From aa25ad8d5f476d6db59012a122833ebe677eaf69 Mon Sep 17 00:00:00 2001 From: Michael Brasser Date: Wed, 11 Jul 2012 13:01:33 +1000 Subject: Make QQmlScriptString opaque. Allow for future optimization by encapsulating the raw script data. Change-Id: I1863103e8e6d74ede60593cabb240e16f2ae657e Reviewed-by: Roberto Raggi --- src/qml/qml/qqmlscriptstring_p.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'src/qml/qml/qqmlscriptstring_p.h') diff --git a/src/qml/qml/qqmlscriptstring_p.h b/src/qml/qml/qqmlscriptstring_p.h index 15786c7aae..97c02d21d7 100644 --- a/src/qml/qml/qqmlscriptstring_p.h +++ b/src/qml/qml/qqmlscriptstring_p.h @@ -42,14 +42,19 @@ #ifndef QQMLSCRIPTSTRING_P_H #define QQMLSCRIPTSTRING_P_H +#include "qqmlscriptstring.h" #include QT_BEGIN_NAMESPACE -class QQmlScriptStringPrivate : public QSharedData +class Q_AUTOTEST_EXPORT QQmlScriptStringPrivate : public QSharedData { public: - QQmlScriptStringPrivate() : context(0), scope(0), bindingId(-1), lineNumber(-1), columnNumber(-1) {} + QQmlScriptStringPrivate() : context(0), scope(0), bindingId(-1), lineNumber(-1), columnNumber(-1), + numberValue(0), isStringLiteral(false), isNumberLiteral(false) {} + + //for testing + static const QQmlScriptStringPrivate* get(const QQmlScriptString &script); QQmlContext *context; QObject *scope; @@ -57,6 +62,9 @@ public: int bindingId; int lineNumber; int columnNumber; + double numberValue; + bool isStringLiteral; + bool isNumberLiteral; }; QT_END_NAMESPACE -- cgit v1.2.3