aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmltyperegistrar
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2020-11-12 17:23:24 +0100
committerUlf Hermann <ulf.hermann@qt.io>2020-11-12 21:24:13 +0100
commit0bcf3f4485b912657e11f1ac560676c5538080fc (patch)
tree779fac5d0973f875eabcac06a2fd3fe53fbdc0a3 /src/qmltyperegistrar
parent756d50e2127d9ac32b99cd1ed3471a3915c0de7f (diff)
qmltyperegistrar: Use QString rather than string for strings
All other type names are actual C++ type names. Also, correctly resolve qreal if its type is overridden at configure time. Change-Id: Ia2a1b4309f94e8c72461ee69005b1bdee6337370 Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qmltyperegistrar')
-rw-r--r--src/qmltyperegistrar/qmltypescreator.cpp8
1 files changed, 5 insertions, 3 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")) {