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

« back to all changes in this revision

Viewing changes to kspread/FunctionModuleRegistry.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2010-09-21 15:36:35 UTC
  • mfrom: (1.4.1 upstream) (60.2.11 maverick)
  • Revision ID: james.westby@ubuntu.com-20100921153635-6tejqkiro2u21ydi
Tags: 1:2.2.2-0ubuntu3
Add kubuntu_03_fix-crash-on-closing-sqlite-connection-2.2.2.diff and
kubuntu_04_support-large-memo-values-for-msaccess-2.2.2.diff as
recommended by upstream http://kexi-
project.org/wiki/wikiview/index.php@Kexi2.2_Patches.html#sqlite_stab
ility

Show diffs side-by-side

added added

removed removed

Lines of Context:
62
62
 
63
63
 
64
64
FunctionModuleRegistry::FunctionModuleRegistry()
65
 
    : d(new Private)
 
65
        : d(new Private)
66
66
{
67
67
    d->repositoryInitialized = false;
68
68
    loadFunctions();
82
82
{
83
83
    const QString serviceType = QString::fromLatin1("KSpread/Plugin");
84
84
    const QString query = QString::fromLatin1("([X-KSpread-Version] >= 2) and "
85
 
                                              "([X-KDE-PluginInfo-Category] == 'FunctionModule')");
 
85
                          "([X-KDE-PluginInfo-Category] == 'FunctionModule')");
86
86
    const KService::List offers = KServiceTypeTrader::self()->query(serviceType, query);
87
87
    const KConfigGroup moduleGroup = KGlobal::config()->group("Plugins");
88
88
    const KPluginInfo::List pluginInfos = KPluginInfo::fromServices(offers, moduleGroup);
89
 
    foreach (KPluginInfo pluginInfo, pluginInfos) {
 
89
    foreach(KPluginInfo pluginInfo, pluginInfos) {
90
90
        KPluginFactory *factory = KPluginLoader(*pluginInfo.service()).factory();
91
91
        if (!factory) {
92
92
            kDebug(36002) << "Unable to create plugin factory for" << pluginInfo.name();
101
101
        if (pluginInfo.isPluginEnabled()) {
102
102
            // Module already registered?
103
103
            if (contains(module->id())) {
104
 
                continue; 
 
104
                continue;
105
105
            }
106
106
            add(module);
107
107
            // Is the function repository already initialized?