summaryrefslogtreecommitdiff
path: root/libopie2/opiecore/oglobal.cpp
Side-by-side diff
Diffstat (limited to 'libopie2/opiecore/oglobal.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/oglobal.cpp9
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
@@ -76,11 +76,20 @@ static char Base64DecMap[128] =
OConfig* OGlobal::_config = 0;
OConfig* OGlobal::_qpe_config = 0;
+void OGlobal::clean_up() {
+ qWarning( "Oglobal clean up" );
+ delete OGlobal::_config;
+ delete OGlobal::_qpe_config;
+ OGlobal::_config = 0;
+ OGlobal::_qpe_config = 0;
+}
+
OConfig* OGlobal::config()
{
if ( !OGlobal::_config )
{
// odebug classes are reading config, so can't use them here!
+ qAddPostRoutine( OGlobal::clean_up );
qDebug( "OGlobal::creating global configuration instance." );
OGlobal::_config = new OConfig( "global" );
}