mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-20 15:37:26 -06:00
Drop libtorrent 0.15.x support.
This commit is contained in:
@@ -79,11 +79,7 @@ void TorrentImportDlg::on_browseContentBtn_clicked()
|
||||
const QString default_dir = settings.value(QString::fromUtf8("TorrentImport/LastContentDir"), QDir::homePath()).toString();
|
||||
if (t->num_files() == 1) {
|
||||
// Single file torrent
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
const QString file_name = fsutils::fileName(misc::toQStringU(t->file_at(0).path));
|
||||
#else
|
||||
const QString file_name = misc::toQStringU(t->file_at(0).path.filename());
|
||||
#endif
|
||||
qDebug("Torrent has only one file: %s", qPrintable(file_name));
|
||||
QString extension = fsutils::fileExtension(file_name);
|
||||
qDebug("File extension is : %s", qPrintable(extension));
|
||||
@@ -146,11 +142,7 @@ void TorrentImportDlg::on_browseContentBtn_clicked()
|
||||
content_dir.cdUp();
|
||||
// Check file sizes
|
||||
for (int i=0; i<t->num_files(); ++i) {
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
const QString rel_path = misc::toQStringU(t->file_at(i).path);
|
||||
#else
|
||||
const QString rel_path = misc::toQStringU(t->file_at(i).path.string());
|
||||
#endif
|
||||
if (QFile(QDir::cleanPath(content_dir.absoluteFilePath(rel_path))).size() != t->file_at(i).size) {
|
||||
qDebug("%s is %lld",
|
||||
qPrintable(QDir::cleanPath(content_dir.absoluteFilePath(rel_path))), (long long int) QFile(QDir::cleanPath(content_dir.absoluteFilePath(rel_path))).size());
|
||||
@@ -252,11 +244,7 @@ void TorrentImportDlg::initializeFilesPath()
|
||||
m_filesPath.clear();
|
||||
// Loads files path in the torrent
|
||||
for (int i=0; i<t->num_files(); ++i) {
|
||||
#if LIBTORRENT_VERSION_NUM >= 001600
|
||||
m_filesPath << misc::toQStringU(t->file_at(i).path).replace("\\", "/");
|
||||
#else
|
||||
m_filesPath << misc::toQStringU(t->file_at(i).path.string()).replace("\\", "/");
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user