author | zautrix <zautrix> | 2005-06-29 16:14:46 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-06-29 16:14:46 (UTC) |
commit | 77aa480c9891a90c9b492618ebfd2b20f2d0727a (patch) (side-by-side diff) | |
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 @@ Enhanced Version of the file for platform independent KDE tools. Copyright (c) 2004 Ulf Schenk $Id$ */ #include <stdlib.h> #include <qfile.h> +#include <qtimer.h> #include <qmap.h> #include <qregexp.h> #ifndef DESKTOP_VERSION #include <qpe/qpeapplication.h> #include <qtopia/qcopenvelope_qws.h> #else #include <qapplication.h> @@ -1124,25 +1125,30 @@ void ExternalAppHandler::passParameters(QCopEnvelope* e, const QString& paramete /************************************************************************** * **************************************************************************/ void ExternalAppHandler::appMessage( const QCString& cmsg, const QByteArray& data ) { - + qDebug("ExternalAppHandler::appMessage %s %x", cmsg.data(), this); if ( cmsg == "nextView()" ) { qDebug("nextView()"); - emit nextView(); + QTimer::singleShot( 0, this, SIGNAL ( nextView() )); return; } if ( cmsg == "callContactdialog()" ) { qDebug("callContactdialog()"); - emit callContactdialog(); + QTimer::singleShot( 0, this, SIGNAL ( callContactdialog() )); + return; + } + if ( cmsg == "doRingSync" ) { + qDebug("doRingSync"); + QTimer::singleShot( 0, this, SIGNAL ( doRingSync() )); return; } bool res = mNameEmailUidListFromKAPITransfer->appMessage( cmsg, data ); if (!res) res = mBirthdayListFromKAPITransfer->appMessage( cmsg, data ); 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 public slots: void appMessage( const QCString& msg, const QByteArray& data ); signals: void callContactdialog(); void nextView(); + void doRingSync(); // Emmitted when the target app receives a request from the source app void requestForNameEmailUidList(const QString& sourceChannel, const QString& uid); // Emitted when the source app recieves a list of name/email pairs (=addresses) from another target app. Usually Ka/Pi // The first parameter is a uniqueid. It can be used to identify the event void receivedNameEmailUidListEvent(const QString& uid, const QStringList& nameList, const QStringList& emailList, const QStringList& uidList); 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() } } void KSyncManager::multiSync( bool askforPrefs ) { if (blockSave()) return; setBlockSave(true); - QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); - if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"), - question, - i18n("Yes"), i18n("No"), - 0, 0 ) != 0 ) { - setBlockSave(false); - mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!")); - return; + if ( askforPrefs ) { + QString question = i18n("Do you really want\nto multiple sync\nwith all checked profiles?\nSyncing takes some\ntime - all profiles\nare synced twice!"); + if ( QMessageBox::information( mParent, i18n("KDE-Pim Sync"), + question, + i18n("Yes"), i18n("No"), + 0, 0 ) != 0 ) { + setBlockSave(false); + mParent->topLevelWidget()->setCaption(i18n("Aborted! Nothing synced!")); + return; + } } mCurrentSyncDevice = i18n("Multiple profiles") ; mSyncAlgoPrefs = mPrefs->mRingSyncAlgoPrefs; if ( askforPrefs ) { if ( !edit_sync_options()) { mParent->topLevelWidget()->setCaption( i18n("Syncing aborted.") ); return; } |