summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp32
-rw-r--r--korganizer/mainwindow.h1
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) :
75 mCommandSocket = 0; 75 mCommandSocket = 0;
76 mCommandSocketFinish = 0;
76 mSyncActionDialog = 0; 77 mSyncActionDialog = 0;
@@ -1983,3 +1984,2 @@ void MainWindow::getFile(QSocket* socket)
1983 setCaption( i18n("Receiving synced file...") ); 1984 setCaption( i18n("Receiving synced file...") );
1984 qDebug("MainWindow::sendFile(QSocket* s) ");
1985 1985
@@ -2070,6 +2070,8 @@ void MainWindow::performQuickQuick()
2070 } 2070 }
2071 if ( mCommandSocket ) 2071 if ( !mCommandSocket ) {
2072 delete mCommandSocket; 2072 mCommandSocket = new QSocket( this );
2073 mCommandSocket = new QSocket( this ); 2073 // delete mCommandSocket;
2074 connect( mCommandSocket, SIGNAL(readyRead()), this, SLOT(readFileFromSocket()) ); 2074 //mCommandSocket = new QSocket( this );
2075 connect( mCommandSocket, SIGNAL(readyRead()), this, SLOT(readFileFromSocket()) );
2076 }
2075 QString host = KOPrefs::instance()->mActiveSyncIP; 2077 QString host = KOPrefs::instance()->mActiveSyncIP;
@@ -2114,5 +2116,5 @@ QString fileName;
2114 mCommandSocket->close(); 2116 mCommandSocket->close();
2115 delete mCommandSocket; 2117 //delete mCommandSocket;
2116 setCaption( i18n("Remote file saved to temp file.") ); 2118 setCaption( i18n("Remote file saved to temp file.") );
2117 mCommandSocket = 0; 2119 //mCommandSocket = 0;
2118 mCurrentSyncProfile = 2 ; // last file 2120 mCurrentSyncProfile = 2 ; // last file
@@ -2140,6 +2142,8 @@ QString fileName;
2140 2142
2141 mCommandSocket = new QSocket( this ); 2143 if ( !mCommandSocketFinish ) {
2142 QString host = KOPrefs::instance()->mActiveSyncIP; 2144 mCommandSocketFinish = new QSocket( this );
2143 mCommandSocket->connectToHost( KOPrefs::instance()->mActiveSyncIP, KOPrefs::instance()->mActiveSyncPort.toUInt() ); 2145 }
2146 mCommandSocketFinish->connectToHost( KOPrefs::instance()->mActiveSyncIP, KOPrefs::instance()->mActiveSyncPort.toUInt() );
2144 2147
2148 QString host = KOPrefs::instance()->mActiveSyncIP;
2145 QFile file2( fileName ); 2149 QFile file2( fileName );
@@ -2154,3 +2158,3 @@ QString fileName;
2154 ts2.setCodec( QTextCodec::codecForName("utf8") ); 2158 ts2.setCodec( QTextCodec::codecForName("utf8") );
2155 QTextStream os2( mCommandSocket ); 2159 QTextStream os2( mCommandSocketFinish );
2156 os2.setCodec( QTextCodec::codecForName("utf8") ); 2160 os2.setCodec( QTextCodec::codecForName("utf8") );
@@ -2165,6 +2169,6 @@ QString fileName;
2165 } 2169 }
2166 mCommandSocket->close(); 2170 mCommandSocketFinish->close();
2167 file.close(); 2171 file.close();
2168 delete mCommandSocket; 2172 //delete ( mCommandSocket);
2169 mCommandSocket = 0; 2173 //mCommandSocket = 0;
2170 qDebug("Syncing succesful! "); 2174 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
149 QSocket* mCommandSocket; 149 QSocket* mCommandSocket;
150 QSocket* mCommandSocketFinish;
150 KServerSocket * mServerSocket; 151 KServerSocket * mServerSocket;