-rw-r--r-- | libopie2/opiecore/oglobal.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/libopie2/opiecore/oglobal.cpp b/libopie2/opiecore/oglobal.cpp index f6071be..ae2fcb6 100644 --- a/libopie2/opiecore/oglobal.cpp +++ b/libopie2/opiecore/oglobal.cpp | |||
@@ -27,10 +27,17 @@ | |||
27 | Inc., 59 Temple Place - Suite 330, | 27 | Inc., 59 Temple Place - Suite 330, |
28 | Boston, MA 02111-1307, USA. | 28 | Boston, MA 02111-1307, USA. |
29 | */ | 29 | */ |
30 | 30 | ||
31 | #include <opie2/oglobal.h> | 31 | #include <opie2/oglobal.h> |
32 | 32 | ||
33 | OConfig* OGlobal::_config = 0; | ||
34 | |||
33 | OConfig* OGlobal::config() | 35 | OConfig* OGlobal::config() |
34 | { | 36 | { |
35 | return globalconfig; | 37 | if ( !OGlobal::_config ) |
38 | { | ||
39 | qDebug( "OGlobal::creating global configuration instance." ); | ||
40 | OGlobal::_config = new OConfig( "global" ); | ||
41 | } | ||
42 | return OGlobal::_config; | ||
36 | } | 43 | } |