Port Plasma::Package to KPackage

Reviewers: #kwin

Subscribers: kwin

Tags: #kwin

Differential Revision: https://phabricator.kde.org/D3814
This commit is contained in:
Martina Flöser 2016-12-26 17:41:06 +01:00 committed by Martin Gräßlin
parent dd289b5dee
commit 4d669b1912
4 changed files with 8 additions and 10 deletions

View file

@ -19,7 +19,6 @@ target_link_libraries(kcm_kwin_scripts
KF5::KIOCore
KF5::I18n
KF5::Package
KF5::Plasma
KF5::NewStuff
)

View file

@ -35,7 +35,6 @@
#include <KPluginInfo>
#include <KPackage/PackageLoader>
#include <KPackage/Package>
#include <Plasma/Package>
#include <KNewStuff3/KNS3/Button>

View file

@ -26,7 +26,7 @@ target_link_libraries(kcm_kwintabbox
KF5::I18n
KF5::Service
KF5::NewStuff
KF5::Plasma
KF5::Package
XCB::XCB
kwin4_effect_builtins
)

View file

@ -43,8 +43,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#include <KShortcutsEditor>
#include <KNewStuff3/KNS3/DownloadDialog>
// Plasma
#include <Plasma/Package>
#include <Plasma/PluginLoader>
#include <KPackage/Package>
#include <KPackage/PackageLoader>
// own
#include "tabboxconfig.h"
@ -162,9 +162,9 @@ KWinTabBoxConfig::~KWinTabBoxConfig()
}
static QList<Plasma::Package> availableLnFPackages()
static QList<KPackage::Package> availableLnFPackages()
{
QList<Plasma::Package> packages;
QList<KPackage::Package> packages;
QStringList paths;
const QStringList dataPaths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
@ -175,9 +175,9 @@ static QList<Plasma::Package> 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"));
}