mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-09 17:12:31 -06:00
Drop support for libtorrent v0.14.x
This commit is contained in:
@@ -21,9 +21,7 @@ enum AdvSettingsRows {DISK_CACHE, OUTGOING_PORT_MIN, OUTGOING_PORT_MAX, IGNORE_L
|
||||
USE_ICON_THEME,
|
||||
#endif
|
||||
CONFIRM_DELETE_TORRENT, TRACKER_EXCHANGE,
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
ANNOUNCE_ALL_TRACKERS,
|
||||
#endif
|
||||
ROW_COUNT};
|
||||
|
||||
class AdvancedSettings: public QTableWidget {
|
||||
@@ -41,9 +39,7 @@ private:
|
||||
#if defined(Q_WS_X11) && (QT_VERSION >= QT_VERSION_CHECK(4,6,0))
|
||||
QCheckBox cb_use_icon_theme;
|
||||
#endif
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
QCheckBox cb_announce_all_trackers;
|
||||
#endif
|
||||
QCheckBox cb_announce_all_trackers;
|
||||
QLineEdit txt_network_address;
|
||||
|
||||
public:
|
||||
@@ -85,10 +81,8 @@ public slots:
|
||||
pref.resolvePeerHostNames(cb_resolve_hosts.isChecked());
|
||||
// Max Half-Open connections
|
||||
pref.setMaxHalfOpenConnections(spin_maxhalfopen.value());
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
// Super seeding
|
||||
pref.enableSuperSeeding(cb_super_seeding.isChecked());
|
||||
#endif
|
||||
// Network interface
|
||||
if(combo_iface.currentIndex() == 0) {
|
||||
// All interfaces (default)
|
||||
@@ -117,9 +111,7 @@ public slots:
|
||||
pref.setConfirmTorrentDeletion(cb_confirm_torrent_deletion.isChecked());
|
||||
// Tracker exchange
|
||||
pref.setTrackerExchangeEnabled(cb_enable_tracker_ext.isChecked());
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
pref.setAnnounceToAllTrackers(cb_announce_all_trackers.isChecked());
|
||||
#endif
|
||||
}
|
||||
|
||||
signals:
|
||||
@@ -201,11 +193,7 @@ private slots:
|
||||
spin_maxhalfopen.setValue(pref.getMaxHalfOpenConnections());
|
||||
setRow(MAX_HALF_OPEN, tr("Maximum number of half-open connections [0: Disabled]"), &spin_maxhalfopen);
|
||||
// Super seeding
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
cb_super_seeding.setChecked(pref.isSuperSeedingEnabled());
|
||||
#else
|
||||
cb_super_seeding.setEnabled(false);
|
||||
#endif
|
||||
setRow(SUPER_SEEDING, tr("Strict super seeding"), &cb_super_seeding);
|
||||
// Network interface
|
||||
combo_iface.addItem(tr("Any interface", "i.e. Any network interface"));
|
||||
@@ -247,11 +235,9 @@ private slots:
|
||||
// Tracker exchange
|
||||
cb_enable_tracker_ext.setChecked(pref.trackerExchangeEnabled());
|
||||
setRow(TRACKER_EXCHANGE, tr("Exchange trackers with other peers"), &cb_enable_tracker_ext);
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
// Announce to all trackers
|
||||
cb_announce_all_trackers.setChecked(pref.announceToAllTrackers());
|
||||
setRow(ANNOUNCE_ALL_TRACKERS, tr("Always announce to all trackers"), &cb_announce_all_trackers);
|
||||
#endif
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
@@ -246,9 +246,6 @@ options_imp::options_imp(QWidget *parent):
|
||||
applyButton->setEnabled(false);
|
||||
// Tab selection mecanism
|
||||
connect(tabSelection, SIGNAL(currentItemChanged(QListWidgetItem *, QListWidgetItem *)), this, SLOT(changePage(QListWidgetItem *, QListWidgetItem*)));
|
||||
#if LIBTORRENT_VERSION_MINOR < 15
|
||||
checkAppendqB->setVisible(false);
|
||||
#endif
|
||||
#if LIBTORRENT_VERSION_MINOR < 16
|
||||
checkuTP->setVisible(false);
|
||||
checkLimituTPConnections->setVisible(false);
|
||||
@@ -392,9 +389,7 @@ void options_imp::saveOptions(){
|
||||
#endif
|
||||
pref.setTempPath(temp_path);
|
||||
pref.setAppendTorrentLabel(checkAppendLabel->isChecked());
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
pref.useIncompleteFilesExtension(checkAppendqB->isChecked());
|
||||
#endif
|
||||
pref.preAllocateAllFiles(preAllocateAllFiles());
|
||||
pref.useAdditionDialog(useAdditionDialog());
|
||||
pref.addTorrentsInPause(addTorrentsInPause());
|
||||
@@ -569,9 +564,7 @@ void options_imp::loadOptions(){
|
||||
#endif
|
||||
textTempPath->setText(temp_path);
|
||||
checkAppendLabel->setChecked(pref.appendTorrentLabel());
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
checkAppendqB->setChecked(pref.useIncompleteFilesExtension());
|
||||
#endif
|
||||
checkPreallocateAll->setChecked(pref.preAllocateAllFiles());
|
||||
checkAdditionDialog->setChecked(pref.useAdditionDialog());
|
||||
checkStartPaused->setChecked(pref.addTorrentsInPause());
|
||||
|
||||
@@ -205,7 +205,6 @@ public:
|
||||
setValue(QString::fromUtf8("Preferences/Downloads/TempPath"), path);
|
||||
}
|
||||
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
bool useIncompleteFilesExtension() const {
|
||||
return value(QString::fromUtf8("Preferences/Downloads/UseIncompleteExtension"), false).toBool();
|
||||
}
|
||||
@@ -213,7 +212,6 @@ public:
|
||||
void useIncompleteFilesExtension(bool enabled) {
|
||||
setValue(QString::fromUtf8("Preferences/Downloads/UseIncompleteExtension"), enabled);
|
||||
}
|
||||
#endif
|
||||
|
||||
bool appendTorrentLabel() const {
|
||||
return value(QString::fromUtf8("Preferences/Downloads/AppendLabel"), false).toBool();
|
||||
@@ -1025,7 +1023,6 @@ public:
|
||||
}
|
||||
#endif
|
||||
|
||||
#if LIBTORRENT_VERSION_MINOR > 14
|
||||
bool isSuperSeedingEnabled() const {
|
||||
return value(QString::fromUtf8("Preferences/Advanced/SuperSeeding"), false).toBool();
|
||||
}
|
||||
@@ -1041,7 +1038,6 @@ public:
|
||||
void setAnnounceToAllTrackers(bool enabled) {
|
||||
setValue(QString::fromUtf8("Preferences/Advanced/AnnounceToAllTrackers"), enabled);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(Q_WS_X11) && (QT_VERSION >= QT_VERSION_CHECK(4,6,0))
|
||||
bool useSystemIconTheme() const {
|
||||
|
||||
Reference in New Issue
Block a user