aboutsummaryrefslogtreecommitdiffstats
path: root/src/qmlmodels/qqmlobjectmodel_p.h
diff options
context:
space:
mode:
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-01-29 10:43:33 +0100
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-02-05 15:28:59 +0100
commit75ce6f3cd03362e6d763ae3bc21ab793a3675fce (patch)
tree591cee7418651c02aeb0c819c1148178a8086876 /src/qmlmodels/qqmlobjectmodel_p.h
parent9dccec88e3394d9d2dc52812d9607f0bfa01a2d2 (diff)
QQmlInstanceModel: refactor recycling signals to base class
Now that QQmlDelegateModel has an API that handles reusing delegate items (*), we should also move the related signals inside it to be consistent. This will also remove the need to cast the model type in the views before connecting. This patch will also remove warnings that stems from QQuickListView trying to connect to the reuse signals when the model is not a QQmlDelegateModel. *: E.g: virtual ReleaseFlags release(QObject *object, ReusableFlag reusableFlag = NotReusable) = 0; Fixes: QTBUG-81257 Change-Id: Ia8a8f0d68e6ef7edc6c45b414121aaa77632bcd3 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'src/qmlmodels/qqmlobjectmodel_p.h')
-rw-r--r--src/qmlmodels/qqmlobjectmodel_p.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/qmlmodels/qqmlobjectmodel_p.h b/src/qmlmodels/qqmlobjectmodel_p.h
index 6c68e55012..7fb4f64676 100644
--- a/src/qmlmodels/qqmlobjectmodel_p.h
+++ b/src/qmlmodels/qqmlobjectmodel_p.h
@@ -104,6 +104,8 @@ Q_SIGNALS:
void createdItem(int index, QObject *object);
void initItem(int index, QObject *object);
void destroyingItem(QObject *object);
+ void itemPooled(int index, QObject *object);
+ void itemReused(int index, QObject *object);
protected:
QQmlInstanceModel(QObjectPrivate &dd, QObject *parent = nullptr)