diff options
author | Michael Brasser <michael.brasser@nokia.com> | 2011-06-08 13:18:35 +1000 |
---|---|---|
committer | Michael Brasser <michael.brasser@nokia.com> | 2011-06-09 10:10:09 +1000 |
commit | ccf706d0bb2d9f70f5a8c18e4aab8ee7e6369817 (patch) | |
tree | 7019d21c843ad3c4e02fdff38d81615b56f56ee0 /src/declarative/qml/qdeclarativeexpression.h | |
parent | b8154d2b6b1a6c0145a099554c9166b4d35630fe (diff) |
Optimized QDeclarativeScriptString constructor for QDeclarativeExpression.
When the compiler sees a script string, it will attempt to rewrite it
and store the id for the rewrite in the script string. We can then
create a QDeclarativeExpression using the id, which saves us a rewrite
at runtime.
Reviewed-by: Aaron Kennedy
Diffstat (limited to 'src/declarative/qml/qdeclarativeexpression.h')
-rw-r--r-- | src/declarative/qml/qdeclarativeexpression.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/declarative/qml/qdeclarativeexpression.h b/src/declarative/qml/qdeclarativeexpression.h index fef97de2b2..b76205c82e 100644 --- a/src/declarative/qml/qdeclarativeexpression.h +++ b/src/declarative/qml/qdeclarativeexpression.h @@ -43,6 +43,7 @@ #define QDECLARATIVEEXPRESSION_H #include <QtDeclarative/qdeclarativeerror.h> +#include <QtDeclarative/qdeclarativescriptstring.h> #include <QtCore/qobject.h> #include <QtCore/qvariant.h> @@ -66,6 +67,7 @@ class Q_DECLARATIVE_EXPORT QDeclarativeExpression : public QObject public: QDeclarativeExpression(); QDeclarativeExpression(QDeclarativeContext *, QObject *, const QString &, QObject * = 0); + explicit QDeclarativeExpression(const QDeclarativeScriptString &, QObject * = 0); virtual ~QDeclarativeExpression(); QDeclarativeEngine *engine() const; |