Remove DataModel::roleNameToId

It is unused and returned -1 whereas SortFilterModel would return Qt::DisplayRole

Differential Revision: https://phabricator.kde.org/D8638
This commit is contained in:
Kai Uwe Broulik 2017-11-06 15:17:15 +01:00
parent 7ec2ccb446
commit d51456bdfc
2 changed files with 0 additions and 10 deletions

View File

@ -562,13 +562,5 @@ QVariantMap DataModel::get(int row) const
return map;
}
int DataModel::roleNameToId(const QString &name)
{
if (!m_roleIds.contains(name)) {
return -1;
}
return m_roleIds.value(name);
}
}

View File

@ -200,8 +200,6 @@ public:
void setSourceFilter(const QString &key);
QString sourceFilter() const;
int roleNameToId(const QString &name); //FIXME TODO KF6: This should have been const.
//Reimplemented
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
QVariant headerData(int section, Qt::Orientation orientation,