author | zautrix <zautrix> | 2004-10-17 01:11:53 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-10-17 01:11:53 (UTC) |
commit | f909868a098a22c17906f3d2ab05d5fac0332e85 (patch) (side-by-side diff) | |
tree | 6b52827f6047c25a2ef3d88304c01f74b68f24cb /libkdepim/ksyncmanager.cpp | |
parent | 9f0a9fb68e70c53593f9cd8340a8bb16d7f6833f (diff) | |
download | kdepimpi-f909868a098a22c17906f3d2ab05d5fac0332e85.zip kdepimpi-f909868a098a22c17906f3d2ab05d5fac0332e85.tar.gz kdepimpi-f909868a098a22c17906f3d2ab05d5fac0332e85.tar.bz2 |
many sync fixes
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index 7ee56e4..c6e06f8 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -148,3 +148,3 @@ void KSyncManager::slotSyncMenu( int action ) { - //qDebug("syncaction %d ", action); + qDebug("syncaction %d ", action); if ( action == 0 ) { @@ -256,2 +256,6 @@ void KSyncManager::slotSyncMenu( int action ) syncPi(); + while ( !mPisyncFinished ) { + //qDebug("waiting "); + qApp->processEvents(); + } } else @@ -474,3 +478,7 @@ int KSyncManager::ringSync() if ( i == 0 ) { +#ifdef DESKTOP_VERSION + syncKDE(); +#else syncSharp(); +#endif } else { @@ -516,2 +524,10 @@ int KSyncManager::ringSync() syncPi(); + while ( !mPisyncFinished ) { + //qDebug("waiting "); + qApp->processEvents(); + } + timer.start(); + while ( timer.elapsed () < 2000 ) { + qApp->processEvents(); + } } else @@ -868,2 +884,3 @@ void KSyncManager::syncPi() { + mPisyncFinished = false; qApp->processEvents(); @@ -894,2 +911,3 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) } + mPisyncFinished = true; return; @@ -898,2 +916,3 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) mParent->topLevelWidget()->setCaption( i18n("ERROR:Writing back file failed.") ); + mPisyncFinished = true; @@ -904,2 +923,3 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); + mPisyncFinished = true; } @@ -915,2 +935,3 @@ void KSyncManager::readFileFromSocket() mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") ); + mPisyncFinished = true; return; @@ -924,2 +945,3 @@ void KSyncManager::readFileFromSocket() mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); + mPisyncFinished = true; } |