mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Fix some warnings
This commit is contained in:
parent
e2b46f01bb
commit
94613c2fa2
29 changed files with 48 additions and 50 deletions
|
@ -240,8 +240,6 @@ QVariant TransferListModel::data(const QModelIndex &index, int role) const
|
|||
return torrent->timeSinceActivity();
|
||||
case TR_TOTAL_SIZE:
|
||||
return torrent->totalSize();
|
||||
default:
|
||||
return QVariant();
|
||||
}
|
||||
|
||||
return QVariant();
|
||||
|
@ -283,7 +281,7 @@ void TransferListModel::addTorrent(BitTorrent::TorrentHandle *const torrent)
|
|||
|
||||
Qt::ItemFlags TransferListModel::flags(const QModelIndex &index) const
|
||||
{
|
||||
if (!index.isValid()) return 0;
|
||||
if (!index.isValid()) return Qt::NoItemFlags;
|
||||
|
||||
// Explicitly mark as editable
|
||||
return QAbstractListModel::flags(index) | Qt::ItemIsEditable;
|
||||
|
@ -291,7 +289,7 @@ Qt::ItemFlags TransferListModel::flags(const QModelIndex &index) const
|
|||
|
||||
BitTorrent::TorrentHandle *TransferListModel::torrentHandle(const QModelIndex &index) const
|
||||
{
|
||||
if (!index.isValid()) return 0;
|
||||
if (!index.isValid()) return nullptr;
|
||||
|
||||
return m_torrents.value(index.row());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue