mirror of https://github.com/KDE/kasts.git
Improve gammarayability of EntriesModel & FeedsModel
This makes both models return a reasonable value for Qt::DisplayRole, allowing gammaray to show something in the model explorer
This commit is contained in:
parent
cc480fa01a
commit
3ae5306e56
|
@ -34,6 +34,7 @@ QVariant EntriesModel::data(const QModelIndex &index, int role) const
|
|||
switch (role) {
|
||||
case EpisodeModel::Roles::EntryRole:
|
||||
return QVariant::fromValue(DataManager::instance().getEntry(m_feed, index.row()));
|
||||
case Qt::DisplayRole:
|
||||
case EpisodeModel::Roles::IdRole:
|
||||
return QVariant::fromValue(DataManager::instance().getIdList(m_feed)[index.row()]);
|
||||
default:
|
||||
|
|
|
@ -67,6 +67,7 @@ QVariant FeedsModel::data(const QModelIndex &index, int role) const
|
|||
switch (role) {
|
||||
case FeedRole:
|
||||
return QVariant::fromValue(DataManager::instance().getFeed(index.row()));
|
||||
case Qt::DisplayRole:
|
||||
case UrlRole:
|
||||
return QVariant::fromValue(DataManager::instance().getFeed(index.row())->url());
|
||||
case TitleRole:
|
||||
|
|
Loading…
Reference in New Issue