Browse Source

- Added Encryption support!

- Removed old UPnP code
- Removed UPnP in options since libtorrent doesn't allow to disable it. Thus, UPnP is always enabled
- Made options window a bit larger
- Added Arnaud Demaiziere to developpers list
- Updated TODO & Changelog
adaptive-webui-19844
Christophe Dumez 18 years ago
parent
commit
c39da36cca
  1. 6
      AUTHORS
  2. 1
      Changelog
  3. 1
      TODO
  4. 24
      qBittorrent.kdevelop
  5. 49
      src/GUI.cpp
  6. 4
      src/GUI.h
  7. 68
      src/bittorrent.cpp
  8. 26
      src/bittorrent.h
  9. 3
      src/lang/qbittorrent_fr.ts
  10. 797
      src/options.ui
  11. 61
      src/options_imp.cpp
  12. 8
      src/options_imp.h
  13. 5
      src/src.pro

6
AUTHORS

@ -1 +1,5 @@
Christophe Dumez <chris@qbittorrent.org> Author:
* Christophe Dumez <chris@qbittorrent.org>
Other developers:
* Arnaud Demaizière <arnaud@qbittorrent.org>

1
Changelog

@ -1,6 +1,7 @@
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.0.0 * Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.0.0
- FEATURE: Based on new libtorrent v0.13 - FEATURE: Based on new libtorrent v0.13
- FEATURE: Added UPnP / NAT-PMP port forwarding support - FEATURE: Added UPnP / NAT-PMP port forwarding support
- FEATURE: Added encryption support (compatible with Azureus)
- FEATURE: Added RSS support - FEATURE: Added RSS support
- FEATURE: Support files prioritizing in a torrent - FEATURE: Support files prioritizing in a torrent
- FEATURE: Finished torrents are now moved to another tab for seeding - FEATURE: Finished torrents are now moved to another tab for seeding

1
TODO

@ -36,7 +36,6 @@
- Use tooltips to explain options? - Use tooltips to explain options?
- Improve ratio display / calculation / saving / per torrent... - Improve ratio display / calculation / saving / per torrent...
- Sorting in Download Status column should be smarter than just an alphabetical sort - Sorting in Download Status column should be smarter than just an alphabetical sort
- Encryption support!
- File selection in a torrent in compact mode??? - File selection in a torrent in compact mode???
- Windows port : http://www.peerweb.nl/qbittorrent/experimentalbuild/testing.zip - Windows port : http://www.peerweb.nl/qbittorrent/experimentalbuild/testing.zip
- Make use of QSessionManager to save application state? - Make use of QSessionManager to save application state?

24
qBittorrent.kdevelop

@ -13,8 +13,8 @@
<ignoreparts/> <ignoreparts/>
<projectdirectory>.</projectdirectory> <projectdirectory>.</projectdirectory>
<absoluteprojectpath>false</absoluteprojectpath> <absoluteprojectpath>false</absoluteprojectpath>
<description/> <description></description>
<defaultencoding/> <defaultencoding></defaultencoding>
<versioncontrol>kdevsubversion</versioncontrol> <versioncontrol>kdevsubversion</versioncontrol>
</general> </general>
<kdevfileview> <kdevfileview>
@ -72,11 +72,11 @@
</kdevdoctreeview> </kdevdoctreeview>
<kdevdebugger> <kdevdebugger>
<general> <general>
<dbgshell/> <dbgshell></dbgshell>
<gdbpath/> <gdbpath></gdbpath>
<configGdbScript/> <configGdbScript></configGdbScript>
<runShellScript/> <runShellScript></runShellScript>
<runGdbScript/> <runGdbScript></runGdbScript>
<breakonloadinglibs>true</breakonloadinglibs> <breakonloadinglibs>true</breakonloadinglibs>
<separatetty>false</separatetty> <separatetty>false</separatetty>
<floatingtoolbar>false</floatingtoolbar> <floatingtoolbar>false</floatingtoolbar>
@ -153,11 +153,11 @@
</general> </general>
<run> <run>
<directoryradio>executable</directoryradio> <directoryradio>executable</directoryradio>
<mainprogram>/home/chris/qbittorrent_svn/trunk</mainprogram> <mainprogram>/home/chris/qbittorrent_svn/trunk/src/qbittorrent</mainprogram>
<programargs/> <programargs></programargs>
<globaldebugarguments/> <globaldebugarguments></globaldebugarguments>
<globalcwd>/home/chris/qbittorrent_svn/trunk</globalcwd> <globalcwd>/home/chris/qbittorrent_svn/trunk</globalcwd>
<useglobalprogram>false</useglobalprogram> <useglobalprogram>true</useglobalprogram>
<terminal>false</terminal> <terminal>false</terminal>
<autocompile>true</autocompile> <autocompile>true</autocompile>
<autoinstall>false</autoinstall> <autoinstall>false</autoinstall>
@ -169,7 +169,7 @@
<runmultiplejobs>false</runmultiplejobs> <runmultiplejobs>false</runmultiplejobs>
<numberofjobs>1</numberofjobs> <numberofjobs>1</numberofjobs>
<dontact>false</dontact> <dontact>false</dontact>
<makebin/> <makebin></makebin>
<prio>0</prio> <prio>0</prio>
<envvars/> <envvars/>
</make> </make>

49
src/GUI.cpp

@ -132,10 +132,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent){
// Hide hash column // Hide hash column
downloadList->hideColumn(HASH); downloadList->hideColumn(HASH);
#ifndef NO_UPNP
connect(&BTSession, SIGNAL(noWanServiceDetected()), this, SLOT(displayNoUPnPWanServiceDetected()));
connect(&BTSession, SIGNAL(wanServiceDetected()), this, SLOT(displayUPnPWanServiceDetected()));
#endif
connect(&BTSession, SIGNAL(addedTorrent(const QString&, torrent_handle&, bool)), this, SLOT(torrentAdded(const QString&, torrent_handle&, bool))); connect(&BTSession, SIGNAL(addedTorrent(const QString&, torrent_handle&, bool)), this, SLOT(torrentAdded(const QString&, torrent_handle&, bool)));
connect(&BTSession, SIGNAL(duplicateTorrent(const QString&)), this, SLOT(torrentDuplicate(const QString&))); connect(&BTSession, SIGNAL(duplicateTorrent(const QString&)), this, SLOT(torrentDuplicate(const QString&)));
connect(&BTSession, SIGNAL(invalidTorrent(const QString&)), this, SLOT(torrentCorrupted(const QString&))); connect(&BTSession, SIGNAL(invalidTorrent(const QString&)), this, SLOT(torrentCorrupted(const QString&)));
@ -278,17 +274,6 @@ void GUI::readParamsOnSocket(){
} }
} }
#ifndef NO_UPNP
void GUI::displayNoUPnPWanServiceDetected(){
setInfoBar(tr("UPnP: no WAN service detected..."), "red");
}
void GUI::displayUPnPWanServiceDetected(){
setInfoBar(tr("UPnP: WAN service detected!"), "green");
}
#endif
// Toggle paused state of selected torrent // Toggle paused state of selected torrent
void GUI::togglePausedState(const QModelIndex& index){ void GUI::togglePausedState(const QModelIndex& index){
int row = index.row(); int row = index.row();
@ -1151,6 +1136,7 @@ void GUI::configureSession(bool deleteOptions){
unsigned short old_listenPort, new_listenPort; unsigned short old_listenPort, new_listenPort;
proxy_settings proxySettings; proxy_settings proxySettings;
session_settings sessionSettings; session_settings sessionSettings;
pe_settings encryptionSettings;
// Configure session regarding options // Configure session regarding options
BTSession.setDefaultSavePath(options->getSavePath()); BTSession.setDefaultSavePath(options->getSavePath());
old_listenPort = BTSession.getListenPort(); old_listenPort = BTSession.getListenPort();
@ -1190,18 +1176,29 @@ void GUI::configureSession(bool deleteOptions){
setInfoBar(tr("DHT support [OFF]"), "blue"); setInfoBar(tr("DHT support [OFF]"), "blue");
BTSession.disableDHT(); BTSession.disableDHT();
} }
#ifndef NO_UPNP // UPnP can't be disabled
// Upnp
if(options->isUPnPEnabled()){
setInfoBar(tr("UPnP support [ON], port: %1").arg(options->getUPnPPort()), "blue");
BTSession.enableUPnP(options->getUPnPPort());
BTSession.setUPnPPort(options->getUPnPPort());
}else{
setInfoBar(tr("UPnP support [OFF]"), "blue");
BTSession.disableUPnP();
}
#endif
setInfoBar(tr("UPnP support [ON]"), "blue"); setInfoBar(tr("UPnP support [ON]"), "blue");
// Encryption settings
int encryptionState = options->getEncryptionSetting();
encryptionSettings.allowed_enc_level = pe_settings::both;
encryptionSettings.prefer_rc4 = true;
switch(encryptionState){
case 0: //Enabled
encryptionSettings.out_enc_policy = pe_settings::enabled;
encryptionSettings.in_enc_policy = pe_settings::enabled;
setInfoBar(tr("Encryption support [ON]"), "blue");
break;
case 1: // Forced
encryptionSettings.out_enc_policy = pe_settings::forced;
encryptionSettings.in_enc_policy = pe_settings::forced;
setInfoBar(tr("Encryption support [FORCED]"), "blue");
break;
default: // Disabled
encryptionSettings.out_enc_policy = pe_settings::disabled;
encryptionSettings.in_enc_policy = pe_settings::disabled;
setInfoBar(tr("Encryption support [OFF]"), "blue");
}
BTSession.applyEncryptionSettings(encryptionSettings);
// PeX // PeX
if(!options->isPeXDisabled()){ if(!options->isPeXDisabled()){
qDebug("Enabling Peer eXchange (PeX)"); qDebug("Enabling Peer eXchange (PeX)");

4
src/GUI.h

@ -154,10 +154,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
void OptionsSaved(const QString& info, bool deleteOptions); void OptionsSaved(const QString& info, bool deleteOptions);
// HTTP slots // HTTP slots
void on_actionDownload_from_URL_triggered(); void on_actionDownload_from_URL_triggered();
#ifndef NO_UPNP
void displayNoUPnPWanServiceDetected();
void displayUPnPWanServiceDetected();
#endif
public slots: public slots:

68
src/bittorrent.cpp

@ -28,10 +28,6 @@
#include "misc.h" #include "misc.h"
#include "downloadThread.h" #include "downloadThread.h"
#ifndef NO_UPNP
#include "UPnP.h"
#endif
// Main constructor // Main constructor
bittorrent::bittorrent(){ bittorrent::bittorrent(){
// To avoid some exceptions // To avoid some exceptions
@ -45,9 +41,6 @@ bittorrent::bittorrent(){
s->set_severity_level(alert::info); s->set_severity_level(alert::info);
// DHT (Trackerless), disabled until told otherwise // DHT (Trackerless), disabled until told otherwise
DHTEnabled = false; DHTEnabled = false;
#ifndef NO_UPNP
UPnPEnabled = false;
#endif
// Enabling metadata plugin // Enabling metadata plugin
s->add_extension(&create_metadata_plugin); s->add_extension(&create_metadata_plugin);
timerAlerts = new QTimer(this); timerAlerts = new QTimer(this);
@ -66,9 +59,6 @@ void bittorrent::resumeUnfinishedTorrents(){
// Main destructor // Main destructor
bittorrent::~bittorrent(){ bittorrent::~bittorrent(){
disableDirectoryScanning(); disableDirectoryScanning();
#ifndef NO_UPNP
disableUPnP();
#endif
delete timerAlerts; delete timerAlerts;
delete downloader; delete downloader;
delete s; delete s;
@ -79,60 +69,6 @@ torrent_handle bittorrent::getTorrentHandle(const QString& hash) const{
return s->find_torrent(misc::fromString<sha1_hash>((hash.toStdString()))); return s->find_torrent(misc::fromString<sha1_hash>((hash.toStdString())));
} }
#ifndef NO_UPNP
void bittorrent::enableUPnP(int port){
if(!UPnPEnabled){
qDebug("Enabling UPnP");
UPnPEnabled = true;
m_upnpMappings.resize(1);
m_upnpMappings[0] = CUPnPPortMapping(
getListenPort(),
"TCP",
true,
"qBittorrent");
m_upnp = new CUPnPControlPoint(port);
connect(m_upnp, SIGNAL(noWanServiceDetected()), this, SLOT(noWanServiceEventHandler()));
connect(m_upnp, SIGNAL(yeswanServiceDetected()), this, SLOT(wanServiceEventHandler()));
m_upnp->AddPortMappings(m_upnpMappings);
}
}
void bittorrent::noWanServiceEventHandler(){
// Forward this signal
emit noWanServiceDetected();
}
void bittorrent::wanServiceEventHandler(){
// Forward this signal
emit wanServiceDetected();
}
// Set UPnP port (>= 1000)
void bittorrent::setUPnPPort(int upnp_port){
if(!UPnPEnabled){
qDebug("Cannot set UPnP port because it is disabled");
return;
}
if(m_upnp->getUPnPPort() != upnp_port){
qDebug("Changing UPnP port to %d", upnp_port);
delete m_upnp;
m_upnp = new CUPnPControlPoint(upnp_port);
m_upnp->AddPortMappings(m_upnpMappings);
}else{
qDebug("UPnP: No need to set the port, it is already listening on this port");
}
}
void bittorrent::disableUPnP(){
if(UPnPEnabled){
qDebug("Disabling UPnP");
UPnPEnabled = false;
m_upnp->DeletePortMappings(m_upnpMappings);
delete m_upnp;
}
}
#endif
// Return true if the torrent corresponding to the // Return true if the torrent corresponding to the
// hash is paused // hash is paused
bool bittorrent::isPaused(const QString& hash) const{ bool bittorrent::isPaused(const QString& hash) const{
@ -895,6 +831,10 @@ void bittorrent::saveDHTEntry(){
} }
} }
void bittorrent::applyEncryptionSettings(pe_settings se){
s->set_pe_settings(se);
}
// Will fast resume unfinished torrents in // Will fast resume unfinished torrents in
// backup directory // backup directory
void bittorrent::resumeUnfinished(){ void bittorrent::resumeUnfinished(){

26
src/bittorrent.h

@ -44,10 +44,6 @@ class QString;
using namespace libtorrent; using namespace libtorrent;
class downloadThread; class downloadThread;
#ifndef NO_UPNP
class CUPnPControlPoint;
class CUPnPPortMapping;
#endif
class bittorrent : public QObject{ class bittorrent : public QObject{
Q_OBJECT Q_OBJECT
@ -55,19 +51,12 @@ class bittorrent : public QObject{
private: private:
session *s; session *s;
bool DHTEnabled; bool DHTEnabled;
#ifndef NO_UPNP
bool UPnPEnabled;
#endif
QString scan_dir; QString scan_dir;
QTimer *timerScan; QTimer *timerScan;
QTimer *timerAlerts; QTimer *timerAlerts;
downloadThread *downloader; downloadThread *downloader;
QStringList supported_preview_extensions; QStringList supported_preview_extensions;
QString defaultSavePath; QString defaultSavePath;
#ifndef NO_UPNP
CUPnPControlPoint* m_upnp;
std::vector<CUPnPPortMapping> m_upnpMappings;
#endif
protected: protected:
QString getSavePath(const QString& hash); QString getSavePath(const QString& hash);
@ -118,11 +107,7 @@ class bittorrent : public QObject{
void setProxySettings(proxy_settings proxySettings, bool trackers=true, bool peers=true, bool web_seeds=true, bool dht=true); void setProxySettings(proxy_settings proxySettings, bool trackers=true, bool peers=true, bool web_seeds=true, bool dht=true);
void setSessionSettings(session_settings sessionSettings); void setSessionSettings(session_settings sessionSettings);
void setDefaultSavePath(const QString& savepath); void setDefaultSavePath(const QString& savepath);
#ifndef NO_UPNP void applyEncryptionSettings(pe_settings se);
void enableUPnP(int port=50000);
void disableUPnP();
void setUPnPPort(int upnp_port);
#endif
protected slots: protected slots:
void cleanDeleter(deleteThread* deleter); void cleanDeleter(deleteThread* deleter);
@ -133,10 +118,6 @@ class bittorrent : public QObject{
void resumeUnfinished(); void resumeUnfinished();
bool loadTrackerFile(const QString& hash); bool loadTrackerFile(const QString& hash);
void saveTrackerFile(const QString& hash); void saveTrackerFile(const QString& hash);
#ifndef NO_UPNP
void noWanServiceEventHandler();
void wanServiceEventHandler();
#endif
signals: signals:
void invalidTorrent(const QString& path); void invalidTorrent(const QString& path);
@ -152,10 +133,7 @@ class bittorrent : public QObject{
void newDownloadedTorrent(const QString& path, const QString& url); void newDownloadedTorrent(const QString& path, const QString& url);
void aboutToDownloadFromUrl(const QString& url); void aboutToDownloadFromUrl(const QString& url);
void updateFileSize(QString hash); void updateFileSize(QString hash);
#ifndef NO_UPNP
void noWanServiceDetected();
void wanServiceDetected();
#endif
}; };
#endif #endif

3
src/lang/qbittorrent_fr.ts

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS><TS version="1.1" language="fr"> <!DOCTYPE TS><TS version="1.1" language="fr">
<defaultcodec></defaultcodec>
<context> <context>
<name>@default</name> <name>@default</name>
<message> <message>
@ -2859,7 +2860,7 @@ Changements:
<message> <message>
<location filename="../downloadFromURLImp.h" line="64"/> <location filename="../downloadFromURLImp.h" line="64"/>
<source>No URL entered</source> <source>No URL entered</source>
<translation type="unfinished">Aucune URL entrée</translation> <translation>Aucune URL entrée</translation>
</message> </message>
<message> <message>
<location filename="../downloadFromURLImp.h" line="64"/> <location filename="../downloadFromURLImp.h" line="64"/>

797
src/options.ui

File diff suppressed because it is too large Load Diff

61
src/options_imp.cpp

@ -68,11 +68,6 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
delFilterRange->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/remove.png"))); delFilterRange->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/remove.png")));
enableProxyAuth_checkBox->setIcon(QIcon(QString::fromUtf8(":/Icons/encrypted.png"))); enableProxyAuth_checkBox->setIcon(QIcon(QString::fromUtf8(":/Icons/encrypted.png")));
to_range->setText(tr("to", "<min port> to <max port>")); to_range->setText(tr("to", "<min port> to <max port>"));
// If UPnP is not supported then disable it
#ifdef NO_UPNP
groupMainUPnP->setEnabled(false);
disableUPnP->setChecked(false);
#endif
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
radioWinXPStyle->setEnabled(true); radioWinXPStyle->setEnabled(true);
#endif #endif
@ -146,9 +141,6 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
connect(disableUPLimit, SIGNAL(stateChanged(int)), this, SLOT(disableUpload(int))); connect(disableUPLimit, SIGNAL(stateChanged(int)), this, SLOT(disableUpload(int)));
connect(disableDLLimit, SIGNAL(stateChanged(int)), this, SLOT(disableDownload(int))); connect(disableDLLimit, SIGNAL(stateChanged(int)), this, SLOT(disableDownload(int)));
connect(disableDHT, SIGNAL(stateChanged(int)), this, SLOT(disableDHTGroup(int))); connect(disableDHT, SIGNAL(stateChanged(int)), this, SLOT(disableDHTGroup(int)));
#ifndef NO_UPNP
connect(disableUPnP, SIGNAL(stateChanged(int)), this, SLOT(disableUPnPGroup(int)));
#endif
connect(check_disableSystray, SIGNAL(stateChanged(int)), this, SLOT(systrayDisabled(int))); connect(check_disableSystray, SIGNAL(stateChanged(int)), this, SLOT(systrayDisabled(int)));
connect(disableRatio, SIGNAL(stateChanged(int)), this, SLOT(disableShareRatio(int))); connect(disableRatio, SIGNAL(stateChanged(int)), this, SLOT(disableShareRatio(int)));
connect(activateFilter, SIGNAL(stateChanged(int)), this, SLOT(enableFilter(int))); connect(activateFilter, SIGNAL(stateChanged(int)), this, SLOT(enableFilter(int)));
@ -172,12 +164,8 @@ options_imp::options_imp(QWidget *parent):QDialog(parent){
connect(enableScan_checkBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(enableScan_checkBox, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(disableMaxConnec, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(disableMaxConnec, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(disableDHT, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(disableDHT, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
#ifndef NO_UPNP
connect(disableUPnP, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
#endif
connect(disablePeX, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton())); connect(disablePeX, SIGNAL(stateChanged(int)), this, SLOT(enableApplyButton()));
connect(spin_dht_port, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton())); connect(comboEncryption, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
connect(spin_upnp_port, SIGNAL(valueChanged(QString)), this, SLOT(enableApplyButton()));
// Language // Language
connect(combo_i18n, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton())); connect(combo_i18n, SIGNAL(currentIndexChanged(int)), this, SLOT(enableApplyButton()));
// IPFilter // IPFilter
@ -275,10 +263,7 @@ void options_imp::saveOptions(){
settings.setValue("PortRangeMin", getPorts().first); settings.setValue("PortRangeMin", getPorts().first);
settings.setValue("PortRangeMax", getPorts().second); settings.setValue("PortRangeMax", getPorts().second);
settings.setValue("ShareRatio", getRatio()); settings.setValue("ShareRatio", getRatio());
settings.setValue("DHTPort", getDHTPort()); settings.setValue("EncryptionState", getEncryptionSetting());
#ifndef NO_UPNP
settings.setValue("UPnPPort", getUPnPPort());
#endif
settings.setValue("PeXState", !isPeXDisabled()); settings.setValue("PeXState", !isPeXDisabled());
settings.setValue("ScanDir", getScanDir()); settings.setValue("ScanDir", getScanDir());
// End Main options // End Main options
@ -495,20 +480,8 @@ void options_imp::loadOptions(){
} }
spin_dht_port->setValue(value); spin_dht_port->setValue(value);
} }
#ifndef NO_UPNP value = settings.value("EncryptionState", 0).toInt();
value = settings.value("UPnPPort", -1).toInt(); comboEncryption->setCurrentIndex(value);
if(value < 0){
disableUPnP->setChecked(true);
groupUPnP->setEnabled(false);
}else{
disableUPnP->setChecked(false);
groupUPnP->setEnabled(true);
if(value < 1000){
value = 50000;
}
spin_upnp_port->setValue(value);
}
#endif
boolValue = settings.value("PeXState", true).toBool(); boolValue = settings.value("PeXState", true).toBool();
if(boolValue){ if(boolValue){
// Pex disabled // Pex disabled
@ -661,19 +634,9 @@ int options_imp::getDHTPort() const{
} }
} }
#ifndef NO_UPNP int options_imp::getEncryptionSetting() const{
int options_imp::getUPnPPort() const{ return comboEncryption->currentIndex();
if(isUPnPEnabled()){
return spin_upnp_port->value();
}else{
return -1;
}
}
bool options_imp::isUPnPEnabled() const{
return !disableUPnP->isChecked();
} }
#endif
QString options_imp::getPreviewProgram() const{ QString options_imp::getPreviewProgram() const{
QString preview_txt = preview_program->text(); QString preview_txt = preview_program->text();
@ -815,18 +778,6 @@ void options_imp::disableDHTGroup(int checkBoxValue){
} }
} }
#ifndef NO_UPNP
void options_imp::disableUPnPGroup(int checkBoxValue){
if(checkBoxValue==2){
//Disable
groupUPnP->setEnabled(false);
}else{
//enable
groupUPnP->setEnabled(true);
}
}
#endif
void options_imp::enableSavePath(int checkBoxValue){ void options_imp::enableSavePath(int checkBoxValue){
if(checkBoxValue==2){ if(checkBoxValue==2){
//enable //enable

8
src/options_imp.h

@ -59,10 +59,7 @@ class options_imp : public QDialog, private Ui::Dialog{
QString getScanDir() const; QString getScanDir() const;
bool isDHTEnabled() const; bool isDHTEnabled() const;
int getDHTPort() const; int getDHTPort() const;
#ifndef NO_UPNP int getEncryptionSetting() const;
bool isUPnPEnabled() const;
int getUPnPPort() const;
#endif
bool isPeXDisabled() const; bool isPeXDisabled() const;
// Filter Settings // Filter Settings
bool isFilteringEnabled() const; bool isFilteringEnabled() const;
@ -105,9 +102,6 @@ class options_imp : public QDialog, private Ui::Dialog{
void on_filterBrowse_clicked(); void on_filterBrowse_clicked();
void disableDownload(int checkBoxValue); void disableDownload(int checkBoxValue);
void disableDHTGroup(int checkBoxValue); void disableDHTGroup(int checkBoxValue);
#ifndef NO_UPNP
void disableUPnPGroup(int checkBoxValue);
#endif
void disableMaxConnecLimit(int); void disableMaxConnecLimit(int);
void enableFilter(int checkBoxValue); void enableFilter(int checkBoxValue);
void disableUpload(int checkBoxValue); void disableUpload(int checkBoxValue);

5
src/src.pro

@ -11,14 +11,11 @@ TARGET = qbittorrent
CONFIG += qt thread x11 network CONFIG += qt thread x11 network
# Update this VERSION for each release # Update this VERSION for each release
DEFINES += VERSION=\\\"v1.0.0alpha8\\\" DEFINES += VERSION=\\\"v1.0.0alpha9\\\"
DEFINES += VERSION_MAJOR=1 DEFINES += VERSION_MAJOR=1
DEFINES += VERSION_MINOR=0 DEFINES += VERSION_MINOR=0
DEFINES += VERSION_BUGFIX=0 DEFINES += VERSION_BUGFIX=0
# Temporary hack
DEFINES += NO_UPNP
contains(DEBUG_MODE, 1){ contains(DEBUG_MODE, 1){
CONFIG += debug CONFIG += debug
message(Debug build!) message(Debug build!)

Loading…
Cancel
Save