summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2005-11-28 05:26:47 (UTC)
committer zautrix <zautrix>2005-11-28 05:26:47 (UTC)
commitc09ac6c4c77ee1ed50cd9d86a6798eebdede3991 (patch) (unidiff)
tree6cbd88eadaaaf2f31be90eaf11edceae5d81d89e
parent1267a02fc23575f82247f8bd8449dc70dab62d44 (diff)
downloadkdepimpi-c09ac6c4c77ee1ed50cd9d86a6798eebdede3991.zip
kdepimpi-c09ac6c4c77ee1ed50cd9d86a6798eebdede3991.tar.gz
kdepimpi-c09ac6c4c77ee1ed50cd9d86a6798eebdede3991.tar.bz2
sync
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 28c48fe..4d859ce 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -412,25 +412,24 @@ void KSyncManager::enableQuick( bool ask )
412 if (mPrefs->mPassiveSyncWithDesktop != syncdesktop.isChecked() ) { 412 if (mPrefs->mPassiveSyncWithDesktop != syncdesktop.isChecked() ) {
413 changed = true; 413 changed = true;
414 mPrefs->mPassiveSyncWithDesktop = syncdesktop.isChecked(); 414 mPrefs->mPassiveSyncWithDesktop = syncdesktop.isChecked();
415 } 415 }
416 } 416 }
417 else 417 else
418 autoStart = mPrefs->mPassiveSyncAutoStart; 418 autoStart = mPrefs->mPassiveSyncAutoStart;
419 if ( autoStart != mPrefs->mPassiveSyncAutoStart ) 419 if ( autoStart != mPrefs->mPassiveSyncAutoStart )
420 changed = true; 420 changed = true;
421 bool ok; 421 bool ok;
422 mPrefs->mPassiveSyncAutoStart = false; 422 mPrefs->mPassiveSyncAutoStart = false;
423 Q_UINT32 port_t = mPrefs->mPassiveSyncPort.toUInt(&ok); 423 Q_UINT32 port_t = mPrefs->mPassiveSyncPort.toUInt(&ok);
424 qDebug("%d ", port_t);
425 if ( ! ok || port_t > 65535 ) { 424 if ( ! ok || port_t > 65535 ) {
426 KMessageBox::information( 0, i18n("No valid port number:\n%1").arg ( mPrefs->mPassiveSyncPort ), i18n("Pi-Sync Port Error")); 425 KMessageBox::information( 0, i18n("No valid port number:\n%1").arg ( mPrefs->mPassiveSyncPort ), i18n("Pi-Sync Port Error"));
427 return; 426 return;
428 } 427 }
429 Q_UINT16 port = port_t; 428 Q_UINT16 port = port_t;
430 //qDebug("port %d ", port); 429 //qDebug("port %d ", port);
431 mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 ); 430 mServerSocket = new KServerSocket ( mPrefs->mPassiveSyncPw, port ,1 );
432 mServerSocket->setFileName( defaultFileName() );//bbb 431 mServerSocket->setFileName( defaultFileName() );//bbb
433 if ( !mServerSocket->ok() ) { 432 if ( !mServerSocket->ok() ) {
434 QTimer::singleShot( 2000, this, SLOT ( displayErrorPort() ) ); 433 QTimer::singleShot( 2000, this, SLOT ( displayErrorPort() ) );
435 delete mServerSocket; 434 delete mServerSocket;
436 mServerSocket = 0; 435 mServerSocket = 0;
@@ -1303,25 +1302,25 @@ void KServerSocket::newConnection ( int socket )
1303 mSocket = new QSocket( this ); 1302 mSocket = new QSocket( this );
1304 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) ); 1303 connect( mSocket , SIGNAL(readyRead()), this, SLOT(readClient()) );
1305 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) ); 1304 connect( mSocket , SIGNAL(delayedCloseFinished()), this, SLOT(discardClient()) );
1306 mSocket->setSocket( socket ); 1305 mSocket->setSocket( socket );
1307} 1306}
1308 1307
1309void KServerSocket::discardClient() 1308void KServerSocket::discardClient()
1310{ 1309{
1311 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 1310 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
1312} 1311}
1313void KServerSocket::deleteSocket() 1312void KServerSocket::deleteSocket()
1314{ 1313{
1315 qDebug("KSS::deleteSocket"); 1314 //qDebug("KSS::deleteSocket");
1316 if ( mSocket ) { 1315 if ( mSocket ) {
1317 delete mSocket; 1316 delete mSocket;
1318 mSocket = 0; 1317 mSocket = 0;
1319 } 1318 }
1320 if ( mErrorMessage ) 1319 if ( mErrorMessage )
1321 QTimer::singleShot( 10, this , SLOT ( displayErrorMessage())); 1320 QTimer::singleShot( 10, this , SLOT ( displayErrorMessage()));
1322} 1321}
1323void KServerSocket::readClient() 1322void KServerSocket::readClient()
1324{ 1323{
1325 if ( blockRC ) 1324 if ( blockRC )
1326 return; 1325 return;
1327 if ( mSocket == 0 ) { 1326 if ( mSocket == 0 ) {
@@ -1591,25 +1590,25 @@ void KCommandSocket::readFile( QString fn )
1591 connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) ); 1590 connect( mSocket, SIGNAL(readyRead()), this, SLOT(startReadFileFromSocket()) );
1592 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 1591 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
1593 connect( mSocket, SIGNAL(connected ()), this, SLOT(sendFileRequest() )); 1592 connect( mSocket, SIGNAL(connected ()), this, SLOT(sendFileRequest() ));
1594 } 1593 }
1595 mFileString = ""; 1594 mFileString = "";
1596 mFileName = fn; 1595 mFileName = fn;
1597 mFirst = true; 1596 mFirst = true;
1598 if ( tlw ) 1597 if ( tlw )
1599 tlw->setCaption( i18n("Trying to connect to remote...") ); 1598 tlw->setCaption( i18n("Trying to connect to remote...") );
1600 mConnectCount = 30;mConnectMax = 30; 1599 mConnectCount = 30;mConnectMax = 30;
1601 mTimerSocket->start( 1000, true ); 1600 mTimerSocket->start( 1000, true );
1602 mSocket->connectToHost( mHost, mPort ); 1601 mSocket->connectToHost( mHost, mPort );
1603 qDebug("KCS: Waiting for connection"); 1602 //qDebug("KCS: Waiting for connection");
1604} 1603}
1605void KCommandSocket::updateConnectDialog() 1604void KCommandSocket::updateConnectDialog()
1606{ 1605{
1607 1606
1608 if ( mConnectCount == mConnectMax ) { 1607 if ( mConnectCount == mConnectMax ) {
1609 //qDebug("MAXX %d", mConnectMax); 1608 //qDebug("MAXX %d", mConnectMax);
1610 mConnectProgress.setTotalSteps ( 30 ); 1609 mConnectProgress.setTotalSteps ( 30 );
1611 mConnectProgress.show(); 1610 mConnectProgress.show();
1612 mConnectProgress.setLabelText( i18n("Trying to connect to remote...") ); 1611 mConnectProgress.setLabelText( i18n("Trying to connect to remote...") );
1613 } 1612 }
1614 //qDebug("updateConnectDialog() %d", mConnectCount); 1613 //qDebug("updateConnectDialog() %d", mConnectCount);
1615 mConnectProgress.raise(); 1614 mConnectProgress.raise();