Port Plasma::Package to KPackage
Reviewers: #kwin Subscribers: kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D3814
This commit is contained in:
parent
dd289b5dee
commit
4d669b1912
4 changed files with 8 additions and 10 deletions
|
@ -19,7 +19,6 @@ target_link_libraries(kcm_kwin_scripts
|
||||||
KF5::KIOCore
|
KF5::KIOCore
|
||||||
KF5::I18n
|
KF5::I18n
|
||||||
KF5::Package
|
KF5::Package
|
||||||
KF5::Plasma
|
|
||||||
KF5::NewStuff
|
KF5::NewStuff
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@
|
||||||
#include <KPluginInfo>
|
#include <KPluginInfo>
|
||||||
#include <KPackage/PackageLoader>
|
#include <KPackage/PackageLoader>
|
||||||
#include <KPackage/Package>
|
#include <KPackage/Package>
|
||||||
#include <Plasma/Package>
|
|
||||||
|
|
||||||
#include <KNewStuff3/KNS3/Button>
|
#include <KNewStuff3/KNS3/Button>
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ target_link_libraries(kcm_kwintabbox
|
||||||
KF5::I18n
|
KF5::I18n
|
||||||
KF5::Service
|
KF5::Service
|
||||||
KF5::NewStuff
|
KF5::NewStuff
|
||||||
KF5::Plasma
|
KF5::Package
|
||||||
XCB::XCB
|
XCB::XCB
|
||||||
kwin4_effect_builtins
|
kwin4_effect_builtins
|
||||||
)
|
)
|
||||||
|
|
|
@ -43,8 +43,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#include <KShortcutsEditor>
|
#include <KShortcutsEditor>
|
||||||
#include <KNewStuff3/KNS3/DownloadDialog>
|
#include <KNewStuff3/KNS3/DownloadDialog>
|
||||||
// Plasma
|
// Plasma
|
||||||
#include <Plasma/Package>
|
#include <KPackage/Package>
|
||||||
#include <Plasma/PluginLoader>
|
#include <KPackage/PackageLoader>
|
||||||
|
|
||||||
// own
|
// own
|
||||||
#include "tabboxconfig.h"
|
#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;
|
QStringList paths;
|
||||||
const QStringList dataPaths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
|
const QStringList dataPaths = QStandardPaths::standardLocations(QStandardPaths::GenericDataLocation);
|
||||||
|
|
||||||
|
@ -175,9 +175,9 @@ static QList<Plasma::Package> availableLnFPackages()
|
||||||
|
|
||||||
const auto &p = paths;
|
const auto &p = paths;
|
||||||
for (const QString &path : p) {
|
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.setPath(path);
|
||||||
pkg.setFallbackPackage(Plasma::Package());
|
pkg.setFallbackPackage(KPackage::Package());
|
||||||
if (!pkg.filePath("defaults").isEmpty()) {
|
if (!pkg.filePath("defaults").isEmpty()) {
|
||||||
KSharedConfigPtr conf = KSharedConfig::openConfig(pkg.filePath("defaults"));
|
KSharedConfigPtr conf = KSharedConfig::openConfig(pkg.filePath("defaults"));
|
||||||
KConfigGroup cg = KConfigGroup(conf, "kwinrc");
|
KConfigGroup cg = KConfigGroup(conf, "kwinrc");
|
||||||
|
@ -205,7 +205,7 @@ void KWinTabBoxConfig::initLayoutLists()
|
||||||
for (const auto &package : lnfPackages) {
|
for (const auto &package : lnfPackages) {
|
||||||
const auto &metaData = package.metadata();
|
const auto &metaData = package.metadata();
|
||||||
layoutNames << metaData.name();
|
layoutNames << metaData.name();
|
||||||
layoutPlugins << metaData.pluginName();
|
layoutPlugins << metaData.pluginId();
|
||||||
layoutPaths << package.filePath("windowswitcher", QStringLiteral("WindowSwitcher.qml"));
|
layoutPaths << package.filePath("windowswitcher", QStringLiteral("WindowSwitcher.qml"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue