author | zautrix <zautrix> | 2005-02-09 20:56:06 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2005-02-09 20:56:06 (UTC) |
commit | ab7725c4517a1f6c145075edcff0bdafe105f0ea (patch) (side-by-side diff) | |
tree | e1a230bcb5c31ca695bbebc40ff80874f2f13380 /libkdepim/ksyncmanager.cpp | |
parent | a9eff860d8399a198a9fdc04e09ed369097fc745 (diff) | |
download | kdepimpi-ab7725c4517a1f6c145075edcff0bdafe105f0ea.zip kdepimpi-ab7725c4517a1f6c145075edcff0bdafe105f0ea.tar.gz kdepimpi-ab7725c4517a1f6c145075edcff0bdafe105f0ea.tar.bz2 |
fixes
-rw-r--r-- | libkdepim/ksyncmanager.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp index c8d0e0d..02e5587 100644 --- a/libkdepim/ksyncmanager.cpp +++ b/libkdepim/ksyncmanager.cpp @@ -1087,7 +1087,7 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) QTimer::singleShot( 1, this , SLOT ( readFileFromSocket())); } else if ( state == KCommandSocket::successW ) { - mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); + mParent->topLevelWidget()->setCaption( i18n("Pi-Sync successful!") ); mPisyncFinished = true; } @@ -1097,19 +1097,20 @@ void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state) void KSyncManager::readFileFromSocket() { QString fileName = syncFileName(); + bool syncOK = true; mParent->topLevelWidget()->setCaption( i18n("Remote file saved to temp file.") ); if ( ! syncWithFile( fileName , true ) ) { mParent->topLevelWidget()->setCaption( i18n("Syncing failed.") ); - mPisyncFinished = true; - return; + syncOK = false; } KCommandSocket* commandSocket = new KCommandSocket( mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget() ); connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) ); - if ( mWriteBackFile ) + if ( mWriteBackFile && syncOK ) commandSocket->writeFile( fileName ); else { commandSocket->sendStop(); - mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); + if ( syncOK ) + mParent->topLevelWidget()->setCaption( i18n("Pi-Sync succesful!") ); mPisyncFinished = true; } } @@ -1224,7 +1225,7 @@ void KServerSocket::send_file() if ( secs > 180 ) { if ( secs > 300 ) { - if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(0, i18n("The clocks of the syncing\ndevices have a difference\n of more than 5 minutes.\nPlease adjust your clocks.\n<b>You may get wrong syncing results!<\b>\nPlease confirm synchronization!"), i18n("High clock skew!"),i18n("Synchronize!"))) { + if ( KMessageBox::Cancel == KMessageBox::warningContinueCancel(0, i18n("The clocks of the syncing\ndevices have a difference\nof more than 5 minutes.\nPlease adjust your clocks.\nYou may get wrong syncing results!\nPlease confirm synchronization!"), i18n("High clock skew!"),i18n("Synchronize!"))) { qDebug("KSS::Sync cancelled ,cs"); return ; } |