summaryrefslogtreecommitdiffabout
path: root/korganizer/kosyncprefsdialog.cpp
Side-by-side diff
Diffstat (limited to 'korganizer/kosyncprefsdialog.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--korganizer/kosyncprefsdialog.cpp44
1 files changed, 30 insertions, 14 deletions
diff --git a/korganizer/kosyncprefsdialog.cpp b/korganizer/kosyncprefsdialog.cpp
index b7e4265..7c838f5 100644
--- a/korganizer/kosyncprefsdialog.cpp
+++ b/korganizer/kosyncprefsdialog.cpp
@@ -31,2 +31,3 @@
#include <qfile.h>
+#include <qdir.h>
#include <qtextstream.h>
@@ -61,6 +62,6 @@
-#include "koprefs.h"
+//#include "koprefs.h"
#include "kosyncprefsdialog.h"
-#include "koglobals.h"
+//#include "koglobals.h"
@@ -235,3 +236,3 @@ void KOSyncPrefsDialog::chooseFile()
{
- QString fn =KOPrefs::instance()->mLastSyncedLocalFile;
+ QString fn = QDir::homeDirPath();
@@ -415,8 +416,22 @@ void KOSyncPrefsDialog::cloneProfile()
+void KOSyncPrefsDialog::setLocalMachineName ( const QString& name )
+{
+ mMyMachineName->setText( name );
+}
+QString KOSyncPrefsDialog::getLocalMachineName ( )
+{
+ return mMyMachineName->text();
+}
+
+QStringList KOSyncPrefsDialog::getSyncProfileNames()
+{
+ return mSyncProfileNames;
+}
void KOSyncPrefsDialog::usrReadConfig()
{
- KConfig *config = KOGlobals::config();
- config->setGroup("SyncProfiles");
- mSyncProfileNames = KOPrefs::instance()->mSyncProfileNames;
+ //KConfig *config = KOGlobals::config();
+ KConfig config ( locateLocal( "config","syncprofilesrc" ) );
+ config.setGroup("SyncProfiles");
+ mSyncProfileNames =config.readListEntry("SyncProfileNames");
int i;
@@ -427,3 +442,3 @@ void KOSyncPrefsDialog::usrReadConfig()
temp->setName( mSyncProfileNames[i] );
- temp->readConfig( config );
+ temp->readConfig( &config );
mSyncProfiles.append( temp );
@@ -431,3 +446,3 @@ void KOSyncPrefsDialog::usrReadConfig()
insertProfiles();
- mMyMachineName->setText(KOPrefs::instance()->mLocalMachineName );
+ //mMyMachineName->setText(KOPrefs::instance()->mLocalMachineName );
}
@@ -440,12 +455,13 @@ void KOSyncPrefsDialog::usrWriteConfig()
profileChanged(currentSelection);
- KConfig *config = KOGlobals::config();
- config->setGroup("SyncProfiles");
+ //KConfig *config = KOGlobals::config();
+ KConfig config ( locateLocal( "config","syncprofilesrc" ) );
+ config.setGroup("SyncProfiles");
KSyncProfile* prof = mSyncProfiles.first();
while ( prof ) {
- prof->writeConfig(config);
+ prof->writeConfig(&config);
prof = mSyncProfiles.next();
}
- KOPrefs::instance()->mSyncProfileNames = mSyncProfileNames;
- KOPrefs::instance()->mLocalMachineName = mMyMachineName->text();
- config->writeEntry("SyncProfileNames",&mSyncProfileNames);
+ //KOPrefs::instance()->mSyncProfileNames = mSyncProfileNames;
+ //KOPrefs::instance()->mLocalMachineName = mMyMachineName->text();
+ config.writeEntry("SyncProfileNames",&mSyncProfileNames);
}