mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 11:38:50 -07:00
Don't use 'else' after return/break
This commit is contained in:
parent
78ab0e4ba9
commit
8a3f942385
15 changed files with 75 additions and 83 deletions
|
@ -287,8 +287,8 @@ int TorrentContentModel::columnCount(const QModelIndex &parent) const
|
|||
{
|
||||
if (parent.isValid())
|
||||
return static_cast<TorrentContentModelItem*>(parent.internalPointer())->columnCount();
|
||||
else
|
||||
return m_rootItem->columnCount();
|
||||
|
||||
return m_rootItem->columnCount();
|
||||
}
|
||||
|
||||
bool TorrentContentModel::setData(const QModelIndex &index, const QVariant &value, int role)
|
||||
|
@ -361,8 +361,8 @@ QVariant TorrentContentModel::data(const QModelIndex &index, int role) const
|
|||
if ((index.column() == TorrentContentModelItem::COL_NAME) && (role == Qt::DecorationRole)) {
|
||||
if (item->itemType() == TorrentContentModelItem::FolderType)
|
||||
return getDirectoryIcon();
|
||||
else
|
||||
return m_fileIconProvider->icon(QFileInfo(item->name()));
|
||||
|
||||
return m_fileIconProvider->icon(QFileInfo(item->name()));
|
||||
}
|
||||
|
||||
if ((index.column() == TorrentContentModelItem::COL_NAME) && (role == Qt::CheckStateRole)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue