diff --git a/applets/kicker/plugin/kastatsfavoritesmodel.cpp b/applets/kicker/plugin/kastatsfavoritesmodel.cpp index 54a25ec19..9b289979c 100644 --- a/applets/kicker/plugin/kastatsfavoritesmodel.cpp +++ b/applets/kicker/plugin/kastatsfavoritesmodel.cpp @@ -79,7 +79,7 @@ public: } if (!entry || !entry->isValid()) { - qWarning() << "Entry is not valid" << id << entry; + qCWarning(KICKER_DEBUG) << "Entry is not valid" << id << entry; m_id = id; return; } @@ -498,14 +498,14 @@ void KAStatsFavoritesModel::setEnabled(bool enable) QStringList KAStatsFavoritesModel::favorites() const { - qWarning() << "KAStatsFavoritesModel::favorites returns nothing, it is here just to keep the API backwards-compatible"; + qCWarning(KICKER_DEBUG) << "KAStatsFavoritesModel::favorites returns nothing, it is here just to keep the API backwards-compatible"; return QStringList(); } void KAStatsFavoritesModel::setFavorites(const QStringList &favorites) { Q_UNUSED(favorites); - qWarning() << "KAStatsFavoritesModel::setFavorites is ignored"; + qCWarning(KICKER_DEBUG) << "KAStatsFavoritesModel::setFavorites is ignored"; } bool KAStatsFavoritesModel::isFavorite(const QString &id) const diff --git a/applets/kicker/plugin/placeholdermodel.cpp b/applets/kicker/plugin/placeholdermodel.cpp index c80fd2c5f..41fd56caf 100644 --- a/applets/kicker/plugin/placeholdermodel.cpp +++ b/applets/kicker/plugin/placeholdermodel.cpp @@ -248,7 +248,7 @@ void PlaceholderModel::connectSignals() connect(sourceModelPtr, &QAbstractItemModel::rowsAboutToBeInserted, this, [this](const QModelIndex &parent, int from, int to) { if (parent.isValid()) { - qWarning() << "We do not support tree models"; + qCWarning(KICKER_DEBUG) << "We do not support tree models"; } else { beginInsertRows(QModelIndex(), sourceRowToRow(from), sourceRowToRow(to)); @@ -265,7 +265,7 @@ void PlaceholderModel::connectSignals() this, [this](const QModelIndex &source, int from, int to, const QModelIndex &dest, int destRow) { if (source.isValid() || dest.isValid()) { - qWarning() << "We do not support tree models"; + qCWarning(KICKER_DEBUG) << "We do not support tree models"; } else { beginMoveRows(QModelIndex(), sourceRowToRow(from), sourceRowToRow(to), QModelIndex(), sourceRowToRow(destRow)); @@ -278,7 +278,7 @@ void PlaceholderModel::connectSignals() connect(sourceModelPtr, &QAbstractItemModel::rowsAboutToBeRemoved, this, [this](const QModelIndex &parent, int from, int to) { if (parent.isValid()) { - qWarning() << "We do not support tree models"; + qCWarning(KICKER_DEBUG) << "We do not support tree models"; } else { beginRemoveRows(QModelIndex(), sourceRowToRow(from), sourceRowToRow(to)); diff --git a/applets/systemtray/statusnotifieritemsource.cpp b/applets/systemtray/statusnotifieritemsource.cpp index f67845e42..31e60392d 100644 --- a/applets/systemtray/statusnotifieritemsource.cpp +++ b/applets/systemtray/statusnotifieritemsource.cpp @@ -10,6 +10,8 @@ #include "statusnotifieritemservice.h" #include "systemtraytypes.h" +#include "debug.h" + #include #include #include @@ -63,7 +65,7 @@ StatusNotifierItemSource::StatusNotifierItemSource(const QString ¬ifierItemId int slash = notifierItemId.indexOf('/'); if (slash == -1) { - qWarning() << "Invalid notifierItemId:" << notifierItemId; + qCWarning(SYSTEM_TRAY) << "Invalid notifierItemId:" << notifierItemId; m_valid = false; m_statusNotifierItemInterface = nullptr; return; @@ -382,7 +384,7 @@ void StatusNotifierItemSource::refreshCallback(QDBusPendingCallWatcher *call) // This is a hack to make it possible to disable DBusMenu in an // application. The string "/NO_DBUSMENU" must be the same as in // KStatusNotifierItem::setContextMenu(). - qWarning() << "DBusMenu disabled for this application"; + qCWarning(SYSTEM_TRAY) << "DBusMenu disabled for this application"; } else { m_menuImporter = new PlasmaDBusMenuImporter(m_statusNotifierItemInterface->service(), menuObjectPath, iconLoader(), this); connect(m_menuImporter, &PlasmaDBusMenuImporter::menuUpdated, this, [this](QMenu *menu) { @@ -535,7 +537,7 @@ void StatusNotifierItemSource::contextMenu(int x, int y) if (m_menuImporter) { m_menuImporter->updateMenu(); } else { - qWarning() << "Could not find DBusMenu interface, falling back to calling ContextMenu()"; + qCWarning(SYSTEM_TRAY) << "Could not find DBusMenu interface, falling back to calling ContextMenu()"; if (m_statusNotifierItemInterface && m_statusNotifierItemInterface->isValid()) { m_statusNotifierItemInterface->call(QDBus::NoBlock, QStringLiteral("ContextMenu"), x, y); } diff --git a/applets/systemtray/systemtray.cpp b/applets/systemtray/systemtray.cpp index 3b7f688a6..dbc23e652 100644 --- a/applets/systemtray/systemtray.cpp +++ b/applets/systemtray/systemtray.cpp @@ -335,7 +335,7 @@ void SystemTray::startApplet(const QString &pluginId) // this should never happen unless explicitly wrong config is hand-written or //(more likely) a previously added applet is uninstalled if (!applet) { - qWarning() << "Unable to find applet" << pluginId; + qCWarning(SYSTEM_TRAY) << "Unable to find applet" << pluginId; return; } applet->setProperty("org.kde.plasma:force-create", true); diff --git a/startkde/startplasma-wayland.cpp b/startkde/startplasma-wayland.cpp index 9fe023843..afa099f4d 100644 --- a/startkde/startplasma-wayland.cpp +++ b/startkde/startplasma-wayland.cpp @@ -4,6 +4,7 @@ SPDX-License-Identifier: LGPL-2.0-or-later */ +#include "debug.h" #include "startplasma.h" #include #include @@ -54,7 +55,7 @@ int main(int argc, char **argv) queryAndSet("XKB_DEFAULT_VARIANT", QStringLiteral("X11Variant")); queryAndSet("XKB_DEFAULT_OPTIONS", QStringLiteral("X11Options")); } else { - qWarning() << "not a reply org.freedesktop.locale1" << resultMessage; + qCWarning(PLASMA_STARTUP) << "not a reply org.freedesktop.locale1" << resultMessage; } } runEnvironmentScripts(); diff --git a/startkde/startplasma.cpp b/startkde/startplasma.cpp index 8ab536579..a4bf8a0ef 100644 --- a/startkde/startplasma.cpp +++ b/startkde/startplasma.cpp @@ -90,7 +90,7 @@ void gentleTermination(QProcess *p) if (!p->waitForFinished(5000)) { p->kill(); if (!p->waitForFinished(5000)) { - qWarning() << "Could not fully finish the process" << p->program(); + qCWarning(PLASMA_STARTUP) << "Could not fully finish the process" << p->program(); } } } @@ -109,7 +109,7 @@ int runSync(const QString &program, const QStringList &args, const QStringList & // qCDebug(PLASMA_STARTUP) << "started..." << program << args; p.waitForFinished(-1); if (p.exitCode()) { - qWarning() << program << args << "exited with code" << p.exitCode(); + qCWarning(PLASMA_STARTUP) << program << args << "exited with code" << p.exitCode(); } return p.exitCode(); } @@ -470,7 +470,7 @@ static void dropSessionVarsFromSystemdEnvironment() msg << varsToDrop; auto reply = QDBusConnection::sessionBus().call(msg); if (reply.type() == QDBusMessage::ErrorMessage) { - qWarning() << "Failed to unset systemd environment variables:" << reply.errorName() << reply.errorMessage(); + qCWarning(PLASMA_STARTUP) << "Failed to unset systemd environment variables:" << reply.errorName() << reply.errorMessage(); } } @@ -703,7 +703,7 @@ bool startPlasmaSession(bool wayland) msg << QStringLiteral("plasma-workspace-%1.target").arg(platform) << QStringLiteral("fail"); QDBusReply reply = QDBusConnection::sessionBus().call(msg); if (!reply.isValid()) { - qWarning() << "Could not start systemd managed Plasma session:" << reply.error().name() << reply.error().message(); + qCWarning(PLASMA_STARTUP) << "Could not start systemd managed Plasma session:" << reply.error().name() << reply.error().message(); messageBox(QStringLiteral("startkde: Could not start Plasma session.\n")); rc = false; } else {