diff options
author | Liang Qi <liang.qi@qt.io> | 2017-10-23 12:09:30 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2017-10-24 11:13:09 +0200 |
commit | 15dd1b7883f5dbe66266aeb588381f85f3532ab9 (patch) | |
tree | 1fa8caa8ec0f38aef39bcf920e3d5c7efeae5cb9 /tests/auto/quick/qquickloader | |
parent | f82c4de515223574bcc510de0d993426b22bccbe (diff) | |
parent | ebceda0cad6d86f6d6fe5efbf85a3b06fb4222b0 (diff) |
Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
src/qml/qml/qqmlimport.cpp
src/qml/qml/qqmlimport_p.h
src/qml/qml/qqmltypenamecache.cpp
Done-with: Ulf Hermann<ulf.hermann@qt.io>
Change-Id: I41ba7a592b2659ddf53da6952ea3b456a7bba319
Diffstat (limited to 'tests/auto/quick/qquickloader')
-rw-r--r-- | tests/auto/quick/qquickloader/qquickloader.pro | 1 | ||||
-rw-r--r-- | tests/auto/quick/qquickloader/tst_qquickloader.cpp | 15 |
2 files changed, 12 insertions, 4 deletions
diff --git a/tests/auto/quick/qquickloader/qquickloader.pro b/tests/auto/quick/qquickloader/qquickloader.pro index 31231b702a..c754c78bec 100644 --- a/tests/auto/quick/qquickloader/qquickloader.pro +++ b/tests/auto/quick/qquickloader/qquickloader.pro @@ -8,6 +8,7 @@ SOURCES += tst_qquickloader.cpp \ ../../shared/testhttpserver.cpp include (../../shared/util.pri) +include (../shared/util.pri) TESTDATA = data/* diff --git a/tests/auto/quick/qquickloader/tst_qquickloader.cpp b/tests/auto/quick/qquickloader/tst_qquickloader.cpp index 3e7439f3e9..521388c5fa 100644 --- a/tests/auto/quick/qquickloader/tst_qquickloader.cpp +++ b/tests/auto/quick/qquickloader/tst_qquickloader.cpp @@ -35,6 +35,7 @@ #include <private/qquickloader_p.h> #include "testhttpserver.h" #include "../../shared/util.h" +#include "../shared/geometrytestutil.h" class SlowComponent : public QQmlComponent { @@ -403,10 +404,16 @@ void tst_QQuickLoader::sizeItemToLoader() QCOMPARE(rect->height(), 80.0); // Check resize - loader->setWidth(180); - loader->setHeight(30); - QCOMPARE(rect->width(), 180.0); - QCOMPARE(rect->height(), 30.0); + QSizeChangeListener sizeListener(rect); + const QSizeF size(180, 30); + loader->setSize(size); + QVERIFY2(!sizeListener.isEmpty(), "There should be at least one signal about the size changed"); + for (const QSizeF sizeOnGeometryChanged : sizeListener) { + // Check that we have the correct size on all signals + QCOMPARE(sizeOnGeometryChanged, size); + } + QCOMPARE(rect->width(), size.width()); + QCOMPARE(rect->height(), size.height()); // Switch mode loader->resetWidth(); // reset explicit size |