mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-05-06 16:45:15 -04:00
Convert iconCount() and expiredIconIndex() to constants.
This commit is contained in:
parent
e144f7c85a
commit
baa5a74ba0
7 changed files with 19 additions and 26 deletions
|
@ -27,7 +27,7 @@ DefaultIconModel::DefaultIconModel(QObject* parent)
|
|||
int DefaultIconModel::rowCount(const QModelIndex& parent) const
|
||||
{
|
||||
if (!parent.isValid()) {
|
||||
return databaseIcons()->iconCount();
|
||||
return DatabaseIcons::IconCount;
|
||||
}
|
||||
else {
|
||||
return 0;
|
||||
|
@ -40,7 +40,7 @@ QVariant DefaultIconModel::data(const QModelIndex& index, int role) const
|
|||
return QVariant();
|
||||
}
|
||||
|
||||
Q_ASSERT(index.row() < databaseIcons()->iconCount());
|
||||
Q_ASSERT(index.row() < DatabaseIcons::IconCount);
|
||||
|
||||
if (role == Qt::DecorationRole) {
|
||||
return databaseIcons()->iconPixmap(index.row());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue