~ubuntu-branches/ubuntu/precise/koffice/precise

« back to all changes in this revision

Viewing changes to kspread/part/ToolRegistry.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2010-10-27 17:52:57 UTC
  • mfrom: (0.12.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20101027175257-s04zqqk5bs8ckm9o
Tags: 1:2.2.83-0ubuntu1
* Merge with Debian git remaining changes:
 - Add build-deps on librcps-dev, opengtl-dev, libqtgtl-dev, freetds-dev,
   create-resources, libspnav-dev
 - Remove needless build-dep on libwv2-dev
 - koffice-libs recommends create-resources
 - krita recommends pstoedit
 - Keep our patches
* New upstream release 2.3 beta 3
  - Remove debian/patches fixed by upstream
  - Update install files

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
 
31
31
using namespace KSpread;
32
32
 
33
 
class ToolRegistrySingleton
34
 
{
35
 
public:
36
 
    ToolRegistry instance;
37
 
};
38
 
K_GLOBAL_STATIC(ToolRegistrySingleton, s_singleton)
39
 
 
40
33
 
41
34
class ToolRegistry::Private
42
35
{
60
53
 
61
54
ToolRegistry* ToolRegistry::instance()
62
55
{
63
 
    return &s_singleton->instance;
 
56
    K_GLOBAL_STATIC(ToolRegistry, s_instance)
 
57
    return s_instance;
64
58
}
65
59
 
66
60
void ToolRegistry::loadTools()
67
61
{
68
 
    const QString serviceType = QString::fromLatin1("KSpread/Plugin");
69
 
    const QString query = QString::fromLatin1("([X-KSpread-Version] >= 2) and "
70
 
                          "([X-KDE-PluginInfo-Category] == 'Tool')");
 
62
    const QString serviceType = QLatin1String("KSpread/Plugin");
 
63
    const QString query = QLatin1String("([X-KSpread-InterfaceVersion] == 0) and "
 
64
                                        "([X-KDE-PluginInfo-Category] == 'Tool')");
71
65
    const KService::List offers = KServiceTypeTrader::self()->query(serviceType, query);
72
66
    const KConfigGroup moduleGroup = KGlobal::config()->group("Plugins");
73
67
    const KPluginInfo::List pluginInfos = KPluginInfo::fromServices(offers, moduleGroup);