debug_console: Support KWin::Window* property type
Display the window caption and class name (safe for the icon) like is done with the windows themselves. Eases debugging properties, such as "transientFor".
This commit is contained in:
parent
64cc884029
commit
dadd7bb545
1 changed files with 7 additions and 0 deletions
|
@ -780,6 +780,13 @@ QString DebugConsoleDelegate::displayText(const QVariant &value, const QLocale &
|
|||
return QStringLiteral("nullptr");
|
||||
}
|
||||
}
|
||||
if (value.userType() == qMetaTypeId<KWin::Window *>()) {
|
||||
if (auto w = value.value<KWin::Window *>()) {
|
||||
return w->caption() + QLatin1Char(' ') + QString::fromUtf8(w->metaObject()->className());
|
||||
} else {
|
||||
return QStringLiteral("nullptr");
|
||||
}
|
||||
}
|
||||
if (value.userType() == qMetaTypeId<Qt::MouseButtons>()) {
|
||||
const auto buttons = value.value<Qt::MouseButtons>();
|
||||
if (buttons == Qt::NoButton) {
|
||||
|
|
Loading…
Reference in a new issue