summaryrefslogtreecommitdiffabout
authorzautrix <zautrix>2004-10-20 08:47:06 (UTC)
committer zautrix <zautrix>2004-10-20 08:47:06 (UTC)
commit40eaafc9e008dc004b6ebc65fae8d89c8883ee8b (patch) (unidiff)
treeb2d60584f52ef66aa5347f2534d323a4609280c5
parent268e69a533c5db110600758366644c9827957364 (diff)
downloadkdepimpi-40eaafc9e008dc004b6ebc65fae8d89c8883ee8b.zip
kdepimpi-40eaafc9e008dc004b6ebc65fae8d89c8883ee8b.tar.gz
kdepimpi-40eaafc9e008dc004b6ebc65fae8d89c8883ee8b.tar.bz2
config save bugfix
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libkdepim/ksyncmanager.cpp16
1 files changed, 15 insertions, 1 deletions
diff --git a/libkdepim/ksyncmanager.cpp b/libkdepim/ksyncmanager.cpp
index 75c0b2b..7ca3ee0 100644
--- a/libkdepim/ksyncmanager.cpp
+++ b/libkdepim/ksyncmanager.cpp
@@ -273,6 +273,7 @@ void KSyncManager::slotSyncMenu( int action )
273void KSyncManager::enableQuick( bool ask ) 273void KSyncManager::enableQuick( bool ask )
274{ 274{
275 bool autoStart; 275 bool autoStart;
276 bool changed = false;
276 if ( ask ) { 277 if ( ask ) {
277 QDialog dia ( 0, "input-dialog", true ); 278 QDialog dia ( 0, "input-dialog", true );
278 QLineEdit lab ( &dia ); 279 QLineEdit lab ( &dia );
@@ -316,13 +317,24 @@ void KSyncManager::enableQuick( bool ask )
316 return; 317 return;
317 dia.hide(); 318 dia.hide();
318 qApp->processEvents(); 319 qApp->processEvents();
320 if ( mPrefs->mPassiveSyncPw != lepw.text() ) {
321 changed = true;
319 mPrefs->mPassiveSyncPw = lepw.text(); 322 mPrefs->mPassiveSyncPw = lepw.text();
323 }
324 if ( mPrefs->mPassiveSyncPort != lab.text() ) {
320 mPrefs->mPassiveSyncPort = lab.text(); 325 mPrefs->mPassiveSyncPort = lab.text();
326 changed = true;
327 }
321 autoStart = autostart.isChecked(); 328 autoStart = autostart.isChecked();
329 if (mPrefs->mPassiveSyncWithDesktop != syncdesktop.isChecked() ) {
330 changed = true;
322 mPrefs->mPassiveSyncWithDesktop = syncdesktop.isChecked(); 331 mPrefs->mPassiveSyncWithDesktop = syncdesktop.isChecked();
323 } 332 }
333 }
324 else 334 else
325 autoStart = mPrefs->mPassiveSyncAutoStart; 335 autoStart = mPrefs->mPassiveSyncAutoStart;
336 if ( autoStart != mPrefs->mPassiveSyncAutoStart )
337 changed = true;
326 bool ok; 338 bool ok;
327 mPrefs->mPassiveSyncAutoStart = false; 339 mPrefs->mPassiveSyncAutoStart = false;
328 Q_UINT16 port = mPrefs->mPassiveSyncPort.toUInt(&ok); 340 Q_UINT16 port = mPrefs->mPassiveSyncPort.toUInt(&ok);
@@ -340,8 +352,10 @@ void KSyncManager::enableQuick( bool ask )
340 mServerSocket = 0; 352 mServerSocket = 0;
341 return; 353 return;
342 } 354 }
343
344 mPrefs->mPassiveSyncAutoStart = autoStart; 355 mPrefs->mPassiveSyncAutoStart = autoStart;
356 if ( changed ) {
357 mPrefs->writeConfig();
358 }
345 connect( mServerSocket, SIGNAL ( request_file() ),this, SIGNAL ( request_file() ) ); 359 connect( mServerSocket, SIGNAL ( request_file() ),this, SIGNAL ( request_file() ) );
346 connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) ); 360 connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) );
347} 361}