diff --git a/src/dolphincontextmenu.cpp b/src/dolphincontextmenu.cpp index e74adca558..d8f101454b 100644 --- a/src/dolphincontextmenu.cpp +++ b/src/dolphincontextmenu.cpp @@ -50,7 +50,6 @@ #include #include #include -#include #include #include diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 629faa154a..8668601b67 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -72,7 +72,6 @@ #include #include #include -#include #include #include #include @@ -87,6 +86,7 @@ #include #include #include +#include #include namespace { @@ -1481,7 +1481,7 @@ bool DolphinMainWindow::isKompareInstalled() const if (!initialized) { // TODO: maybe replace this approach later by using a menu // plugin like kdiff3plugin.cpp - installed = !KGlobal::dirs()->findExe("kompare").isEmpty(); + installed = !QStandardPaths::findExecutable(QStringLiteral("kompare")).isEmpty(); initialized = true; } return installed; diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index abfe1d62f5..aa7f720b4c 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -33,7 +33,7 @@ #include #include #include -#include +#include #include #include #include "placesitem.h" @@ -87,7 +87,7 @@ PlacesItemModel::PlacesItemModel(QObject* parent) : Baloo::IndexerConfig config; m_fileIndexingEnabled = config.fileIndexingEnabled(); #endif - const QString file = KStandardDirs::locateLocal("data", "kfileplaces/bookmarks.xml"); + const QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kfileplaces/bookmarks.xml"); m_bookmarkManager = KBookmarkManager::managerForFile(file, "kfilePlaces"); createSystemBookmarks(); diff --git a/src/settings/services/servicessettingspage.cpp b/src/settings/services/servicessettingspage.cpp index be43ae6565..e4f5b3fab7 100644 --- a/src/settings/services/servicessettingspage.cpp +++ b/src/settings/services/servicessettingspage.cpp @@ -32,7 +32,7 @@ #include #include #include -#include +#include #include #include @@ -195,7 +195,7 @@ void ServicesSettingsPage::loadServices() // Load generic services const KService::List entries = KServiceTypeTrader::self()->query("KonqPopupMenu/Plugin"); foreach (const KService::Ptr& service, entries) { - const QString file = KStandardDirs::locate("services", service->entryPath()); + const QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, "kservices5/" % service->entryPath()); const QList serviceActions = KDesktopFileActions::userDefinedServices(file, true); diff --git a/src/settings/viewpropertiesdialog.cpp b/src/settings/viewpropertiesdialog.cpp index 41a39f2a74..576154f2bd 100644 --- a/src/settings/viewpropertiesdialog.cpp +++ b/src/settings/viewpropertiesdialog.cpp @@ -34,7 +34,6 @@ #include #include #include -#include #include #include diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp index 46c8362747..95c44bc847 100644 --- a/src/views/viewproperties.cpp +++ b/src/views/viewproperties.cpp @@ -25,7 +25,6 @@ #include #include -#include #include #include #include @@ -34,6 +33,7 @@ #include #include #include +#include namespace { const int AdditionalInfoViewPropertiesVersion = 1; @@ -364,7 +364,8 @@ void ViewProperties::update() void ViewProperties::save() { kDebug() << "Saving view-properties to" << m_filePath; - KStandardDirs::makeDir(m_filePath); + QDir dir; + dir.mkpath(m_filePath); m_node->setVersion(CurrentViewPropertiesVersion); m_node->writeConfig(); m_changedProps = false; @@ -378,9 +379,10 @@ bool ViewProperties::exist() const QString ViewProperties::destinationDir(const QString& subDir) const { - QString basePath = KGlobal::mainComponent().componentName(); - basePath.append("/view_properties/").append(subDir); - return KStandardDirs::locateLocal("data", basePath); + QString path = QStandardPaths::writableLocation(QStandardPaths::DataLocation); + path.append(KGlobal::mainComponent().componentName()); + path.append("/view_properties/").append(subDir); + return path; } QString ViewProperties::viewModePrefix() const @@ -471,10 +473,3 @@ QString ViewProperties::directoryHashForUrl(const KUrl& url) hashString.replace('/', '-'); return hashString; } - -KUrl ViewProperties::mirroredDirectory() -{ - QString basePath = KGlobal::mainComponent().componentName(); - basePath.append("/view_properties/"); - return KUrl(KStandardDirs::locateLocal("data", basePath)); -} diff --git a/src/views/viewproperties.h b/src/views/viewproperties.h index 69b507f1b2..d794edf655 100644 --- a/src/views/viewproperties.h +++ b/src/views/viewproperties.h @@ -164,15 +164,6 @@ private: */ static QString directoryHashForUrl(const KUrl& url); - /** - * Returns the URL of the directory, where the mirrored view properties - * are stored into. Mirrored view properties are used if: - * - there is no write access for storing the view properties into - * the original directory - * - for non local directories - */ - static KUrl mirroredDirectory(); - Q_DISABLE_COPY(ViewProperties) private: