summaryrefslogtreecommitdiffabout
path: root/libkdepim
Unidiff
Diffstat (limited to 'libkdepim') (more/less context) (ignore whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp5
-rw-r--r--libkdepim/ksyncmanager.h5
2 files changed, 5 insertions, 5 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 5d48884..ea543dd 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -270,17 +270,18 @@ void KSyncManager::enableQuick()
270 mServerSocket->setFileName( defaultFileName() ); 270 mServerSocket->setFileName( defaultFileName() );
271 //qDebug("connected "); 271 //qDebug("connected ");
272 if ( !mServerSocket->ok() ) { 272 if ( !mServerSocket->ok() ) {
273 KMessageBox::information( 0, i18n("Failed to bind or\nlisten to the port!")); 273 KMessageBox::information( 0, i18n("Failed to bind or\nlisten to the port!"));
274 delete mServerSocket; 274 delete mServerSocket;
275 mServerSocket = 0; 275 mServerSocket = 0;
276 return; 276 return;
277 } 277 }
278 connect( mServerSocket, SIGNAL ( saveFile() ),this, SIGNAL ( save() ) ); 278 //connect( mServerSocket, SIGNAL ( saveFile() ),this, SIGNAL ( save() ) );
279 connect( mServerSocket, SIGNAL ( request_file() ),this, SIGNAL ( request_file() ) );
279 connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) ); 280 connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) );
280} 281}
281 282
282void KSyncManager::syncLocalFile() 283void KSyncManager::syncLocalFile()
283{ 284{
284 285
285 QString fn =mLastSyncedLocalFile; 286 QString fn =mLastSyncedLocalFile;
286 QString ext; 287 QString ext;
@@ -923,17 +924,17 @@ void KServerSocket::send_file()
923 QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog ); 924 QLabel* label = new QLabel( i18n("Synchronizing from remote ...\n\nDo not use this application!\n\nIf syncing fails\nyou can close this dialog."), mSyncActionDialog );
924 QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog ); 925 QVBoxLayout* lay = new QVBoxLayout( mSyncActionDialog );
925 lay->addWidget( label); 926 lay->addWidget( label);
926 lay->setMargin(7); 927 lay->setMargin(7);
927 lay->setSpacing(7); 928 lay->setSpacing(7);
928 mSyncActionDialog->setFixedSize( 230, 120); 929 mSyncActionDialog->setFixedSize( 230, 120);
929 mSyncActionDialog->show(); 930 mSyncActionDialog->show();
930 qDebug("KSS::saving ... "); 931 qDebug("KSS::saving ... ");
931 emit saveFile(); 932 emit request_file();
932 qApp->processEvents(); 933 qApp->processEvents();
933 QString fileName = mFileName; 934 QString fileName = mFileName;
934 QFile file( fileName ); 935 QFile file( fileName );
935 if (!file.open( IO_ReadOnly ) ) { 936 if (!file.open( IO_ReadOnly ) ) {
936 delete mSyncActionDialog; 937 delete mSyncActionDialog;
937 mSyncActionDialog = 0; 938 mSyncActionDialog = 0;
938 qDebug("KSS::error open file "); 939 qDebug("KSS::error open file ");
939 mSocket->close(); 940 mSocket->close();
diff --git a/libkdepim/ksyncmanager.h b/libkdepim/ksyncmanager.h
index 52e2772..0eb3323 100644
--- a/libkdepim/ksyncmanager.h
+++ b/libkdepim/ksyncmanager.h
@@ -45,20 +45,18 @@ class KServerSocket : public QServerSocket
45 45
46public: 46public:
47 KServerSocket ( QString password, Q_UINT16 port, int backlog = 0, QObject * parent=0, const char * name=0 ); 47 KServerSocket ( QString password, Q_UINT16 port, int backlog = 0, QObject * parent=0, const char * name=0 );
48 48
49 void newConnection ( int socket ) ; 49 void newConnection ( int socket ) ;
50 void setFileName( QString fn ) {mFileName = fn;}; 50 void setFileName( QString fn ) {mFileName = fn;};
51 51
52signals: 52signals:
53 //void sendFile(QSocket*);
54 //void getFile(QSocket*);
55 void file_received( bool ); 53 void file_received( bool );
56 //void file_sent(); 54 void request_file();
57 void saveFile(); 55 void saveFile();
58 void endConnect(); 56 void endConnect();
59private slots: 57private slots:
60 void discardClient(); 58 void discardClient();
61 void readClient(); 59 void readClient();
62 void readBackFileFromSocket(); 60 void readBackFileFromSocket();
63 private : 61 private :
64 bool blockRC; 62 bool blockRC;
@@ -151,16 +149,17 @@ class KSyncManager : public QObject
151 QString mPhoneModel; 149 QString mPhoneModel;
152 QString mLastSyncedLocalFile; // save! 150 QString mLastSyncedLocalFile; // save!
153 QString mPassWordPiSync; 151 QString mPassWordPiSync;
154 QString mActiveSyncPort; 152 QString mActiveSyncPort;
155 QString mActiveSyncIP ; 153 QString mActiveSyncIP ;
156 154
157 signals: 155 signals:
158 void save(); 156 void save();
157 void request_file();
159 void getFile( bool ); 158 void getFile( bool );
160 159
161 public slots: 160 public slots:
162 void slotSyncMenu( int ); 161 void slotSyncMenu( int );
163 162
164 private: 163 private:
165 // LR ******************************* 164 // LR *******************************
166 // sync stuff! 165 // sync stuff!