aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmljavascriptexpression_p.h
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2016-03-30 14:53:03 +0200
committerErik Verbruggen <erik.verbruggen@theqtcompany.com>2016-04-05 13:52:47 +0000
commitaac611fdb8aacc494956a080bf38cb9b7eb4c2e8 (patch)
treeff88f41bdd35871b5cfbb84dbdad8b61f5efa1c3 /src/qml/qml/qqmljavascriptexpression_p.h
parenteb9fa2d407a712ae72f7fdf80c4833bd301f1de5 (diff)
QML: allow more methods to get inlined.
Most of these methods are small, and all of them lie in the 'hot path' for simple bindings like 'width: parent.width'. Change-Id: I0071cec92b49437a352160b0283ed6c89a278a07 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmljavascriptexpression_p.h')
-rw-r--r--src/qml/qml/qqmljavascriptexpression_p.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/qml/qml/qqmljavascriptexpression_p.h b/src/qml/qml/qqmljavascriptexpression_p.h
index e8ca498ff4..64cb1bb242 100644
--- a/src/qml/qml/qqmljavascriptexpression_p.h
+++ b/src/qml/qml/qqmljavascriptexpression_p.h
@@ -243,6 +243,13 @@ bool QQmlJavaScriptExpression::hasDelayedError() const
return m_error;
}
+inline void QQmlJavaScriptExpression::clearError()
+{
+ if (m_error)
+ delete m_error;
+ m_error = 0;
+}
+
QQmlJavaScriptExpressionGuard::QQmlJavaScriptExpressionGuard(QQmlJavaScriptExpression *e)
: QQmlNotifierEndpoint(QQmlNotifierEndpoint::QQmlJavaScriptExpressionGuard),
expression(e), next(0)