[network/ruqola] src/widgets/room: Don't store view (unused)

Laurent Montel <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit d90a34a2dddbebde2fb6a02ea39c4909d891c4d6 by Laurent Montel.
Committed on 13/08/2026 at 16:48.
Pushed by mlaurent into branch 'master'.

Don't store view (unused)

M  +1    -4    src/widgets/room/commandpreviewimagedelegate.h
M  +1    -1    src/widgets/room/commandpreviewwidget.cpp

https://invent.kde.org/network/ruqola/-/commit/d90a34a2dddbebde2fb6a02ea39c4909d891c4d6

diff --git a/src/widgets/room/commandpreviewimagedelegate.h b/src/widgets/room/commandpreviewimagedelegate.h
index 9e18ce3ca8..bd8bbaacce 100644
--- a/src/widgets/room/commandpreviewimagedelegate.h
+++ b/src/widgets/room/commandpreviewimagedelegate.h
@@ -12,11 +12,8 @@ class CommandPreviewImageDelegate : public QStyledItemDelegate
 {
     Q_OBJECT
 public:
-    explicit CommandPreviewImageDelegate(QListView *view, QObject *parent = nullptr);
+    explicit CommandPreviewImageDelegate(QObject *parent = nullptr);
     ~CommandPreviewImageDelegate() override;
     void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
     [[nodiscard]] QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const override;
-
-private:
-    QListView *const mView;
 };
diff --git a/src/widgets/room/commandpreviewwidget.cpp b/src/widgets/room/commandpreviewwidget.cpp
index a43a700252..4d2e82a8c4 100644
--- a/src/widgets/room/commandpreviewwidget.cpp
+++ b/src/widgets/room/commandpreviewwidget.cpp
@@ -42,7 +42,7 @@ CommandPreviewWidget::CommandPreviewWidget(QWidget *parent)
     mListView->setFlow(QListView::LeftToRight);
     mListView->setResizeMode(QListView::Adjust);
     mListView->setWrapping(false);
-    mListView->setItemDelegate(new CommandPreviewImageDelegate(mListView, this));
+    mListView->setItemDelegate(new CommandPreviewImageDelegate(this));
     mListView->setModel(mPreviewCommandModel);
     mListView->setSpacing(2);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.