summaryrefslogtreecommitdiffstats
path: root/tests/auto
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@nokia.com>2012-07-03 13:49:11 +0200
committerQt by Nokia <qt-info@nokia.com>2012-07-03 14:25:36 +0200
commit9d88743b7dce44187b9f4304a2c947861ddb7899 (patch)
tree9a4d11deb2ef4998e58f20bec82c57ae35f73f8f /tests/auto
parent122741c671b189bc2a3bff8a679eff56dd4aa26d (diff)
removed ancient left-over test from tst_qwidget
The part of tst_qwidget::reparent() that "makes sense only on Windows" is antiquated at least since the introduction of alien widgets. It basically tests if QWidget::winId() returns a valid window handle (has been replaced with winHandleOf here in the meantime). This is always successful, because winId() creates a valid window handle. Change-Id: I52c370e26fd9b34861bd4d52c12dded243382d43 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp50
1 files changed, 0 insertions, 50 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index 9a6a84309e..36567b0ac2 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -2234,56 +2234,6 @@ void tst_QWidget::reparent()
QCOMPARE(child.geometry().topLeft(), childPos);
QTRY_COMPARE(childTLW.pos(), tlwPos);
-
- // This following part of the test only makes sense on Windows.
-#ifdef Q_OS_WIN
- QWidget childTLWChild(&childTLW);
- childTLWChild.setObjectName("childTLWChild");
-
- QWidget grandChild(&child);
- grandChild.setObjectName("grandChild");
- grandChild.setGeometry(10, 10, 160, 110);
- QPalette pal3;
- pal3.setColor(grandChild.backgroundRole(), Qt::red);
- grandChild.setPalette(pal3);
- //grandChild.setPaletteBackgroundColor(Qt::red);
-
- QWidget grandChildTLW(&grandChild, Qt::Window);
- grandChildTLW.setObjectName("grandChildTLW");
- grandChildTLW.setGeometry(200, 200, 50, 50);
- QPalette pal4;
- pal4.setColor(grandChildTLW.backgroundRole(), Qt::yellow);
- grandChildTLW.setPalette(pal4);
- //grandChildTLW.setPaletteBackgroundColor(Qt::yellow);
-
- QWidget grandChildTLWChild(&grandChildTLW);
- grandChildTLWChild.setObjectName("grandChildTLWChild");
-
- QVERIFY(IsWindow(winHandleOf(&childTLW)));
- QVERIFY(IsWindow(winHandleOf(&childTLWChild)));
- QVERIFY(IsWindow(winHandleOf(&grandChildTLW)));
- QVERIFY(IsWindow(winHandleOf(&grandChildTLWChild)));
-
- parent.show();
-
- QVERIFY(IsWindow(winHandleOf(&childTLW)));
- QVERIFY(IsWindow(winHandleOf(&childTLWChild)));
- QVERIFY(IsWindow(winHandleOf(&grandChildTLW)));
- QVERIFY(IsWindow(winHandleOf(&grandChildTLWChild)));
-
- child.setParent(&parent);
- child.move(10,10);
- child.show();
-
- // this appears to stabelize results
- qApp->processEvents();
-
- QVERIFY(IsWindow(winHandleOf(&childTLW)));
- QVERIFY(IsWindow(winHandleOf(&childTLWChild)));
-
- QVERIFY(IsWindow(winHandleOf(&grandChildTLW)));
- QVERIFY(IsWindow(winHandleOf(&grandChildTLWChild)));
-#endif
}
// Qt/Embedded does it differently.