aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/qmltyperegistrar/qmltypescreator.cpp8
-rw-r--r--tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp2
2 files changed, 6 insertions, 4 deletions
diff --git a/src/qmltyperegistrar/qmltypescreator.cpp b/src/qmltyperegistrar/qmltypescreator.cpp
index 9e1e757b69..df257d1f53 100644
--- a/src/qmltyperegistrar/qmltypescreator.cpp
+++ b/src/qmltyperegistrar/qmltypescreator.cpp
@@ -114,10 +114,12 @@ void QmlTypesCreator::writeType(const QJsonObject &property, const QString &key,
bool isList = false;
bool isPointer = false;
- if (type == QLatin1String("QString")) {
- type = QLatin1String("string");
- } else if (type == QLatin1String("qreal")) {
+ if (type == QLatin1String("qreal")) {
+#ifdef QT_COORD_TYPE_STRING
+ type = QLatin1String(QT_COORD_TYPE_STRING)
+#else
type = QLatin1String("double");
+#endif
} else if (type == QLatin1String("qint32")) {
type = QLatin1String("int");
} else if (type == QLatin1String("quint32")) {
diff --git a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp
index 77f1f3b9cf..3d3a0e7fbd 100644
--- a/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp
+++ b/tests/auto/qml/qmltyperegistrar/tst_qmltyperegistrar.cpp
@@ -81,7 +81,7 @@ void tst_qmltyperegistrar::superAndForeignTypes()
QVERIFY(qmltypesData.contains("prototype: \"SizeEnums\""));
QVERIFY(qmltypesData.contains("Property { name: \"height\"; type: \"int\" }"));
QVERIFY(qmltypesData.contains("Property { name: \"width\"; type: \"int\" }"));
- QVERIFY(qmltypesData.contains("Method { name: \"sizeToString\"; type: \"string\" }"));
+ QVERIFY(qmltypesData.contains("Method { name: \"sizeToString\"; type: \"QString\" }"));
}
void tst_qmltyperegistrar::accessSemantics()