Commit 1e1ce733 authored by Kai Uwe Broulik's avatar Kai Uwe Broulik 🍇

[libdbusmenuqt] Port to categorized logging

And make it less chatty overall, none of these are real "warnings"

Differential Revision: https://phabricator.kde.org/D15447
parent 4bc3eb83
......@@ -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"
......
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment