diff options
author | Fabian Kosmale <[email protected]> | 2024-07-18 09:30:09 +0200 |
---|---|---|
committer | Fabian Kosmale <[email protected]> | 2024-07-18 15:23:43 +0200 |
commit | 16b49089c69187d2a82f42874cd6253ca656e3ca (patch) | |
tree | 29b90ea783b26dc5654013148d8cbbcee7035e7a /src/quick/items/qquickitemview_p.h | |
parent | f4ea7af462a4b6cd9fc8bb6e57c8d0224881e9ab (diff) |
(List|Grid)ViewAttached: Narrow down the view type
The classes tried to reuse as much functionality as possible by putting
it into the common base class, QQuickItemViewAttached. That however
meant that the view property could only have the type QQuickItemView,
confusing tooling.
This change moves the property to the derived classes, and changes the
type to the derived type (matching what is already documented).
This is safe (API stability wise) because QQuickItemViewAttached does
not exist as its own type in QML, and the C++ type exists only in a
private header.
Fixes: QTBUG-124412
Pick-to: 6.8
Change-Id: Ic613d2afce311d974072913a110a601ce2ee0251
Reviewed-by: Mitch Curtis <[email protected]>
Diffstat (limited to 'src/quick/items/qquickitemview_p.h')
-rw-r--r-- | src/quick/items/qquickitemview_p.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/src/quick/items/qquickitemview_p.h b/src/quick/items/qquickitemview_p.h index cecbf094cb..5db7d5ed1d 100644 --- a/src/quick/items/qquickitemview_p.h +++ b/src/quick/items/qquickitemview_p.h @@ -287,7 +287,6 @@ class Q_QUICK_EXPORT QQuickItemViewAttached : public QObject { Q_OBJECT - Q_PROPERTY(QQuickItemView *view READ view NOTIFY viewChanged FINAL) Q_PROPERTY(bool isCurrentItem READ isCurrentItem NOTIFY currentItemChanged FINAL) Q_PROPERTY(bool delayRemove READ delayRemove WRITE setDelayRemove NOTIFY delayRemoveChanged FINAL) @@ -300,14 +299,6 @@ public: : QObject(parent), m_isCurrent(false), m_delayRemove(false) {} ~QQuickItemViewAttached() {} - QQuickItemView *view() const { return m_view; } - void setView(QQuickItemView *view) { - if (view != m_view) { - m_view = view; - Q_EMIT viewChanged(); - } - } - bool isCurrentItem() const { return m_isCurrent; } void setIsCurrentItem(bool c) { if (m_isCurrent != c) { @@ -382,7 +373,6 @@ Q_SIGNALS: void reused(); public: - QPointer<QQuickItemView> m_view; bool m_isCurrent : 1; bool m_delayRemove : 1; |