author | zautrix <zautrix> | 2005-04-03 22:00:17 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-04-03 22:00:17 (UTC) |
commit | 30359da3c126e67f6c75400323fcca4c159c3d93 (patch) (unidiff) | |
tree | 71fbc8d5574ebe5156171af935f9c5da99d9ffcf | |
parent | 23d4df2516068bfbf8d968b94763d0a6d6e13271 (diff) | |
download | kdepimpi-30359da3c126e67f6c75400323fcca4c159c3d93.zip kdepimpi-30359da3c126e67f6c75400323fcca4c159c3d93.tar.gz kdepimpi-30359da3c126e67f6c75400323fcca4c159c3d93.tar.bz2 |
sync fixes
-rw-r--r-- | kaddressbook/kabcore.cpp | 6 | ||||
-rw-r--r-- | korganizer/calendarview.cpp | 16 |
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 | |||
@@ -2869,8 +2869,8 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i | |||
2869 | break; | 2869 | break; |
2870 | case SYNC_PREF_REMOTE: | 2870 | case SYNC_PREF_REMOTE: |
2871 | if ( lastSync > remoteMod ) | ||
2872 | return 1; | ||
2873 | if ( lastSync > localMod ) | 2871 | if ( lastSync > localMod ) |
2874 | return 2; | 2872 | return 2; |
2873 | if ( lastSync > remoteMod ) | ||
2874 | return 1; | ||
2875 | return 2; | 2875 | return 2; |
2876 | break; | 2876 | break; |
@@ -2883,4 +2883,6 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i | |||
2883 | case SYNC_PREF_ASK: | 2883 | case SYNC_PREF_ASK: |
2884 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 2884 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
2885 | if ( lastSync > remoteMod && lastSync > localMod) | ||
2886 | return 0; | ||
2885 | if ( lastSync > remoteMod ) | 2887 | if ( lastSync > remoteMod ) |
2886 | return 1; | 2888 | return 1; |
diff --git a/korganizer/calendarview.cpp b/korganizer/calendarview.cpp index 76cce26..00ef145 100644 --- a/korganizer/calendarview.cpp +++ b/korganizer/calendarview.cpp | |||
@@ -817,4 +817,12 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b | |||
817 | //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() ); | 817 | //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() ); |
818 | 818 | ||
819 | |||
820 | // ************************************************ | ||
821 | // ************************************************ | ||
822 | // ************************************************ | ||
823 | // We may have that lastSync > remoteMod AND lastSync > localMod | ||
824 | // BUT remoteMod != localMod | ||
825 | |||
826 | |||
819 | if ( full && mode < SYNC_PREF_NEWEST ) | 827 | if ( full && mode < SYNC_PREF_NEWEST ) |
820 | mode = SYNC_PREF_ASK; | 828 | mode = SYNC_PREF_ASK; |
@@ -829,12 +837,12 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b | |||
829 | break; | 837 | break; |
830 | case SYNC_PREF_REMOTE: | 838 | case SYNC_PREF_REMOTE: |
831 | if ( lastSync > remoteMod ) | ||
832 | return 1; | ||
833 | if ( lastSync > localMod ) | 839 | if ( lastSync > localMod ) |
834 | return 2; | 840 | return 2; |
841 | if ( lastSync > remoteMod ) | ||
842 | return 1; | ||
835 | return 2; | 843 | return 2; |
836 | break; | 844 | break; |
837 | case SYNC_PREF_NEWEST: | 845 | case SYNC_PREF_NEWEST: |
838 | if ( localMod > remoteMod ) | 846 | if ( localMod >= remoteMod ) |
839 | return 1; | 847 | return 1; |
840 | else | 848 | else |
@@ -843,4 +851,6 @@ int CalendarView::takeEvent( Incidence* local, Incidence* remote, int mode , b | |||
843 | case SYNC_PREF_ASK: | 851 | case SYNC_PREF_ASK: |
844 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); | 852 | //qDebug("lsy %s --- lo %s --- re %s ", lastSync.toString().latin1(), localMod.toString().latin1(), remoteMod.toString().latin1() ); |
853 | if ( lastSync > remoteMod && lastSync > localMod) | ||
854 | return 0; | ||
845 | if ( lastSync > remoteMod ) | 855 | if ( lastSync > remoteMod ) |
846 | return 1; | 856 | return 1; |