Android: Fix QLayout tests

This test requires test data to be available and the
testRetainSizeWhenHidden test assumes that a widget will be
sized based on its sizeHint(), which does not work on
platforms where show() implies showMaximized().

Change-Id: I9bf372d8c0ea94845ae08481ec555fe25dcfebc0
Reviewed-by: BogDan Vatra <bogdan@kde.org>
This commit is contained in:
Eskil Abrahamsen Blomfeldt 2015-01-13 16:13:34 +01:00
parent 7a760f5ed9
commit 4448576ae0
3 changed files with 14 additions and 0 deletions

View File

@ -11,3 +11,8 @@ wince* {
} else {
TESTDATA += baseline/*
}
android: !android-no-sdk {
RESOURCES += \
testdata.qrc
}

View File

@ -0,0 +1,5 @@
<RCC>
<qresource prefix="/">
<file>baseline/smartmaxsize</file>
</qresource>
</RCC>

View File

@ -345,6 +345,10 @@ void tst_QLayout::adjustSizeShouldMakeSureLayoutIsActivated()
void tst_QLayout::testRetainSizeWhenHidden()
{
#if defined(Q_OS_ANDROID) && !defined(Q_OS_ANDROID_NO_SDK)
QSKIP("Test does not work on platforms which default to showMaximized()");
#endif
QWidget widget;
QBoxLayout layout(QBoxLayout::TopToBottom, &widget);