summaryrefslogtreecommitdiffabout
path: root/libkdepim
authorzautrix <zautrix>2005-12-02 10:19:28 (UTC)
committer zautrix <zautrix>2005-12-02 10:19:28 (UTC)
commit1bb72406b4f160efa20bf4329539543e000295a5 (patch) (side-by-side diff)
treeeb8cee9f4c79dd28443b4e7a3b2374b712c16e9b /libkdepim
parentcba4eb3e05bee757b910f316ffab01d3849c0138 (diff)
downloadkdepimpi-1bb72406b4f160efa20bf4329539543e000295a5.zip
kdepimpi-1bb72406b4f160efa20bf4329539543e000295a5.tar.gz
kdepimpi-1bb72406b4f160efa20bf4329539543e000295a5.tar.bz2
more sync
Diffstat (limited to 'libkdepim') (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 7197b30..b7929ec 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -1165,48 +1165,49 @@ void KSyncManager::syncPi()
qDebug ( "KSM: Syncing resources: Local: %s --- Remote: %s ",mCurrentResourceLocal.latin1(), mCurrentResourceRemote.latin1() );
KCommandSocket* commandSocket = new KCommandSocket( mCurrentResourceRemote, mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() );
connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) );
commandSocket->readFile( syncFileName() );
mParent->topLevelWidget()->setCaption( i18n("Syncing %1 <-> %2").arg( mCurrentResourceLocal ).arg( mCurrentResourceRemote ) );
while ( !mPisyncFinished ) {
//qDebug("waiting ");
qApp->processEvents();
}
if ( startLocal+1 < mSpecificResources.count()/2 ) {
mParent->topLevelWidget()->setCaption( i18n("Waiting a second before syncing next resource...") );
QTime timer;
timer.start();
while ( timer.elapsed () < 1000 ) {
qApp->processEvents();
}
}
}
++startRemote;
++startLocal;
mAskForPreferences = false;
}
mPisyncFinished = true;
+ mParent->topLevelWidget()->setCaption( i18n("Multi-resource Pi-sync finished") );
} else {
KCommandSocket* commandSocket = new KCommandSocket( "", mPassWordPiSync, port, mActiveSyncIP, this, mParent->topLevelWidget() );
connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int )), this, SLOT(deleteCommandSocket(KCommandSocket*, int)) );
commandSocket->readFile( syncFileName() );
}
}
void KSyncManager::deleteCommandSocket(KCommandSocket*s, int state)
{
//enum { success, errorW, errorR, quiet };
if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO ||state == KCommandSocket::errorPW ||
state == KCommandSocket::errorCA ||state == KCommandSocket::errorFI ||state == KCommandSocket::errorUN||state == KCommandSocket::errorED ) {
if ( state == KCommandSocket::errorPW )
mParent->topLevelWidget()->setCaption( i18n("Wrong password: Receiving remote file failed.") );
else if ( state == KCommandSocket::errorR ||state == KCommandSocket::errorTO )
mParent->topLevelWidget()->setCaption( i18n("ERROR: Receiving remote file failed.") );
else if ( state == KCommandSocket::errorCA )
mParent->topLevelWidget()->setCaption( i18n("Sync cancelled from remote.") );
else if ( state == KCommandSocket::errorFI )
mParent->topLevelWidget()->setCaption( i18n("File error on remote.") );
else if ( state == KCommandSocket::errorED )