mirror of
https://github.com/KDE/kasts.git
synced 2024-12-22 13:43:58 +01:00
Remove explicit QVariant and this->
This commit is contained in:
parent
1fc7f9b904
commit
708a873880
@ -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
|
||||
{
|
||||
|
@ -50,14 +50,14 @@ QHash<int, QByteArray> 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)
|
||||
|
Loading…
Reference in New Issue
Block a user