diff --git a/client.cpp b/client.cpp
index afb4920cbf..46bf618b10 100644
--- a/client.cpp
+++ b/client.cpp
@@ -44,11 +44,11 @@ along with this program. If not, see .
#include "workspace.h"
// KDE
#include
-#include
#include
// Qt
#include
#include
+#include
#ifdef KWIN_BUILD_SCRIPTING
#include
#include
@@ -1362,7 +1362,7 @@ void Client::killProcess(bool ask, xcb_timestamp_t timestamp)
::kill(pid, SIGTERM);
} else {
QString hostname = clientMachine()->isLocal() ? QStringLiteral("localhost") : QString::fromUtf8(clientMachine()->hostName());
- QProcess::startDetached(KStandardDirs::findExe(QStringLiteral("kwin_killer_helper")),
+ QProcess::startDetached(QStandardPaths::findExecutable(QStringLiteral("kwin_killer_helper")),
QStringList() << QStringLiteral("--pid") << QString::number(unsigned(pid)) << QStringLiteral("--hostname") << hostname
<< QStringLiteral("--windowname") << caption()
<< QStringLiteral("--applicationname") << QString::fromUtf8(resourceClass())
@@ -1742,7 +1742,7 @@ void Client::setCaption(const QString& _s, bool force)
static QScriptProgram stripTitle;
static QScriptValue script;
if (stripTitle.isNull()) {
- const QString scriptFile = KStandardDirs::locate("data", QStringLiteral(KWIN_NAME) + QStringLiteral("/stripTitle.js"));
+ const QString scriptFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(KWIN_NAME) + QStringLiteral("/stripTitle.js"));
if (!scriptFile.isEmpty()) {
QFile f(scriptFile);
if (f.open(QIODevice::ReadOnly|QIODevice::Text)) {
diff --git a/clients/aurorae/src/aurorae.cpp b/clients/aurorae/src/aurorae.cpp
index be3826cc7e..89c882ac84 100644
--- a/clients/aurorae/src/aurorae.cpp
+++ b/clients/aurorae/src/aurorae.cpp
@@ -26,6 +26,7 @@ along with this program. If not, see .
#include
#include
#include
+#include
#include
#include
@@ -33,7 +34,6 @@ along with this program. If not, see .
#include
#include
#include
-#include
#include
namespace Aurorae
@@ -92,12 +92,12 @@ void AuroraeFactory::initAurorae(KConfig &conf, KConfigGroup &group)
/* use logic from KDeclarative::setupBindings():
"addImportPath adds the path at the beginning, so to honour user's
paths we need to traverse the list in reverse order" */
- QStringListIterator paths(KGlobal::dirs()->findDirs("module", QStringLiteral("imports")));
+ QStringListIterator paths(QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("module/imports"), QStandardPaths::LocateDirectory));
paths.toBack();
while (paths.hasPrevious()) {
m_engine->addImportPath(paths.previous());
}
- m_component->loadUrl(QUrl(KStandardDirs::locate("data", QStringLiteral("kwin/aurorae/aurorae.qml"))));
+ m_component->loadUrl(QUrl(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("kwin/aurorae/aurorae.qml"))));
m_engine->rootContext()->setContextProperty(QStringLiteral("auroraeTheme"), m_theme);
m_themeName = themeName;
}
@@ -120,7 +120,7 @@ void AuroraeFactory::initQML(const KConfigGroup &group)
KPluginInfo plugininfo(service);
const QString pluginName = service->property(QStringLiteral("X-KDE-PluginInfo-Name")).toString();
const QString scriptName = service->property(QStringLiteral("X-Plasma-MainScript")).toString();
- const QString file = KStandardDirs::locate("data", QStringLiteral(KWIN_NAME) + QStringLiteral("/decorations/") + pluginName + QStringLiteral("/contents/") + scriptName);
+ const QString file = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(KWIN_NAME) + QStringLiteral("/decorations/") + pluginName + QStringLiteral("/contents/") + scriptName);
if (file.isNull()) {
kDebug(1212) << "Could not find script file for " << pluginName;
// TODO: what to do in error case?
@@ -131,7 +131,7 @@ void AuroraeFactory::initQML(const KConfigGroup &group)
/* use logic from KDeclarative::setupBindings():
"addImportPath adds the path at the beginning, so to honour user's
paths we need to traverse the list in reverse order" */
- QStringListIterator paths(KGlobal::dirs()->findDirs("module", QStringLiteral("imports")));
+ QStringListIterator paths(QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, QStringLiteral("module/imports"), QStandardPaths::LocateDirectory));
paths.toBack();
while (paths.hasPrevious()) {
m_engine->addImportPath(paths.previous());
diff --git a/clients/aurorae/src/lib/auroraetheme.cpp b/clients/aurorae/src/lib/auroraetheme.cpp
index bace934b2c..667eb28eea 100644
--- a/clients/aurorae/src/lib/auroraetheme.cpp
+++ b/clients/aurorae/src/lib/auroraetheme.cpp
@@ -27,7 +27,6 @@
#include
#include
#include
-#include
#include
namespace Aurorae {
@@ -65,11 +64,11 @@ AuroraeThemePrivate::~AuroraeThemePrivate()
void AuroraeThemePrivate::initButtonFrame(AuroraeButtonType type)
{
QString file(QStringLiteral("aurorae/themes/") + themeName + QStringLiteral("/") + AuroraeTheme::mapButtonToName(type) + QStringLiteral(".svg"));
- QString path = KGlobal::dirs()->findResource("data", file);
+ QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, file);
if (path.isEmpty()) {
// let's look for svgz
file.append(QStringLiteral("z"));
- path = KGlobal::dirs()->findResource("data", file);
+ path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, file);
}
if (!path.isEmpty()) {
pathes[ type ] = path;
@@ -113,10 +112,10 @@ void AuroraeTheme::loadTheme(const QString &name, const KConfig &config)
{
d->themeName = name;
QString file(QStringLiteral("aurorae/themes/") + d->themeName + QStringLiteral("/decoration.svg"));
- QString path = KGlobal::dirs()->findResource("data", file);
+ QString path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, file);
if (path.isEmpty()) {
file += QStringLiteral("z");
- path = KGlobal::dirs()->findResource("data", file);
+ path = QStandardPaths::locate(QStandardPaths::GenericDataLocation, file);
}
if (path.isEmpty()) {
kDebug(1216) << "Could not find decoration svg: aborting";