diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-12-08 07:09:26 +0100 |
---|---|---|
committer | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-12-08 07:09:47 +0100 |
commit | 3ec31ef9c5acd57a4a59c0d5f5e20b8d9a19bfa1 (patch) | |
tree | 8b55dd13dbc2a33fe7c857f622e10b817386bdb3 /tests/auto/widgets/kernel/qwidget | |
parent | 6f87f2d23fb50d8183ea173fe423b7e1a24c0e2e (diff) | |
parent | 4ad8798de428b44fe4c56e1ca111940068056c57 (diff) |
Merge remote-tracking branch 'origin/5.6' into dev
Change-Id: I2532c7f7db5e6cc3ef09753d886279816dd662b2
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget')
-rw-r--r-- | tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp index f146955e95..95e4d92cd2 100644 --- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp +++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp @@ -4562,8 +4562,18 @@ void tst_QWidget::setWindowGeometry_data() QList<int> windowFlags; windowFlags << 0 << Qt::FramelessWindowHint; + const bool skipEmptyRects = (m_platform == QStringLiteral("windows")); foreach (QList<QRect> l, rects) { QRect rect = l.first(); + if (skipEmptyRects) { + QList<QRect>::iterator it = l.begin(); + while (it != l.end()) { + if (it->isEmpty()) + it = l.erase(it); + else + ++it; + } + } foreach (int windowFlag, windowFlags) { QTest::newRow(QString("%1,%2 %3x%4, flags %5") .arg(rect.x()) @@ -4612,8 +4622,13 @@ void tst_QWidget::setWindowGeometry() widget.setGeometry(rect); widget.showNormal(); - if (rect.isValid()) + if (rect.isValid()) { QVERIFY(QTest::qWaitForWindowExposed(&widget)); + } else { + // in case of an invalid rect, wait for the geometry to become + // adjusted to the actual (valid) value. + QApplication::processEvents(); + } QTRY_COMPARE(widget.geometry(), rect); // setGeometry() while shown |