-rw-r--r-- | libkdepim/kcmconfigs/kdepimconfigwidget.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp index bbed38d..5cd845e 100644 --- a/libkdepim/kcmconfigs/kdepimconfigwidget.cpp +++ b/libkdepim/kcmconfigs/kdepimconfigwidget.cpp @@ -134,28 +134,35 @@ void KDEPIMConfigWidget::setupStoreTab() new QLabel( i18n("<b>New settings are used\nafter a restart</b>"), storePage ); new QLabel( i18n("Settings are stored in\n%1").arg(QDir::homeDirPath() + "/.microkdehome" ), storePage ); tabWidget->addTab( storePage, i18n( "Data storage path" ) ); } void KDEPIMConfigWidget::setStandardStore() { mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); saveStoreSettings(); } void KDEPIMConfigWidget::saveStoreSettings() { if ( !mStoreUrl->url().isEmpty() ) { - KConfig cfg ( QDir::homeDirPath() + "/.microkdehome" ); + QString path = QDir::homeDirPath(); + QString url = mStoreUrl->url(); +#ifdef DESKTOP_VERSION + if ( url.startsWith( "LOCAL:" ) ) { + path = qApp->applicationDirPath () ; + } +#endif + KConfig cfg ( path + "/.microkdehome" ); cfg.setGroup("Global"); - cfg.writeEntry( "MICROKDEHOME", mStoreUrl->url() ); - qDebug("cfg.writeEntry( MICROKDEHOME, mStoreUrl->url() ); "); + cfg.writeEntry( "MICROKDEHOME", url ); + qDebug("cfg.writeEntry( MICROKDEHOME, %s ", url.latin1()); cfg.sync(); } else { mStoreUrl->setURL( QDir::homeDirPath() + "/kdepim" ); saveStoreSettings(); } } void KDEPIMConfigWidget::setupExternalAppTab() { QWidget *externalAppsPage = new QWidget( this ); QVBoxLayout* layout = new QVBoxLayout( externalAppsPage, KDialog::marginHintSmall(), KDialog::spacingHintSmall() ); |