Commit 788ef152 authored by Alexander Lohnau's avatar Alexander Lohnau 💬
Browse files

Port away from KDeclarative::runtimePlatform

Instead use KRuntimePlatform::runtimePlatform from KCoreAddons.
The defunct code to set the runtime platform was removed. This value gets set using ENV variables.

Task: https://phabricator.kde.org/T15492
parent b5f90386
Pipeline #218537 passed with stage
in 6 minutes and 52 seconds
......@@ -25,7 +25,6 @@ target_link_libraries(plasmashellprivateplugin
KF5::NewStuff
KF5::KIOFileWidgets
KF5::WindowSystem
KF5::Declarative
KF5::Activities
KF5::TextWidgets
)
......
......@@ -13,10 +13,10 @@
#include "config-workspace.h"
#include <KAboutData>
#include <KConfig>
#include <KDeclarative/KDeclarative>
#include <KJsonUtils>
#include <KLocalizedString>
#include <KPackage/PackageLoader>
#include <KRuntimePlatform>
#include <KSycoca>
PlasmaAppletItem::PlasmaAppletItem(const KPluginMetaData &info)
......@@ -294,7 +294,7 @@ void PlasmaAppletItemModel::populateModel()
return false;
}
static const auto formFactors = KDeclarative::KDeclarative::runtimePlatform();
static const auto formFactors = KRuntimePlatform::runtimePlatform();
// If runtimePlatformis not defined, accept everything
bool inFormFactor = formFactors.isEmpty();
......
......@@ -3,7 +3,6 @@ add_definitions(-DTRANSLATION_DOMAIN=\"plasma_package_wallpaper\")
kcoreaddons_add_plugin(plasma_packagestructure_wallpaper SOURCES wallpaper.cpp INSTALL_NAMESPACE "kpackage/packagestructure")
target_link_libraries(plasma_packagestructure_wallpaper
KF5::Declarative
KF5::I18n
KF5::Package
)
......
......@@ -7,15 +7,15 @@
#include "wallpaper.h"
#include <KDeclarative/KDeclarative>
#include <KLocalizedString>
#include <KRuntimePlatform>
void QmlWallpaperPackage::initPackage(KPackage::Package *package)
{
package->addFileDefinition("mainscript", QStringLiteral("ui/main.qml"), i18n("Main Script File"));
package->setRequired("mainscript", true);
QStringList platform = KDeclarative::KDeclarative::runtimePlatform();
QStringList platform = KRuntimePlatform::runtimePlatform();
if (!platform.isEmpty()) {
QMutableStringListIterator it(platform);
while (it.hasNext()) {
......
......@@ -347,13 +347,6 @@ void ShellCorona::setShell(const QString &shell)
t->setThemeName(themeName);
}
// FIXME: this would change the runtime platform to a fixed one if available
// but a different way to load platform specific components is needed beforehand
// because if we import and use two different components plugin, the second time
// the import is called it will fail
/* KConfigGroup cg(KSharedConfig::openConfig(package.filePath("defaults")), "General");
KDeclarative::KDeclarative::setRuntimePlatform(cg.readEntry("DefaultRuntimePlatform", QStringList()));*/
unload();
/*
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment