summaryrefslogtreecommitdiffabout
path: root/libkdepim/ksyncmanager.cpp
Side-by-side diff
Diffstat (limited to 'libkdepim/ksyncmanager.cpp') (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
@@ -272,8 +272,9 @@ void KSyncManager::slotSyncMenu( int action )
void KSyncManager::enableQuick( bool ask )
{
bool autoStart;
+ bool changed = false;
if ( ask ) {
QDialog dia ( 0, "input-dialog", true );
QLineEdit lab ( &dia );
QVBoxLayout lay( &dia );
@@ -315,15 +316,26 @@ void KSyncManager::enableQuick( bool ask )
if ( ! dia.exec() )
return;
dia.hide();
qApp->processEvents();
+ if ( mPrefs->mPassiveSyncPw != lepw.text() ) {
+ changed = true;
mPrefs->mPassiveSyncPw = lepw.text();
+ }
+ if ( mPrefs->mPassiveSyncPort != lab.text() ) {
mPrefs->mPassiveSyncPort = lab.text();
+ changed = true;
+ }
autoStart = autostart.isChecked();
+ if (mPrefs->mPassiveSyncWithDesktop != syncdesktop.isChecked() ) {
+ changed = true;
mPrefs->mPassiveSyncWithDesktop = syncdesktop.isChecked();
}
+ }
else
autoStart = mPrefs->mPassiveSyncAutoStart;
+ if ( autoStart != mPrefs->mPassiveSyncAutoStart )
+ changed = true;
bool ok;
mPrefs->mPassiveSyncAutoStart = false;
Q_UINT16 port = mPrefs->mPassiveSyncPort.toUInt(&ok);
if ( ! ok ) {
@@ -339,10 +351,12 @@ void KSyncManager::enableQuick( bool ask )
delete mServerSocket;
mServerSocket = 0;
return;
}
-
mPrefs->mPassiveSyncAutoStart = autoStart;
+ if ( changed ) {
+ mPrefs->writeConfig();
+ }
connect( mServerSocket, SIGNAL ( request_file() ),this, SIGNAL ( request_file() ) );
connect( mServerSocket, SIGNAL ( file_received( bool ) ), this, SIGNAL ( getFile( bool ) ) );
}