From eff37a46ce33078f6f601bd724bbb7359b5db055 Mon Sep 17 00:00:00 2001 From: Anton Kudryavtsev Date: Mon, 10 Oct 2016 14:54:07 +0300 Subject: Qml, Imports: mark some methods as const These methods do not modify objects. Change-Id: I67b1a10cfd0b32688500fca3265a96f53afd1b57 Reviewed-by: Ulf Hermann --- src/qml/qml/qqmlnotifier_p.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/qml/qml/qqmlnotifier_p.h') diff --git a/src/qml/qml/qqmlnotifier_p.h b/src/qml/qml/qqmlnotifier_p.h index eff9684558..4db0dd038a 100644 --- a/src/qml/qml/qqmlnotifier_p.h +++ b/src/qml/qml/qqmlnotifier_p.h @@ -94,9 +94,9 @@ public: inline QQmlNotifierEndpoint(Callback callback); inline ~QQmlNotifierEndpoint(); - inline bool isConnected(); - inline bool isConnected(QObject *source, int sourceSignal); - inline bool isConnected(QQmlNotifier *); + inline bool isConnected() const; + inline bool isConnected(QObject *source, int sourceSignal) const; + inline bool isConnected(QQmlNotifier *) const; void connect(QObject *source, int sourceSignal, QQmlEngine *engine); inline void connect(QQmlNotifier *); @@ -162,7 +162,7 @@ QQmlNotifierEndpoint::~QQmlNotifierEndpoint() disconnect(); } -bool QQmlNotifierEndpoint::isConnected() +bool QQmlNotifierEndpoint::isConnected() const { return prev != 0; } @@ -171,13 +171,13 @@ bool QQmlNotifierEndpoint::isConnected() \a sourceSignal MUST be in the signal index range (see QObjectPrivate::signalIndex()). This is different from QMetaMethod::methodIndex(). */ -bool QQmlNotifierEndpoint::isConnected(QObject *source, int sourceSignal) +bool QQmlNotifierEndpoint::isConnected(QObject *source, int sourceSignal) const { return this->sourceSignal != -1 && senderAsObject() == source && this->sourceSignal == sourceSignal; } -bool QQmlNotifierEndpoint::isConnected(QQmlNotifier *notifier) +bool QQmlNotifierEndpoint::isConnected(QQmlNotifier *notifier) const { return sourceSignal == -1 && senderAsNotifier() == notifier; } -- cgit v1.2.3