summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp24
-rw-r--r--libkdepim/ksyncmanager.h9
2 files changed, 28 insertions, 5 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;
}
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 7d5b05e..ffb1ea4 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -180,6 +180,3 @@ class KSyncManager : public QObject
QString getPassword( );
-
- private slots:
- void confSync();
- private:
+ bool mPisyncFinished;
bool mBlockSaveFlag;
@@ -191,2 +188,6 @@ class KSyncManager : public QObject
+private slots:
+ void confSync();
+
+
};