mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Replace prio namespace with FilePriority enum class
This commit is contained in:
parent
6bb4eb825b
commit
f27dc977e9
14 changed files with 159 additions and 69 deletions
|
@ -38,6 +38,7 @@
|
|||
#include <QThread>
|
||||
#include <QTimer>
|
||||
|
||||
#include "base/bittorrent/filepriority.h"
|
||||
#include "base/bittorrent/session.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/unicodestrings.h"
|
||||
|
@ -621,18 +622,18 @@ void PropertiesWidget::displayFilesListMenu(const QPoint &)
|
|||
renameSelectedFile();
|
||||
}
|
||||
else {
|
||||
int prio = prio::NORMAL;
|
||||
BitTorrent::FilePriority prio = BitTorrent::FilePriority::Normal;
|
||||
if (act == m_ui->actionHigh)
|
||||
prio = prio::HIGH;
|
||||
prio = BitTorrent::FilePriority::High;
|
||||
else if (act == m_ui->actionMaximum)
|
||||
prio = prio::MAXIMUM;
|
||||
prio = BitTorrent::FilePriority::Maximum;
|
||||
else if (act == m_ui->actionNotDownloaded)
|
||||
prio = prio::IGNORED;
|
||||
prio = BitTorrent::FilePriority::Ignored;
|
||||
|
||||
qDebug("Setting files priority");
|
||||
for (const QModelIndex &index : selectedRows) {
|
||||
qDebug("Setting priority(%d) for file at row %d", prio, index.row());
|
||||
m_propListModel->setData(m_propListModel->index(index.row(), PRIORITY, index.parent()), prio);
|
||||
qDebug("Setting priority(%d) for file at row %d", static_cast<int>(prio), index.row());
|
||||
m_propListModel->setData(m_propListModel->index(index.row(), PRIORITY, index.parent()), static_cast<int>(prio));
|
||||
}
|
||||
// Save changes
|
||||
filteredFilesChanged();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue