mirror of
https://github.com/d47081/qBittorrent.git
synced 2025-01-10 14:57:52 +00:00
- Some bug fixes (Proxy)
This commit is contained in:
parent
3926b0d787
commit
6b0ae4f575
2
TODO
2
TODO
@ -8,11 +8,9 @@
|
|||||||
- Skins support? (contact Mateusz)
|
- Skins support? (contact Mateusz)
|
||||||
|
|
||||||
// Harder
|
// Harder
|
||||||
- Display a progress bar that really represents the pieces we have (like in eMule)
|
|
||||||
- Torrent scheduler ala µtorrent/Bitcomet
|
- Torrent scheduler ala µtorrent/Bitcomet
|
||||||
|
|
||||||
// Waiting for libtorrent
|
// Waiting for libtorrent
|
||||||
- File selection in a torrent in compact mode
|
|
||||||
- Allow to prioritize torrents (may code this in qBittorrent?)
|
- Allow to prioritize torrents (may code this in qBittorrent?)
|
||||||
|
|
||||||
// Unsure
|
// Unsure
|
||||||
|
@ -55,12 +55,15 @@ subDownloadThread::subDownloadThread(QObject *parent, QString url) : QThread(par
|
|||||||
url_stream = new ost::URLStream();
|
url_stream = new ost::URLStream();
|
||||||
// Proxy support
|
// Proxy support
|
||||||
QSettings settings("qBittorrent", "qBittorrent");
|
QSettings settings("qBittorrent", "qBittorrent");
|
||||||
int intValue = settings.value(QString::fromUtf8("[Preferences/Connection/ProxyType"), 0).toInt();
|
int intValue = settings.value(QString::fromUtf8("Preferences/Connection/ProxyType"), 0).toInt();
|
||||||
if(intValue > 0) {
|
if(intValue > 0) {
|
||||||
// Proxy enabled
|
// Proxy enabled
|
||||||
|
qDebug("Set proxy, hostname: %s, port: %d", settings.value(QString::fromUtf8("Preferences/Connection/Proxy/IP"), "0.0.0.0").toString().toUtf8().data(), settings.value(QString::fromUtf8("Preferences/Connection/Proxy/Port"), 8080).toInt());
|
||||||
url_stream->setProxy(settings.value(QString::fromUtf8("Preferences/Connection/Proxy/IP"), "0.0.0.0").toString().toUtf8().data(), settings.value(QString::fromUtf8("Preferences/Connection/Proxy/Port"), 8080).toInt());
|
url_stream->setProxy(settings.value(QString::fromUtf8("Preferences/Connection/Proxy/IP"), "0.0.0.0").toString().toUtf8().data(), settings.value(QString::fromUtf8("Preferences/Connection/Proxy/Port"), 8080).toInt());
|
||||||
if(settings.value(QString::fromUtf8("Preferences/Connection/Proxy/Authentication"), false).toBool()) {
|
if(settings.value(QString::fromUtf8("Preferences/Connection/Proxy/Authentication"), false).toBool()) {
|
||||||
|
qDebug("Proxy auth required");
|
||||||
// Authentication required
|
// Authentication required
|
||||||
|
url_stream->setProxyAuthentication(ost::URLStream::authBasic, "auth");
|
||||||
url_stream->setProxyUser(settings.value(QString::fromUtf8("Preferences/Connection/Proxy/Username"), QString()).toString().toUtf8().data());
|
url_stream->setProxyUser(settings.value(QString::fromUtf8("Preferences/Connection/Proxy/Username"), QString()).toString().toUtf8().data());
|
||||||
url_stream->setProxyPassword(settings.value(QString::fromUtf8("Preferences/Connection/Proxy/Password"), QString()).toString().toUtf8().data());
|
url_stream->setProxyPassword(settings.value(QString::fromUtf8("Preferences/Connection/Proxy/Password"), QString()).toString().toUtf8().data());
|
||||||
}
|
}
|
||||||
|
@ -470,7 +470,15 @@ void options_imp::loadOptions(){
|
|||||||
spinUploadLimit->setEnabled(false);
|
spinUploadLimit->setEnabled(false);
|
||||||
}
|
}
|
||||||
intValue = settings.value(QString::fromUtf8("ProxyType"), 0).toInt();
|
intValue = settings.value(QString::fromUtf8("ProxyType"), 0).toInt();
|
||||||
if(intValue < 0) intValue = 0;
|
if(intValue <= 0) {
|
||||||
|
intValue = 0;
|
||||||
|
} else {
|
||||||
|
if(intValue%2 == 0) {
|
||||||
|
intValue = 2;
|
||||||
|
}else {
|
||||||
|
intValue = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
comboProxyType->setCurrentIndex(intValue);
|
comboProxyType->setCurrentIndex(intValue);
|
||||||
enableProxy(intValue);
|
enableProxy(intValue);
|
||||||
if(isProxyEnabled()) {
|
if(isProxyEnabled()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user