aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexandr Ivanov <alexandr.ivanov@tieto.com>2010-12-16 13:07:39 +0200
committerStanislav Ionascu <stanislav.ionascu@nokia.com>2011-01-03 11:01:44 +0200
commit320d5efbbda17c2746b2555cf50839d64f3d7ecf (patch)
tree80dcb6fb9aeb3b5d9047f7fb5e2d1647db42bda8
parente38575c43c1da424ff318bed92eb63a75335333b (diff)
Fixes: BMC#7117 - Unwanted gconf warnings
RevBy: Stanislav Ionascu Details: Call gconf_client_remove_dir() with the same dir as gconf_client_add_dir()
-rw-r--r--src/corelib/core/mgconfitem.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/core/mgconfitem.cpp b/src/corelib/core/mgconfitem.cpp
index c541e7b7..ea262cd2 100644
--- a/src/corelib/core/mgconfitem.cpp
+++ b/src/corelib/core/mgconfitem.cpp
@@ -403,11 +403,18 @@ MGConfItem::~MGConfItem()
QByteArray k = convertKey(priv->key);
gconf_client_notify_remove(client, priv->notify_id);
GError *error = NULL;
+
+ // Use the same dir as in ctor
+ int index = k.lastIndexOf('/');
+ if (index > 0) {
+ k = k.left(index);
+ }
gconf_client_remove_dir(client, k.data(), &error);
+
if(error) {
mWarning("MGConfItem") << error->message;
g_error_free(error);
- return;
+ //return; // or priv not deleted
}
}
}