aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/core/qqmlsettings/tst_qqmlsettings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/core/qqmlsettings/tst_qqmlsettings.cpp')
-rw-r--r--tests/auto/core/qqmlsettings/tst_qqmlsettings.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/tests/auto/core/qqmlsettings/tst_qqmlsettings.cpp b/tests/auto/core/qqmlsettings/tst_qqmlsettings.cpp
index 1b6ab3f68b..236ce4b3e9 100644
--- a/tests/auto/core/qqmlsettings/tst_qqmlsettings.cpp
+++ b/tests/auto/core/qqmlsettings/tst_qqmlsettings.cpp
@@ -1,5 +1,5 @@
// Copyright (C) 2022 The Qt Company Ltd.
-// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
+// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
#include <QtTest/QtTest>
#include <QtCore/QCoreApplication>
@@ -33,6 +33,7 @@ private slots:
void siblings();
void initial();
void noApplicationIdentifiersSet();
+ void fromResources();
};
// ### Replace keyValueMap("foo", "bar") with QVariantMap({{"foo", "bar"}})
@@ -493,6 +494,17 @@ void tst_QQmlSettings::noApplicationIdentifiersSet()
QVERIFY(!settings.value("success").toBool());
}
+void tst_QQmlSettings::fromResources()
+{
+ QQmlEngine engine;
+ QQmlComponent component(&engine, testFileUrl("resources.qml"));
+ QVERIFY2(component.isReady(), qPrintable(component.errorString()));
+ QScopedPointer<QObject> root(component.create());
+ QVERIFY(!root.isNull());
+
+ QCOMPARE(root->property("text").toString(), QLatin1String("from resource"));
+}
+
QTEST_MAIN(tst_QQmlSettings)
#include "tst_qqmlsettings.moc"