-rw-r--r-- | microkde/kglobal.cpp | 14 |
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 @@ -30,15 +30,5 @@ 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; } @@ -96,4 +86,6 @@ void KGlobal::setAppName( const QString &appName ) { mAppName = appName; + + mConfig = new KConfig( locateLocal("config", mAppName + "rc" ) ); } |