summaryrefslogtreecommitdiffabout
path: root/korganizer
Unidiff
Diffstat (limited to 'korganizer') (more/less context) (show 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 )
2528{ 2528{
2529 QFile file2( fileName );
2530 if (!file2.open( IO_ReadOnly ) ) {
2531 mRetVal= false;
2532 deleteSocket();
2533 return ;
2534
2535 }
2536 if ( !mSocket ) { 2529 if ( !mSocket ) {
@@ -2538,4 +2531,17 @@ void KCommandSocket::writeFile( QString fileName )
2538 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) ); 2531 connect( mSocket, SIGNAL(delayedCloseFinished ()), this, SLOT(deleteSocket()) );
2532 connect( mSocket, SIGNAL(connected ()), this, SLOT(writeFileToSocket()) );
2539 } 2533 }
2534 mFileName = fileName ;
2540 mSocket->connectToHost( mHost, mPort ); 2535 mSocket->connectToHost( mHost, mPort );
2536}
2537void KCommandSocket::writeFileToSocket()
2538{
2539 QFile file2( mFileName );
2540 if (!file2.open( IO_ReadOnly ) ) {
2541 mRetVal= false;
2542 mSocket->close();
2543 if ( mSocket->state() == QSocket::Idle )
2544 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
2545 return ;
2546 }
2541 QTextStream ts2( &file2 ); 2547 QTextStream ts2( &file2 );
@@ -2549,2 +2555,3 @@ void KCommandSocket::writeFile( QString fileName )
2549 mRetVal= true; 2555 mRetVal= true;
2556 file2.close();
2550 mSocket->close(); 2557 mSocket->close();
@@ -2552,5 +2559,3 @@ void KCommandSocket::writeFile( QString fileName )
2552 QTimer::singleShot( 10, this , SLOT ( deleteSocket())); 2559 QTimer::singleShot( 10, this , SLOT ( deleteSocket()));
2553 file2.close();
2554} 2560}
2555
2556void KCommandSocket::sendStop() 2561void 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:
77 void deleteSocket(); 77 void deleteSocket();
78 void writeFileToSocket();
78 private : 79 private :