summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-03-10 14:41:30 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-03-12 00:10:27 +0000
commitc286afee3a817ffcfe0aba5fbe7c36cd791beda9 (patch)
treeab41df7746a301b40f807589b5bf32bec52b37a0
parentbad3325c0bf494b0d57e78a5ea74a4df578fba4c (diff)
tst_QWindow::initialSize: Use showNormal() instead of show()v5.5.0-alpha1
On some platforms show() may result in the window being shown full screen, depending on the defaultWindowState of the platform. If that's the case, the resulting window size does not follow the requested size (though the internal normal geometry should). We need to use showNormal, so that we guarantee that the window state is WindowNoState. Change-Id: Ied080eaca13d759501ea292b5e6b2df4e3b32426 Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
-rw-r--r--tests/auto/gui/kernel/qwindow/tst_qwindow.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
index 8ce0e3942e..d361aa12a6 100644
--- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
+++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp
@@ -1464,7 +1464,7 @@ void tst_QWindow::initialSize()
QSize defaultSize(0,0);
{
Window w;
- w.show();
+ w.showNormal();
QTRY_VERIFY(w.width() > 0);
QTRY_VERIFY(w.height() > 0);
defaultSize = QSize(w.width(), w.height());
@@ -1472,7 +1472,7 @@ void tst_QWindow::initialSize()
{
Window w;
w.setWidth(m_testWindowSize.width());
- w.show();
+ w.showNormal();
#if defined(Q_OS_BLACKBERRY) // "window" is the "root" window and will always be shown fullscreen
// so we only expect one resize event
QTRY_COMPARE(w.width(), qGuiApp->primaryScreen()->availableGeometry().width());
@@ -1485,7 +1485,7 @@ void tst_QWindow::initialSize()
Window w;
const QSize testSize(m_testWindowSize.width(), 42);
w.resize(testSize);
- w.show();
+ w.showNormal();
#if defined(Q_OS_BLACKBERRY) // "window" is the "root" window and will always be shown fullscreen
// so we only expect one resize event