-rw-r--r-- | korganizer/mainwindow.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp index 8e2f956..10cb2a2 100644 --- a/korganizer/mainwindow.cpp +++ b/korganizer/mainwindow.cpp @@ -2117,5 +2117,5 @@ void MainWindow::performQuickQuick() os << "GET " << mPassWordPiSync << "\r\n"; setCaption( i18n("Sending request for remote file ...") ); - mTimerCommandSocket->start( 15000 ); + mTimerCommandSocket->start( 10000 ); } @@ -2128,4 +2128,5 @@ void MainWindow::deleteCommandSocket() mTimerCommandSocket->stop(); } + //KMessageBox::information( 0, i18n("MainWindow::deleteCommandSocket ")); qDebug("MainWindow::deletemCommandSocket() "); delete mCommandSocket; @@ -2172,5 +2173,5 @@ void MainWindow::readFileFromSocket() QTime ti; ti.start(); - while ( ti.elapsed () < 5000 && !mCommandSocket->canReadLine () ) { + while ( ti.elapsed () < 3000 && !mCommandSocket->canReadLine () ) { qApp->processEvents(); qDebug("waiting2 %d ",ti.elapsed () ); @@ -2226,5 +2227,4 @@ void MainWindow::readFileFromSocket() } - setCaption( i18n("Sending back synced file...") ); QTextStream ts2( &file2 ); ts2.setCodec( QTextCodec::codecForName("utf8") ); @@ -2233,4 +2233,5 @@ void MainWindow::readFileFromSocket() //os.setEncoding( QTextStream::UnicodeUTF8 ); if ( KOPrefs::instance()->mWriteBackFile ) { + setCaption( i18n("Sending back synced file...") ); os2 << "PUT " << mPassWordPiSync << "\r\n";; while ( ! ts2.atEnd() ) { @@ -2242,9 +2243,10 @@ void MainWindow::readFileFromSocket() mCommandSocketFinish->close(); if ( mCommandSocketFinish->state() == QSocket::Idle ) - deleteCommandSocketFinish(); + QTimer::singleShot( 10, this , SLOT ( deleteCommandSocketFinish())); file.close(); qDebug("Syncing succesful! "); setCaption( i18n("Pi-Sync succesful!") ); + // KMessageBox::information( 0, i18n(" Pi-Sync succesful! ")); } |