[network/ktorrent] plugins/mediaplayer: Remove unneeded functions from MediaModel

Jack Hill <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit 4c6eabeea131fbd114771d9a5a000d118bb24288 by Jack Hill.
Committed on 05/08/2026 at 21:29.
Pushed by jackh into branch 'master'.

Remove unneeded functions from MediaModel

It's a list model so we don't need to implement columnCount or
headerData ourselves.

M  +0    -14   plugins/mediaplayer/mediamodel.cpp
M  +0    -2    plugins/mediaplayer/mediamodel.h

https://invent.kde.org/network/ktorrent/-/commit/4c6eabeea131fbd114771d9a5a000d118bb24288

diff --git a/plugins/mediaplayer/mediamodel.cpp b/plugins/mediaplayer/mediamodel.cpp
index 97b06fc09..b80962c02 100644
--- a/plugins/mediaplayer/mediamodel.cpp
+++ b/plugins/mediaplayer/mediamodel.cpp
@@ -46,20 +46,6 @@ int MediaModel::rowCount(const QModelIndex &parent) const
     }
 }
 
-int MediaModel::columnCount(const QModelIndex &parent) const
-{
-    Q_UNUSED(parent);
-    return 1;
-}
-
-QVariant MediaModel::headerData(int section, Qt::Orientation orientation, int role) const
-{
-    Q_UNUSED(section);
-    Q_UNUSED(orientation);
-    Q_UNUSED(role);
-    return QVariant();
-}
-
 QVariant MediaModel::data(const QModelIndex &index, int role) const
 {
     if (index.column() != 0 || index.row() < 0 || index.row() >= items.count()) {
diff --git a/plugins/mediaplayer/mediamodel.h b/plugins/mediaplayer/mediamodel.h
index e79f4651d..d88cc31c9 100644
--- a/plugins/mediaplayer/mediamodel.h
+++ b/plugins/mediaplayer/mediamodel.h
@@ -44,8 +44,6 @@ public:
     ~MediaModel() override;
 
     int rowCount(const QModelIndex &parent) const override;
-    int columnCount(const QModelIndex &parent) const override;
-    QVariant headerData(int section, Qt::Orientation orientation, int role) const override;
     QVariant data(const QModelIndex &index, int role) const override;
     bool removeRows(int row, int count, const QModelIndex &parent) override;
     bool insertRows(int row, int count, const QModelIndex &parent) override;
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.