mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-16 02:03:07 -07:00
Fix compilation with libtorrent 1.x.x v2
This commit is contained in:
parent
94b58ca229
commit
22e2bafa7a
18 changed files with 98 additions and 98 deletions
|
@ -188,13 +188,13 @@ bool AddNewTorrentDialog::loadTorrent(const QString& torrent_path, const QString
|
|||
ui->date_lbl->setText(m_torrentInfo->creation_date() ? misc::toQString(*m_torrentInfo->creation_date()) : tr("Not available"));
|
||||
updateDiskSpaceLabel();
|
||||
|
||||
#if LIBTORRENT_VERSION_MINOR >= 16 || LIBTORRENT_VERSION_MAJOR > 0
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
file_storage fs = m_torrentInfo->files();
|
||||
#endif
|
||||
|
||||
// Populate m_filesList
|
||||
for (int i = 0; i < m_torrentInfo->num_files(); ++i) {
|
||||
#if LIBTORRENT_VERSION_MINOR >= 16 || LIBTORRENT_VERSION_MAJOR > 0
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
m_filesPath << misc::toQStringU(fs.file_path(m_torrentInfo->file_at(i)));
|
||||
#else
|
||||
m_filesPath << misc::toQStringU(m_torrentInfo->file_at(i).path.string());
|
||||
|
@ -220,7 +220,7 @@ bool AddNewTorrentDialog::loadTorrent(const QString& torrent_path, const QString
|
|||
ui->content_tree->header()->setResizeMode(0, QHeaderView::Stretch);
|
||||
} else {
|
||||
// Update save paths (append file name to them)
|
||||
#if LIBTORRENT_VERSION_MINOR >= 16 || LIBTORRENT_VERSION_MAJOR > 0
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
QString single_file_relpath = misc::toQStringU(fs.file_path(m_torrentInfo->file_at(0)));
|
||||
#else
|
||||
QString single_file_relpath = misc::toQStringU(m_torrentInfo->file_at(0).path.string());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue