aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml/qquickfolderlistmodel
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-01-10 13:33:59 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-01-10 21:20:37 +0100
commit517c374375c8b989f17a52aacbd9d5891469cba2 (patch)
treec4156a6bde6d7e7ee55edacef836b988288d288a /tests/auto/qml/qquickfolderlistmodel
parent728abd1dbce275b7778795f4588ef6588d0209da (diff)
QQmlImport: Allow importing multiple versions of the same module
Previously, once a plugin had been loaded, the static module registrations were disregarded. Therefore, if there were static and dynamic registrations in the same plugin, only one set was ever loaded. Change-Id: I24f52cc579a833041c51f15555caf226a6189c99 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'tests/auto/qml/qquickfolderlistmodel')
-rw-r--r--tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp
index ae99e35467..dccd3951b3 100644
--- a/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp
+++ b/tests/auto/qml/qquickfolderlistmodel/tst_qquickfolderlistmodel.cpp
@@ -76,6 +76,7 @@ private slots:
void sortCaseSensitive_data();
void sortCaseSensitive();
void updateProperties();
+ void importBothVersions();
private:
void checkNoErrors(const QQmlComponent& component);
QQmlEngine engine;
@@ -467,6 +468,22 @@ void tst_qquickfolderlistmodel::updateProperties()
QCOMPARE(showHidden.toBool(), true);
}
+void tst_qquickfolderlistmodel::importBothVersions()
+{
+ {
+ QQmlComponent component(&engine, testFileUrl("sortReversed.qml"));
+ checkNoErrors(component);
+ QScopedPointer<QObject> obj(component.create());
+ QVERIFY(obj);
+ }
+ {
+ QQmlComponent component(&engine, testFileUrl("qrc.qml"));
+ checkNoErrors(component);
+ QScopedPointer<QObject> obj(component.create());
+ QVERIFY(obj);
+ }
+}
+
QTEST_MAIN(tst_qquickfolderlistmodel)
#include "tst_qquickfolderlistmodel.moc"