aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmldata_p.h
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2018-01-10 15:39:53 +0100
committerMitch Curtis <mitch.curtis@qt.io>2018-01-11 11:03:22 +0000
commitecb52e7991abe8d880f74f65dcdd92d7fde715d5 (patch)
tree2c36c5136b5856e79ec0878fa9205e1e2b6bf7c7 /src/qml/qml/qqmldata_p.h
parent7cf3421858c96ff3a2fe3b860be01a3e0e1133cf (diff)
Constify QObject* argument to QQmlData::wasDeleted()
Because it doesn't hurt and it makes it easier to use it in QObjectWrapper::query(). Change-Id: I727ce4b862fa34866513cbb80a221a8a3aeca363 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'src/qml/qml/qqmldata_p.h')
-rw-r--r--src/qml/qml/qqmldata_p.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/qml/qml/qqmldata_p.h b/src/qml/qml/qqmldata_p.h
index 63994a392d..4848f48766 100644
--- a/src/qml/qml/qqmldata_p.h
+++ b/src/qml/qml/qqmldata_p.h
@@ -259,7 +259,7 @@ public:
bool hasExtendedData() const { return extendedData != 0; }
QHash<int, QObject *> *attachedProperties() const;
- static inline bool wasDeleted(QObject *);
+ static inline bool wasDeleted(const QObject *);
static void markAsDeleted(QObject *);
static void setQueuedForDeletion(QObject *);
@@ -296,16 +296,16 @@ private:
}
};
-bool QQmlData::wasDeleted(QObject *object)
+bool QQmlData::wasDeleted(const QObject *object)
{
if (!object)
return true;
- QObjectPrivate *priv = QObjectPrivate::get(object);
+ const QObjectPrivate *priv = QObjectPrivate::get(object);
if (!priv || priv->wasDeleted)
return true;
- QQmlData *ddata = QQmlData::get(object);
+ const QQmlData *ddata = QQmlData::get(object);
return ddata && ddata->isQueuedForDeletion;
}