From 708a873880971fe29d3f100df08b04e6147ab025 Mon Sep 17 00:00:00 2001 From: Tobias Fella Date: Sat, 29 Feb 2020 15:26:40 +0100 Subject: [PATCH] Remove explicit QVariant and this-> --- src/entryListModel.cpp | 6 +++--- src/feedListModel.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/entryListModel.cpp b/src/entryListModel.cpp index f256f36f..9e440514 100644 --- a/src/entryListModel.cpp +++ b/src/entryListModel.cpp @@ -35,12 +35,12 @@ EntryListModel::EntryListModel(QObject *parent) QVariant EntryListModel::data(const QModelIndex &index, int role) const { if (role == Bookmark) - return QVariant(m_entries[index.row()].isBookmark()); + return m_entries[index.row()].isBookmark(); if (role == Read) - return QVariant(m_entries[index.row()].isRead()); + return m_entries[index.row()].isRead(); if (role == Qt::DisplayRole) return m_entries[index.row()].title(); - return QVariant(index.row()); + return QStringLiteral("DEADBEEF"); } int EntryListModel::rowCount(const QModelIndex &index) const { diff --git a/src/feedListModel.cpp b/src/feedListModel.cpp index 6cfce309..a7402b36 100644 --- a/src/feedListModel.cpp +++ b/src/feedListModel.cpp @@ -50,14 +50,14 @@ QHash FeedListModel::roleNames() const QVariant FeedListModel::data(const QModelIndex &index, int role) const { if (role == Url) - return QVariant(this->feeds[index.row()].url()); + return feeds[index.row()].url(); if (role == Qt::DisplayRole) - return QVariant(this->feeds[index.row()].name()); - return QVariant(); + return feeds[index.row()].name(); + return QStringLiteral("DEADBEEF"); } int FeedListModel::rowCount(const QModelIndex &index) const { - return this->feeds.size(); + return feeds.size(); } void FeedListModel::add_feed(QString url)