mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Use 'auto' to avoid duplicating the type name
This commit is contained in:
parent
947c7e1d64
commit
d8cbc9266a
25 changed files with 68 additions and 68 deletions
|
@ -104,8 +104,8 @@ bool TransferListSortModel::lessThan(const QModelIndex &left, const QModelIndex
|
|||
// In this case QSortFilterProxyModel::lessThan() converts other types to QString and
|
||||
// sorts them.
|
||||
// Thus we can't use the code in the default label.
|
||||
const BitTorrent::TorrentState leftValue = left.data().value<BitTorrent::TorrentState>();
|
||||
const BitTorrent::TorrentState rightValue = right.data().value<BitTorrent::TorrentState>();
|
||||
const auto leftValue = left.data().value<BitTorrent::TorrentState>();
|
||||
const auto rightValue = right.data().value<BitTorrent::TorrentState>();
|
||||
if (leftValue != rightValue)
|
||||
return leftValue < rightValue;
|
||||
|
||||
|
@ -261,7 +261,7 @@ bool TransferListSortModel::filterAcceptsRow(int sourceRow, const QModelIndex &s
|
|||
|
||||
bool TransferListSortModel::matchFilter(int sourceRow, const QModelIndex &sourceParent) const
|
||||
{
|
||||
TransferListModel *model = qobject_cast<TransferListModel *>(sourceModel());
|
||||
auto *model = qobject_cast<TransferListModel *>(sourceModel());
|
||||
if (!model) return false;
|
||||
|
||||
BitTorrent::TorrentHandle *const torrent = model->torrentHandle(model->index(sourceRow, 0, sourceParent));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue