summaryrefslogtreecommitdiffstats
path: root/tests/auto/opengl
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@digia.com>2013-06-14 14:09:23 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-06-14 15:13:26 +0200
commitaf2deb85caa5e179ce1bd6b7031af757eadc3ba9 (patch)
tree4cb23debc27c35b53aaf229c757b377b85d62bbf /tests/auto/opengl
parent686c94c892006a3e72291ca8971aabf18ea1ec85 (diff)
Add object names to QGLWidget-reparenting test.
Task-number: QTBUG-31762 Change-Id: I213b4f17aa04cc99df7183df547a52c2c2a68626 Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Diffstat (limited to 'tests/auto/opengl')
-rw-r--r--tests/auto/opengl/qgl/tst_qgl.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/auto/opengl/qgl/tst_qgl.cpp b/tests/auto/opengl/qgl/tst_qgl.cpp
index 28ec699427..3fc89acb67 100644
--- a/tests/auto/opengl/qgl/tst_qgl.cpp
+++ b/tests/auto/opengl/qgl/tst_qgl.cpp
@@ -1309,14 +1309,17 @@ void tst_QGL::glWidgetReparent()
{
// Try it as a top-level first:
GLWidget *widget = new GLWidget;
+ widget->setObjectName(QStringLiteral("glWidget1"));
widget->setGeometry(0, 0, 200, 30);
widget->show();
QWidget grandParentWidget;
+ grandParentWidget.setObjectName(QStringLiteral("grandParentWidget"));
grandParentWidget.setPalette(Qt::blue);
QVBoxLayout grandParentLayout(&grandParentWidget);
QWidget parentWidget(&grandParentWidget);
+ parentWidget.setObjectName(QStringLiteral("parentWidget"));
grandParentLayout.addWidget(&parentWidget);
parentWidget.setPalette(Qt::green);
parentWidget.setAutoFillBackground(true);
@@ -1348,6 +1351,7 @@ void tst_QGL::glWidgetReparent()
// Now do pretty much the same thing, but don't show the
// widget first:
widget = new GLWidget;
+ widget->setObjectName(QStringLiteral("glWidget2"));
parentLayout.addWidget(widget);
QVERIFY(QTest::qWaitForWindowExposed(&grandParentWidget));