summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp12
1 files changed, 7 insertions, 5 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index 8e2f956..10cb2a2 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -2116,7 +2116,7 @@ void MainWindow::performQuickQuick()
os.setEncoding( QTextStream::UnicodeUTF8 );
os << "GET " << mPassWordPiSync << "\r\n";
setCaption( i18n("Sending request for remote file ...") );
- mTimerCommandSocket->start( 15000 );
+ mTimerCommandSocket->start( 10000 );
}
void MainWindow::deleteCommandSocket()
@@ -2127,6 +2127,7 @@ void MainWindow::deleteCommandSocket()
KMessageBox::information( 0, i18n("ERROR:\nConnection to remote host timed out "));
mTimerCommandSocket->stop();
}
+ //KMessageBox::information( 0, i18n("MainWindow::deleteCommandSocket "));
qDebug("MainWindow::deletemCommandSocket() ");
delete mCommandSocket;
mCommandSocket = 0;
@@ -2135,7 +2136,7 @@ void MainWindow::deleteCommandSocketFinish()
{
if ( ! mCommandSocketFinish)
return;
- //KMessageBox::information( 0, i18n("MainWindow::deleteCommandSocketFinish() "));
+ // KMessageBox::information( 0, i18n("MainWindow::deleteCommandSocketFinish() "));
qDebug("MainWindow::deletemCommandSocketFinish() ");
delete mCommandSocketFinish;
mCommandSocketFinish = 0;
@@ -2171,7 +2172,7 @@ 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 () );
if ( !mCommandSocket->canReadLine () )
@@ -2225,13 +2226,13 @@ void MainWindow::readFileFromSocket()
return ;
}
- setCaption( i18n("Sending back synced file...") );
QTextStream ts2( &file2 );
ts2.setCodec( QTextCodec::codecForName("utf8") );
QTextStream os2( mCommandSocketFinish );
os2.setCodec( QTextCodec::codecForName("utf8") );
//os.setEncoding( QTextStream::UnicodeUTF8 );
if ( KOPrefs::instance()->mWriteBackFile ) {
+ setCaption( i18n("Sending back synced file...") );
os2 << "PUT " << mPassWordPiSync << "\r\n";;
while ( ! ts2.atEnd() ) {
os2 << ts2.readLine() << "\n";
@@ -2241,11 +2242,12 @@ 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! "));
}