mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-09 00:52:30 -06:00
Drop support for libtorrent v0.14.x
This commit is contained in:
@@ -420,10 +420,8 @@ void PropertiesWidget::openDoubleClickedFile(QModelIndex index) {
|
||||
const QString filename = h.filepath_at(i);
|
||||
const QString file_path = QDir::cleanPath(saveDir.absoluteFilePath(filename));
|
||||
qDebug("Trying to open file at %s", qPrintable(file_path));
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
// Flush data
|
||||
h.flush_cache();
|
||||
#endif
|
||||
if(QFile::exists(file_path)) {
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(file_path));
|
||||
} else {
|
||||
@@ -442,10 +440,8 @@ void PropertiesWidget::openDoubleClickedFile(QModelIndex index) {
|
||||
const QString filename = path_items.join(QDir::separator());
|
||||
const QString file_path = QDir::cleanPath(saveDir.absoluteFilePath(filename));
|
||||
qDebug("Trying to open folder at %s", qPrintable(file_path));
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
// Flush data
|
||||
h.flush_cache();
|
||||
#endif
|
||||
if(QFile::exists(file_path)) {
|
||||
QDesktopServices::openUrl(QUrl::fromLocalFile(file_path));
|
||||
} else {
|
||||
|
||||
@@ -247,7 +247,6 @@ void TrackerList::loadTrackers() {
|
||||
}
|
||||
TrackerInfos data = trackers_data.value(tracker_url, TrackerInfos(tracker_url));
|
||||
QString error_message = data.last_message.trimmed();
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
if(it->verified) {
|
||||
item->setText(COL_STATUS, tr("Working"));
|
||||
item->setText(COL_MSG, "");
|
||||
@@ -265,20 +264,6 @@ void TrackerList::loadTrackers() {
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
if(data.verified) {
|
||||
item->setText(COL_STATUS, tr("Working"));
|
||||
item->setText(COL_MSG, "");
|
||||
} else {
|
||||
if(data.fail_count > 0) {
|
||||
item->setText(COL_STATUS, tr("Not working"));
|
||||
item->setText(COL_MSG, error_message);
|
||||
} else {
|
||||
item->setText(COL_STATUS, tr("Not contacted yet"));
|
||||
item->setText(COL_MSG, "");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
item->setText(COL_PEERS, QString::number(trackers_data.value(tracker_url, TrackerInfos(tracker_url)).num_peers));
|
||||
}
|
||||
// Remove old trackers
|
||||
|
||||
Reference in New Issue
Block a user