-rw-r--r-- | libopie2/opiecore/oglobal.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libopie2/opiecore/oglobal.cpp b/libopie2/opiecore/oglobal.cpp index ea02058..2968a7d 100644 --- a/libopie2/opiecore/oglobal.cpp +++ b/libopie2/opiecore/oglobal.cpp | |||
@@ -73,17 +73,26 @@ static char Base64DecMap[128] = | |||
73 | }; | 73 | }; |
74 | 74 | ||
75 | 75 | ||
76 | OConfig* OGlobal::_config = 0; | 76 | OConfig* OGlobal::_config = 0; |
77 | OConfig* OGlobal::_qpe_config = 0; | 77 | OConfig* OGlobal::_qpe_config = 0; |
78 | 78 | ||
79 | void OGlobal::clean_up() { | ||
80 | qWarning( "Oglobal clean up" ); | ||
81 | delete OGlobal::_config; | ||
82 | delete OGlobal::_qpe_config; | ||
83 | OGlobal::_config = 0; | ||
84 | OGlobal::_qpe_config = 0; | ||
85 | } | ||
86 | |||
79 | OConfig* OGlobal::config() | 87 | OConfig* OGlobal::config() |
80 | { | 88 | { |
81 | if ( !OGlobal::_config ) | 89 | if ( !OGlobal::_config ) |
82 | { | 90 | { |
83 | // odebug classes are reading config, so can't use them here! | 91 | // odebug classes are reading config, so can't use them here! |
92 | qAddPostRoutine( OGlobal::clean_up ); | ||
84 | qDebug( "OGlobal::creating global configuration instance." ); | 93 | qDebug( "OGlobal::creating global configuration instance." ); |
85 | OGlobal::_config = new OConfig( "global" ); | 94 | OGlobal::_config = new OConfig( "global" ); |
86 | } | 95 | } |
87 | return OGlobal::_config; | 96 | return OGlobal::_config; |
88 | } | 97 | } |
89 | 98 | ||