diff options
author | Matthew Vogt <matthew.vogt@nokia.com> | 2012-08-09 13:26:32 +1000 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-16 01:13:50 +0200 |
commit | 6aeff1b5429ca97af052a7a172369585382096e8 (patch) | |
tree | 68347d53f95cbcb6162a0a4f2e3c198a77f455b1 /src/qml/qml/qqmlboundsignal_p.h | |
parent | 6096f72e8cf23522cf675d6142492c58401e68b0 (diff) |
Reduce memory consumption of source coordinates
Reduce memory consumption by storing source location coordinates
as 16-bit variables (in run-time structures). Also modify qmlmin
to restrict line lengths so that the column bound is not normally
exceeded.
Change-Id: I08605626ffbdf081b6da2aea1116bdfe24998572
Reviewed-by: Yann Bodson <yann.bodson@nokia.com>
Diffstat (limited to 'src/qml/qml/qqmlboundsignal_p.h')
-rw-r--r-- | src/qml/qml/qqmlboundsignal_p.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/qml/qml/qqmlboundsignal_p.h b/src/qml/qml/qqmlboundsignal_p.h index 81bcb0bc06..879b84294c 100644 --- a/src/qml/qml/qqmlboundsignal_p.h +++ b/src/qml/qml/qqmlboundsignal_p.h @@ -61,6 +61,7 @@ #include <private/qqmlnotifier_p.h> #include <private/qflagpointer_p.h> #include <private/qqmlrefcount_p.h> +#include <private/qqmlglobal_p.h> #include <private/qobject_p.h> QT_BEGIN_NAMESPACE @@ -69,9 +70,9 @@ class Q_QML_PRIVATE_EXPORT QQmlBoundSignalExpression : public QQmlAbstractExpres { public: QQmlBoundSignalExpression(QQmlContextData *ctxt, QObject *scope, const QByteArray &expression, - bool isRewritten, const QString &fileName, int line, int column); + bool isRewritten, const QString &fileName, quint16 line, quint16 column); QQmlBoundSignalExpression(QQmlContextData *ctxt, QObject *scope, const QString &expression, - bool isRewritten, const QString &fileName, int line, int column); + bool isRewritten, const QString &fileName, quint16 line, quint16 column); // "inherited" from QQmlJavaScriptExpression. static QString expressionIdentifier(QQmlJavaScriptExpression *); @@ -81,8 +82,8 @@ public: void evaluate(QObject *secondaryScope = 0); QString sourceFile() const { return m_fileName; } - int lineNumber() const { return m_line; } - int columnNumber() const { return m_column; } + quint16 lineNumber() const { return m_line; } + quint16 columnNumber() const { return m_column; } QString expression() const; QQmlEngine *engine() const { return context() ? context()->engine : 0; } @@ -100,8 +101,8 @@ private: QString m_expression; //only used when expression needs to be rewritten QString m_fileName; - int m_line; - int m_column; + quint16 m_line; + quint16 m_column; bool m_expressionFunctionValid:1; bool m_expressionFunctionRewritten:1; |