122
122
d->name = service->name();
123
123
d->comment = service->comment();
124
124
d->icon = service->icon();
125
d->author = service->property( "X-KDE-PluginInfo-Author" ).toString();
126
d->email = service->property( "X-KDE-PluginInfo-Email" ).toString();
127
d->pluginName = service->property( "X-KDE-PluginInfo-Name" ).toString();
128
d->version = service->property( "X-KDE-PluginInfo-Version" ).toString();
129
d->website = service->property( "X-KDE-PluginInfo-Website" ).toString();
130
d->category = service->property( "X-KDE-PluginInfo-Category" ).toString();
131
d->license = service->property( "X-KDE-PluginInfo-License" ).toString();
125
d->author = service->property( QLatin1String("X-KDE-PluginInfo-Author") ).toString();
126
d->email = service->property( QLatin1String("X-KDE-PluginInfo-Email") ).toString();
127
d->pluginName = service->property( QLatin1String("X-KDE-PluginInfo-Name") ).toString();
128
d->version = service->property( QLatin1String("X-KDE-PluginInfo-Version") ).toString();
129
d->website = service->property( QLatin1String("X-KDE-PluginInfo-Website") ).toString();
130
d->category = service->property( QLatin1String("X-KDE-PluginInfo-Category") ).toString();
131
d->license = service->property( QLatin1String("X-KDE-PluginInfo-License") ).toString();
132
132
d->dependencies =
133
service->property( "X-KDE-PluginInfo-Depends" ).toStringList();
134
QVariant tmp = service->property( "X-KDE-PluginInfo-EnabledByDefault" );
133
service->property( QLatin1String("X-KDE-PluginInfo-Depends") ).toStringList();
134
QVariant tmp = service->property( QLatin1String("X-KDE-PluginInfo-EnabledByDefault") );
135
135
d->enabledbydefault = tmp.isValid() ? tmp.toBool() : false;
220
220
QList<KPluginInfo> KPluginInfo::fromKPartsInstanceName(const QString &name, const KConfigGroup &config)
222
QStringList files = KGlobal::dirs()->findAllResources( "data",
223
name + "/kpartplugins/*.desktop",
224
KStandardDirs::Recursive );
222
const QStringList files = KGlobal::dirs()->findAllResources(
223
"data", name + QString::fromLatin1("/kpartplugins/*.desktop"),
224
KStandardDirs::Recursive );
225
225
return fromFiles(files, config);
341
341
KPLUGININFO_ISVALID_ASSERTION;
342
342
if ( !d->kcmservicesCached )
344
d->kcmservices = KServiceTypeTrader::self()->query( "KCModule", '\'' + d->pluginName +
345
"' in [X-KDE-ParentComponents]" );
346
kDebug( d->debugArea() ) << "found " << d->kcmservices.count() << " offers for " <<
347
d->pluginName << endl;
344
d->kcmservices = KServiceTypeTrader::self()->query( QLatin1String("KCModule"), QLatin1Char('\'') + d->pluginName +
345
QString::fromLatin1("' in [X-KDE-ParentComponents]") );
346
kDebug(d->debugArea()) << "found" << d->kcmservices.count() << "offers for" << d->pluginName;
349
348
d->kcmservicesCached = true;
378
377
KPLUGININFO_ISVALID_ASSERTION;
379
378
//kDebug( d->debugArea() ) ;
380
379
if (config.isValid()) {
381
config.writeEntry(d->pluginName + "Enabled", isPluginEnabled());
380
config.writeEntry(d->pluginName + QString::fromLatin1("Enabled"), isPluginEnabled());
383
382
if (!d->config.isValid()) {
384
383
kWarning( d->debugArea() ) << "no KConfigGroup, cannot save";
387
d->config.writeEntry(d->pluginName + "Enabled", isPluginEnabled());
386
d->config.writeEntry(d->pluginName + QString::fromLatin1("Enabled"), isPluginEnabled());
393
392
KPLUGININFO_ISVALID_ASSERTION;
394
393
//kDebug( d->debugArea() ) ;
395
394
if (config.isValid()) {
396
setPluginEnabled(config.readEntry(d->pluginName + "Enabled", isPluginEnabledByDefault()));
395
setPluginEnabled(config.readEntry(d->pluginName + QString::fromLatin1("Enabled"), isPluginEnabledByDefault()));
398
397
if (!d->config.isValid()) {
399
398
kWarning( d->debugArea() ) << "no KConfigGroup, cannot load";
402
setPluginEnabled(d->config.readEntry(d->pluginName + "Enabled", isPluginEnabledByDefault()));
401
setPluginEnabled(d->config.readEntry(d->pluginName + QString::fromLatin1("Enabled"), isPluginEnabledByDefault()));