Use override directly
This commit is contained in:
parent
efb10a0768
commit
552c4622ae
2 changed files with 5 additions and 5 deletions
|
@ -104,7 +104,7 @@ QVariant DanbooruPostModel::data(const QModelIndex &index, int role) const
|
||||||
case RatingRole:
|
case RatingRole:
|
||||||
return post->rating();
|
return post->rating();
|
||||||
case TagRole: {
|
case TagRole: {
|
||||||
QStringList tagList = post->tags().toList();
|
QStringList tagList = post->tags().values();
|
||||||
return tagList;
|
return tagList;
|
||||||
}
|
}
|
||||||
case SampleUrlRole:
|
case SampleUrlRole:
|
||||||
|
@ -146,7 +146,7 @@ QHash< int, QByteArray > DanbooruPostModel::roleNames() const
|
||||||
QStringList DanbooruPostModel::postTags() const
|
QStringList DanbooruPostModel::postTags() const
|
||||||
{
|
{
|
||||||
|
|
||||||
return m_postTags.toList();
|
return m_postTags.values();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -54,10 +54,10 @@ public:
|
||||||
DanbooruPostModel(QObject *parent = 0);
|
DanbooruPostModel(QObject *parent = 0);
|
||||||
~DanbooruPostModel();
|
~DanbooruPostModel();
|
||||||
|
|
||||||
Q_INVOKABLE int rowCount(const QModelIndex &parent = QModelIndex()) const Q_DECL_OVERRIDE;
|
Q_INVOKABLE int rowCount(const QModelIndex &parent = QModelIndex()) const override;
|
||||||
QVariant data(const QModelIndex &index, int role) const Q_DECL_OVERRIDE;
|
QVariant data(const QModelIndex &index, int role) const override;
|
||||||
void clear();
|
void clear();
|
||||||
QHash<int, QByteArray> roleNames() const Q_DECL_OVERRIDE;
|
QHash<int, QByteArray> roleNames() const override;
|
||||||
QStringList postTags() const;
|
QStringList postTags() const;
|
||||||
|
|
||||||
enum PostRoles {
|
enum PostRoles {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue