mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 06:57:24 -06:00
Avoid repeating the return type
This commit is contained in:
@@ -58,7 +58,7 @@ QVariant CookiesModel::headerData(int section, Qt::Orientation orientation, int
|
||||
}
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
return {};
|
||||
}
|
||||
|
||||
QModelIndex CookiesModel::index(int row, int column, const QModelIndex &parent) const
|
||||
@@ -66,7 +66,7 @@ QModelIndex CookiesModel::index(int row, int column, const QModelIndex &parent)
|
||||
if (parent.isValid() // no items with valid parent
|
||||
|| (row < 0) || (row >= m_cookies.size())
|
||||
|| (column < 0) || (column >= NB_COLUMNS))
|
||||
return QModelIndex();
|
||||
return {};
|
||||
|
||||
return createIndex(row, column, &m_cookies[row]);
|
||||
}
|
||||
@@ -74,7 +74,7 @@ QModelIndex CookiesModel::index(int row, int column, const QModelIndex &parent)
|
||||
QModelIndex CookiesModel::parent(const QModelIndex &index) const
|
||||
{
|
||||
Q_UNUSED(index);
|
||||
return QModelIndex();
|
||||
return {};
|
||||
}
|
||||
|
||||
int CookiesModel::rowCount(const QModelIndex &parent) const
|
||||
@@ -94,7 +94,7 @@ QVariant CookiesModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
if (!index.isValid() || (index.row() >= m_cookies.size())
|
||||
|| ((role != Qt::DisplayRole) && (role != Qt::EditRole)))
|
||||
return QVariant();
|
||||
return {};
|
||||
|
||||
switch (index.column()) {
|
||||
case COL_DOMAIN:
|
||||
@@ -109,7 +109,7 @@ QVariant CookiesModel::data(const QModelIndex &index, int role) const
|
||||
return m_cookies[index.row()].expirationDate();
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
return {};
|
||||
}
|
||||
|
||||
bool CookiesModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
|
||||
Reference in New Issue
Block a user