aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4string_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/jsruntime/qv4string_p.h')
-rw-r--r--src/qml/jsruntime/qv4string_p.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h
index 41039bca88..679cb7329c 100644
--- a/src/qml/jsruntime/qv4string_p.h
+++ b/src/qml/jsruntime/qv4string_p.h
@@ -112,6 +112,8 @@ struct Q_QML_PRIVATE_EXPORT String : Base {
return toQString() == other->toQString();
}
+ bool startsWithUpper() const;
+
mutable QStringData *text;
mutable Identifier *identifier;
mutable uint subtype;
@@ -206,10 +208,7 @@ struct Q_QML_PRIVATE_EXPORT String : public Managed {
return calculateHashValue(ch, end, subtype);
}
- bool startsWithUpper() const {
- Q_ASSERT(d()->subtype < Heap::String::StringType_Complex);
- return d()->text->size && QChar::isUpper(d()->text->data()[0]);
- }
+ bool startsWithUpper() const { return d()->startsWithUpper(); }
Identifier *identifier() const { return d()->identifier; }