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
@@ -24,27 +24,17 @@ KLocale *KGlobal::locale()
//US
void KGlobal::setLocale(KLocale *kg)
{
mLocale = 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;
}
KGlobal::Size KGlobal::getDesktopSize()
{
#ifdef DESKTOP_VERSION
return KGlobal::Desktop;
#else
@@ -90,16 +80,18 @@ KStandardDirs *KGlobal::dirs()
}
return mDirs;
}
void KGlobal::setAppName( const QString &appName )
{
mAppName = appName;
+
+ mConfig = new KConfig( locateLocal("config", mAppName + "rc" ) );
}
//US
QString KGlobal::getAppName()
{
return mAppName;
}
QString KGlobal::formatMessage ( QString mess, int maxlen )