Use libtorrent version.hpp instead of our own DEFINE

This commit is contained in:
Christophe Dumez
2010-06-07 08:32:41 +00:00
parent 2e0c8f848f
commit 5f23cbc470
17 changed files with 79 additions and 62 deletions

View File

@@ -7,6 +7,7 @@
#include <QCheckBox>
#include <QComboBox>
#include <QNetworkInterface>
#include <libtorrent/version.hpp>
#include "preferences.h"
enum AdvSettingsCols {PROPERTY, VALUE};
@@ -73,7 +74,7 @@ public slots:
Preferences::resolvePeerHostNames(cb_resolve_hosts->isChecked());
// Max Half-Open connections
Preferences::setMaxHalfOpenConnections(spin_maxhalfopen->value());
#ifdef LIBTORRENT_0_15
#if LIBTORRENT_VERSION_MINOR > 14
// Super seeding
Preferences::enableSuperSeeding(cb_super_seeding->isChecked());
#endif
@@ -164,7 +165,7 @@ protected slots:
setItem(SUPER_SEEDING, PROPERTY, new QTableWidgetItem(tr("Strict super seeding")));
cb_super_seeding = new QCheckBox();
connect(cb_super_seeding, SIGNAL(toggled(bool)), this, SLOT(emitSettingsChanged()));
#ifdef LIBTORRENT_0_15
#if LIBTORRENT_VERSION_MINOR > 14
cb_super_seeding->setChecked(Preferences::isSuperSeedingEnabled());
#else
cb_super_seeding->setEnabled(false);