Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit a8573d1b authored by David Edmundson's avatar David Edmundson

Use logging categories in a few dataengines

Test Plan: Compiles

Reviewers: #plasma, mart

Reviewed By: #plasma, mart

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D13357
parent a9993017
......@@ -31,6 +31,12 @@ target_link_libraries(plasma_engine_statusnotifieritem
dbusmenuqt
)
ecm_qt_declare_logging_category(statusnotifieritem_engine_SRCS HEADER debug.h
IDENTIFIER DATAENGINE_SNI
CATEGORY_NAME kde.dataengine.sni
DEFAULT_SEVERITY Info)
kcoreaddons_desktop_to_json(plasma_engine_statusnotifieritem plasma-dataengine-statusnotifieritem.desktop)
install(TARGETS plasma_engine_statusnotifieritem DESTINATION ${KDE_INSTALL_PLUGINDIR}/plasma/dataengine)
......
......@@ -25,7 +25,7 @@
#include "dbusproperties.h"
#include <QDebug>
#include "debug.h"
#include <iostream>
static const QString s_watcherServiceName(QStringLiteral("org.kde.StatusNotifierWatcher"));
......@@ -73,7 +73,7 @@ void StatusNotifierItemEngine::init()
void StatusNotifierItemEngine::serviceChange(const QString& name, const QString& oldOwner, const QString& newOwner)
{
qDebug()<< "Service" << name << "status change, old owner:" << oldOwner << "new:" << newOwner;
qCDebug(DATAENGINE_SNI)<< "Service" << name << "status change, old owner:" << oldOwner << "new:" << newOwner;
if (newOwner.isEmpty()) {
//unregistered
......@@ -86,7 +86,7 @@ void StatusNotifierItemEngine::serviceChange(const QString& name, const QString&
void StatusNotifierItemEngine::registerWatcher(const QString& service)
{
//qDebug()<<"service appeared"<<service;
//qCDebug(DATAENGINE_SNI)<<"service appeared"<<service;
if (service == s_watcherServiceName) {
delete m_statusNotifierWatcher;
......@@ -115,7 +115,7 @@ void StatusNotifierItemEngine::registerWatcher(const QString& service)
} else {
delete m_statusNotifierWatcher;
m_statusNotifierWatcher = nullptr;
qDebug()<<"System tray daemon not reachable";
qCDebug(DATAENGINE_SNI)<<"System tray daemon not reachable";
}
}
}
......@@ -123,7 +123,7 @@ void StatusNotifierItemEngine::registerWatcher(const QString& service)
void StatusNotifierItemEngine::unregisterWatcher(const QString& service)
{
if (service == s_watcherServiceName) {
qDebug()<< s_watcherServiceName << "disappeared";
qCDebug(DATAENGINE_SNI)<< s_watcherServiceName << "disappeared";
disconnect(m_statusNotifierWatcher, &OrgKdeStatusNotifierWatcherInterface::StatusNotifierItemRegistered, this, &StatusNotifierItemEngine::serviceRegistered);
disconnect(m_statusNotifierWatcher, &OrgKdeStatusNotifierWatcherInterface::StatusNotifierItemUnregistered, this, &StatusNotifierItemEngine::serviceUnregistered);
......@@ -137,7 +137,7 @@ void StatusNotifierItemEngine::unregisterWatcher(const QString& service)
void StatusNotifierItemEngine::serviceRegistered(const QString &service)
{
qDebug() << "Registering"<<service;
qCDebug(DATAENGINE_SNI) << "Registering"<<service;
newItem(service);
}
......
......@@ -42,13 +42,13 @@ const QDBusArgument &operator>>(const QDBusArgument &argument, KDbusImageStruct
if (argument.currentType() == QDBusArgument::StructureType) {
argument.beginStructure();
//qDebug() << "begun structure";
//qCDebug(DATAENGINE_SNI)() << "begun structure";
argument >> width;
//qDebug() << width;
//qCDebug(DATAENGINE_SNI)() << width;
argument >> height;
//qDebug() << height;
//qCDebug(DATAENGINE_SNI)() << height;
argument >> data;
//qDebug() << data.size();
//qCDebug(DATAENGINE_SNI)() << data.size();
argument.endStructure();
}
......
......@@ -6,6 +6,11 @@ set(time_engine_SRCS
solarsystem.cpp
)
ecm_qt_declare_logging_category(time_engine_SRCS HEADER debug.h
IDENTIFIER DATAENGINE_TIME
CATEGORY_NAME kde.dataengine.time
DEFAULT_SEVERITY Info)
add_library(plasma_engine_time MODULE ${time_engine_SRCS})
target_link_libraries(plasma_engine_time
......
......@@ -33,6 +33,7 @@
#endif
#include "timesource.h"
#include "debug.h"
//timezone is defined in msvc
#ifdef timezone
......@@ -70,7 +71,7 @@ void TimeEngine::init()
int err = timerfd_settime(timeChangedFd, 3, &timespec, nullptr); //monitor for the time changing
//(flags == TFD_TIMER_ABSTIME | TFD_TIMER_CANCEL_ON_SET). However these are not exposed in glibc so value is hardcoded
if (err) {
qWarning() << "Could not create timer with TFD_TIMER_CANCEL_ON_SET. Clock skews will not be detected. Error:" << qPrintable(strerror(err));
qCWarning(DATAENGINE_TIME) << "Could not create timer with TFD_TIMER_CANCEL_ON_SET. Clock skews will not be detected. Error:" << qPrintable(strerror(err));
}
connect(this, &QObject::destroyed, [timeChangedFd]() {
......@@ -96,14 +97,14 @@ void TimeEngine::init()
void TimeEngine::clockSkewed()
{
qDebug() << "Time engine Clock skew signaled";
qCDebug(DATAENGINE_TIME) << "Time engine Clock skew signaled";
updateAllSources();
forceImmediateUpdateOfAllVisualizations();
}
void TimeEngine::tzConfigChanged()
{
qDebug() << "Local timezone changed signaled";
qCDebug(DATAENGINE_TIME) << "Local timezone changed signaled";
TimeSource *s = qobject_cast<TimeSource *>(containerForSource(QStringLiteral("Local")));
if (s) {
......
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