tst_QWindow::initialSize: Use showNormal() instead of show()
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>
This commit is contained in:
parent
bad3325c0b
commit
c286afee3a
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user