aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlboundsignal_p.h
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@theqtcompany.com>2015-05-03 18:38:29 +0200
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2015-06-18 05:48:05 +0000
commit7be7651e9d6699981ed13643eff0aa43ca1bed4e (patch)
tree24fb859795ba8eb755247d9c8397a113f1f386e7 /src/qml/qml/qqmlboundsignal_p.h
parenta75c0cb5a7de3b205bd612ecd5e49b4ecc225ecd (diff)
Get rid of QQmlBoundSignalExpression::ExtraData
The extra data was only used to delay initialization of the required FunctionObject to the first time evaluate got called. In addition, the constructor using ExtraData was only ever called from the debugger. In that case performance can't be critical, so we can just as well do function object creation at construction time. This saves one pointer in the object. Change-Id: I46ce9aa325f0fa95b5b0e374e9c07d673e454dd4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlboundsignal_p.h')
-rw-r--r--src/qml/qml/qqmlboundsignal_p.h23
1 files changed, 1 insertions, 22 deletions
diff --git a/src/qml/qml/qqmlboundsignal_p.h b/src/qml/qml/qqmlboundsignal_p.h
index 0a139875db..eb4a00a4d0 100644
--- a/src/qml/qml/qqmlboundsignal_p.h
+++ b/src/qml/qml/qqmlboundsignal_p.h
@@ -91,31 +91,10 @@ private:
void init(QQmlContextData *ctxt, QObject *scope);
- bool expressionFunctionValid() const { return m_extra.flag(); }
- void setExpressionFunctionValid(bool v) { m_extra.setFlagValue(v); }
-
- bool invalidParameterName() const { return m_extra.flag2(); }
- void setInvalidParameterName(bool v) { m_extra.setFlag2Value(v); }
+ bool expressionFunctionValid() const { return !m_function.isNullOrUndefined(); }
int m_index;
QObject *m_target;
-
- // only needed when !expressionFunctionValid()
- struct ExtraData {
- ExtraData(const QString &handlerName, const QString &parameterString,
- const QString &expression, const QString &fileName,
- quint16 line, quint16 column);
- QString m_handlerName;
- QString m_parameterString;
- QString m_expression;
- QQmlSourceLocation m_sourceLocation;
- QV4::PersistentValue m_v8qmlscope;
- };
-
- // We store some flag bits in the following flag pointers.
- // flag - expressionFunctionValid
- // flag2 - invalidParameterName
- QFlagPointer<ExtraData> m_extra;
};
class Q_QML_PRIVATE_EXPORT QQmlBoundSignal : public QQmlNotifierEndpoint