aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlboundsignal.cpp
diff options
context:
space:
mode:
authorFabian Kosmale <fabian.kosmale@qt.io>2021-02-26 13:54:24 +0100
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-02-28 13:50:45 +0000
commit4371cb583457e5dbcdd93183ff82886dfefdfce6 (patch)
tree884ac5ab8ceeac822db5c203d82e0b9a47473982 /src/qml/qml/qqmlboundsignal.cpp
parente966a340d09a9ffdc9876001a35201f38663ace7 (diff)
QML engine internals: Do not require mutable QObject pointer
All we need is to get the meta-object from the object. This also works with a const pointer, which is helpful for const-correctness in the FSM framework. Change-Id: Ie554fe81e67bced5f74c844c72e7f9b0df7ded58 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io> (cherry picked from commit d0db469788039cf73406ba3f489b7a00b0601f01) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/qml/qml/qqmlboundsignal.cpp')
-rw-r--r--src/qml/qml/qqmlboundsignal.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/qml/qml/qqmlboundsignal.cpp b/src/qml/qml/qqmlboundsignal.cpp
index 8fceb94f45..3626d8f9c0 100644
--- a/src/qml/qml/qqmlboundsignal.cpp
+++ b/src/qml/qml/qqmlboundsignal.cpp
@@ -64,8 +64,7 @@
QT_BEGIN_NAMESPACE
-QQmlBoundSignalExpression::QQmlBoundSignalExpression(
- QObject *target, int index, const QQmlRefPointer<QQmlContextData> &ctxt, QObject *scope,
+QQmlBoundSignalExpression::QQmlBoundSignalExpression(const QObject *target, int index, const QQmlRefPointer<QQmlContextData> &ctxt, QObject *scope,
const QString &expression, const QString &fileName, quint16 line, quint16 column,
const QString &handlerName, const QString &parameterString)
: QQmlJavaScriptExpression(),
@@ -104,8 +103,7 @@ QQmlBoundSignalExpression::QQmlBoundSignalExpression(
setupFunction(context, f->function());
}
-QQmlBoundSignalExpression::QQmlBoundSignalExpression(
- QObject *target, int index, const QQmlRefPointer<QQmlContextData> &ctxt,
+QQmlBoundSignalExpression::QQmlBoundSignalExpression(const QObject *target, int index, const QQmlRefPointer<QQmlContextData> &ctxt,
QObject *scopeObject, QV4::Function *function, QV4::ExecutionContext *scope)
: QQmlJavaScriptExpression(),
m_index(index),