Commit f397f072 authored by Ismael Asensio's avatar Ismael Asensio
Browse files

Reply a meaningful dBus error when detecting unmanaged windows

Currently, the method `createErrorReply()` with empty strings
errors out and the client gets no answer:
QDBusConnection: error: could not send error message to service "":
Error name cannot be empty

Simple test:
qdbus org.kde.KWin /KWin org.kde.KWin.showDebugConsole
qdbus org.kde.KWin /KWin org.kde.KWin.queryWindowInfo

Error name uses D-Bus Interface-like notation as suggested in

CCBUG: 340477
parent e5b2fca4
......@@ -219,7 +219,9 @@ QVariantMap DBusInterface::queryWindowInfo()
if (auto c = qobject_cast<AbstractClient*>(t)) {
} else {
QDBusConnection::sessionBus().send(m_replyQueryWindowInfo.createErrorReply(QString(), QString()));
QStringLiteral("Tried to query information about an unmanaged window")));
Supports Markdown
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