summaryrefslogtreecommitdiffabout
path: root/korganizer
authorzautrix <zautrix>2005-07-09 12:00:17 (UTC)
committer zautrix <zautrix>2005-07-09 12:00:17 (UTC)
commitfa0b6f9dae69ae7ac610b2bc97ca79b74d04f5e5 (patch) (side-by-side diff)
treeb8d4b3cec0f447fb2930fe2ab9cd191bf7e015d0 /korganizer
parent2e2d9a949b8273ad52b09ffdf2c9250acfdbe6db (diff)
downloadkdepimpi-fa0b6f9dae69ae7ac610b2bc97ca79b74d04f5e5.zip
kdepimpi-fa0b6f9dae69ae7ac610b2bc97ca79b74d04f5e5.tar.gz
kdepimpi-fa0b6f9dae69ae7ac610b2bc97ca79b74d04f5e5.tar.bz2
fixx
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/calendarview.cpp34
1 files changed, 18 insertions, 16 deletions
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index a350c3b..7044e90 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -1441,7 +1441,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
QString idS;
qApp->processEvents();
if ( !skipIncidence ) {
- inL = local->incidence( uid );
+ inL = local->incidenceForUid( uid , false );
if ( inL ) { // maybe conflict - same uid in both calendars
if ( (take = takeEvent( inL, inR, mode, fullDateRange )) > 0 ) {
//qDebug("take %d %s ", take, inL->summary().latin1());
@@ -1464,21 +1464,23 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
inR->setPilotId( 2 );
++changedRemote;
} else {// take remote **********************
- idS = inL->IDStr();
- int pid = inL->pilotId();
- int calID = inL->calID();
- local->deleteIncidence( inL );
- inL = inR->clone();
- inL->setCalID( calID );
- if ( mSyncManager->syncWithDesktop() )
- inL->setPilotId( pid );
- inL->setIDStr( idS );
- if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
- inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
- inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
+ if ( !inL->isReadOnly() ) {
+ idS = inL->IDStr();
+ int pid = inL->pilotId();
+ int calID = inL->calID();
+ local->deleteIncidence( inL );
+ inL = inR->clone();
+ inL->setCalID( calID );
+ if ( mSyncManager->syncWithDesktop() )
+ inL->setPilotId( pid );
+ inL->setIDStr( idS );
+ if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) {
+ inL->setCsum( mCurrentSyncDevice, inR->getCsum(mCurrentSyncDevice) );
+ inL->setID( mCurrentSyncDevice, inR->getID(mCurrentSyncDevice) );
+ }
+ local->addIncidence( inL );
+ ++changedLocal;
}
- local->addIncidence( inL );
- ++changedLocal;
}
}
} else { // no conflict ********** add or delete remote
@@ -1549,7 +1551,7 @@ bool CalendarView::synchronizeCalendar( Calendar* local, Calendar* remote, int
if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL && inL->typeID() == journalID )
skipIncidence = true;
if ( !skipIncidence ) {
- inR = remote->incidence( uid );
+ inR = remote->incidenceForUid( uid , true );
if ( ! inR ) {
if ( !filterOUT || filterOUT->filterCalendarItem( inL ) ){
// no conflict ********** add or delete local