summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-09-22 22:21:06 (UTC)
committer zautrix <zautrix>2004-09-22 22:21:06 (UTC)
commit772411a6c16f9b2299bd173116faeb4482325bcc (patch) (unidiff)
treeb70a4f4964bcf32e786fab82eaea8de0693bd841
parente29076add5876c7dd46ff35ab0cbc2ad2c496713 (diff)
downloadkdepimpi-772411a6c16f9b2299bd173116faeb4482325bcc.zip
kdepimpi-772411a6c16f9b2299bd173116faeb4482325bcc.tar.gz
kdepimpi-772411a6c16f9b2299bd173116faeb4482325bcc.tar.bz2
bugfixes
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/mainwindow.cpp2
-rw-r--r--korganizer/mainwindow.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/korganizer/mainwindow.cpp b/korganizer/mainwindow.cpp
index f2e1bf8..ebe761a 100644
--- a/korganizer/mainwindow.cpp
+++ b/korganizer/mainwindow.cpp
@@ -1930,24 +1930,26 @@ void MainWindow::enableQuick()
1930 qWarning("Failed to bind to port %d", port); 1930 qWarning("Failed to bind to port %d", port);
1931 delete mServerSocket; 1931 delete mServerSocket;
1932 mServerSocket = 0; 1932 mServerSocket = 0;
1933 return; 1933 return;
1934 } 1934 }
1935 connect( mServerSocket, SIGNAL ( sendFile(QSocket*) ), this, SLOT ( sendFile(QSocket*) ) ); 1935 connect( mServerSocket, SIGNAL ( sendFile(QSocket*) ), this, SLOT ( sendFile(QSocket*) ) );
1936 connect( mServerSocket, SIGNAL ( getFile(QSocket*) ), this, SLOT ( getFile(QSocket*) ) ); 1936 connect( mServerSocket, SIGNAL ( getFile(QSocket*) ), this, SLOT ( getFile(QSocket*) ) );
1937} 1937}
1938void MainWindow::sendFile(QSocket* socket) 1938void MainWindow::sendFile(QSocket* socket)
1939{ 1939{
1940 setCaption( i18n("Received request for file") ); 1940 setCaption( i18n("Received request for file") );
1941 qDebug("MainWindow::sendFile(QSocket* s) "); 1941 qDebug("MainWindow::sendFile(QSocket* s) ");
1942 if ( mSyncActionDialog )
1943 delete mSyncActionDialog;
1942 mSyncActionDialog = new QDialog ( this, "input-dialog", true ); 1944 mSyncActionDialog = new QDialog ( this, "input-dialog", true );
1943 mSyncActionDialog->setCaption(i18n("KO/Pi - WARNING")); 1945 mSyncActionDialog->setCaption(i18n("KO/Pi - WARNING"));
1944 QLabel* label = new QLabel( i18n("Synchronizing...\nDo not use\nthis application!\n"), mSyncActionDialog ); 1946 QLabel* label = new QLabel( i18n("Synchronizing...\nDo not use\nthis application!\n"), mSyncActionDialog );
1945 QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog ); 1947 QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog );
1946 lay->addWidget( label); 1948 lay->addWidget( label);
1947 lay->setMargin(7); 1949 lay->setMargin(7);
1948 lay->setSpacing(7); 1950 lay->setSpacing(7);
1949 mSyncActionDialog->setFixedSize( 200,100 ); 1951 mSyncActionDialog->setFixedSize( 200,100 );
1950 mSyncActionDialog->show(); 1952 mSyncActionDialog->show();
1951 qApp->processEvents(); 1953 qApp->processEvents();
1952 qDebug("saving ... "); 1954 qDebug("saving ... ");
1953 save(); 1955 save();
diff --git a/korganizer/mainwindow.h b/korganizer/mainwindow.h
index 58081f6..9bb2302 100644
--- a/korganizer/mainwindow.h
+++ b/korganizer/mainwindow.h
@@ -38,25 +38,25 @@ public:
38 s->setSocket( socket ); 38 s->setSocket( socket );
39 } 39 }
40 40
41signals: 41signals:
42 void sendFile(QSocket*); 42 void sendFile(QSocket*);
43 void getFile(QSocket*); 43 void getFile(QSocket*);
44 void endConnect(); 44 void endConnect();
45private slots: 45private slots:
46 void discardClient() 46 void discardClient()
47 { 47 {
48 QSocket* socket = (QSocket*)sender(); 48 QSocket* socket = (QSocket*)sender();
49 delete socket; 49 delete socket;
50 emit endConnect(); 50 //emit endConnect();
51 } 51 }
52 void readClient() 52 void readClient()
53 { 53 {
54 qDebug("readClient() "); 54 qDebug("readClient() ");
55 QSocket* socket = (QSocket*)sender(); 55 QSocket* socket = (QSocket*)sender();
56 if ( socket->canReadLine() ) { 56 if ( socket->canReadLine() ) {
57 QStringList tokens = QStringList::split( QRegExp("[ \r\n][ \r\n]*"), socket->readLine() ); 57 QStringList tokens = QStringList::split( QRegExp("[ \r\n][ \r\n]*"), socket->readLine() );
58 if ( tokens[0] == "GET" ) { 58 if ( tokens[0] == "GET" ) {
59 emit sendFile( socket ); 59 emit sendFile( socket );
60 } 60 }
61 if ( tokens[0] == "PUT" ) { 61 if ( tokens[0] == "PUT" ) {
62 emit getFile( socket ); 62 emit getFile( socket );