diff --git a/kcms/desktoppaths/CMakeLists.txt b/kcms/desktoppaths/CMakeLists.txt --- a/kcms/desktoppaths/CMakeLists.txt +++ b/kcms/desktoppaths/CMakeLists.txt @@ -12,7 +12,6 @@ KF5::I18n KF5::KIOCore KF5::KIOWidgets - KF5::KDELibs4Support # kglobalsettings ) install(TARGETS kcm_desktoppaths DESTINATION ${KDE_INSTALL_PLUGINDIR}) diff --git a/kcms/desktoppaths/globalpaths.cpp b/kcms/desktoppaths/globalpaths.cpp --- a/kcms/desktoppaths/globalpaths.cpp +++ b/kcms/desktoppaths/globalpaths.cpp @@ -51,7 +51,6 @@ // KDE #include #include -#include //KDELibs4Support #include #include #include @@ -237,7 +236,6 @@ KSharedConfig::Ptr config = KSharedConfig::openConfig(); KConfigGroup configGroup( config, "Paths" ); - bool pathChanged = false; bool autostartMoved = false; QUrl desktopURL(desktopLocation()); @@ -287,7 +285,6 @@ KConfig xdgUserConf( userDirsFile, KConfig::SimpleConfig ); KConfigGroup g( &xdgUserConf, "" ); g.writeEntry( "XDG_DESKTOP_DIR", QString("\"" + translatePath( urlDesktop ) + "\"") ); - pathChanged = true; } } @@ -298,31 +295,16 @@ if (autostartMoved) { configGroup.writePathEntry( "Autostart", urAutostart->url().toLocalFile(), KConfigBase::Normal | KConfigBase::Global ); - pathChanged = true; } } config->sync(); - if (xdgSavePath(urDocument, documentsLocation(), "XDG_DOCUMENTS_DIR", i18n("Documents"))) - pathChanged = true; - - if (xdgSavePath(urDownload, downloadLocation(), "XDG_DOWNLOAD_DIR", i18n("Downloads"))) - pathChanged = true; - - if (xdgSavePath(urMovie, moviesLocation(), "XDG_VIDEOS_DIR", i18n("Movies"))) - pathChanged = true; - - if (xdgSavePath(urPicture, picturesLocation(), "XDG_PICTURES_DIR", i18n("Pictures"))) - pathChanged = true; - - if (xdgSavePath(urMusic, musicLocation(), "XDG_MUSIC_DIR", i18n("Music"))) - pathChanged = true; - - if (pathChanged) { - qCDebug(KCM_DESKTOPPATH) << "sending message SettingsChanged"; - KGlobalSettings::self()->emitChange(KGlobalSettings::SettingsChanged, KGlobalSettings::SETTINGS_PATHS); - } + xdgSavePath(urDocument, documentsLocation(), "XDG_DOCUMENTS_DIR", i18n("Documents")); + xdgSavePath(urDownload, downloadLocation(), "XDG_DOWNLOAD_DIR", i18n("Downloads")); + xdgSavePath(urMovie, moviesLocation(), "XDG_VIDEOS_DIR", i18n("Movies")); + xdgSavePath(urPicture, picturesLocation(), "XDG_PICTURES_DIR", i18n("Pictures")); + xdgSavePath(urMusic, musicLocation(), "XDG_MUSIC_DIR", i18n("Music")); } bool DesktopPathConfig::xdgSavePath(KUrlRequester* ur, const QUrl& currentUrl, const char* xdgKey, const QString& type)