mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-19 15:07:22 -06:00
Add preliminary support of libtorrent v1.2
libtorrent v1.2 should be built with deprecated features enabled.
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
#include <QThread>
|
||||
#include <QUrl>
|
||||
|
||||
#include "base/bittorrent/filepriority.h"
|
||||
#include "base/bittorrent/downloadpriority.h"
|
||||
#include "base/bittorrent/session.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/unicodestrings.h"
|
||||
@@ -621,13 +621,13 @@ void PropertiesWidget::displayFilesListMenu(const QPoint &)
|
||||
renameSelectedFile();
|
||||
}
|
||||
else {
|
||||
BitTorrent::FilePriority prio = BitTorrent::FilePriority::Normal;
|
||||
BitTorrent::DownloadPriority prio = BitTorrent::DownloadPriority::Normal;
|
||||
if (act == m_ui->actionHigh)
|
||||
prio = BitTorrent::FilePriority::High;
|
||||
prio = BitTorrent::DownloadPriority::High;
|
||||
else if (act == m_ui->actionMaximum)
|
||||
prio = BitTorrent::FilePriority::Maximum;
|
||||
prio = BitTorrent::DownloadPriority::Maximum;
|
||||
else if (act == m_ui->actionNotDownloaded)
|
||||
prio = BitTorrent::FilePriority::Ignored;
|
||||
prio = BitTorrent::DownloadPriority::Ignored;
|
||||
|
||||
qDebug("Setting files priority");
|
||||
for (const QModelIndex &index : selectedRows) {
|
||||
@@ -894,11 +894,7 @@ void PropertiesWidget::editWebSeed()
|
||||
|
||||
void PropertiesWidget::applyPriorities()
|
||||
{
|
||||
qDebug("Saving files priorities");
|
||||
const QVector<int> priorities = m_propListModel->model()->getFilePriorities();
|
||||
// Prioritize the files
|
||||
qDebug("prioritize files: %d", priorities[0]);
|
||||
m_torrent->prioritizeFiles(priorities);
|
||||
m_torrent->prioritizeFiles(m_propListModel->model()->getFilePriorities());
|
||||
}
|
||||
|
||||
void PropertiesWidget::filteredFilesChanged()
|
||||
|
||||
Reference in New Issue
Block a user