diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2021-12-16 16:28:04 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2022-01-06 13:21:42 +0100 |
commit | b5824378500594377d113d5b11bc220fdfe4cc1b (patch) | |
tree | c6af838c50f9c8b8faa2c9844f9016ba54891158 | |
parent | 65bf0c53f03aaf6bbbdaad68290bf2f252e34103 (diff) |
Update qquicktreeview to take Qt 6.3 API changes into account
Some functions in the private class QQuickTableViewPrivate has
changed in Qt 6.3 to be virtual. Update qquicktreeview so that
it takes these changes into account when building with Qt 6.3.
Change-Id: I81c78d3f16da36d9859031ac28434987981d99f1
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
-rw-r--r-- | src/qquicktreeview.cpp | 8 | ||||
-rw-r--r-- | src/qquicktreeview_p_p.h | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/qquicktreeview.cpp b/src/qquicktreeview.cpp index 4fc4557..a056a0a 100644 --- a/src/qquicktreeview.cpp +++ b/src/qquicktreeview.cpp @@ -505,13 +505,21 @@ void QQuickTreeViewPrivate::dataChangedCallback( void QQuickTreeViewPrivate::initItemCallback(int modelIndex, QObject *object) { +#if QT_VERSION < QT_VERSION_CHECK(6, 3, 0) Q_UNUSED(modelIndex); +#else + QQuickTableViewPrivate::initItemCallback(modelIndex, object); +#endif updateAttachedProperties(object); } void QQuickTreeViewPrivate::itemReusedCallback(int modelIndex, QObject *object) { +#if QT_VERSION < QT_VERSION_CHECK(6, 3, 0) Q_UNUSED(modelIndex); +#else + QQuickTableViewPrivate::itemReusedCallback(modelIndex, object); +#endif updateAttachedProperties(object); } diff --git a/src/qquicktreeview_p_p.h b/src/qquicktreeview_p_p.h index f390edc..1e9a9cb 100644 --- a/src/qquicktreeview_p_p.h +++ b/src/qquicktreeview_p_p.h @@ -59,8 +59,15 @@ public: void dataChangedCallback(const QModelIndex &topLeft, const QModelIndex &bottomRight, const QVector<int> &roles); + +#if QT_VERSION < QT_VERSION_CHECK(6, 3, 0) void initItemCallback(int modelIndex, QObject *object); void itemReusedCallback(int modelIndex, QObject *object); +#else + void initItemCallback(int modelIndex, QObject *object) override; + void itemReusedCallback(int modelIndex, QObject *object) override; +#endif + void updateAttachedProperties(QObject *object); void checkForPropertyChanges(); |