summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp6
-rw-r--r--korganizer/calendarview.cpp16
2 files changed, 17 insertions, 5 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index eba74a6..20b107e 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2865,26 +2865,28 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
return 1;
if ( lastSync > localMod )
return 2;
return 1;
break;
case SYNC_PREF_REMOTE:
- if ( lastSync > remoteMod )
- return 1;
if ( lastSync > localMod )
return 2;
+ if ( lastSync > remoteMod )
+ return 1;
return 2;
break;
case SYNC_PREF_NEWEST:
if ( localMod > remoteMod )
return 1;
else
return 2;
break;
case SYNC_PREF_ASK:
//qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
+ if ( lastSync > remoteMod && lastSync > localMod)
+ return 0;
if ( lastSync > remoteMod )
return 1;
if ( lastSync > localMod ) {
return 2;
}
localIsNew = localMod >= remoteMod;
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp
index 76cce26..00ef145 100644
--- a/korganizer/calendarview.cpp
+++ b/korganizer/calendarview.cpp
@@ -813,38 +813,48 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b
//qDebug("not equal %s %s ", local->summary().latin1(), remote->summary().latin1());
}
int result;
bool localIsNew;
//qDebug("%s -- %s mLastCalendarSync %s lastsync %s --- local %s remote %s ",local->summary().latin1(), remote->summary().latin1(),mLastCalendarSync.toString().latin1() ,lastSync.toString().latin1() , localMod.toString().latin1() , remoteMod.toString().latin1() );
+
+ // ************************************************
+ // ************************************************
+ // ************************************************
+ // We may have that lastSync > remoteMod AND lastSync > localMod
+ // BUT remoteMod != localMod
+
+
if ( full && mode < SYNC_PREF_NEWEST )
mode = SYNC_PREF_ASK;
switch( mode ) {
case SYNC_PREF_LOCAL:
if ( lastSync > remoteMod )
return 1;
if ( lastSync > localMod )
return 2;
return 1;
break;
case SYNC_PREF_REMOTE:
- if ( lastSync > remoteMod )
- return 1;
if ( lastSync > localMod )
return 2;
+ if ( lastSync > remoteMod )
+ return 1;
return 2;
break;
case SYNC_PREF_NEWEST:
- if ( localMod > remoteMod )
+ if ( localMod >= remoteMod )
return 1;
else
return 2;
break;
case SYNC_PREF_ASK:
//qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
+ if ( lastSync > remoteMod && lastSync > localMod)
+ return 0;
if ( lastSync > remoteMod )
return 1;
if ( lastSync > localMod )
return 2;
//qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() );
localIsNew = localMod >= remoteMod;