diff options
author | Jan Arve Sæther <jan-arve.saether@qt.io> | 2019-07-03 13:39:40 +0200 |
---|---|---|
committer | Jan Arve Sæther <jan-arve.saether@qt.io> | 2019-07-03 16:20:13 +0200 |
commit | 9ec09ed1dacc9fcf4a88ff18beee8101ee7df5ec (patch) | |
tree | 42f6b0a1e839cd1e4a2e176da6a41cbe5a1d1d2a /tests | |
parent | 11344a9070974db6ce21af3a377434f621513053 (diff) |
Fix localeAsCppProperty test for Android
Move the qml code to a separate localeAsCppProperty.qml in order for the
qmlimportscanner to see what deployment dependencies it has.
Change-Id: Ic4eba3e0f2ffed69a2cd213d16b2c9142a522d12
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/auto/qml/qqmllocale/data/localeAsCppProperty.qml | 6 | ||||
-rw-r--r-- | tests/auto/qml/qqmllocale/tst_qqmllocale.cpp | 5 |
2 files changed, 8 insertions, 3 deletions
diff --git a/tests/auto/qml/qqmllocale/data/localeAsCppProperty.qml b/tests/auto/qml/qqmllocale/data/localeAsCppProperty.qml new file mode 100644 index 0000000000..ff80f3cf85 --- /dev/null +++ b/tests/auto/qml/qqmllocale/data/localeAsCppProperty.qml @@ -0,0 +1,6 @@ +import QtQml 2.2 +import Test 1.0 +Calendar { + locale: Qt.locale('en_GB') + property var testLocale +} diff --git a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp index eb6eb62648..cc13fb4b5f 100644 --- a/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp +++ b/tests/auto/qml/qqmllocale/tst_qqmllocale.cpp @@ -1214,10 +1214,9 @@ private: void tst_qqmllocale::localeAsCppProperty() { - QQmlComponent component(&engine); qmlRegisterType<Calendar>("Test", 1, 0, "Calendar"); - component.setData("import QtQml 2.2\nimport Test 1.0\nCalendar { locale: Qt.locale('en_GB'); property var testLocale }", QUrl()); - QVERIFY(!component.isError()); + QQmlComponent component(&engine, testFileUrl("localeAsCppProperty.qml")); + QVERIFY2(!component.isError(), qPrintable(component.errorString())); QTRY_VERIFY(component.isReady()); Calendar *item = qobject_cast<Calendar*>(component.create()); |