Add a debug message that gets printed if TakeDevice fails

This can be useful while debugging why the TakeDevice request fails.
This commit is contained in:
Vlad Zahorodnii 2021-04-27 09:49:20 +03:00
parent 2aae299eba
commit ba0e18955b
2 changed files with 4 additions and 0 deletions

View file

@ -175,6 +175,8 @@ int ConsoleKitSession::openRestricted(const QString &fileName)
const QDBusMessage reply = QDBusConnection::systemBus().call(message);
if (reply.type() == QDBusMessage::ErrorMessage) {
qCDebug(KWIN_CORE, "Failed to open %s device (%s)",
qPrintable(fileName), qPrintable(reply.errorMessage()));
return -1;
}

View file

@ -181,6 +181,8 @@ int LogindSession::openRestricted(const QString &fileName)
const QDBusMessage reply = QDBusConnection::systemBus().call(message);
if (reply.type() == QDBusMessage::ErrorMessage) {
qCDebug(KWIN_CORE, "Failed to open %s device (%s)",
qPrintable(fileName), qPrintable(reply.errorMessage()));
return -1;
}