diff options
author | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2023-10-04 16:34:16 +0200 |
---|---|---|
committer | Christian Ehrlicher <ch.ehrlicher@gmx.de> | 2023-10-05 21:08:45 +0200 |
commit | 4e8b54eb811f8c6064fd2e937711efe68543087c (patch) | |
tree | 28aca92c964de790d7953b22590cd3870d3d67b5 /examples/network/torrent/mainwindow.cpp | |
parent | 9ed25b413ff2e5055ec03fd6e1f8ba5dfcfc499a (diff) |
Preparations to deprecate QItemDelegate
QItemDelegate was superseded since Qt4 by QStyledItemDelegate but it
took until Qt6.7 to remove the last occurrences in qtbase.
- remove unused includes / replace with qabstractitemdelegate.h
- replace references in the documentation with QStyledItemDelegate
- adjust the examples and tests to use QStyledItemDelegate
Pick-to: 6.5 6.6
Change-Id: I246755004ce2d01192a726ca0972106c237df0cc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Diffstat (limited to 'examples/network/torrent/mainwindow.cpp')
-rw-r--r-- | examples/network/torrent/mainwindow.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/examples/network/torrent/mainwindow.cpp b/examples/network/torrent/mainwindow.cpp index 4c898743ba..2b5d0a8757 100644 --- a/examples/network/torrent/mainwindow.cpp +++ b/examples/network/torrent/mainwindow.cpp @@ -26,17 +26,17 @@ protected: }; // TorrentViewDelegate is used to draw the progress bars. -class TorrentViewDelegate : public QItemDelegate +class TorrentViewDelegate : public QStyledItemDelegate { Q_OBJECT public: - inline TorrentViewDelegate(MainWindow *mainWindow) : QItemDelegate(mainWindow) {} + inline TorrentViewDelegate(MainWindow *mainWindow) : QStyledItemDelegate(mainWindow) {} void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index ) const override { if (index.column() != 2) { - QItemDelegate::paint(painter, option, index); + QStyledItemDelegate::paint(painter, option, index); return; } |