aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4string_p.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2018-05-03 08:35:36 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2018-05-03 08:27:28 +0000
commit96bb8ff5dd133a00bff6a7a713c59736441e1c78 (patch)
treebbba8e483772ff4b834d7c0e05805822f2acb960 /src/qml/jsruntime/qv4string_p.h
parent4c39e08e16e672a8b93061ff5e241873abef6fc4 (diff)
QV4::String: Fix build with QT_NO_CAST_FROM_ASCII
String::calculateHashValue() does not compile for char with QT_NO_CAST_FROM_ASCII since ch == QLatin1Char('@') will try to construct a QChar. Use toUInt() to obtain the ASCII code. The build breakage ocurred in Qt Quick Controls 2. Change-Id: I03b1763d4ca5654edbca849fe2836aac05098331 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4string_p.h')
-rw-r--r--src/qml/jsruntime/qv4string_p.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h
index bd94e1ee1a..0deb542ea2 100644
--- a/src/qml/jsruntime/qv4string_p.h
+++ b/src/qml/jsruntime/qv4string_p.h
@@ -294,7 +294,7 @@ public:
}
if (subtype)
- *subtype = (*ch == QLatin1Char('@')) ? Heap::StringOrSymbol::StringType_Symbol : Heap::StringOrSymbol::StringType_Regular;
+ *subtype = (toUInt(ch) == '@') ? Heap::StringOrSymbol::StringType_Symbol : Heap::StringOrSymbol::StringType_Regular;
return h;
}
};