summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--microkde/kglobal.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/microkde/kglobal.cpp b/microkde/kglobal.cpp
index 0aba952..6fa0dd6 100644
--- a/microkde/kglobal.cpp
+++ b/microkde/kglobal.cpp
@@ -1,13 +1,14 @@
#include "kglobal.h"
+#include "kstandarddirs.h"
#include <qkeycode.h>
#include <qapplication.h>
KLocale *KGlobal::mLocale = 0;
KConfig *KGlobal::mConfig = 0;
KIconLoader *KGlobal::mIconLoader = 0;
KStandardDirs *KGlobal::mDirs = 0;
QString KGlobal::mAppName = "godot";
KLocale *KGlobal::locale()
{
@@ -19,26 +20,33 @@ KLocale *KGlobal::locale()
return mLocale;
}
//US
void KGlobal::setLocale(KLocale *kg)
{
mLocale = kg;
}
KConfig *KGlobal::config()
{
+ static bool reentrant = false;
+
+ if (reentrant)
+ return 0;
+
if ( !mConfig ) {
- mConfig = new KConfig( KStandardDirs::appDir() + mAppName + "rc" );
+ reentrant = true;
+ mConfig = new KConfig( locateLocal("config", mAppName + "rc" ) );
+ reentrant = false;
}
return mConfig;
}
KGlobal::Size KGlobal::getDesktopSize()
{
#ifdef DESKTOP_VERSION
return KGlobal::Desktop;
#else
if ( QApplication::desktop()->width() < 480 )
return KGlobal::Small;