summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2016-07-01 12:33:16 +0200
committerLiang Qi <liang.qi@qt.io>2016-07-01 13:21:29 +0200
commit200fdd96f0aae9d2060cf3b8cb491eda10d6d68f (patch)
tree80b3a1450c3fa8cbd44e07d82f6f5d3985a5902e /tests
parentcb260c6c7f1ebd4b3fa5f86c3d98ec8ff0486095 (diff)
parente2665600c09358854bb0b29389cc873a2684f77b (diff)
Merge remote-tracking branch 'origin/5.7' into dev
Conflicts: configure configure.json Change-Id: Iba032d9a29c273da2585632bc6e22bbafb961808
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 4d4565f02e..a41c574454 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -58,6 +58,7 @@ private slots:
void setVisible();
void eventOrderOnShow();
void resizeEventAfterResize();
+ void exposeEventOnShrink_QTBUG54040();
void mapGlobal();
void positioning_data();
void positioning();
@@ -370,6 +371,24 @@ void tst_QWindow::resizeEventAfterResize()
QTRY_COMPARE(window.received(QEvent::Resize), 2);
}
+void tst_QWindow::exposeEventOnShrink_QTBUG54040()
+{
+ Window window;
+ window.setGeometry(QRect(m_availableTopLeft + QPoint(80, 80), m_testWindowSize));
+ window.setTitle(QTest::currentTestFunction());
+ window.showNormal();
+
+ QVERIFY(QTest::qWaitForWindowExposed(&window));
+
+ const int initialExposeCount = window.received(QEvent::Expose);
+ window.resize(window.width(), window.height() - 5);
+ QTRY_COMPARE(window.received(QEvent::Expose), initialExposeCount + 1);
+ window.resize(window.width() - 5, window.height());
+ QTRY_COMPARE(window.received(QEvent::Expose), initialExposeCount + 2);
+ window.resize(window.width() - 5, window.height() - 5);
+ QTRY_COMPARE(window.received(QEvent::Expose), initialExposeCount + 3);
+}
+
void tst_QWindow::positioning_data()
{
QTest::addColumn<int>("windowflags");