summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-05 06:23:42 (UTC)
committer zautrix <zautrix>2004-10-05 06:23:42 (UTC)
commit0dd4cb1ff2bbd47788a5220363758226e5639edf (patch) (side-by-side diff)
treec062e2d2a1572810118a1c3f38057fa573716b29
parentc22811d11414872fc0525350a8a1afdae61be346 (diff)
downloadkdepimpi-0dd4cb1ff2bbd47788a5220363758226e5639edf.zip
kdepimpi-0dd4cb1ff2bbd47788a5220363758226e5639edf.tar.gz
kdepimpi-0dd4cb1ff2bbd47788a5220363758226e5639edf.tar.bz2
sync fixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp23
-rw-r--r--korganizer/mainwindow.h1
2 files changed, 15 insertions, 9 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index fe7e6d3..b7176a1 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -2528,9 +2528,2 @@ void KCommandSocket::writeFile( QString fileName )
{
- QFile file2( fileName );
- if (!file2.open( IO_ReadOnly ) ) {
- mRetVal= false;
- deleteSocket();
- return ;
-
- }
if ( !mSocket ) {
@@ -2538,4 +2531,17 @@ void KCommandSocket::writeFile( QString fileName )
connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
+ connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) );
}
+ mFileName = fileName ;
mSocket->connectToHost( mHost, mPort );
+}
+void KCommandSocket::writeFileToSocket()
+{
+ QFile file2( mFileName );
+ if (!file2.open( IO_ReadOnly ) ) {
+ mRetVal= false;
+ mSocket->close();
+ if ( mSocket->state() == QSocket::Idle )
+ QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
+ return ;
+ }
QTextStream ts2( &file2 );
@@ -2549,2 +2555,3 @@ void KCommandSocket::writeFile( QString fileName )
mRetVal= true;
+ file2.close();
mSocket->close();
@@ -2552,5 +2559,3 @@ void KCommandSocket::writeFile( QString fileName )
QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
- file2.close();
}
-
void KCommandSocket::sendStop()
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index f8b2334..90b3a88 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -77,2 +77,3 @@ private slots:
void deleteSocket();
+ void writeFileToSocket();
private :