mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-30 19:40:18 -07:00
Use polymorphism to distinguish folder / file items in torrent content model
Step to address issue #24.
This commit is contained in:
parent
30be83d445
commit
0fdacf4d54
13 changed files with 507 additions and 297 deletions
|
@ -402,7 +402,7 @@ void AddNewTorrentDialog::renameSelectedFile()
|
|||
QMessageBox::Ok);
|
||||
return;
|
||||
}
|
||||
if (m_contentModel->getType(index) == TorrentContentModelItem::TFILE) {
|
||||
if (m_contentModel->itemType(index) == TorrentContentModelItem::FileType) {
|
||||
// File renaming
|
||||
const int file_index = m_contentModel->getFileIndex(index);
|
||||
QString old_name = m_filesPath.at(file_index);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue