summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncmanager.cpp
Side-by-side diff
Diffstat (limited to 'libkdepim/ksyncmanager.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp24
1 files changed, 18 insertions, 6 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index a64eb34..719d80b 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -197,5 +197,6 @@ void KSyncManager::slotSyncMenu( int action )
{
qDebug("KSM::syncaction %d ", action);
- mCurrentResourceLocal = "";
+ mCurrentResourceLocal = "";
+ emit multiResourceSyncStart( false );
if ( action == 5000 )
return;
@@ -442,4 +443,6 @@ void KSyncManager::enableQuick( bool ask )
connect( mServerSocket, SIGNAL ( request_file() ),this, SIGNAL ( request_file() ) );
connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) );
+ connect( mServerSocket, SIGNAL ( request_file(const QString &) ),this, SIGNAL ( request_file(const QString &) ) );
+ connect( mServerSocket, SIGNAL ( file_received( bool ,const QString &) ), this, SIGNAL ( getFile( bool,const QString & ) ) );
}
void KSyncManager::displayErrorPort()
@@ -570,5 +573,5 @@ void KSyncManager::multiSync( bool askforPrefs )
int KSyncManager::ringSync()
{
-
+ emit multiResourceSyncStart( false );
int syncedProfiles = 0;
unsigned int i;
@@ -1141,5 +1144,8 @@ void KSyncManager::syncPi()
int startLocal = 0;
int startRemote = mSpecificResources.count()/2;
+ emit multiResourceSyncStart( true );
while ( startLocal < mSpecificResources.count()/2 ) {
+ if ( startLocal+1 >= mSpecificResources.count()/2 )
+ emit multiResourceSyncStart( false );
mPisyncFinished = false;
mCurrentResourceLocal = mSpecificResources[ startLocal ];
@@ -1220,5 +1226,5 @@ void KSyncManager::readFileFromSocket()
syncOK = false;
}
- KCommandSocket* commandSocket = new KCommandSocket( "",mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget() );
+ KCommandSocket* commandSocket = new KCommandSocket( mCurrentResourceRemote,mPassWordPiSync, mActiveSyncPort.toUInt(), mActiveSyncIP, this, mParent->topLevelWidget() );
connect( commandSocket, SIGNAL(commandFinished( KCommandSocket*, int)), this, SLOT(deleteCommandSocket(KCommandSocket*, int )) );
if ( mWriteBackFile && syncOK ) {
@@ -1284,4 +1290,5 @@ void KServerSocket::readClient()
return;
}
+ mResource = "";
mErrorMessage = 0;
//qDebug("KServerSocket::readClient()");
@@ -1300,4 +1307,5 @@ void KServerSocket::readClient()
else
KSyncManager::mRequestedSyncEvent = QDateTime();
+ mResource =tokens[3];
send_file();
}
@@ -1311,4 +1319,5 @@ void KServerSocket::readClient()
//emit getFile( mSocket );
blockRC = true;
+ mResource =tokens[2];
get_file();
}
@@ -1407,4 +1416,5 @@ void KServerSocket::send_file()
mSyncActionDialog->show();
mSyncActionDialog->raise();
+ emit request_file(mResource);
emit request_file();
qApp->processEvents();
@@ -1468,5 +1478,6 @@ void KServerSocket::readBackFileFromSocket()
qDebug("KSS:Error open read back file ");
piFileString = "";
- emit file_received( false );
+ emit file_received( false, mResource);
+ emit file_received( false);
blockRC = false;
return ;
@@ -1484,5 +1495,6 @@ void KServerSocket::readBackFileFromSocket()
file.close();
piFileString = "";
- emit file_received( true );
+ emit file_received( true, mResource );
+ emit file_received( true);
delete mSyncActionDialog;
mSyncActionDialog = 0;
@@ -1597,5 +1609,5 @@ void KCommandSocket::writeFileToSocket()
QTextStream os2( mSocket );
os2.setEncoding( QTextStream::Latin1 );
- os2 << "PUT " << mPassWord << "\r\n\r\n";;
+ os2 << "PUT " << mPassWord << mRemoteResource << "\r\n\r\n";;
int byteCount = 0;
int byteMax = file2.size()/53;