mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-11 15:56:17 -07:00
Add preliminary support of libtorrent v1.2
libtorrent v1.2 should be built with deprecated features enabled.
This commit is contained in:
parent
20f2c86d25
commit
ead078a38e
37 changed files with 646 additions and 370 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue