summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kglobal.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp
index 6fa0dd6..2b1bd34 100644
--- a/microkde/kglobal.cpp
+++ b/microkde/kglobal.cpp
@@ -31,13 +31,3 @@ KConfig *KGlobal::config()
{
- static bool reentrant = false;
-
- if (reentrant)
- return 0;
-
- if ( !mConfig ) {
- reentrant = true;
- mConfig = new KConfig( locateLocal("config", mAppName + "rc" ) );
- reentrant = false;
- }
-
+ //mConfig is set inside setAppName. Though it has to be the first function you call.
return mConfig;
@@ -97,2 +87,4 @@ void KGlobal::setAppName( const QString &appName )
mAppName = appName;
+
+ mConfig = new KConfig( locateLocal("config", mAppName + "rc" ) );
}