diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-01-10 21:37:31 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-01-10 21:37:31 +0100 |
commit | 3b67ec7abdb3056f259eb0aa819de9b5bbf8ec3a (patch) | |
tree | 84345fc1b93e153313c367abc1e8eac1ced51631 /tests | |
parent | ede9a8285858873e644083bbad9a71da26276dce (diff) | |
parent | 3795904e3831722e222fa32a1e52aeb6b3e6ba87 (diff) |
Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
.qmake.conf
Change-Id: I6b2539bf17d3e9bc66d96b53c1bce95680113ed8
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp | 14 | ||||
-rw-r--r-- | tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp | 4 |
2 files changed, 10 insertions, 8 deletions
diff --git a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp index 89640bc385..cb4bee0d3a 100644 --- a/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp +++ b/tests/auto/qml/qqmlcontext/tst_qqmlcontext.cpp @@ -883,13 +883,13 @@ void tst_qqmlcontext::contextObjectHierarchy() QScopedPointer<QObject> root(component.create()); QVERIFY(!root.isNull()); - for (const QObject *child : root->children()) { - QQmlData *d = QQmlData::get(child); - QVERIFY(d->outerContext != nullptr); - connect(root.data(), &QObject::destroyed, [&]() { - QCOMPARE(d->outerContext, nullptr); - }); - } + for (const QObject *child : root->children()) + QVERIFY(QQmlData::get(child)->outerContext != nullptr); + + connect(root.data(), &QObject::destroyed, [&root]() { + for (const QObject *child : root->children()) + QCOMPARE(QQmlData::get(child)->outerContext, nullptr); + }); } QTEST_MAIN(tst_qqmlcontext) diff --git a/tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp b/tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp index fbcd53cad4..34be4d98b4 100644 --- a/tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp +++ b/tests/auto/quick/propertyrequirements/tst_propertyrequirements.cpp @@ -175,8 +175,10 @@ void tst_PropertyRequirements::testQmlType(TestDepth testDepth, const QQmlType & // check if this type is derived from QObject and even can have signals // i.e. weed out the Q_GADGET classes - if (inheritanceHierarchy.first()->className() != QByteArray("QObject")) + if (inheritanceHierarchy.isEmpty() + || inheritanceHierarchy.constFirst()->className() != QByteArrayLiteral("QObject")) { return; + } if (testDepth == MainTypeOnly) { inheritanceHierarchy.clear(); |