summaryrefslogtreecommitdiffstats
path: root/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp')
-rw-r--r--tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
index f9ee2e485a..252d47f698 100644
--- a/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
+++ b/tests/auto/widgets/kernel/qwidget/tst_qwidget.cpp
@@ -412,6 +412,7 @@ private slots:
void keyboardModifiers();
void mouseDoubleClickBubbling_QTBUG29680();
+ void largerThanScreen_QTBUG30142();
private:
bool ensureScreenSize(int width, int height);
@@ -5632,6 +5633,7 @@ void tst_QWidget::showHideShowX11()
qApp->installNativeEventFilter(&w);
w.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&w));
w.hide();
QEventLoop eventLoop;
@@ -10079,5 +10081,20 @@ void tst_QWidget::mouseDoubleClickBubbling_QTBUG29680()
QTRY_VERIFY(parent.triggered);
}
+void tst_QWidget::largerThanScreen_QTBUG30142()
+{
+ QWidget widget;
+ widget.resize(200, 4000);
+ widget.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&widget));
+ QVERIFY(widget.frameGeometry().y() >= 0);
+
+ QWidget widget2;
+ widget2.resize(10000, 400);
+ widget2.show();
+ QVERIFY(QTest::qWaitForWindowExposed(&widget2));
+ QVERIFY(widget2.frameGeometry().x() >= 0);
+}
+
QTEST_MAIN(tst_QWidget)
#include "tst_qwidget.moc"