summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2013-02-22 12:52:54 (GMT)
committerChristian Mollekopf <chrigi_1@fastmail.fm>2013-02-22 12:52:54 (GMT)
commite133591c8667698cd471eaa70e79a13446c966e2 (patch)
treed9d823a34add6c109869551cbcc01bca8f4678c1
parentd58df884dde2633c818845c2eaccf66486b39075 (diff)
downloadlibcalendaring-e133591c8667698cd471eaa70e79a13446c966e2.tar.gz
Avoid creating kdebugrc.
-rw-r--r--kdecore/io/kdebug.cpp19
1 files changed, 12 insertions, 7 deletions
diff --git a/kdecore/io/kdebug.cpp b/kdecore/io/kdebug.cpp
index b29df9f..dbb7c04 100644
--- a/kdecore/io/kdebug.cpp
+++ b/kdecore/io/kdebug.cpp
@@ -253,7 +253,9 @@ struct KDebugPrivate
~KDebugPrivate()
{
- delete config;
+ if (config) {
+ delete config;
+ }
#ifndef KDE_NO_DBUS
delete kDebugDBusIface;
#endif
@@ -397,11 +399,12 @@ struct KDebugPrivate
KConfig* configObject()
{
- if (!config) {
- config = new KConfig(QLatin1String("kdebugrc"), KConfig::NoGlobals);
- m_disableAll = config->group(QString()).readEntry("DisableAll", false);
- }
- return config;
+ return 0;
+ // if (!config) {
+ // config = new KConfig(QLatin1String("kdebugrc"), KConfig::NoGlobals);
+ // m_disableAll = config->group(QString()).readEntry("DisableAll", false);
+ // }
+ // return config;
}
Cache::Iterator areaData(QtMsgType type, unsigned int num, bool enableByDefault = true)
@@ -812,7 +815,9 @@ void kClearDebugConfig()
if (!kDebug_data) return;
KDebugPrivate* d = kDebug_data;
QMutexLocker locker(&d->mutex);
- delete d->config;
+ if (d->config) {
+ delete d->config;
+ }
d->config = 0;
KDebugPrivate::Cache::Iterator it = d->cache.begin(),