aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp')
-rw-r--r--tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
index bf818b9005..f3b11b4a6b 100644
--- a/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
+++ b/tests/auto/qml/qqmllanguage/tst_qqmllanguage.cpp
@@ -343,6 +343,7 @@ private slots:
void extendedNamespace();
void factorySingleton();
void extendedSingleton();
+ void qtbug_86482();
void invalidInlineComponent();
@@ -6105,6 +6106,26 @@ void tst_qqmllanguage::invalidInlineComponent()
QVERIFY(c.errorString().contains("\"Window.visibility\" is not available in QtQuick 2.0."));
}
+void tst_qqmllanguage::qtbug_86482()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine);
+ component.setData(QByteArray(R"(import QtQml 2.0
+ import StaticTest
+ QtObject {
+ id: root
+ property string result
+ property StringSignaler str: StringSignaler {
+ onSignal: function(value) { root.result = value; }
+ }
+ Component.onCompleted: str.call();
+ })"), QUrl());
+ VERIFY_ERRORS(0);
+ QScopedPointer<QObject> o(component.create());
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
+ QCOMPARE(o->property("result").toString(), QStringLiteral("Hello world!"));
+}
+
QTEST_MAIN(tst_qqmllanguage)
#include "tst_qqmllanguage.moc"