summaryrefslogtreecommitdiffabout
path: root/kaddressbook
authorzautrix <zautrix>2005-04-03 22:00:17 (UTC)
committer zautrix <zautrix>2005-04-03 22:00:17 (UTC)
commit30359da3c126e67f6c75400323fcca4c159c3d93 (patch) (unidiff)
tree71fbc8d5574ebe5156171af935f9c5da99d9ffcf /kaddressbook
parent23d4df2516068bfbf8d968b94763d0a6d6e13271 (diff)
downloadkdepimpi-30359da3c126e67f6c75400323fcca4c159c3d93.zip
kdepimpi-30359da3c126e67f6c75400323fcca4c159c3d93.tar.gz
kdepimpi-30359da3c126e67f6c75400323fcca4c159c3d93.tar.bz2
sync fixes
Diffstat (limited to 'kaddressbook') (more/less context) (ignore whitespace changes)
-rw-r--r--kaddressbook/kabcore.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp
index eba74a6..20b107e 100644
--- a/kaddressbook/kabcore.cpp
+++ b/kaddressbook/kabcore.cpp
@@ -2859,38 +2859,40 @@ int KABCore::takeAddressee( KABC::Addressee* local, KABC::Addressee* remote, i
2859 if ( full && mode < SYNC_PREF_NEWEST ) 2859 if ( full && mode < SYNC_PREF_NEWEST )
2860 mode = SYNC_PREF_ASK; 2860 mode = SYNC_PREF_ASK;
2861 2861
2862 switch( mode ) { 2862 switch( mode ) {
2863 case SYNC_PREF_LOCAL: 2863 case SYNC_PREF_LOCAL:
2864 if ( lastSync > remoteMod ) 2864 if ( lastSync > remoteMod )
2865 return 1; 2865 return 1;
2866 if ( lastSync > localMod ) 2866 if ( lastSync > localMod )
2867 return 2; 2867 return 2;
2868 return 1; 2868 return 1;
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;
2877 case SYNC_PREF_NEWEST: 2877 case SYNC_PREF_NEWEST:
2878 if ( localMod > remoteMod ) 2878 if ( localMod > remoteMod )
2879 return 1; 2879 return 1;
2880 else 2880 else
2881 return 2; 2881 return 2;
2882 break; 2882 break;
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;
2887 if ( lastSync > localMod ) { 2889 if ( lastSync > localMod ) {
2888 return 2; 2890 return 2;
2889 } 2891 }
2890 localIsNew = localMod >= remoteMod; 2892 localIsNew = localMod >= remoteMod;
2891 //qDebug("conflict! ************************************** "); 2893 //qDebug("conflict! ************************************** ");
2892 { 2894 {
2893 KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this ); 2895 KABC::AddresseeChooser acd ( *local,*remote, localIsNew , this );
2894 result = acd.executeD(localIsNew); 2896 result = acd.executeD(localIsNew);
2895 return result; 2897 return result;
2896 } 2898 }