aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel
diff options
context:
space:
mode:
authorNick Dedekind <nick.dedekind@canonical.com>2016-02-19 11:06:04 +0000
committerNick Dedekind <nick.dedekind@canonical.com>2016-02-19 11:06:04 +0000
commit2291decf1d2a2a6cb88f600c3371bcecda0e51c7 (patch)
tree4fdc33a2f0461385ef05cd97598f7b4b8032ae00 /libqmenumodel
parente6e4babce2ed63c327f85180d77e24dc6a330c11 (diff)
downloadqmenumodel-2291decf1d2a2a6cb88f600c3371bcecda0e51c7.tar.gz
qmenumodel-2291decf1d2a2a6cb88f600c3371bcecda0e51c7.tar.bz2
qmenumodel-2291decf1d2a2a6cb88f600c3371bcecda0e51c7.zip
use logging categories
Diffstat (limited to 'libqmenumodel')
-rw-r--r--libqmenumodel/src/unitymenumodel.cpp7
1 files changed, 5 insertions, 2 deletions
diff --git a/libqmenumodel/src/unitymenumodel.cpp b/libqmenumodel/src/unitymenumodel.cpp
index 63d5e5b..67fe95d 100644
--- a/libqmenumodel/src/unitymenumodel.cpp
+++ b/libqmenumodel/src/unitymenumodel.cpp
@@ -22,6 +22,7 @@
#include "unitymenumodelevents.h"
#include "unitymenuaction.h"
#include "unitymenuactionevents.h"
+#include "logging.h"
#include <QIcon>
#include <QQmlComponent>
@@ -33,6 +34,8 @@ extern "C" {
#include "gtk/gtksimpleactionobserver.h"
}
+Q_LOGGING_CATEGORY(unitymenumodel, "qmenumodel.unitymenumodel", QtWarningMsg)
+
G_DEFINE_QUARK (UNITY_MENU_MODEL, unity_menu_model)
G_DEFINE_QUARK (UNITY_SUBMENU_MODEL, unity_submenu_model)
G_DEFINE_QUARK (UNITY_MENU_ITEM_EXTENDED_ATTRIBUTES, unity_menu_item_extended_attributes)
@@ -654,7 +657,7 @@ bool UnityMenuModel::loadExtendedAttributes(int position, const QVariantMap &sch
GVariant *value = gtk_menu_tracker_item_get_attribute_value (item, name.toUtf8(), NULL);
if (value == NULL) {
- qWarning("loadExtendedAttributes: menu item does not contain '%s'", it.key().toUtf8().constData());
+ qCDebug(unitymenumodel, "loadExtendedAttributes: menu item does not contain '%s'", it.key().toUtf8().constData());
continue;
}
@@ -662,7 +665,7 @@ bool UnityMenuModel::loadExtendedAttributes(int position, const QVariantMap &sch
if (qvalue.isValid())
extendedAttrs->insert(qtify_name (name.toUtf8()), qvalue);
else
- qWarning("loadExtendedAttributes: key '%s' is of type '%s' (expected '%s')",
+ qCWarning(unitymenumodel, "loadExtendedAttributes: key '%s' is of type '%s' (expected '%s')",
name.toUtf8().constData(), g_variant_get_type_string(value), type.constData());
g_variant_unref (value);