Changeset View
Changeset View
Standalone View
Standalone View
src/services/kplugininfo.cpp
Show First 20 Lines • Show All 292 Lines • ▼ Show 20 Line(s) | 282 | if (v.canConvert<QVariantMap>()) { | |||
---|---|---|---|---|---|
293 | } | 293 | } | ||
294 | } | 294 | } | ||
295 | } | 295 | } | ||
296 | if (!d->metaData.isValid()) { | 296 | if (!d->metaData.isValid()) { | ||
297 | d.reset(); | 297 | d.reset(); | ||
298 | } | 298 | } | ||
299 | } | 299 | } | ||
300 | 300 | | |||
301 | #ifndef KSERVICE_NO_DEPRECATED | 301 | #if KSERVICE_BUILD_DEPRECATED_SINCE(5, 0) | ||
302 | KPluginInfo::KPluginInfo(const KService::Ptr service) | 302 | KPluginInfo::KPluginInfo(const KService::Ptr service) | ||
303 | : d(new KPluginInfoPrivate) | 303 | : d(new KPluginInfoPrivate) | ||
304 | { | 304 | { | ||
305 | if (!service) { | 305 | if (!service) { | ||
306 | d = nullptr; // isValid() == false | 306 | d = nullptr; // isValid() == false | ||
307 | return; | 307 | return; | ||
308 | } | 308 | } | ||
309 | d->service = service; | 309 | d->service = service; | ||
▲ Show 20 Lines • Show All 98 Lines • ▼ Show 20 Line(s) | 402 | { | |||
408 | } | 408 | } | ||
409 | return false; | 409 | return false; | ||
410 | } | 410 | } | ||
411 | 411 | | |||
412 | KPluginInfo::~KPluginInfo() | 412 | KPluginInfo::~KPluginInfo() | ||
413 | { | 413 | { | ||
414 | } | 414 | } | ||
415 | 415 | | |||
416 | #ifndef KSERVICE_NO_DEPRECATED | 416 | #if KSERVICE_BUILD_DEPRECATED_SINCE(5, 0) | ||
417 | QList<KPluginInfo> KPluginInfo::fromServices(const KService::List &services, const KConfigGroup &config) | 417 | QList<KPluginInfo> KPluginInfo::fromServices(const KService::List &services, const KConfigGroup &config) | ||
418 | { | 418 | { | ||
419 | QList<KPluginInfo> infolist; | 419 | QList<KPluginInfo> infolist; | ||
420 | for (KService::List::ConstIterator it = services.begin(); | 420 | for (KService::List::ConstIterator it = services.begin(); | ||
421 | it != services.end(); ++it) { | 421 | it != services.end(); ++it) { | ||
422 | KPluginInfo info(*it); | 422 | KPluginInfo info(*it); | ||
423 | if (info.isValid()) { | 423 | if (info.isValid()) { | ||
424 | info.setConfig(config); | 424 | info.setConfig(config); | ||
▲ Show 20 Lines • Show All 346 Lines • Show Last 20 Lines |