~ubuntu-branches/ubuntu/natty/kde4libs/natty-proposed

« back to all changes in this revision

Viewing changes to kdecore/services/kplugininfo.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell, Scott Kitterman, Jonathan Riddell
  • Date: 2010-11-22 17:59:02 UTC
  • mfrom: (1.6.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101122175902-yubxubd0pg6hn11z
Tags: 4:4.5.80a-0ubuntu1
[ Scott Kitterman ]
* New upstream beta release
  - Refreshed all patches
  - Updated debian/patches/10_make_libkdeinit4_private.diff to use Qfile
    instead of Qstring in kdecore/kernel/kstandarddirs_unix.cpp
  - Updated debian/patches/kubuntu_01_kubuntu_useragent.diff to provide
    Kubuntu in the Konqueror user agen string with the changes in
    kio/kio/kprotocolmanager.cpp
  - Partially updated debian/patches/kubuntu_05_langpack_desktop_files.diff
    and left the balance in kdecore/localization/klocale.cpp.rej for later
    revision
  - Update debian/patches/kubuntu_06_user_disk_mounting.diff for changes in
    solid/solid/backends/hal/halstorageaccess.cpp
  - Remove debian/patches/kubuntu_71_backport_plasma_webview_changes.diff
    (backported from upstream, so already present now)
  - Add minimum version for libattica-dev of 0.1.90 to build-depends
  - Bump minimum version for libsoprano-dev build-depend to 2.5.60
  - Add minimum version for shared-desktop-ontologies of 0.5 in build-dep

[ Jonathan Riddell ]
* Add build-depends on grantlee, libudev-dev, hupnp (FIXME needs packaging fixes)
* Update kubuntu_04_add_langpack_path.diff 28_find_old_kde4_html_documentation.diff
  22_hack_in_etc_kde4_in_kstandarddirs.diff for QT_NO_CAST_FROM_ASCII
* Update kubuntu_05_langpack_desktop_files.diff for new upstream code
* Add kubuntu_78_solid_trunk.diff to fix solid linking
* Add libnepomukutils4 package for new library
* Don't install kcm_ssl for now, e-mailed upstream to suggest moving to kdebase
* Add kubuntu_79_knewstuff_fix.diff to fix compile broken by non-trunk commit
  http://websvn.kde.org/?view=revision&revision=1199825
* kdelibs5-data replaces old kdebase-runtime-data due to moved file
* Add kubuntu_80_find_hupnp.diff to find hupnp include files, committed upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
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;
136
136
}
137
137
 
219
219
 
220
220
QList<KPluginInfo> KPluginInfo::fromKPartsInstanceName(const QString &name, const KConfigGroup &config)
221
221
{
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);
226
226
}
227
227
 
341
341
    KPLUGININFO_ISVALID_ASSERTION;
342
342
    if ( !d->kcmservicesCached )
343
343
    {
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;
348
347
 
349
348
        d->kcmservicesCached = true;
350
349
    }
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());
382
381
    } else {
383
382
        if (!d->config.isValid()) {
384
383
            kWarning( d->debugArea() ) << "no KConfigGroup, cannot save";
385
384
            return;
386
385
        }
387
 
        d->config.writeEntry(d->pluginName + "Enabled", isPluginEnabled());
 
386
        d->config.writeEntry(d->pluginName + QString::fromLatin1("Enabled"), isPluginEnabled());
388
387
    }
389
388
}
390
389
 
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()));
397
396
    } else {
398
397
        if (!d->config.isValid()) {
399
398
            kWarning( d->debugArea() ) << "no KConfigGroup, cannot load";
400
399
            return;
401
400
        }
402
 
        setPluginEnabled(d->config.readEntry(d->pluginName + "Enabled", isPluginEnabledByDefault()));
 
401
        setPluginEnabled(d->config.readEntry(d->pluginName + QString::fromLatin1("Enabled"), isPluginEnabledByDefault()));
403
402
    }
404
403
}
405
404