Changeset View
Changeset View
Standalone View
Standalone View
tests/kplugins/plugintest.cpp
Show First 20 Lines • Show All 122 Lines • ▼ Show 20 Line(s) | |||||
123 | 123 | | |||
124 | } | 124 | } | ||
125 | 125 | | |||
126 | bool PluginTest::loadFromPlasma() | 126 | bool PluginTest::loadFromPlasma() | ||
127 | { | 127 | { | ||
128 | bool ok = false; | 128 | bool ok = false; | ||
129 | const QStringList allEngines = Plasma::PluginLoader::self()->listAllEngines(); | 129 | const QStringList allEngines = Plasma::PluginLoader::self()->listAllEngines(); | ||
130 | qDebug() << "All engines: " << allEngines; | 130 | qDebug() << "All engines: " << allEngines; | ||
131 | foreach (const QString &e, allEngines) { | 131 | for (const QString &e : allEngines) { | ||
132 | Plasma::DataEngine *engine = Plasma::PluginLoader::self()->loadDataEngine(e); | 132 | Plasma::DataEngine *engine = Plasma::PluginLoader::self()->loadDataEngine(e); | ||
133 | if (engine) { | 133 | if (engine) { | ||
134 | engine->connectSource(QStringLiteral("Europe/Amsterdam"), this); | 134 | engine->connectSource(QStringLiteral("Europe/Amsterdam"), this); | ||
135 | engine->connectSource(QStringLiteral("Battery"), this); | 135 | engine->connectSource(QStringLiteral("Battery"), this); | ||
136 | engine->connectAllSources(this); | 136 | engine->connectAllSources(this); | ||
137 | qDebug() << "SOURCE: " << engine->sources(); | 137 | qDebug() << "SOURCE: " << engine->sources(); | ||
138 | ok = true; | 138 | ok = true; | ||
139 | } | 139 | } | ||
▲ Show 20 Lines • Show All 49 Lines • Show Last 20 Lines |