Changeset View
Changeset View
Standalone View
Standalone View
src/plasma/scripting/scriptengine.cpp
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Line(s) | 57 | { | |||
---|---|---|---|---|---|
58 | return QString(); | 58 | return QString(); | ||
59 | } | 59 | } | ||
60 | 60 | | |||
61 | QStringList knownLanguages(Types::ComponentTypes types) | 61 | QStringList knownLanguages(Types::ComponentTypes types) | ||
62 | { | 62 | { | ||
63 | QStringList languages; | 63 | QStringList languages; | ||
64 | const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("plasma/scriptengines")); | 64 | const QVector<KPluginMetaData> plugins = KPluginLoader::findPlugins(QStringLiteral("plasma/scriptengines")); | ||
65 | 65 | | |||
66 | foreach (const auto &plugin, plugins) { | 66 | for (const auto &plugin : plugins) { | ||
67 | const QStringList componentTypes = KPluginMetaData::readStringList(plugins.first().rawData(), QStringLiteral("X-Plasma-ComponentTypes")); | 67 | const QStringList componentTypes = KPluginMetaData::readStringList(plugins.first().rawData(), QStringLiteral("X-Plasma-ComponentTypes")); | ||
68 | if (((types & Types::AppletComponent) && componentTypes.contains(QStringLiteral("Applet"))) | 68 | if (((types & Types::AppletComponent) && componentTypes.contains(QStringLiteral("Applet"))) | ||
69 | ||((types & Types::DataEngineComponent) && componentTypes.contains(QStringLiteral("DataEngine")))) { | 69 | ||((types & Types::DataEngineComponent) && componentTypes.contains(QStringLiteral("DataEngine")))) { | ||
70 | languages << plugin.value(QStringLiteral("X-Plasma-API")); | 70 | languages << plugin.value(QStringLiteral("X-Plasma-API")); | ||
71 | } | 71 | } | ||
72 | } | 72 | } | ||
73 | 73 | | |||
74 | return languages; | 74 | return languages; | ||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |