diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/kconfig.cpp | 6 | ||||
| -rw-r--r-- | src/core/kconfig.h | 3 | ||||
| -rw-r--r-- | src/core/kcoreconfigskeleton.cpp | 2 | 
3 files changed, 7 insertions, 4 deletions
| diff --git a/src/core/kconfig.cpp b/src/core/kconfig.cpp index 5b51cce8..4695621a 100644 --- a/src/core/kconfig.cpp +++ b/src/core/kconfig.cpp @@ -259,8 +259,10 @@ KConfig::KConfig(const QString &file, OpenFlags mode,  {      d_ptr->changeFileName(file); // set the local file name -    // read initial information off disk -    reparseConfiguration(); +    if ((mode & DelayedParsing) == 0) { +        // read initial information off disk +        reparseConfiguration(); +    }  }  KConfig::KConfig(const QString &file, const QString &backend, QStandardPaths::StandardLocation resourceType) diff --git a/src/core/kconfig.h b/src/core/kconfig.h index d27eebe7..5685ebdb 100644 --- a/src/core/kconfig.h +++ b/src/core/kconfig.h @@ -95,7 +95,8 @@ public:          SimpleConfig    = 0x00, ///< Just a single config file.          NoCascade       = IncludeGlobals, ///< Include user's globals, but omit system settings.          NoGlobals       = CascadeConfig, ///< Cascade to system settings, but omit user's globals. -        FullConfig      = IncludeGlobals | CascadeConfig ///< Fully-fledged config, including globals and cascading to system settings +        FullConfig      = IncludeGlobals | CascadeConfig, ///< Fully-fledged config, including globals and cascading to system settings +        DelayedParsing  = 0x04 ///< Do not parse in the constructor, require a call to reparseConfiguration      };      Q_DECLARE_FLAGS(OpenFlags, OpenFlag) diff --git a/src/core/kcoreconfigskeleton.cpp b/src/core/kcoreconfigskeleton.cpp index 9c5fb4a8..0c1a96fa 100644 --- a/src/core/kcoreconfigskeleton.cpp +++ b/src/core/kcoreconfigskeleton.cpp @@ -986,7 +986,7 @@ KCoreConfigSkeleton::KCoreConfigSkeleton(const QString &configname, QObject *par  {      //qDebug() << "Creating KCoreConfigSkeleton (" << (void *)this << ")"; -    d->mConfig = KSharedConfig::openConfig(configname); +    d->mConfig = KSharedConfig::openConfig(configname, KConfig::FullConfig | KConfig::DelayedParsing);  }  KCoreConfigSkeleton::KCoreConfigSkeleton(KSharedConfig::Ptr pConfig, QObject *parent) | 
