From a9c346ad83927cebb9f730b495a326c3dec12fe4 Mon Sep 17 00:00:00 2001 From: "Anselmo L. S. Melo" Date: Sat, 3 Aug 2013 17:33:50 -0300 Subject: [PATCH] Porting tabbox to Qt5/KF5: QStandardPaths REVIEW: 111973 --- tabbox/declarative.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tabbox/declarative.cpp b/tabbox/declarative.cpp index b3bb21b86b..b11f3ce9e6 100644 --- a/tabbox/declarative.cpp +++ b/tabbox/declarative.cpp @@ -30,6 +30,7 @@ along with this program. If not, see . #include #include #include +#include // include KDE #include @@ -37,7 +38,6 @@ along with this program. If not, see . #include #include #include -#include #include #include #include @@ -149,7 +149,7 @@ DeclarativeView::DeclarativeView(QAbstractItemModel *model, TabBoxConfig::TabBox } else if (m_mode == TabBoxConfig::DesktopTabBox) { rootContext()->setContextProperty(QStringLiteral("clientModel"), model); } - setSource(QUrl(KStandardDirs::locate("data", QLatin1String(KWIN_NAME) + QLatin1String("/tabbox/tabbox.qml")))); + setSource(QUrl(QStandardPaths::locate(QStandardPaths::GenericDataLocation, QLatin1String(KWIN_NAME) + QLatin1String("/tabbox/tabbox.qml")))); // FrameSvg m_frame->setImagePath(QStringLiteral("dialogs/background")); @@ -391,14 +391,14 @@ QString DeclarativeView::findWindowSwitcherScriptFile(KService::Ptr service) { const QString pluginName = service->property(QStringLiteral("X-KDE-PluginInfo-Name")).toString(); const QString scriptName = service->property(QStringLiteral("X-Plasma-MainScript")).toString(); - return KStandardDirs::locate("data", QStringLiteral(KWIN_NAME) + QStringLiteral("/tabbox/") + pluginName + QStringLiteral("/contents/") + scriptName); + return QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(KWIN_NAME) + QStringLiteral("/tabbox/") + pluginName + QStringLiteral("/contents/") + scriptName); } QString DeclarativeView::findDesktopSwitcherScriptFile(KService::Ptr service) { const QString pluginName = service->property(QStringLiteral("X-KDE-PluginInfo-Name")).toString(); const QString scriptName = service->property(QStringLiteral("X-Plasma-MainScript")).toString(); - return KStandardDirs::locate("data", QStringLiteral(KWIN_NAME) + QStringLiteral("/desktoptabbox/") + pluginName + QStringLiteral("/contents/") + scriptName); + return QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral(KWIN_NAME) + QStringLiteral("/desktoptabbox/") + pluginName + QStringLiteral("/contents/") + scriptName); } void DeclarativeView::slotEmbeddedChanged(bool enabled)