[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: [plasma-workspace] libdbusmenuqt: [libdbusmenuqt] Port to categorized logging
From: Kai Uwe Broulik <null () kde ! org>
Date: 2018-09-12 9:55:44
Message-ID: E1g01s8-0003J1-VV () code ! kde ! org
[Download RAW message or body]
Git commit 1e1ce733920d4086c500ead03987b32eb175b18c by Kai Uwe Broulik.
Committed on 12/09/2018 at 09:55.
Pushed by broulik into branch 'master'.
[libdbusmenuqt] Port to categorized logging
And make it less chatty overall, none of these are real "warnings"
Differential Revision: https://phabricator.kde.org/D15447
M +5 -0 libdbusmenuqt/CMakeLists.txt
M +8 -6 libdbusmenuqt/dbusmenuimporter.cpp
https://commits.kde.org/plasma-workspace/1e1ce733920d4086c500ead03987b32eb175b18c
diff --git a/libdbusmenuqt/CMakeLists.txt b/libdbusmenuqt/CMakeLists.txt
index 49d34204..6ddc9493 100644
--- a/libdbusmenuqt/CMakeLists.txt
+++ b/libdbusmenuqt/CMakeLists.txt
@@ -5,6 +5,11 @@ dbusmenutypes_p.cpp
utils.cpp
)
+ecm_qt_declare_logging_category(libdbusmenu_SRCS HEADER debug.h
+ IDENTIFIER DBUSMENUQT
+ CATEGORY_NAME \
org.kde.libdbusmenuqt + \
DEFAULT_SEVERITY Info) +
set_source_files_properties(com.canonical.dbusmenu.xml PROPERTIES
NO_NAMESPACE true
INCLUDE "dbusmenutypes_p.h"
diff --git a/libdbusmenuqt/dbusmenuimporter.cpp \
b/libdbusmenuqt/dbusmenuimporter.cpp index a23ed839..1a883e33 100644
--- a/libdbusmenuqt/dbusmenuimporter.cpp
+++ b/libdbusmenuqt/dbusmenuimporter.cpp
@@ -20,6 +20,8 @@
*/
#include "dbusmenuimporter.h"
+#include "debug.h"
+
// Qt
#include <QCoreApplication>
#include <QDBusConnection>
@@ -50,7 +52,7 @@ static QTime sChrono;
#endif
#define DMRETURN_IF_FAIL(cond) if (!(cond)) { \
- qWarning() << "Condition failed: " #cond; \
+ qCWarning(DBUSMENUQT) << "Condition failed: " #cond; \
return; \
}
@@ -181,7 +183,7 @@ public:
} else if (key == QLatin1String("shortcut")) {
updateActionShortcut(action, value);
} else {
- qWarning() << "Unhandled property update" << key;
+ qDebug(DBUSMENUQT) << "Unhandled property update" << key;
}
}
@@ -229,7 +231,7 @@ public:
action->setProperty(DBUSMENU_PROPERTY_ICON_DATA_HASH, dataHash);
QPixmap pix;
if (!pix.loadFromData(data)) {
- qWarning() << "Failed to decode icon-data property for action" \
<< action->text(); + qDebug(DBUSMENUQT) << "Failed to decode \
icon-data property for action" << action->text(); \
action->setIcon(QIcon()); return;
}
@@ -382,7 +384,7 @@ void \
DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher)
QDBusPendingReply<uint, DBusMenuLayoutItem> reply = *watcher;
if (!reply.isValid()) {
- qWarning() << reply.error().message();
+ qDebug(DBUSMENUQT) << reply.error().message();
if (menu) {
emit menuUpdated(menu);
}
@@ -395,7 +397,7 @@ void \
DBusMenuImporter::slotGetLayoutFinished(QDBusPendingCallWatcher *watcher) \
DBusMenuLayoutItem rootItem = reply.argumentAt<1>();
if (!menu) {
- qWarning() << "No menu for id" << parentId;
+ qDebug(DBUSMENUQT) << "No menu for id" << parentId;
return;
}
@@ -494,7 +496,7 @@ void \
DBusMenuImporter::slotAboutToShowDBusCallFinished(QDBusPendingCallWatcher * \
QDBusPendingReply<bool> reply = *watcher;
if (reply.isError()) {
- qWarning() << "Call to AboutToShow() failed:" << \
reply.error().message(); + qDebug(DBUSMENUQT) << "Call to \
AboutToShow() failed:" << reply.error().message(); menuUpdated(menu);
return;
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic