KPluginInfo::KPluginInfo( const KService::Ptr service ) : d( new KPluginInfoPrivate ) { if (!service) { d = 0; // isValid() == false return; } d->service = service; d->entryPath = service->entryPath(); if ( service->isDeleted() ) { d->hidden = true; return; } d->name = service->name(); d->comment = service->comment(); d->icon = service->icon(); d->author = service->property( QLatin1String("X-KDE-PluginInfo-Author") ).toString(); d->email = service->property( QLatin1String("X-KDE-PluginInfo-Email") ).toString(); d->pluginName = service->property( QLatin1String("X-KDE-PluginInfo-Name") ).toString(); d->version = service->property( QLatin1String("X-KDE-PluginInfo-Version") ).toString(); d->website = service->property( QLatin1String("X-KDE-PluginInfo-Website") ).toString(); d->category = service->property( QLatin1String("X-KDE-PluginInfo-Category") ).toString(); d->license = service->property( QLatin1String("X-KDE-PluginInfo-License") ).toString(); d->dependencies = service->property( QLatin1String("X-KDE-PluginInfo-Depends") ).toStringList(); QVariant tmp = service->property( QLatin1String("X-KDE-PluginInfo-EnabledByDefault") ); d->enabledbydefault = tmp.isValid() ? tmp.toBool() : false; }