applets/systemmonitor: Don't load "metadata.desktop" to determine preset

Applets were apparently blindly converted to use JSON metadata without
checking the usage. At least KPackage now has a direct getter for the
package metadata, so use that to get the plugin ID instead of manually
loading the package metadata.

BUG: 448529
wilder-5.25
Arjen Hiemstra 4 years ago
parent 39ecc45e5b
commit 7736fc8dfa
  1. 2
      applets/systemmonitor/systemmonitor/systemmonitor.cpp

@ -45,7 +45,7 @@ void SystemMonitor::init()
// NOTE: taking the pluginId this way, we take it from the child applet (cpu monitor, memory, whatever) rather than the parent fallback applet
// (systemmonitor)
const QString pluginId = KPluginMetaData(kPackage().path() + QStringLiteral("metadata.desktop")).pluginId();
const QString pluginId = kPackage().metadata().pluginId();
// FIXME HACK: better way to get the engine At least AppletQuickItem should have an engine() getter
KDeclarative::QmlObjectSharedEngine *qmlObject = new KDeclarative::QmlObjectSharedEngine();

Loading…
Cancel
Save