Changeset View
Changeset View
Standalone View
Standalone View
src/runnermanager.cpp
Show First 20 Lines • Show All 293 Lines • ▼ Show 20 Line(s) | 290 | { | |||
---|---|---|---|---|---|
294 | 294 | | |||
295 | AbstractRunner *runner = nullptr; | 295 | AbstractRunner *runner = nullptr; | ||
296 | 296 | | |||
297 | const QString api = service->property(QStringLiteral("X-Plasma-API")).toString(); | 297 | const QString api = service->property(QStringLiteral("X-Plasma-API")).toString(); | ||
298 | 298 | | |||
299 | if (api.isEmpty()) { | 299 | if (api.isEmpty()) { | ||
300 | QVariantList args; | 300 | QVariantList args; | ||
301 | args << service->storageId(); | 301 | args << service->storageId(); | ||
302 | if (Plasma::isPluginVersionCompatible(KPluginLoader(*service).pluginVersion())) { | 302 | const quint64 pluginVersion = KPluginLoader(*service).pluginVersion(); | ||
303 | if (Plasma::isPluginVersionCompatible(pluginVersion)) { | ||||
303 | QString error; | 304 | QString error; | ||
304 | runner = service->createInstance<AbstractRunner>(q, args, &error); | 305 | runner = service->createInstance<AbstractRunner>(q, args, &error); | ||
305 | if (!runner) { | 306 | if (!runner) { | ||
306 | #ifndef NDEBUG | 307 | #ifndef NDEBUG | ||
307 | // qCDebug(KRUNNER) << "Failed to load runner:" << service->name() << ". error reported:" << error; | 308 | // qCDebug(KRUNNER) << "Failed to load runner:" << service->name() << ". error reported:" << error; | ||
308 | #endif | 309 | #endif | ||
309 | } | 310 | } | ||
311 | } else { | ||||
312 | const QString runnerVersion = QStringLiteral("%1.%2.%3").arg(pluginVersion >> 16).arg((pluginVersion >> 8) & 0x00ff).arg(pluginVersion & 0x0000ff); | ||||
313 | qCWarning(KRUNNER) << "Cannot load runner" << service->name() <<"- versions mismatch: KRunner" | ||||
314 | << Plasma::versionString()<< "," << service->name() << runnerVersion; | ||||
310 | } | 315 | } | ||
311 | } else if (api == QLatin1String("DBus")){ | 316 | } else if (api == QLatin1String("DBus")){ | ||
312 | runner = new DBusRunner(service, q); | 317 | runner = new DBusRunner(service, q); | ||
313 | } else { | 318 | } else { | ||
314 | //qCDebug(KRUNNER) << "got a script runner known as" << api; | 319 | //qCDebug(KRUNNER) << "got a script runner known as" << api; | ||
315 | runner = new AbstractRunner(service, q); | 320 | runner = new AbstractRunner(service, q); | ||
316 | } | 321 | } | ||
317 | 322 | | |||
▲ Show 20 Lines • Show All 536 Lines • Show Last 20 Lines |