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
wilder-5.26
Alexander Lohnau 4 years ago
parent b5f903862e
commit 788ef1526b
  1. 1
      components/shellprivate/CMakeLists.txt
  2. 4
      components/shellprivate/widgetexplorer/plasmaappletitemmodel.cpp
  3. 1
      shell/packageplugins/qmlWallpaper/CMakeLists.txt
  4. 4
      shell/packageplugins/qmlWallpaper/wallpaper.cpp
  5. 7
      shell/shellcorona.cpp

@ -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();
/*

Loading…
Cancel
Save