author | zautrix <zautrix> | 2004-09-22 23:36:37 (UTC) |
---|---|---|
committer | zautrix <zautrix> | 2004-09-22 23:36:37 (UTC) |
commit | e2bc785d2f98d2aeac6ab6a5e39ff4f6e679517b (patch) (side-by-side diff) | |
tree | f45771acfd61a0ddda6b253082f243acac473d33 /korganizer | |
parent | 772411a6c16f9b2299bd173116faeb4482325bcc (diff) | |
download | kdepimpi-e2bc785d2f98d2aeac6ab6a5e39ff4f6e679517b.zip kdepimpi-e2bc785d2f98d2aeac6ab6a5e39ff4f6e679517b.tar.gz kdepimpi-e2bc785d2f98d2aeac6ab6a5e39ff4f6e679517b.tar.bz2 |
bugfixes
-rw-r--r-- | korganizer/mainwindow.cpp | 32 | ||||
-rw-r--r-- | korganizer/mainwindow.h | 1 |
2 files changed, 19 insertions, 14 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index ebe761a..2e6b5c8 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -75,2 +75,3 @@ MainWindow::MainWindow( QWidget *parent, const char *name, QString msg) : mCommandSocket = 0; + mCommandSocketFinish = 0; mSyncActionDialog = 0; @@ -1983,3 +1984,2 @@ void MainWindow::getFile(QSocket* socket) setCaption( i18n("Receiving synced file...") ); - qDebug("MainWindow::sendFile(QSocket* s) "); @@ -2070,6 +2070,8 @@ void MainWindow::performQuickQuick() } - if ( mCommandSocket ) - delete mCommandSocket; - mCommandSocket = new QSocket( this ); - connect( mCommandSocket, SIGNAL(readyRead()), this, SLOT(readFileFromSocket()) ); + if ( !mCommandSocket ) { + mCommandSocket = new QSocket( this ); + // delete mCommandSocket; + //mCommandSocket = new QSocket( this ); + connect( mCommandSocket, SIGNAL(readyRead()), this, SLOT(readFileFromSocket()) ); + } QString host = KOPrefs::instance()->mActiveSyncIP; @@ -2114,5 +2116,5 @@ QString fileName; mCommandSocket->close(); - delete mCommandSocket; + //delete mCommandSocket; setCaption( i18n("Remote file saved to temp file.") ); - mCommandSocket = 0; + //mCommandSocket = 0; mCurrentSyncProfile = 2 ; // last file @@ -2140,6 +2142,8 @@ QString fileName; - mCommandSocket = new QSocket( this ); - QString host = KOPrefs::instance()->mActiveSyncIP; - mCommandSocket->connectToHost( KOPrefs::instance()->mActiveSyncIP, KOPrefs::instance()->mActiveSyncPort.toUInt() ); + if ( !mCommandSocketFinish ) { + mCommandSocketFinish = new QSocket( this ); + } + mCommandSocketFinish->connectToHost( KOPrefs::instance()->mActiveSyncIP, KOPrefs::instance()->mActiveSyncPort.toUInt() ); + QString host = KOPrefs::instance()->mActiveSyncIP; QFile file2( fileName ); @@ -2154,3 +2158,3 @@ QString fileName; ts2.setCodec( QTextCodec::codecForName("utf8") ); - QTextStream os2( mCommandSocket ); + QTextStream os2( mCommandSocketFinish ); os2.setCodec( QTextCodec::codecForName("utf8") ); @@ -2165,6 +2169,6 @@ QString fileName; } - mCommandSocket->close(); + mCommandSocketFinish->close(); file.close(); - delete mCommandSocket; - mCommandSocket = 0; + //delete ( mCommandSocket); + //mCommandSocket = 0; qDebug("Syncing succesful! "); diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h index 9bb2302..5985d56 100644 --- a/korganizer/mainwindow.h +++ b/korganizer/mainwindow.h @@ -149,2 +149,3 @@ class MainWindow : public QMainWindow QSocket* mCommandSocket; + QSocket* mCommandSocketFinish; KServerSocket * mServerSocket; |