From 4d669b19125f07e8e227ea38565d29d7515680dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martina=20Fl=C3=B6ser?= Date: Mon, 26 Dec 2016 17:41:06 +0100 Subject: [PATCH] Port Plasma::Package to KPackage Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3814 --- kcmkwin/kwinscripts/CMakeLists.txt | 1 - kcmkwin/kwinscripts/module.cpp | 1 - kcmkwin/kwintabbox/CMakeLists.txt | 2 +- kcmkwin/kwintabbox/main.cpp | 14 +++++++------- 4 files changed, 8 insertions(+), 10 deletions(-) diff --git a/kcmkwin/kwinscripts/CMakeLists.txt b/kcmkwin/kwinscripts/CMakeLists.txt index c6cd344cea..e21879bcb6 100644 --- a/kcmkwin/kwinscripts/CMakeLists.txt +++ b/kcmkwin/kwinscripts/CMakeLists.txt @@ -19,7 +19,6 @@ target_link_libraries(kcm_kwin_scripts KF5::KIOCore KF5::I18n KF5::Package - KF5::Plasma KF5::NewStuff ) diff --git a/kcmkwin/kwinscripts/module.cpp b/kcmkwin/kwinscripts/module.cpp index 5042a73db4..93634876c7 100644 --- a/kcmkwin/kwinscripts/module.cpp +++ b/kcmkwin/kwinscripts/module.cpp @@ -35,7 +35,6 @@ #include #include #include -#include #include diff --git a/kcmkwin/kwintabbox/CMakeLists.txt b/kcmkwin/kwintabbox/CMakeLists.txt index d2db994579..b4d51027f8 100644 --- a/kcmkwin/kwintabbox/CMakeLists.txt +++ b/kcmkwin/kwintabbox/CMakeLists.txt @@ -26,7 +26,7 @@ target_link_libraries(kcm_kwintabbox KF5::I18n KF5::Service KF5::NewStuff - KF5::Plasma + KF5::Package XCB::XCB kwin4_effect_builtins ) diff --git a/kcmkwin/kwintabbox/main.cpp b/kcmkwin/kwintabbox/main.cpp index 9641b9334b..5e42cf7ccf 100644 --- a/kcmkwin/kwintabbox/main.cpp +++ b/kcmkwin/kwintabbox/main.cpp @@ -43,8 +43,8 @@ along with this program. If not, see . #include #include // Plasma -#include -#include +#include +#include // own #include "tabboxconfig.h" @@ -162,9 +162,9 @@ KWinTabBoxConfig::~KWinTabBoxConfig() } -static QList availableLnFPackages() +static QList availableLnFPackages() { - QList packages; + QList packages; QStringList paths; const QStringList dataPaths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation); @@ -175,9 +175,9 @@ static QList availableLnFPackages() const auto &p = paths; for (const QString &path : p) { - Plasma::Package pkg = Plasma::PluginLoader::self()->loadPackage(QStringLiteral("Plasma/LookAndFeel")); + KPackage::Package pkg = KPackage::PackageLoader::self()->loadPackage(QStringLiteral("Plasma/LookAndFeel")); pkg.setPath(path); - pkg.setFallbackPackage(Plasma::Package()); + pkg.setFallbackPackage(KPackage::Package()); if (!pkg.filePath("defaults").isEmpty()) { KSharedConfigPtr conf = KSharedConfig::openConfig(pkg.filePath("defaults")); KConfigGroup cg = KConfigGroup(conf, "kwinrc"); @@ -205,7 +205,7 @@ void KWinTabBoxConfig::initLayoutLists() for (const auto &package : lnfPackages) { const auto &metaData = package.metadata(); layoutNames << metaData.name(); - layoutPlugins << metaData.pluginName(); + layoutPlugins << metaData.pluginId(); layoutPaths << package.filePath("windowswitcher", QStringLiteral("WindowSwitcher.qml")); }