aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/jsruntime/qv4string_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2018-04-03 15:23:07 +0200
committerLars Knoll <lars.knoll@qt.io>2018-05-02 14:18:36 +0000
commitbab5e5adf578fb37402ff03f4bd5e9ed3ce4c2d2 (patch)
tree1bbc320c5594faf5d2156385088c12222b9542b8 /src/qml/jsruntime/qv4string_p.h
parenta6da23bb5f6004e13d22838c7db1246169874930 (diff)
Partial Symbol support
Added basic infrastructure to create symbols and convert them back to strings. In addition, storing and retrieving of symbol based properties in Objects works. Change-Id: I185f7aa46e7afa19db5a801102142892e03b7bf1 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/jsruntime/qv4string_p.h')
-rw-r--r--src/qml/jsruntime/qv4string_p.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/qml/jsruntime/qv4string_p.h b/src/qml/jsruntime/qv4string_p.h
index 4e35853f69..c48f46fe6e 100644
--- a/src/qml/jsruntime/qv4string_p.h
+++ b/src/qml/jsruntime/qv4string_p.h
@@ -68,7 +68,9 @@ struct Q_QML_PRIVATE_EXPORT StringOrSymbol : Base
{
mutable QStringData *text;
mutable Identifier identifier;
+
static void markObjects(Heap::Base *that, MarkStack *markStack);
+ void destroy();
inline QString toQString() const {
if (!text)
@@ -96,7 +98,6 @@ struct Q_QML_PRIVATE_EXPORT String : StringOrSymbol {
}
void init(const QString &text);
- void destroy();
void simplifyString() const;
int length() const;
std::size_t retainedTextSize() const {
@@ -175,6 +176,9 @@ struct Q_QML_PRIVATE_EXPORT StringOrSymbol : public Managed {
uint asArrayIndex() const;
+ inline QString toQString() const {
+ return d()->toQString();
+ }
#endif
};