diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-04-15 01:00:05 +0200 |
---|---|---|
committer | Ulf Hermann <ulf.hermann@qt.io> | 2019-04-15 09:36:12 +0200 |
commit | 8bc3329e2cec4638fa9af274a40dda176bbb7352 (patch) | |
tree | 87ebd27e0f6dc305c78fddb956e65bd5922a078b /tests | |
parent | 75998b22b0b216d925e93d2c0e205025c23b2522 (diff) | |
parent | 6dac2e7df7fbf0f29667bf92b4e72426db47dbe9 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13v5.13.0-beta3
Conflicts:
src/3rdparty/masm/assembler/LinkBuffer.h
src/qmltest/doc/src/qtquicktest-index.qdoc
tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
Change-Id: I7d83ad95cf489dda794dd7a0a33bad3ef3b05609
Diffstat (limited to 'tests')
5 files changed, 32 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/data/cyclicAlias.errors.txt b/tests/auto/qml/qqmllanguage/data/cyclicAlias.errors.txt new file mode 100644 index 0000000000..46951ef69f --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/cyclicAlias.errors.txt @@ -0,0 +1 @@ +4:5:Cyclic alias diff --git a/tests/auto/qml/qqmllanguage/data/cyclicAlias.qml b/tests/auto/qml/qqmllanguage/data/cyclicAlias.qml new file mode 100644 index 0000000000..23129e210d --- /dev/null +++ b/tests/auto/qml/qqmllanguage/data/cyclicAlias.qml @@ -0,0 +1,5 @@ +import QtQml 2.2 +QtObject { + id: o + property alias t: o.t +} diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp index 22ea3a89c3..89c1d05905 100644 --- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp +++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp @@ -614,6 +614,7 @@ void tst_qqmllanguage::errors_data() QTest::newRow("badCompositeRegistration.2") << "badCompositeRegistration.2.qml" << "badCompositeRegistration.2.errors.txt" << false; QTest::newRow("assignComponentToWrongType") << "assignComponentToWrongType.qml" << "assignComponentToWrongType.errors.txt" << false; + QTest::newRow("cyclicAlias") << "cyclicAlias.qml" << "cyclicAlias.errors.txt" << false; } diff --git a/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp b/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp index 6ccfc77c25..15bd031ce3 100644 --- a/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp +++ b/tests/auto/qml/qqmlvaluetypes/tst_qqmlvaluetypes.cpp @@ -33,6 +33,8 @@ #include <QJSValueIterator> #include <private/qquickvaluetypes_p.h> #include <private/qqmlglobal_p.h> +#include <private/qv4engine_p.h> +#include <private/qv4variantobject_p.h> #include "../../shared/util.h" #include "testtypes.h" @@ -94,6 +96,7 @@ private slots: void toStringConversion(); void enumerableProperties(); void enumProperties(); + void scarceTypes(); private: QQmlEngine engine; @@ -1809,6 +1812,26 @@ void tst_qqmlvaluetypes::enumProperties() QCOMPARE(enumValue.toInt(), int(g.enumProperty())); } +void tst_qqmlvaluetypes::scarceTypes() +{ + // These should not be treated as value types because we want the scarce resource + // mechanism to clear them when going out of scope. The scarce resource mechanism + // only works on QV4::VariantObject as that has an additional level of redirection. + QVERIFY(!QQmlValueTypeFactory::isValueType(qMetaTypeId<QImage>())); + QVERIFY(!QQmlValueTypeFactory::isValueType(qMetaTypeId<QPixmap>())); + + QV4::ExecutionEngine engine; + QV4::Scope scope(&engine); + + QImage img(20, 20, QImage::Format_ARGB32); + QV4::ScopedObject imgValue(scope, engine.fromVariant(QVariant::fromValue(img))); + QCOMPARE(QByteArray(imgValue->vtable()->className), QByteArray("VariantObject")); + + QPixmap pixmap; + QV4::ScopedObject pixmapValue(scope, engine.fromVariant(QVariant::fromValue(img))); + QCOMPARE(QByteArray(pixmapValue->vtable()->className), QByteArray("VariantObject")); +} + QTEST_MAIN(tst_qqmlvaluetypes) diff --git a/tests/auto/quick/qquickmultipointtoucharea/BLACKLIST b/tests/auto/quick/qquickmultipointtoucharea/BLACKLIST index de939b5273..6af00ab76f 100644 --- a/tests/auto/quick/qquickmultipointtoucharea/BLACKLIST +++ b/tests/auto/quick/qquickmultipointtoucharea/BLACKLIST @@ -3,8 +3,10 @@ ubuntu-16.04 ubuntu-18.04 opensuse-42.3 opensuse-leap +sles [nested] ubuntu-16.04 ubuntu-18.04 opensuse-42.3 opensuse-leap +sles |