summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (show 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
@@ -29,17 +29,7 @@ void KGlobal::setLocale(KLocale *kg)
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;
}
@@ -95,6 +85,8 @@ KStandardDirs *KGlobal::dirs()
void KGlobal::setAppName( const QString &appName )
{
mAppName = appName;
+
+ mConfig = new KConfig( locateLocal("config", mAppName + "rc" ) );
}
//US