author | zautrix <zautrix> | 2004-10-28 12:14:23 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-28 12:14:23 (UTC) |
commit | 2a5dfaf6f91534043ab9baa172b077c5ccef63ae (patch) (unidiff) | |
tree | ad8a5a7dfb9c67707d255d97a063e006958b6796 | |
parent | af21c3d45173ece8492850b8c2c5019e7c25d59c (diff) | |
download | kdepimpi-2a5dfaf6f91534043ab9baa172b077c5ccef63ae.zip kdepimpi-2a5dfaf6f91534043ab9baa172b077c5ccef63ae.tar.gz kdepimpi-2a5dfaf6f91534043ab9baa172b077c5ccef63ae.tar.bz2 |
compile fixes
-rw-r--r-- | bin/kdepim/WhatsNew.txt | 4 | ||||
-rw-r--r-- | kaddressbook/kabcore.cpp | 2 |
2 files changed, 5 insertions, 1 deletions
diff --git a/bin/kdepim/WhatsNew.txt b/bin/kdepim/WhatsNew.txt index 41b3e45..c61a322 100644 --- a/bin/kdepim/WhatsNew.txt +++ b/bin/kdepim/WhatsNew.txt | |||
@@ -1,132 +1,136 @@ | |||
1 | Info about the changes in new versions of KDE-Pim/Pi | 1 | Info about the changes in new versions of KDE-Pim/Pi |
2 | 2 | ||
3 | ********** VERSION 1.9.11 ************ | 3 | ********** VERSION 1.9.11 ************ |
4 | 4 | ||
5 | Fixed several problems in PWM/Pi, like | 5 | Fixed several problems in PWM/Pi, like |
6 | asking the user, if unsaved changed are pending | 6 | asking the user, if unsaved changed are pending |
7 | when closing the app. | 7 | when closing the app. |
8 | 8 | ||
9 | Fixed a crash in KO/Pi , when importing/loading vcs files | 9 | Fixed a crash in KO/Pi , when importing/loading vcs files |
10 | which have an entry with an attendee with state: | 10 | which have an entry with an attendee with state: |
11 | NEEDS ACTION | 11 | NEEDS ACTION |
12 | 12 | ||
13 | Fixed some problems in the German translation of OM/Pi, | 13 | Fixed some problems in the German translation of OM/Pi, |
14 | which makes some dialogs not fitting on the screen | 14 | which makes some dialogs not fitting on the screen |
15 | of the Z 5500. | 15 | of the Z 5500. |
16 | 16 | ||
17 | Fixed Qtopia crash, when disabling/deinstalling | 17 | Fixed Qtopia crash, when disabling/deinstalling |
18 | KO/Pi alarm applet. | 18 | KO/Pi alarm applet. |
19 | 19 | ||
20 | Implemented direct KDE<->KA/Pi sync for KA/Pi running | 20 | Implemented direct KDE<->KA/Pi sync for KA/Pi running |
21 | on Linux desktop. | 21 | on Linux desktop. |
22 | 22 | ||
23 | Added "remove sync info" to sync menu. | 23 | Added "remove sync info" to sync menu. |
24 | 24 | ||
25 | Tweaked the KO/Pi What's next view a bit, added | 25 | Tweaked the KO/Pi What's next view a bit, added |
26 | setting to hide events that are done. | 26 | setting to hide events that are done. |
27 | 27 | ||
28 | Disabled "beam receive enabled" on startup to | 28 | Disabled "beam receive enabled" on startup to |
29 | avoid problems if Fastload is enabled. | 29 | avoid problems if Fastload is enabled. |
30 | Please set "beam receive enabled", | 30 | Please set "beam receive enabled", |
31 | if you want to receive data via IR. | 31 | if you want to receive data via IR. |
32 | 32 | ||
33 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running | 33 | Fixed bug in direct KDE<->KO/Pi sync for KO/Pi running |
34 | on Linux desktop. | 34 | on Linux desktop. |
35 | 35 | ||
36 | Made in KA/Pi scrolling possible, if details view is selected. | 36 | Made in KA/Pi scrolling possible, if details view is selected. |
37 | (The keyboard focus is set automatically to the search line) | ||
38 | |||
39 | Fixed a bug in DMT sync, that a new entry in DTM was added | ||
40 | on every sync to Kx/Pi. | ||
37 | 41 | ||
38 | 42 | ||
39 | 43 | ||
40 | 44 | ||
41 | ********** VERSION 1.9.10 ************ | 45 | ********** VERSION 1.9.10 ************ |
42 | 46 | ||
43 | Many internal small bugfixes. | 47 | Many internal small bugfixes. |
44 | And fix of the "big" bug in KO/Pi, | 48 | And fix of the "big" bug in KO/Pi, |
45 | that after Syncing the appointments had an offset by several hours. | 49 | that after Syncing the appointments had an offset by several hours. |
46 | That was a problem with the internal timezone setting, | 50 | That was a problem with the internal timezone setting, |
47 | introduced by the changed timezone configuration settings. | 51 | introduced by the changed timezone configuration settings. |
48 | 52 | ||
49 | German translation for OM/Pi is now available. | 53 | German translation for OM/Pi is now available. |
50 | 54 | ||
51 | 55 | ||
52 | ********** VERSION 1.9.9 ************ | 56 | ********** VERSION 1.9.9 ************ |
53 | 57 | ||
54 | KDE-Pim/Pi has a new Member! | 58 | KDE-Pim/Pi has a new Member! |
55 | It is called PWM/Pi (Passwordmanager/platform-independent) | 59 | It is called PWM/Pi (Passwordmanager/platform-independent) |
56 | and it is available for the Zaurus. | 60 | and it is available for the Zaurus. |
57 | It is planned, that it will be available later for Windows. | 61 | It is planned, that it will be available later for Windows. |
58 | (And for Linux, of course). | 62 | (And for Linux, of course). |
59 | It is a port of the Passwordmanager of KDE. | 63 | It is a port of the Passwordmanager of KDE. |
60 | It will need the MicroKDElibs to run. | 64 | It will need the MicroKDElibs to run. |
61 | 65 | ||
62 | Made loading of addressbooks in KA/Pi up to 7 times faster! | 66 | Made loading of addressbooks in KA/Pi up to 7 times faster! |
63 | The bigger your addressbook file, the more starting speed | 67 | The bigger your addressbook file, the more starting speed |
64 | will you gain. (relatively) | 68 | will you gain. (relatively) |
65 | 69 | ||
66 | The Qtopia addressbook connector is now platform independend | 70 | The Qtopia addressbook connector is now platform independend |
67 | as well and should work on any platform for importing/exporting | 71 | as well and should work on any platform for importing/exporting |
68 | Qtopia and Opie XML files. | 72 | Qtopia and Opie XML files. |
69 | 73 | ||
70 | Added a +30min feature to the timezone settings to make | 74 | Added a +30min feature to the timezone settings to make |
71 | KDE-Pim/Pi useable in Australia and other parts on the | 75 | KDE-Pim/Pi useable in Australia and other parts on the |
72 | world with strange timezones ;-) | 76 | world with strange timezones ;-) |
73 | 77 | ||
74 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. | 78 | German "Umlaute" should now be sorted correctly on the Z in KA/Pi. |
75 | 79 | ||
76 | It is now possible to disable the | 80 | It is now possible to disable the |
77 | "receive data via infrared" feature, such that syncing with | 81 | "receive data via infrared" feature, such that syncing with |
78 | Outlook is now possible again with Kx/Pi runing. | 82 | Outlook is now possible again with Kx/Pi runing. |
79 | Please disable it, before syncing Sharp DTM with Outlook. | 83 | Please disable it, before syncing Sharp DTM with Outlook. |
80 | For your convenience, the "receive data via infrared" feature | 84 | For your convenience, the "receive data via infrared" feature |
81 | is disabled automatically, if you sync Kx/Pi with DTM. | 85 | is disabled automatically, if you sync Kx/Pi with DTM. |
82 | You have to enable it again manually after syncing. | 86 | You have to enable it again manually after syncing. |
83 | Enabling this feature makes it impossible to start the | 87 | Enabling this feature makes it impossible to start the |
84 | Sharp DTM apps. If this feature is enabled, you will only get the | 88 | Sharp DTM apps. If this feature is enabled, you will only get the |
85 | alarm notification from KO/Pi and not from the Sharp calendar. | 89 | alarm notification from KO/Pi and not from the Sharp calendar. |
86 | This is very useful if you sync KO/Pi with Sharp DTM, | 90 | This is very useful if you sync KO/Pi with Sharp DTM, |
87 | because after syncing you usually would get notified about | 91 | because after syncing you usually would get notified about |
88 | an alarm by KO/Pi and the Sharp Calendar. | 92 | an alarm by KO/Pi and the Sharp Calendar. |
89 | 93 | ||
90 | Together with the Linux desktop version of KO/Pi | 94 | Together with the Linux desktop version of KO/Pi |
91 | it is now possible to sync KO/Pi on the Zaurus | 95 | it is now possible to sync KO/Pi on the Zaurus |
92 | with the complete KDE-desktop (3.3 or later) | 96 | with the complete KDE-desktop (3.3 or later) |
93 | calendar data easily. | 97 | calendar data easily. |
94 | That makes it possible to sync the Z with one | 98 | That makes it possible to sync the Z with one |
95 | click of a mouse with the KDE-Desktop. | 99 | click of a mouse with the KDE-Desktop. |
96 | This feature it available for all Zaurus platforms KO/Pi | 100 | This feature it available for all Zaurus platforms KO/Pi |
97 | is running on. | 101 | is running on. |
98 | The only thing needed is a running KO/Pi on Linux and | 102 | The only thing needed is a running KO/Pi on Linux and |
99 | a compiled version of the small | 103 | a compiled version of the small |
100 | KDE-Pim/Pi<->KDE-Desktop access command line program, | 104 | KDE-Pim/Pi<->KDE-Desktop access command line program, |
101 | which is in the KDE-Pim/Pi sources available. | 105 | which is in the KDE-Pim/Pi sources available. |
102 | 106 | ||
103 | The "KDE-desktop" syncing feature for KA/Pi will follow | 107 | The "KDE-desktop" syncing feature for KA/Pi will follow |
104 | in the next releases. | 108 | in the next releases. |
105 | 109 | ||
106 | Fixed the vcard export bug, which had the version 1.9.8. | 110 | Fixed the vcard export bug, which had the version 1.9.8. |
107 | 111 | ||
108 | Added missing GERMAN translation to KO/Pi. | 112 | Added missing GERMAN translation to KO/Pi. |
109 | Hi PsionX, could you add the missing french translation?Thx! | 113 | Hi PsionX, could you add the missing french translation?Thx! |
110 | 114 | ||
111 | Translation files for KA/Pi are available as well. | 115 | Translation files for KA/Pi are available as well. |
112 | GERMAN translation will be available in the next release. | 116 | GERMAN translation will be available in the next release. |
113 | PsionX ( yres, you again ;-) ), could you start translating | 117 | PsionX ( yres, you again ;-) ), could you start translating |
114 | KA/Pi? Thx! | 118 | KA/Pi? Thx! |
115 | 119 | ||
116 | You can download the version 1.9.9 at | 120 | You can download the version 1.9.9 at |
117 | 121 | ||
118 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 | 122 | http://sourceforge.net/project/showfiles.php?group_id=104103&package_id=112604 |
119 | 123 | ||
120 | Note: | 124 | Note: |
121 | To run the mail program OM/Pi you need libopenssl. | 125 | To run the mail program OM/Pi you need libopenssl. |
122 | A link to a download loaction is available at | 126 | A link to a download loaction is available at |
123 | ZSI at www.killefiz.de | 127 | ZSI at www.killefiz.de |
124 | 128 | ||
125 | 129 | ||
126 | ********** VERSION 1.9.8 ************ | 130 | ********** VERSION 1.9.8 ************ |
127 | 131 | ||
128 | Fixed character decoding in OM/Pi. | 132 | Fixed character decoding in OM/Pi. |
129 | (e.g. German "Umlaute" were not displayed properly.) | 133 | (e.g. German "Umlaute" were not displayed properly.) |
130 | 134 | ||
131 | Made is possible to reparent todos in KO/Pi. | 135 | Made is possible to reparent todos in KO/Pi. |
132 | Use contextmenu or keys (look at Help-Keys + Colors) for that. | 136 | Use contextmenu or keys (look at Help-Keys + Colors) for that. |
diff --git a/kaddressbook/kabcore.cpp b/kaddressbook/kabcore.cpp index c75b4bc..9ef97c9 100644 --- a/kaddressbook/kabcore.cpp +++ b/kaddressbook/kabcore.cpp | |||
@@ -2642,193 +2642,193 @@ bool KABCore::synchronizeAddressbooks( KABC::AddressBook* local, KABC::AddressBo | |||
2642 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | 2642 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); |
2643 | local->insertAddressee( inL, false ); | 2643 | local->insertAddressee( inL, false ); |
2644 | idS = inR.externalUID(); | 2644 | idS = inR.externalUID(); |
2645 | OidS = inR.originalExternalUID(); | 2645 | OidS = inR.originalExternalUID(); |
2646 | } | 2646 | } |
2647 | else | 2647 | else |
2648 | idS = inR.IDStr(); | 2648 | idS = inR.IDStr(); |
2649 | remote->removeAddressee( inR ); | 2649 | remote->removeAddressee( inR ); |
2650 | inR = inL; | 2650 | inR = inL; |
2651 | inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); | 2651 | inR.setTempSyncStat( SYNC_TEMPSTATE_INITIAL ); |
2652 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2652 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2653 | inR.setOriginalExternalUID( OidS ); | 2653 | inR.setOriginalExternalUID( OidS ); |
2654 | inR.setExternalUID( idS ); | 2654 | inR.setExternalUID( idS ); |
2655 | if ( syncManager->syncWithDesktop() ) | 2655 | if ( syncManager->syncWithDesktop() ) |
2656 | inR.setIDStr("changed" ); | 2656 | inR.setIDStr("changed" ); |
2657 | //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); | 2657 | //inR.insertCustom( "KADDRESSBOOK", "X-KDESYNC","changed" ); |
2658 | } else { | 2658 | } else { |
2659 | inR.setIDStr( idS ); | 2659 | inR.setIDStr( idS ); |
2660 | } | 2660 | } |
2661 | inR.setResource( 0 ); | 2661 | inR.setResource( 0 ); |
2662 | remote->insertAddressee( inR , false); | 2662 | remote->insertAddressee( inR , false); |
2663 | ++changedRemote; | 2663 | ++changedRemote; |
2664 | } else { // take == 2 take remote ********************** | 2664 | } else { // take == 2 take remote ********************** |
2665 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2665 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2666 | if ( inR.revision().date().year() < 2004 ) | 2666 | if ( inR.revision().date().year() < 2004 ) |
2667 | inR.setRevision( modifiedCalendar ); | 2667 | inR.setRevision( modifiedCalendar ); |
2668 | } | 2668 | } |
2669 | idS = inL.IDStr(); | 2669 | idS = inL.IDStr(); |
2670 | local->removeAddressee( inL ); | 2670 | local->removeAddressee( inL ); |
2671 | inL = inR; | 2671 | inL = inR; |
2672 | inL.setIDStr( idS ); | 2672 | inL.setIDStr( idS ); |
2673 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2673 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2674 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); | 2674 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); |
2675 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | 2675 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); |
2676 | } | 2676 | } |
2677 | inL.setResource( 0 ); | 2677 | inL.setResource( 0 ); |
2678 | local->insertAddressee( inL , false ); | 2678 | local->insertAddressee( inL , false ); |
2679 | ++changedLocal; | 2679 | ++changedLocal; |
2680 | } | 2680 | } |
2681 | } | 2681 | } |
2682 | } | 2682 | } |
2683 | } else { // no conflict ********** add or delete remote | 2683 | } else { // no conflict ********** add or delete remote |
2684 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2684 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2685 | QString des = addresseeLSync.note(); | 2685 | QString des = addresseeLSync.note(); |
2686 | if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it | 2686 | if ( des.find( inR.getID(mCurrentSyncDevice) +"," ) >= 0 && mode != 5) { // delete it |
2687 | inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); | 2687 | inR.setTempSyncStat( SYNC_TEMPSTATE_DELETE ); |
2688 | remote->insertAddressee( inR, false ); | 2688 | remote->insertAddressee( inR, false ); |
2689 | ++deletedAddresseeR; | 2689 | ++deletedAddresseeR; |
2690 | } else { | 2690 | } else { |
2691 | inR.setRevision( modifiedCalendar ); | 2691 | inR.setRevision( modifiedCalendar ); |
2692 | remote->insertAddressee( inR, false ); | 2692 | remote->insertAddressee( inR, false ); |
2693 | inL = inR; | 2693 | inL = inR; |
2694 | inL.setIDStr( ":" ); | 2694 | inL.setIDStr( ":" ); |
2695 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); | 2695 | inL.setCsum( mCurrentSyncDevice, inR.getCsum(mCurrentSyncDevice) ); |
2696 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); | 2696 | inL.setID( mCurrentSyncDevice, inR.getID(mCurrentSyncDevice) ); |
2697 | inL.setResource( 0 ); | 2697 | inL.setResource( 0 ); |
2698 | local->insertAddressee( inL , false); | 2698 | local->insertAddressee( inL , false); |
2699 | ++addedAddressee; | 2699 | ++addedAddressee; |
2700 | } | 2700 | } |
2701 | } else { | 2701 | } else { |
2702 | if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { | 2702 | if ( inR.revision() > mLastAddressbookSync || mode == 5 ) { |
2703 | inR.setRevision( modifiedCalendar ); | 2703 | inR.setRevision( modifiedCalendar ); |
2704 | remote->insertAddressee( inR, false ); | 2704 | remote->insertAddressee( inR, false ); |
2705 | inR.setResource( 0 ); | 2705 | inR.setResource( 0 ); |
2706 | local->insertAddressee( inR, false ); | 2706 | local->insertAddressee( inR, false ); |
2707 | ++addedAddressee; | 2707 | ++addedAddressee; |
2708 | } else { | 2708 | } else { |
2709 | // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); | 2709 | // pending checkExternSyncAddressee(addresseeRSyncSharp, inR); |
2710 | remote->removeAddressee( inR ); | 2710 | remote->removeAddressee( inR ); |
2711 | ++deletedAddresseeR; | 2711 | ++deletedAddresseeR; |
2712 | } | 2712 | } |
2713 | } | 2713 | } |
2714 | } | 2714 | } |
2715 | } | 2715 | } |
2716 | ++incCounter; | 2716 | ++incCounter; |
2717 | } | 2717 | } |
2718 | er.clear(); | 2718 | er.clear(); |
2719 | QStringList el = local->uidList(); | 2719 | QStringList el = local->uidList(); |
2720 | modulo = (el.count()/10)+1; | 2720 | modulo = (el.count()/10)+1; |
2721 | 2721 | ||
2722 | syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); | 2722 | syncManager->showProgressBar(0, i18n("Add / remove addressees"), el.count()); |
2723 | incCounter = 0; | 2723 | incCounter = 0; |
2724 | while ( incCounter < el.count()) { | 2724 | while ( incCounter < el.count()) { |
2725 | qApp->processEvents(); | 2725 | qApp->processEvents(); |
2726 | if (syncManager->isProgressBarCanceled()) | 2726 | if (syncManager->isProgressBarCanceled()) |
2727 | return false; | 2727 | return false; |
2728 | if ( incCounter % modulo == 0 ) | 2728 | if ( incCounter % modulo == 0 ) |
2729 | syncManager->showProgressBar(incCounter); | 2729 | syncManager->showProgressBar(incCounter); |
2730 | uid = el[ incCounter ]; | 2730 | uid = el[ incCounter ]; |
2731 | bool skipIncidence = false; | 2731 | bool skipIncidence = false; |
2732 | if ( uid.left(19) == QString("last-syncAddressee-") ) | 2732 | if ( uid.left(19) == QString("last-syncAddressee-") ) |
2733 | skipIncidence = true; | 2733 | skipIncidence = true; |
2734 | if ( !skipIncidence ) { | 2734 | if ( !skipIncidence ) { |
2735 | inL = local->findByUid( uid ); | 2735 | inL = local->findByUid( uid ); |
2736 | if ( !inL.resource() || inL.resource()->includeInSync() ) { | 2736 | if ( !inL.resource() || inL.resource()->includeInSync() ) { |
2737 | inR = remote->findByUid( uid ); | 2737 | inR = remote->findByUid( uid ); |
2738 | if ( inR.isEmpty() ) { / no conflict ********** add or delete local | 2738 | if ( inR.isEmpty() ) { // no conflict ********** add or delete local |
2739 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { | 2739 | if ( mGlobalSyncMode == SYNC_MODE_EXTERNAL ) { |
2740 | if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { | 2740 | if ( !inL.getID(mCurrentSyncDevice).isEmpty() && mode != 4 ) { |
2741 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); | 2741 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |
2742 | local->removeAddressee( inL ); | 2742 | local->removeAddressee( inL ); |
2743 | ++deletedAddresseeL; | 2743 | ++deletedAddresseeL; |
2744 | } else { | 2744 | } else { |
2745 | if ( ! syncManager->mWriteBackExistingOnly ) { | 2745 | if ( ! syncManager->mWriteBackExistingOnly ) { |
2746 | inL.removeID(mCurrentSyncDevice ); | 2746 | inL.removeID(mCurrentSyncDevice ); |
2747 | ++addedAddresseeR; | 2747 | ++addedAddresseeR; |
2748 | inL.setRevision( modifiedCalendar ); | 2748 | inL.setRevision( modifiedCalendar ); |
2749 | local->insertAddressee( inL, false ); | 2749 | local->insertAddressee( inL, false ); |
2750 | inR = inL; | 2750 | inR = inL; |
2751 | inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); | 2751 | inR.setTempSyncStat( SYNC_TEMPSTATE_ADDED_EXTERNAL ); |
2752 | inR.setResource( 0 ); | 2752 | inR.setResource( 0 ); |
2753 | remote->insertAddressee( inR, false ); | 2753 | remote->insertAddressee( inR, false ); |
2754 | } | 2754 | } |
2755 | } | 2755 | } |
2756 | } else { | 2756 | } else { |
2757 | if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { | 2757 | if ( inL.revision() < mLastAddressbookSync && mode != 4 ) { |
2758 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); | 2758 | // pending checkExternSyncAddressee(addresseeLSyncSharp, inL); |
2759 | local->removeAddressee( inL ); | 2759 | local->removeAddressee( inL ); |
2760 | ++deletedAddresseeL; | 2760 | ++deletedAddresseeL; |
2761 | } else { | 2761 | } else { |
2762 | if ( ! syncManager->mWriteBackExistingOnly ) { | 2762 | if ( ! syncManager->mWriteBackExistingOnly ) { |
2763 | ++addedAddresseeR; | 2763 | ++addedAddresseeR; |
2764 | inL.setRevision( modifiedCalendar ); | 2764 | inL.setRevision( modifiedCalendar ); |
2765 | local->insertAddressee( inL, false ); | 2765 | local->insertAddressee( inL, false ); |
2766 | inR = inL; | 2766 | inR = inL; |
2767 | inR.setIDStr( ":" ); | 2767 | inR.setIDStr( ":" ); |
2768 | inR.setResource( 0 ); | 2768 | inR.setResource( 0 ); |
2769 | remote->insertAddressee( inR, false ); | 2769 | remote->insertAddressee( inR, false ); |
2770 | } | 2770 | } |
2771 | } | 2771 | } |
2772 | } | 2772 | } |
2773 | } | 2773 | } |
2774 | } | 2774 | } |
2775 | } | 2775 | } |
2776 | ++incCounter; | 2776 | ++incCounter; |
2777 | } | 2777 | } |
2778 | el.clear(); | 2778 | el.clear(); |
2779 | syncManager->hideProgressBar(); | 2779 | syncManager->hideProgressBar(); |
2780 | mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); | 2780 | mLastAddressbookSync = QDateTime::currentDateTime().addSecs( 1 ); |
2781 | // get rid of micro seconds | 2781 | // get rid of micro seconds |
2782 | QTime t = mLastAddressbookSync.time(); | 2782 | QTime t = mLastAddressbookSync.time(); |
2783 | mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); | 2783 | mLastAddressbookSync.setTime( QTime (t.hour (), t.minute (), t.second () ) ); |
2784 | addresseeLSync.setRevision( mLastAddressbookSync ); | 2784 | addresseeLSync.setRevision( mLastAddressbookSync ); |
2785 | addresseeRSync.setRevision( mLastAddressbookSync ); | 2785 | addresseeRSync.setRevision( mLastAddressbookSync ); |
2786 | addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; | 2786 | addresseeRSync.setRole( i18n("!Remote from: ")+mCurrentSyncName ) ; |
2787 | addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); | 2787 | addresseeLSync.setRole(i18n("!Local from: ") + mCurrentSyncName ); |
2788 | addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; | 2788 | addresseeRSync.setGivenName( i18n("!DO NOT EDIT!") ) ; |
2789 | addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); | 2789 | addresseeLSync.setGivenName(i18n("!DO NOT EDIT!") ); |
2790 | addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; | 2790 | addresseeRSync.setOrganization( "!"+mLastAddressbookSync.toString() ) ; |
2791 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); | 2791 | addresseeLSync.setOrganization("!"+ mLastAddressbookSync.toString() ); |
2792 | addresseeRSync.setNote( "" ) ; | 2792 | addresseeRSync.setNote( "" ) ; |
2793 | addresseeLSync.setNote( "" ); | 2793 | addresseeLSync.setNote( "" ); |
2794 | 2794 | ||
2795 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) | 2795 | if ( mGlobalSyncMode == SYNC_MODE_NORMAL) |
2796 | remote->insertAddressee( addresseeRSync, false ); | 2796 | remote->insertAddressee( addresseeRSync, false ); |
2797 | local->insertAddressee( addresseeLSync, false ); | 2797 | local->insertAddressee( addresseeLSync, false ); |
2798 | QString mes; | 2798 | QString mes; |
2799 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR ); | 2799 | mes .sprintf( i18n("Synchronization summary:\n\n %d items added to local\n %d items added to remote\n %d items updated on local\n %d items updated on remote\n %d items deleted on local\n %d items deleted on remote\n"),addedAddressee, addedAddresseeR, changedLocal, changedRemote, deletedAddresseeL, deletedAddresseeR ); |
2800 | qDebug( mes ); | 2800 | qDebug( mes ); |
2801 | if ( syncManager->mShowSyncSummary ) { | 2801 | if ( syncManager->mShowSyncSummary ) { |
2802 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, | 2802 | if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(this, mes, |
2803 | i18n("KA/Pi Synchronization"),i18n("Write back"))) { | 2803 | i18n("KA/Pi Synchronization"),i18n("Write back"))) { |
2804 | qDebug("cancelled "); | 2804 | qDebug("cancelled "); |
2805 | return false; | 2805 | return false; |
2806 | } | 2806 | } |
2807 | } | 2807 | } |
2808 | return syncOK; | 2808 | return syncOK; |
2809 | } | 2809 | } |
2810 | 2810 | ||
2811 | 2811 | ||
2812 | //this is a overwritten callbackmethods from the syncinterface | 2812 | //this is a overwritten callbackmethods from the syncinterface |
2813 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) | 2813 | bool KABCore::sync(KSyncManager* manager, QString filename, int mode) |
2814 | { | 2814 | { |
2815 | 2815 | ||
2816 | //pending prepare addresseeview for output | 2816 | //pending prepare addresseeview for output |
2817 | //pending detect, if remote file has REV field. if not switch to external sync | 2817 | //pending detect, if remote file has REV field. if not switch to external sync |
2818 | mGlobalSyncMode = SYNC_MODE_NORMAL; | 2818 | mGlobalSyncMode = SYNC_MODE_NORMAL; |
2819 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); | 2819 | QString mCurrentSyncDevice = manager->getCurrentSyncDevice(); |
2820 | 2820 | ||
2821 | AddressBook abLocal(filename,"syncContact"); | 2821 | AddressBook abLocal(filename,"syncContact"); |
2822 | bool syncOK = false; | 2822 | bool syncOK = false; |
2823 | if ( abLocal.load() ) { | 2823 | if ( abLocal.load() ) { |
2824 | qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode ); | 2824 | qDebug("AB loaded %s,sync mode %d",filename.latin1(), mode ); |
2825 | bool external = false; | 2825 | bool external = false; |
2826 | bool isXML = false; | 2826 | bool isXML = false; |
2827 | if ( filename.right(4) == ".xml") { | 2827 | if ( filename.right(4) == ".xml") { |
2828 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; | 2828 | mGlobalSyncMode = SYNC_MODE_EXTERNAL; |
2829 | isXML = true; | 2829 | isXML = true; |
2830 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); | 2830 | abLocal.preExternSync( mAddressBook ,mCurrentSyncDevice, true ); |
2831 | } else { | 2831 | } else { |
2832 | external = !manager->mIsKapiFile; | 2832 | external = !manager->mIsKapiFile; |
2833 | if ( external ) { | 2833 | if ( external ) { |
2834 | qDebug("Setting vcf mode to external "); | 2834 | qDebug("Setting vcf mode to external "); |