diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/qml/qml/qqmlboundsignal.cpp | 6 | ||||
-rw-r--r-- | src/qml/qml/qqmlboundsignal_p.h | 8 | ||||
-rw-r--r-- | src/qml/qml/qqmlmetaobject_p.h | 4 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycache.cpp | 2 | ||||
-rw-r--r-- | src/qml/qml/qqmlpropertycache_p.h | 2 |
5 files changed, 10 insertions, 12 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 ¶meterString) : 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), diff --git a/src/qml/qml/qqmlboundsignal_p.h b/src/qml/qml/qqmlboundsignal_p.h index d034d874df..881c65db26 100644 --- a/src/qml/qml/qqmlboundsignal_p.h +++ b/src/qml/qml/qqmlboundsignal_p.h @@ -66,12 +66,12 @@ class Q_QML_PRIVATE_EXPORT QQmlBoundSignalExpression : public QQmlJavaScriptExpr { public: QQmlBoundSignalExpression( - QObject *target, int index, const QQmlRefPointer<QQmlContextData> &ctxt, QObject *scope, + const QObject *target, int index, const QQmlRefPointer<QQmlContextData> &ctxt, QObject *scope, const QString &expression, const QString &fileName, quint16 line, quint16 column, const QString &handlerName = QString(), const QString ¶meterString = QString()); QQmlBoundSignalExpression( - QObject *target, int index, const QQmlRefPointer<QQmlContextData> &ctxt, + const QObject *target, int index, const QQmlRefPointer<QQmlContextData> &ctxt, QObject *scopeObject, QV4::Function *function, QV4::ExecutionContext *scope = nullptr); // inherited from QQmlJavaScriptExpression. @@ -83,7 +83,7 @@ public: void evaluate(const QList<QVariant> &args); QString expression() const; - QObject *target() const { return m_target; } + const QObject *target() const { return m_target; } private: ~QQmlBoundSignalExpression() override; @@ -93,7 +93,7 @@ private: bool expressionFunctionValid() const { return function() != nullptr; } int m_index; - QObject *m_target; + const QObject *m_target; }; class Q_QML_PRIVATE_EXPORT QQmlBoundSignal : public QQmlNotifierEndpoint diff --git a/src/qml/qml/qqmlmetaobject_p.h b/src/qml/qml/qqmlmetaobject_p.h index 9465458780..a5b9b758a8 100644 --- a/src/qml/qml/qqmlmetaobject_p.h +++ b/src/qml/qml/qqmlmetaobject_p.h @@ -75,7 +75,7 @@ public: typedef QVarLengthArray<int, 9> ArgTypeStorage; inline QQmlMetaObject() = default; - inline QQmlMetaObject(QObject *); + inline QQmlMetaObject(const QObject *); inline QQmlMetaObject(const QMetaObject *); inline QQmlMetaObject(QQmlPropertyCache *); inline QQmlMetaObject(const QQmlMetaObject &); @@ -108,7 +108,7 @@ protected: }; -QQmlMetaObject::QQmlMetaObject(QObject *o) +QQmlMetaObject::QQmlMetaObject(const QObject *o) { if (o) _m = o->metaObject(); diff --git a/src/qml/qml/qqmlpropertycache.cpp b/src/qml/qml/qqmlpropertycache.cpp index 114c5fec10..854cba6f29 100644 --- a/src/qml/qml/qqmlpropertycache.cpp +++ b/src/qml/qml/qqmlpropertycache.cpp @@ -820,7 +820,7 @@ int QQmlPropertyCache::originalClone(int index) return index; } -int QQmlPropertyCache::originalClone(QObject *object, int index) +int QQmlPropertyCache::originalClone(const QObject *object, int index) { QQmlData *data = QQmlData::get(object, false); if (data && data->propertyCache) { diff --git a/src/qml/qml/qqmlpropertycache_p.h b/src/qml/qml/qqmlpropertycache_p.h index 1adfc53cf5..4c9395601c 100644 --- a/src/qml/qml/qqmlpropertycache_p.h +++ b/src/qml/qml/qqmlpropertycache_p.h @@ -196,7 +196,7 @@ public: //see QMetaObjectPrivate::originalClone int originalClone(int index); - static int originalClone(QObject *, int index); + static int originalClone(const QObject *, int index); QList<QByteArray> signalParameterNames(int index) const; static QString signalParameterStringForJS(QV4::ExecutionEngine *engine, const QList<QByteArray> ¶meterNameList, QString *errorString = nullptr); |