aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/qml
diff options
context:
space:
mode:
Diffstat (limited to 'tests/auto/qml')
-rw-r--r--tests/auto/qml/qqmlproperty/data/aliasToIdWithMatchingQmlFileName.qml9
-rw-r--r--tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp12
2 files changed, 21 insertions, 0 deletions
diff --git a/tests/auto/qml/qqmlproperty/data/aliasToIdWithMatchingQmlFileName.qml b/tests/auto/qml/qqmlproperty/data/aliasToIdWithMatchingQmlFileName.qml
new file mode 100644
index 0000000000..8cbd928f36
--- /dev/null
+++ b/tests/auto/qml/qqmlproperty/data/aliasToIdWithMatchingQmlFileName.qml
@@ -0,0 +1,9 @@
+import QtQuick 2.0
+
+Item {
+ property alias testType: testType
+
+ Rectangle {
+ id: testType
+ }
+}
diff --git a/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp
index 128dc21b9a..1e9ba80264 100644
--- a/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp
+++ b/tests/auto/qml/qqmlproperty/tst_qqmlproperty.cpp
@@ -143,6 +143,7 @@ private slots:
void registeredCompositeTypeProperty();
void deeplyNestedObject();
void readOnlyDynamicProperties();
+ void aliasToIdWithMatchingQmlFileNameOnCaseInsensitiveFileSystem();
void floatToStringPrecision_data();
void floatToStringPrecision();
@@ -2047,6 +2048,17 @@ void tst_qqmlproperty::readOnlyDynamicProperties()
delete obj;
}
+void tst_qqmlproperty::aliasToIdWithMatchingQmlFileNameOnCaseInsensitiveFileSystem()
+{
+ const QUrl url = testFileUrl("aliasToIdWithMatchingQmlFileName.qml");
+ QQmlEngine engine;
+ QQmlComponent component(&engine, url);
+ QScopedPointer<QObject> root(component.create());
+
+ QQmlProperty property(root.data(), "testType.objectName", QQmlEngine::contextForObject(root.data()));
+ QVERIFY(property.isValid());
+}
+
void tst_qqmlproperty::floatToStringPrecision_data()
{
QTest::addColumn<QString>("propertyName");