summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-07-26 10:32:30 +0200
committerFriedemann Kleint <Friedemann.Kleint@nokia.com>2011-07-26 10:34:27 +0200
commitc7c8a38ec313b998d0df76cd15fa360f56d213e2 (patch)
treeabde5b4fb89e212d822f16aae12621827b2a5b77 /src/widgets/kernel
parent32cec9f3bab992a2fd749bf386a9b8106b89b1fe (diff)
Set an object name matching the Widget on QWidgetWindow.
To aid debugging. Change-Id: I841a59a60a0de504eef140debc5e55ee5f15d7f7 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com> Reviewed-on: http://codereview.qt.nokia.com/2167 Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'src/widgets/kernel')
-rw-r--r--src/widgets/kernel/qwidget.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index 76218a9eb3..d48d5ae15d 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -9556,6 +9556,18 @@ void QWidget::ensurePolished() const
QChildEvent e(QEvent::ChildPolished, const_cast<QWidget *>(this));
QCoreApplication::sendEvent(d->parent, &e);
}
+#ifdef Q_WS_QPA
+ if (d->extra && d->extra->topextra && d->extra->topextra->window
+ && d->extra->topextra->window->objectName().isEmpty()) {
+ QString on = objectName();
+ if (on.isEmpty()) {
+ on = QString::fromUtf8(metaObject()->className());
+ on += QLatin1String("Class");
+ }
+ on += QLatin1String("Window");
+ d->extra->topextra->window->setObjectName(on);
+ }
+#endif
}
/*!