diff options
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r-- | src/widgets/kernel/qwidget.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp index 3918a46da4..97a02899f8 100644 --- a/src/widgets/kernel/qwidget.cpp +++ b/src/widgets/kernel/qwidget.cpp @@ -110,6 +110,8 @@ #include "qwindowcontainer_p.h" +#include <sstream> + // widget/widget data creation count //#define QWIDGET_EXTRA_DEBUG //#define ALIEN_DEBUG @@ -12961,6 +12963,25 @@ void QWidgetPrivate::setWidgetParentHelper(QObject *widgetAsObject, QObject *new widget->setParent(static_cast<QWidget*>(newParent)); } +std::string QWidgetPrivate::flagsForDumping() const +{ + Q_Q(const QWidget); + std::string flags = QObjectPrivate::flagsForDumping(); + if (QApplication::focusWidget() == q) + flags += 'F'; + if (q->isVisible()) { + std::stringstream s; + s << '<' + << q->width() << 'x' << q->height() + << std::showpos << q->x() << q->y() + << '>'; + flags += s.str(); + } else { + flags += 'I'; + } + return flags; +} + void QWidgetPrivate::setNetWmWindowTypes(bool skipIfMissing) { #if QT_CONFIG(xcb) |