author | zautrix <zautrix> | 2005-06-29 16:14:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-29 16:14:46 (UTC) |
commit | 77aa480c9891a90c9b492618ebfd2b20f2d0727a (patch) (unidiff) | |
tree | 4f2c278d016fe21f280f8ee6abbca34685aada96 /libkdepim | |
parent | e0fa858c284dddf0d47146e666c4ece7158487be (diff) | |
download | kdepimpi-77aa480c9891a90c9b492618ebfd2b20f2d0727a.zip kdepimpi-77aa480c9891a90c9b492618ebfd2b20f2d0727a.tar.gz kdepimpi-77aa480c9891a90c9b492618ebfd2b20f2d0727a.tar.bz2 |
many sync fixes
-rw-r--r-- | libkdepim/externalapphandler.cpp | 12 | ||||
-rw-r--r-- | libkdepim/externalapphandler.h | 1 | ||||
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 18 |
3 files changed, 20 insertions, 11 deletions
diff --git a/libkdepim/externalapphandler.cpp b/libkdepim/externalapphandler.cpp index 0e9c5e5..2ce6926 100644 --- a/libkdepim/externalapphandler.cpp +++ b/libkdepim/externalapphandler.cpp | |||
@@ -25,16 +25,17 @@ | |||
25 | Enhanced Version of the file for platform independent KDE tools. | 25 | Enhanced Version of the file for platform independent KDE tools. |
26 | Copyright (c) 2004 Ulf Schenk | 26 | Copyright (c) 2004 Ulf Schenk |
27 | 27 | ||
28 | $Id$ | 28 | $Id$ |
29 | */ | 29 | */ |
30 | #include <stdlib.h> | 30 | #include <stdlib.h> |
31 | 31 | ||
32 | #include <qfile.h> | 32 | #include <qfile.h> |
33 | #include <qtimer.h> | ||
33 | #include <qmap.h> | 34 | #include <qmap.h> |
34 | #include <qregexp.h> | 35 | #include <qregexp.h> |
35 | 36 | ||
36 | #ifndef DESKTOP_VERSION | 37 | #ifndef DESKTOP_VERSION |
37 | #include <qpe/qpeapplication.h> | 38 | #include <qpe/qpeapplication.h> |
38 | #include <qtopia/qcopenvelope_qws.h> | 39 | #include <qtopia/qcopenvelope_qws.h> |
39 | #else | 40 | #else |
40 | #include <qapplication.h> | 41 | #include <qapplication.h> |
@@ -1124,25 +1125,30 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete | |||
1124 | 1125 | ||
1125 | 1126 | ||
1126 | /************************************************************************** | 1127 | /************************************************************************** |
1127 | * | 1128 | * |
1128 | **************************************************************************/ | 1129 | **************************************************************************/ |
1129 | 1130 | ||
1130 | void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) | 1131 | void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) |
1131 | { | 1132 | { |
1132 | 1133 | qDebug("ExternalAppHandler::appMessage %s %x", cmsg.data(), this); | |
1133 | if ( cmsg == "nextView()" ) { | 1134 | if ( cmsg == "nextView()" ) { |
1134 | qDebug("nextView()"); | 1135 | qDebug("nextView()"); |
1135 | emit nextView(); | 1136 | QTimer::singleShot( 0, this, SIGNAL ( nextView() )); |
1136 | return; | 1137 | return; |
1137 | } | 1138 | } |
1138 | if ( cmsg == "callContactdialog()" ) { | 1139 | if ( cmsg == "callContactdialog()" ) { |
1139 | qDebug("callContactdialog()"); | 1140 | qDebug("callContactdialog()"); |
1140 | emit callContactdialog(); | 1141 | QTimer::singleShot( 0, this, SIGNAL ( callContactdialog() )); |
1142 | return; | ||
1143 | } | ||
1144 | if ( cmsg == "doRingSync" ) { | ||
1145 | qDebug("doRingSync"); | ||
1146 | QTimer::singleShot( 0, this, SIGNAL ( doRingSync() )); | ||
1141 | return; | 1147 | return; |
1142 | } | 1148 | } |
1143 | 1149 | ||
1144 | bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); | 1150 | bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); |
1145 | if (!res) | 1151 | if (!res) |
1146 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); | 1152 | res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); |
1147 | 1153 | ||
1148 | if (!res) | 1154 | if (!res) |
diff --git a/libkdepim/externalapphandler.h b/libkdepim/externalapphandler.h index 097f306..b899ad7 100644 --- a/libkdepim/externalapphandler.h +++ b/libkdepim/externalapphandler.h | |||
@@ -230,16 +230,17 @@ class ExternalAppHandler : public QObject | |||
230 | 230 | ||
231 | public slots: | 231 | public slots: |
232 | void appMessage( const QCString& msg, const QByteArray& data ); | 232 | void appMessage( const QCString& msg, const QByteArray& data ); |
233 | 233 | ||
234 | 234 | ||
235 | signals: | 235 | signals: |
236 | void callContactdialog(); | 236 | void callContactdialog(); |
237 | void nextView(); | 237 | void nextView(); |
238 | void doRingSync(); | ||
238 | // Emmitted when the target app receives a request from the source app | 239 | // Emmitted when the target app receives a request from the source app |
239 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); | 240 | void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); |
240 | 241 | ||
241 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi | 242 | // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi |
242 | // The first parameter is a uniqueid. It can be used to identify the event | 243 | // The first parameter is a uniqueid. It can be used to identify the event |
243 | void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); | 244 | void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); |
244 | 245 | ||
245 | void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); | 246 | void requestFindByEmail(const QString& sourceChannel, const QString& uid, const QString& email); |
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index db815d6..038e032 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp | |||
@@ -516,24 +516,26 @@ void KSyncManager::quickSyncLocalFile() | |||
516 | } | 516 | } |
517 | } | 517 | } |
518 | 518 | ||
519 | void KSyncManager::multiSync( bool askforPrefs ) | 519 | void KSyncManager::multiSync( bool askforPrefs ) |
520 | { | 520 | { |
521 | if (blockSave()) | 521 | if (blockSave()) |
522 | return; | 522 | return; |
523 | setBlockSave(true); | 523 | setBlockSave(true); |
524 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); | 524 | if ( askforPrefs ) { |
525 | if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"), | 525 | QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); |
526 | question, | 526 | if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"), |
527 | i18n("Yes"), i18n("No"), | 527 | question, |
528 | 0, 0 ) != 0 ) { | 528 | i18n("Yes"), i18n("No"), |
529 | setBlockSave(false); | 529 | 0, 0 ) != 0 ) { |
530 | mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!")); | 530 | setBlockSave(false); |
531 | return; | 531 | mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!")); |
532 | return; | ||
533 | } | ||
532 | } | 534 | } |
533 | mCurrentSyncDevice = i18n("Multiple profiles") ; | 535 | mCurrentSyncDevice = i18n("Multiple profiles") ; |
534 | mSyncAlgoPrefs = mPrefs->mRingSyncAlgoPrefs; | 536 | mSyncAlgoPrefs = mPrefs->mRingSyncAlgoPrefs; |
535 | if ( askforPrefs ) { | 537 | if ( askforPrefs ) { |
536 | if ( !edit_sync_options()) { | 538 | if ( !edit_sync_options()) { |
537 | mParent->topLevelWidget()->setCaption( i18n("Syncing aborted.") ); | 539 | mParent->topLevelWidget()->setCaption( i18n("Syncing aborted.") ); |
538 | return; | 540 | return; |
539 | } | 541 | } |