summaryrefslogtreecommitdiffabout
Unidiff
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,7 +1,8 @@
1#include "kglobal.h" 1#include "kglobal.h"
2#include "kstandarddirs.h"
2#include <qkeycode.h> 3#include <qkeycode.h>
3#include <qapplication.h> 4#include <qapplication.h>
4 5
5KLocale *KGlobal::mLocale = 0; 6KLocale *KGlobal::mLocale = 0;
6KConfig *KGlobal::mConfig = 0; 7KConfig *KGlobal::mConfig = 0;
7KIconLoader *KGlobal::mIconLoader = 0; 8KIconLoader *KGlobal::mIconLoader = 0;
@@ -25,14 +26,21 @@ void KGlobal::setLocale(KLocale *kg)
25{ 26{
26 mLocale = kg; 27 mLocale = kg;
27} 28}
28 29
29KConfig *KGlobal::config() 30KConfig *KGlobal::config()
30{ 31{
32 static bool reentrant = false;
33
34 if (reentrant)
35 return 0;
36
31 if ( !mConfig ) { 37 if ( !mConfig ) {
32 mConfig = new KConfig( KStandardDirs::appDir() + mAppName + "rc" ); 38 reentrant = true;
39 mConfig = new KConfig( locateLocal("config", mAppName + "rc" ) );
40 reentrant = false;
33 } 41 }
34 42
35 return mConfig; 43 return mConfig;
36} 44}
37 45
38KGlobal::Size KGlobal::getDesktopSize() 46KGlobal::Size KGlobal::getDesktopSize()