Support QRectF in debug console

This commit is contained in:
David Edmundson 2022-07-28 11:31:39 +01:00 committed by Vlad Zahorodnii
parent 9177fd1835
commit 97fe0613e6

View file

@ -760,6 +760,10 @@ QString DebugConsoleDelegate::displayText(const QVariant &value, const QLocale &
const QRect r = value.toRect();
return QStringLiteral("%1,%2 %3x%4").arg(r.x()).arg(r.y()).arg(r.width()).arg(r.height());
}
case QMetaType::QRectF: {
const QRectF r = value.toRectF();
return QStringLiteral("%1,%2 %3x%4").arg(r.x()).arg(r.y()).arg(r.width()).arg(r.height());
}
default:
if (value.userType() == qMetaTypeId<KWaylandServer::SurfaceInterface *>()) {
if (auto s = value.value<KWaylandServer::SurfaceInterface *>()) {