Compare commits
122 Commits
release-1.
...
release-1.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
c1efd03cd0 | ||
![]() |
36eae88a5a | ||
![]() |
c01fd75c92 | ||
![]() |
103f2d0720 | ||
![]() |
037c46b587 | ||
![]() |
0879f2c0ca | ||
![]() |
a65cd5c39c | ||
![]() |
d219e7afeb | ||
![]() |
892bb4c432 | ||
![]() |
45b9c6335c | ||
![]() |
78e643039c | ||
![]() |
04e993c674 | ||
![]() |
c3132fc1b0 | ||
![]() |
b1c73cb401 | ||
![]() |
ac6eb8c6bc | ||
![]() |
8a64412cb5 | ||
![]() |
56885cc914 | ||
![]() |
cdd1f9b86c | ||
![]() |
139360cf76 | ||
![]() |
2931d51add | ||
![]() |
aa0bec41b4 | ||
![]() |
b32b42b53e | ||
![]() |
06c4c717bd | ||
![]() |
a3ed44baec | ||
![]() |
0cbb4a7074 | ||
![]() |
af2e487ef5 | ||
![]() |
28fdfdfef1 | ||
![]() |
c95cca6436 | ||
![]() |
86024c6c74 | ||
![]() |
75290cf715 | ||
![]() |
321b76a72a | ||
![]() |
95ecaec11e | ||
![]() |
0e7c16901c | ||
![]() |
43dcbf776b | ||
![]() |
e21c28e9d2 | ||
![]() |
918c1507d3 | ||
![]() |
a189e4403d | ||
![]() |
563291a2e8 | ||
![]() |
9156c9ac8f | ||
![]() |
f0049f1dae | ||
![]() |
a622152747 | ||
![]() |
8440e9982f | ||
![]() |
602d73fa82 | ||
![]() |
c32ebb8d9f | ||
![]() |
deeead4008 | ||
![]() |
937a491409 | ||
![]() |
79d5ae18a6 | ||
![]() |
5cce0c53bf | ||
![]() |
681b8c14ad | ||
![]() |
443567486e | ||
![]() |
c10ebc3086 | ||
![]() |
42a2acefd3 | ||
![]() |
c781545609 | ||
![]() |
ba06affec7 | ||
![]() |
6140d69fcb | ||
![]() |
71a81fd1b7 | ||
![]() |
4e05b62bbe | ||
![]() |
9d366c8c7d | ||
![]() |
940744b0bf | ||
![]() |
6c2518a704 | ||
![]() |
ef51fabf63 | ||
![]() |
1aedd97d4d | ||
![]() |
ff26ea94f5 | ||
![]() |
c7a289d183 | ||
![]() |
2a70c8f4d8 | ||
![]() |
e27b08d970 | ||
![]() |
48ec57604f | ||
![]() |
db1bbea26a | ||
![]() |
7bbb2f542b | ||
![]() |
5563e24781 | ||
![]() |
f131f6210f | ||
![]() |
0356fa4538 | ||
![]() |
b9c4a434c9 | ||
![]() |
a4318cc060 | ||
![]() |
d6e7161eff | ||
![]() |
e428489ebc | ||
![]() |
fa4cffe3d4 | ||
![]() |
a355a87ec5 | ||
![]() |
39749620a4 | ||
![]() |
e7674bfaf8 | ||
![]() |
3e8ad9eb83 | ||
![]() |
6a95f9170c | ||
![]() |
cc4a542e9d | ||
![]() |
fed63b0b85 | ||
![]() |
bf7b11d87d | ||
![]() |
bb959ba465 | ||
![]() |
b77e28fb12 | ||
![]() |
261f981a9a | ||
![]() |
93ad7e889e | ||
![]() |
b79e2906e8 | ||
![]() |
99e8ac3d36 | ||
![]() |
badd36e81e | ||
![]() |
c835502692 | ||
![]() |
4fe7fd537d | ||
![]() |
88ea548eaf | ||
![]() |
360c8500bb | ||
![]() |
7a925f15ba | ||
![]() |
15ce9a7369 | ||
![]() |
4b8532ea2d | ||
![]() |
8e7d0f4dc1 | ||
![]() |
de0ac5cda4 | ||
![]() |
9a9fd4e2d1 | ||
![]() |
4be0cbd2e4 | ||
![]() |
5fef86ec18 | ||
![]() |
1acd05794a | ||
![]() |
5a61b7543b | ||
![]() |
b6b74752a5 | ||
![]() |
27a71ba123 | ||
![]() |
20ae3d997c | ||
![]() |
b73d0548c8 | ||
![]() |
ca118697e9 | ||
![]() |
600308aaa1 | ||
![]() |
9b1ea66659 | ||
![]() |
d29cc3325b | ||
![]() |
9f6e28b741 | ||
![]() |
4c5f349f49 | ||
![]() |
9a321adfb1 | ||
![]() |
e233f27d1c | ||
![]() |
1cadf73a40 | ||
![]() |
77c97b5b43 | ||
![]() |
0054a330fb | ||
![]() |
8ba05c57b0 |
16
Changelog
@@ -1,3 +1,19 @@
|
||||
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.2.0
|
||||
- FEATURE: Torrent queueing system (with priorities)
|
||||
- FEATURE: The number of DHT nodes is displayed
|
||||
- FEATURE: RSS can now be disabled from program preferences
|
||||
- FEATURE: Added collapse/expand all buttons in addition dialog
|
||||
- FEATURE: Can have different proxies for Bittorrent and search engine
|
||||
- FEATURE: Allow multiple item selection in Web UI transfer list
|
||||
- FEATURE: Moved uploads to a separate list in Web UI
|
||||
- BUGFIX: Totally rewritten Web UI list refresh system (fixed memory leak)
|
||||
- BUGFIX: Disable ETA calculation when ETA column is hidden
|
||||
- BUGFIX: Removed "disconnected" connection state, detection was far from perfect
|
||||
- COSMETIC: Transfer speed, ratio, connection status and DHT nodes are displayed in status bar
|
||||
- COSMETIC: RSS Tab is now hidden as a default
|
||||
- COSMETIC: Allow to hide or display top toolbar
|
||||
- COSMETIC: Log is now in a separate dialog
|
||||
|
||||
* Sun Sept 14 2008 - Christophe Dumez <chris@qbittorrent.org> - v1.1.4
|
||||
- FEATURE: DHT is no longer used as fallback only
|
||||
- FEATURE: Ported WebUI to Mootools v1.2
|
||||
|
1
INSTALL
@@ -18,6 +18,7 @@ Dependencies:
|
||||
Qt >= 4.4.0 is advised
|
||||
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= v0.13.1 REQUIRED)
|
||||
-> http://www.qbittorrent.org/download.php (advised)
|
||||
-> http://www.libtorrent.net
|
||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
||||
|
||||
|
22
TODO
@@ -1,22 +1,4 @@
|
||||
See https://blueprints.launchpad.net/qbittorrent/
|
||||
|
||||
Translations updated in v1.1.0:
|
||||
- French
|
||||
- Chinese
|
||||
- Polish
|
||||
- Portuguese
|
||||
- Brazilian
|
||||
- Slovak
|
||||
- Swedish
|
||||
- Romanian
|
||||
- Finnish
|
||||
- Italian
|
||||
- Turkish
|
||||
- Korean
|
||||
- Hungarian
|
||||
- German
|
||||
- Spanish
|
||||
- Russian
|
||||
- Dutch
|
||||
- Bulgarian
|
||||
- Greek
|
||||
// in v1.2.0
|
||||
- Split download and uploads in Web UI (Ishan Ahora)
|
||||
|
@@ -40,7 +40,8 @@
|
||||
#define SEEDSLEECH 5
|
||||
#define RATIO 6
|
||||
#define ETA 7
|
||||
#define HASH 8
|
||||
#define PRIORITY 8
|
||||
#define HASH 9
|
||||
|
||||
class DLListDelegate: public QItemDelegate {
|
||||
Q_OBJECT
|
||||
|
@@ -37,7 +37,8 @@
|
||||
#define F_UPSPEED 2
|
||||
#define F_LEECH 3
|
||||
#define F_RATIO 4
|
||||
#define F_HASH 5
|
||||
#define F_PRIORITY 5
|
||||
#define F_HASH 6
|
||||
|
||||
class FinishedListDelegate: public QItemDelegate {
|
||||
Q_OBJECT
|
||||
|
@@ -37,15 +37,18 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
|
||||
setupUi(this);
|
||||
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
|
||||
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
|
||||
connect(BTSession, SIGNAL(addedTorrent(QString, QTorrentHandle&, bool)), this, SLOT(torrentAdded(QString, QTorrentHandle&, bool)));
|
||||
finishedListModel = new QStandardItemModel(0,6);
|
||||
connect(BTSession, SIGNAL(addedTorrent(QTorrentHandle&)), this, SLOT(torrentAdded(QTorrentHandle&)));
|
||||
finishedListModel = new QStandardItemModel(0,7);
|
||||
finishedListModel->setHeaderData(F_NAME, Qt::Horizontal, tr("Name", "i.e: file name"));
|
||||
finishedListModel->setHeaderData(F_SIZE, Qt::Horizontal, tr("Size", "i.e: file size"));
|
||||
finishedListModel->setHeaderData(F_UPSPEED, Qt::Horizontal, tr("UP Speed", "i.e: Upload speed"));
|
||||
finishedListModel->setHeaderData(F_LEECH, Qt::Horizontal, tr("Leechers", "i.e: full/partial sources"));
|
||||
finishedListModel->setHeaderData(F_RATIO, Qt::Horizontal, tr("Ratio"));
|
||||
finishedListModel->setHeaderData(F_PRIORITY, Qt::Horizontal, tr("Priority"));
|
||||
finishedList->setModel(finishedListModel);
|
||||
loadHiddenColumns();
|
||||
// Hide priority column
|
||||
finishedList->hideColumn(F_PRIORITY);
|
||||
// Hide hash column
|
||||
finishedList->hideColumn(F_HASH);
|
||||
// Load last columns width for download list
|
||||
@@ -61,8 +64,8 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
|
||||
connect(finishedList, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedListMenu(const QPoint&)));
|
||||
finishedList->header()->setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(finishedList->header(), SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(displayFinishedHoSMenu(const QPoint&)));
|
||||
|
||||
connect(finishedList, SIGNAL(doubleClicked(const QModelIndex&)), this, SLOT(notifyTorrentDoubleClicked(const QModelIndex&)));
|
||||
connect(BTSession, SIGNAL(forceFinishedListUpdate()), this, SLOT(updateFinishedList()));
|
||||
actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png")));
|
||||
actionPreview_file->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/preview.png")));
|
||||
actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png")));
|
||||
@@ -71,6 +74,8 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
|
||||
connect(actionPause, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPause_triggered()));
|
||||
connect(actionStart, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionStart_triggered()));
|
||||
connect(actionDelete, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_triggered()));
|
||||
connect(actionIncreasePriority, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionIncreasePriority_triggered()));
|
||||
connect(actionDecreasePriority, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDecreasePriority_triggered()));
|
||||
connect(actionPreview_file, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionPreview_file_triggered()));
|
||||
connect(actionDelete_Permanently, SIGNAL(triggered()), (GUI*)parent, SLOT(on_actionDelete_Permanently_triggered()));
|
||||
connect(actionOpen_destination_folder, SIGNAL(triggered()), (GUI*)parent, SLOT(openDestinationFolder()));
|
||||
@@ -82,6 +87,7 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
|
||||
connect(actionHOSColUpSpeed, SIGNAL(triggered()), this, SLOT(hideOrShowColumnUpSpeed()));
|
||||
connect(actionHOSColLeechers, SIGNAL(triggered()), this, SLOT(hideOrShowColumnLeechers()));
|
||||
connect(actionHOSColRatio, SIGNAL(triggered()), this, SLOT(hideOrShowColumnRatio()));
|
||||
connect(actionHOSColPriority, SIGNAL(triggered()), this, SLOT(hideOrShowColumnPriority()));
|
||||
}
|
||||
|
||||
FinishedTorrents::~FinishedTorrents(){
|
||||
@@ -97,6 +103,14 @@ void FinishedTorrents::notifyTorrentDoubleClicked(const QModelIndex& index) {
|
||||
emit torrentDoubleClicked(hash, true);
|
||||
}
|
||||
|
||||
void FinishedTorrents::hidePriorityColumn(bool hide) {
|
||||
finishedList->setColumnHidden(F_PRIORITY, hide);
|
||||
if(hide)
|
||||
getActionHoSCol(F_PRIORITY)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
|
||||
else
|
||||
getActionHoSCol(F_PRIORITY)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
|
||||
}
|
||||
|
||||
void FinishedTorrents::addTorrent(QString hash){
|
||||
if(!BTSession->isFinished(hash)){
|
||||
BTSession->setFinishedTorrent(hash);
|
||||
@@ -112,6 +126,8 @@ void FinishedTorrents::addTorrent(QString hash){
|
||||
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)0.));
|
||||
finishedListModel->setData(finishedListModel->index(row, F_LEECH), QVariant("0"));
|
||||
finishedListModel->setData(finishedListModel->index(row, F_RATIO), QVariant(QString::fromUtf8(misc::toString(BTSession->getRealRatio(hash)).c_str())));
|
||||
if(BTSession->isQueueingEnabled())
|
||||
finishedListModel->setData(finishedListModel->index(row, F_PRIORITY), QVariant((int)BTSession->getUpTorrentPriority(hash)));
|
||||
finishedListModel->setData(finishedListModel->index(row, F_HASH), QVariant(hash));
|
||||
if(h.is_paused()) {
|
||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QIcon(":/Icons/skin/paused.png"), Qt::DecorationRole);
|
||||
@@ -126,7 +142,7 @@ void FinishedTorrents::addTorrent(QString hash){
|
||||
sortFinishedList();
|
||||
}
|
||||
|
||||
void FinishedTorrents::torrentAdded(QString, QTorrentHandle& h, bool) {
|
||||
void FinishedTorrents::torrentAdded(QTorrentHandle& h) {
|
||||
QString hash = h.hash();
|
||||
if(BTSession->isFinished(hash)) {
|
||||
addTorrent(hash);
|
||||
@@ -255,8 +271,16 @@ void FinishedTorrents::updateFinishedList(){
|
||||
row = getRowFromHash(hash);
|
||||
}
|
||||
Q_ASSERT(row != -1);
|
||||
// Update priority
|
||||
if(BTSession->isQueueingEnabled()) {
|
||||
finishedListModel->setData(finishedListModel->index(row, F_PRIORITY), QVariant((int)BTSession->getUpTorrentPriority(hash)));
|
||||
if(h.is_paused() && BTSession->isUploadQueued(hash)) {
|
||||
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/queued.png"))), Qt::DecorationRole);
|
||||
setRowColor(row, QString::fromUtf8("grey"));
|
||||
}
|
||||
}
|
||||
if(h.is_paused()) continue;
|
||||
if(h.state() == torrent_status::downloading || (h.state() != torrent_status::checking_files && h.state() != torrent_status::queued_for_checking && h.progress() < 1.)) {
|
||||
if(h.state() == torrent_status::downloading || (h.state() != torrent_status::checking_files && h.state() != torrent_status::queued_for_checking && !h.is_seed())) {
|
||||
// What are you doing here? go back to download tab!
|
||||
int reponse = QMessageBox::question(this, tr("Incomplete torrent in seeding list"), tr("It appears that the state of '%1' torrent changed from 'seeding' to 'downloading'. Would you like to move it back to download list? (otherwise the torrent will simply be deleted)").arg(h.name()), QMessageBox::Yes | QMessageBox::No);
|
||||
if (reponse == QMessageBox::Yes) {
|
||||
@@ -404,12 +428,17 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
|
||||
myFinishedListMenu.addSeparator();
|
||||
myFinishedListMenu.addAction(actionOpen_destination_folder);
|
||||
myFinishedListMenu.addAction(actionTorrent_Properties);
|
||||
if(BTSession->isQueueingEnabled()) {
|
||||
myFinishedListMenu.addSeparator();
|
||||
myFinishedListMenu.addAction(actionIncreasePriority);
|
||||
myFinishedListMenu.addAction(actionDecreasePriority);
|
||||
}
|
||||
myFinishedListMenu.addSeparator();
|
||||
myFinishedListMenu.addAction(actionBuy_it);
|
||||
|
||||
// Call menu
|
||||
// XXX: why mapToGlobal() is not enough?
|
||||
myFinishedListMenu.exec(mapToGlobal(pos)+QPoint(10,59));
|
||||
myFinishedListMenu.exec(mapToGlobal(pos)+QPoint(10,58));
|
||||
}
|
||||
|
||||
|
||||
@@ -421,11 +450,17 @@ void FinishedTorrents::displayFinishedListMenu(const QPoint& pos){
|
||||
void FinishedTorrents::displayFinishedHoSMenu(const QPoint& pos){
|
||||
QMenu hideshowColumn(this);
|
||||
hideshowColumn.setTitle(tr("Hide or Show Column"));
|
||||
for(int i=0; i<=F_RATIO; i++) {
|
||||
int lastCol;
|
||||
if(BTSession->isQueueingEnabled()) {
|
||||
lastCol = F_PRIORITY;
|
||||
} else {
|
||||
lastCol = F_RATIO;
|
||||
}
|
||||
for(int i=0; i<=lastCol; i++) {
|
||||
hideshowColumn.addAction(getActionHoSCol(i));
|
||||
}
|
||||
// Call menu
|
||||
hideshowColumn.exec(mapToGlobal(pos)+QPoint(10,32));
|
||||
hideshowColumn.exec(mapToGlobal(pos)+QPoint(10,34));
|
||||
}
|
||||
|
||||
// toggle hide/show a column
|
||||
@@ -479,6 +514,10 @@ void FinishedTorrents::hideOrShowColumnRatio() {
|
||||
hideOrShowColumn(F_RATIO);
|
||||
}
|
||||
|
||||
void FinishedTorrents::hideOrShowColumnPriority() {
|
||||
hideOrShowColumn(F_PRIORITY);
|
||||
}
|
||||
|
||||
// load the previous settings, and hide the columns
|
||||
bool FinishedTorrents::loadHiddenColumns() {
|
||||
bool loaded = false;
|
||||
@@ -540,6 +579,9 @@ QAction* FinishedTorrents::getActionHoSCol(int index) {
|
||||
case F_RATIO :
|
||||
return actionHOSColRatio;
|
||||
break;
|
||||
case F_PRIORITY :
|
||||
return actionHOSColPriority;
|
||||
break;
|
||||
default :
|
||||
return NULL;
|
||||
}
|
||||
@@ -558,6 +600,7 @@ void FinishedTorrents::toggleFinishedListSortOrder(int index) {
|
||||
switch(index) {
|
||||
case F_SIZE:
|
||||
case F_UPSPEED:
|
||||
case F_PRIORITY:
|
||||
sortFinishedListFloat(index, sortOrder);
|
||||
break;
|
||||
default:
|
||||
|
@@ -66,7 +66,7 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
|
||||
void sortFinishedListFloat(int index, Qt::SortOrder sortOrder);
|
||||
void sortFinishedListString(int index, Qt::SortOrder sortOrder);
|
||||
void updateFileSize(QString hash);
|
||||
void torrentAdded(QString path, QTorrentHandle& h, bool fastResume);
|
||||
void torrentAdded(QTorrentHandle& h);
|
||||
void on_actionSet_upload_limit_triggered();
|
||||
void notifyTorrentDoubleClicked(const QModelIndex& index);
|
||||
void hideOrShowColumnName();
|
||||
@@ -74,6 +74,7 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
|
||||
void hideOrShowColumnUpSpeed();
|
||||
void hideOrShowColumnLeechers();
|
||||
void hideOrShowColumnRatio();
|
||||
void hideOrShowColumnPriority();
|
||||
|
||||
public slots:
|
||||
void addTorrent(QString hash);
|
||||
@@ -83,6 +84,7 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
|
||||
void propertiesSelection();
|
||||
void deleteTorrent(QString hash);
|
||||
void showPropertiesFromHash(QString hash);
|
||||
void hidePriorityColumn(bool hide);
|
||||
|
||||
signals:
|
||||
void torrentMovedFromFinishedList(QString);
|
||||
|
339
src/GUI.cpp
22
src/GUI.h
@@ -52,6 +52,7 @@ class QTabWidget;
|
||||
class QLabel;
|
||||
class QModelIndex;
|
||||
class HttpServer;
|
||||
class QFrame;
|
||||
|
||||
class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
Q_OBJECT
|
||||
@@ -75,12 +76,22 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
bool force_exit;
|
||||
unsigned int refreshInterval;
|
||||
QTimer *refresher;
|
||||
QLabel *dlSpeedLbl;
|
||||
QLabel *upSpeedLbl;
|
||||
QLabel *ratioLbl;
|
||||
QLabel *DHTLbl;
|
||||
QFrame *statusSep1;
|
||||
QFrame *statusSep2;
|
||||
QFrame *statusSep3;
|
||||
QFrame *statusSep4;
|
||||
// Keyboard shortcuts
|
||||
QShortcut *switchSearchShortcut;
|
||||
QShortcut *switchSearchShortcut2;
|
||||
QShortcut *switchDownShortcut;
|
||||
QShortcut *switchUpShortcut;
|
||||
QShortcut *switchRSSShortcut;
|
||||
QAction *prioSeparator;
|
||||
QAction *prioSeparator2;
|
||||
// Search
|
||||
SearchEngine *searchEngine;
|
||||
// RSS
|
||||
@@ -105,6 +116,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
void on_actionCreate_torrent_triggered();
|
||||
void on_actionWebsite_triggered() const;
|
||||
void on_actionBugReport_triggered() const;
|
||||
void on_actionShow_console_triggered();
|
||||
void readParamsOnSocket();
|
||||
void acceptConnection();
|
||||
void togglePausedState(QString hash);
|
||||
@@ -116,6 +128,8 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
void readSettings();
|
||||
void on_actionExit_triggered();
|
||||
void createTrayIcon();
|
||||
void updateUnfinishedTorrentNumberCalc();
|
||||
void updateFinishedTorrentNumberCalc();
|
||||
void updateUnfinishedTorrentNumber(unsigned int nb);
|
||||
void updateFinishedTorrentNumber(unsigned int nb);
|
||||
void fullDiskError(QTorrentHandle& h) const;
|
||||
@@ -148,14 +162,15 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
void processDownloadedFiles(QString path, QString url);
|
||||
void downloadFromURLList(const QStringList& urls);
|
||||
void deleteTorrent(QString hash);
|
||||
void deleteRatioTorrent(QString fileName);
|
||||
void finishedTorrent(QTorrentHandle& h) const;
|
||||
void updateLists();
|
||||
bool initWebUi(QString username, QString password, int port);
|
||||
void pauseTorrent(QString hash);
|
||||
void on_actionIncreasePriority_triggered();
|
||||
void on_actionDecreasePriority_triggered();
|
||||
// Options slots
|
||||
void on_actionOptions_triggered();
|
||||
void OptionsSaved(QString info, bool deleteOptions);
|
||||
void OptionsSaved(bool deleteOptions);
|
||||
// HTTP slots
|
||||
void on_actionDownload_from_URL_triggered();
|
||||
|
||||
@@ -169,7 +184,8 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *);
|
||||
void hideEvent(QHideEvent *);
|
||||
bool event(QEvent * event);
|
||||
void displayRSSTab(bool enable);
|
||||
|
||||
public:
|
||||
// Construct / Destruct
|
||||
|
@@ -1,6 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Categories=Qt;Network;P2P
|
||||
Comment=V1.1.4
|
||||
Comment=V1.2.0
|
||||
Exec=qbittorrent %f
|
||||
GenericName=Bittorrent client
|
||||
GenericName[bg]=Торент клиент
|
||||
|
Before Width: | Height: | Size: 2.3 KiB After Width: | Height: | Size: 1.4 KiB |
BIN
src/Icons/skin/decrease.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
Before Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 2.8 KiB After Width: | Height: | Size: 1.5 KiB |
BIN
src/Icons/skin/increase.png
Normal file
After Width: | Height: | Size: 5.1 KiB |
BIN
src/Icons/skin/queued.png
Normal file
After Width: | Height: | Size: 493 B |
BIN
src/Icons/skin/tabs.gif
Normal file
After Width: | Height: | Size: 2.0 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 75 KiB After Width: | Height: | Size: 76 KiB |
Before Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.2 KiB |
@@ -187,4 +187,3 @@ bool SearchTab::loadColWidthSearchList(){
|
||||
qDebug("Search list columns width loaded");
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,7 @@ class about : public QDialog, private Ui::AboutDlg{
|
||||
"<i>- <u>Brazilian:</u> Nick Marinho (nickmarinho@gmail.com)<br>\
|
||||
- <u>Bulgarian:</u> Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)<br>\
|
||||
- <u>Catalan:</u> Gekko Dam Beer (gekko04@users.sourceforge.net)<br>\
|
||||
- <u>Chinese (Simplified):</u> Guo Yue (guoyue0418@hotmail.com)<br>\
|
||||
- <u>Chinese (Simplified):</u> Guo Yue (yue.guo0418@gmail.com)<br>\
|
||||
- <u>Chinese (Traditional):</u> Yi-Shun Wang (dnextstep@gmail.com)<br>\
|
||||
- <u>Czech:</u> Jirka Vilim (web@tets.cz)<br>\
|
||||
- <u>Danish:</u> Mathias Nielsen (comoneo@gmail.com)<br>\
|
||||
|
@@ -13,21 +13,6 @@
|
||||
<string>Torrent addition dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="leftMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QLabel" name="fileNameLbl" >
|
||||
<property name="text" >
|
||||
@@ -110,6 +95,50 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="collapseAllButton" >
|
||||
<property name="text" >
|
||||
<string>Collapse all</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="expandAllButton" >
|
||||
<property name="text" >
|
||||
<string>Expand All</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer>
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="checkIncrementalDL" >
|
||||
<property name="text" >
|
||||
|
@@ -26,6 +26,8 @@
|
||||
#include <QPair>
|
||||
#include <QStringList>
|
||||
#include <QDateTime>
|
||||
#include <QApplication>
|
||||
#include <QPalette>
|
||||
#include <QPointer>
|
||||
|
||||
#include <libtorrent/session.hpp>
|
||||
@@ -39,7 +41,7 @@ class deleteThread;
|
||||
class QTimer;
|
||||
class FilterParserThread;
|
||||
|
||||
class bittorrent : public QObject{
|
||||
class bittorrent : public QObject {
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
@@ -56,6 +58,8 @@ class bittorrent : public QObject{
|
||||
QHash<QString, size_type> TorrentsStartData;
|
||||
QHash<QString, QPair<size_type,size_type> > ratioData;
|
||||
QHash<QString, QHash<QString, QString> > trackersErrors;
|
||||
QStringList consoleMessages;
|
||||
QStringList peerBanMessages;
|
||||
deleteThread *deleter;
|
||||
QStringList finishedTorrents;
|
||||
QStringList unfinishedTorrents;
|
||||
@@ -70,6 +74,15 @@ class bittorrent : public QObject{
|
||||
QPointer<FilterParserThread> filterParser;
|
||||
QString filterPath;
|
||||
int folderScanInterval; // in seconds
|
||||
bool queueingEnabled;
|
||||
int maxActiveDownloads;
|
||||
int maxActiveTorrents;
|
||||
int currentActiveDownloads;
|
||||
QStringList *downloadQueue;
|
||||
QStringList *queuedDownloads;
|
||||
QStringList *uploadQueue;
|
||||
QStringList *queuedUploads;
|
||||
bool calculateETA;
|
||||
QStringList url_skippingDlg;
|
||||
|
||||
protected:
|
||||
@@ -97,6 +110,16 @@ class bittorrent : public QObject{
|
||||
bool has_filtered_files(QString hash) const;
|
||||
unsigned int getFinishedPausedTorrentsNb() const;
|
||||
unsigned int getUnfinishedPausedTorrentsNb() const;
|
||||
bool isQueueingEnabled() const;
|
||||
int getDlTorrentPriority(QString hash) const;
|
||||
int getUpTorrentPriority(QString hash) const;
|
||||
int getMaximumActiveDownloads() const;
|
||||
int getMaximumActiveTorrents() const;
|
||||
bool isDownloadQueued(QString hash) const;
|
||||
bool isUploadQueued(QString hash) const;
|
||||
int loadTorrentPriority(QString hash);
|
||||
QStringList getConsoleMessages() const;
|
||||
QStringList getPeerBanMessages() const;
|
||||
float getUncheckedTorrentProgress(QString hash) const;
|
||||
|
||||
public slots:
|
||||
@@ -117,6 +140,7 @@ class bittorrent : public QObject{
|
||||
void enablePeerExchange();
|
||||
void enableIPFilter(QString filter);
|
||||
void disableIPFilter();
|
||||
void setQueueingEnabled(bool enable);
|
||||
void resumeUnfinishedTorrents();
|
||||
void saveTorrentSpeedLimits(QString hash);
|
||||
void loadTorrentSpeedLimits(QString hash);
|
||||
@@ -124,6 +148,13 @@ class bittorrent : public QObject{
|
||||
void loadDownloadUploadForTorrent(QString hash);
|
||||
void handleDownloadFailure(QString url, QString reason);
|
||||
void loadWebSeeds(QString fileHash);
|
||||
void updateDownloadQueue();
|
||||
void updateUploadQueue();
|
||||
void increaseDlTorrentPriority(QString hash);
|
||||
void decreaseDlTorrentPriority(QString hash);
|
||||
void increaseUpTorrentPriority(QString hash);
|
||||
void decreaseUpTorrentPriority(QString hash);
|
||||
void saveTorrentPriority(QString hash, int prio);
|
||||
void downloadUrlAndSkipDialog(QString);
|
||||
// Session configuration - Setters
|
||||
void setListeningPortsRange(std::pair<unsigned short, unsigned short> ports);
|
||||
@@ -151,6 +182,11 @@ class bittorrent : public QObject{
|
||||
bool enableDHT(bool b);
|
||||
void reloadTorrent(const QTorrentHandle &h, bool full_alloc);
|
||||
void setTimerScanInterval(int secs);
|
||||
void setMaxActiveDownloads(int val);
|
||||
void setMaxActiveTorrents(int val);
|
||||
void setETACalculation(bool enable);
|
||||
void addConsoleMessage(QString msg, QColor color=QApplication::palette().color(QPalette::WindowText));
|
||||
void addPeerBanMessage(QString msg, bool from_ipfilter);
|
||||
|
||||
protected slots:
|
||||
void scanDirectory();
|
||||
@@ -161,29 +197,35 @@ class bittorrent : public QObject{
|
||||
void deleteBigRatios();
|
||||
|
||||
signals:
|
||||
void invalidTorrent(QString path);
|
||||
void duplicateTorrent(QString path);
|
||||
void addedTorrent(QString path, QTorrentHandle& h, bool fastResume);
|
||||
//void invalidTorrent(QString path);
|
||||
//void duplicateTorrent(QString path);
|
||||
void addedTorrent(QTorrentHandle& h);
|
||||
void deletedTorrent(QString hash);
|
||||
void pausedTorrent(QString hash);
|
||||
void resumedTorrent(QString hash);
|
||||
void finishedTorrent(QTorrentHandle& h);
|
||||
void fullDiskError(QTorrentHandle& h);
|
||||
void trackerError(QString hash, QString time, QString msg);
|
||||
void portListeningFailure();
|
||||
//void portListeningFailure();
|
||||
void trackerAuthenticationRequired(QTorrentHandle& h);
|
||||
void scanDirFoundTorrents(const QStringList& pathList);
|
||||
void newDownloadedTorrent(QString path, QString url);
|
||||
void aboutToDownloadFromUrl(QString url);
|
||||
//void aboutToDownloadFromUrl(QString url);
|
||||
void updateFileSize(QString hash);
|
||||
void peerBlocked(QString);
|
||||
//void peerBlocked(QString);
|
||||
void downloadFromUrlFailure(QString url, QString reason);
|
||||
void fastResumeDataRejected(QString name);
|
||||
void urlSeedProblem(QString url, QString msg);
|
||||
//void fastResumeDataRejected(QString name);
|
||||
//void urlSeedProblem(QString url, QString msg);
|
||||
//void torrentFinishedChecking(QString hash);
|
||||
void torrent_ratio_deleted(QString fileName);
|
||||
void UPnPError(QString msg);
|
||||
void UPnPSuccess(QString msg);
|
||||
//void torrent_ratio_deleted(QString fileName);
|
||||
//void UPnPError(QString msg);
|
||||
//void UPnPSuccess(QString msg);
|
||||
void updateFinishedTorrentNumber();
|
||||
void updateUnfinishedTorrentNumber();
|
||||
void forceUnfinishedListUpdate();
|
||||
void forceFinishedListUpdate();
|
||||
/*void torrentSwitchedtoFinished(QString hash);
|
||||
void torrentSwitchedtoUnfinished(QString hash);*/
|
||||
};
|
||||
|
||||
#endif
|
||||
|
58
src/console.ui
Normal file
@@ -0,0 +1,58 @@
|
||||
<ui version="4.0" >
|
||||
<class>ConsoleDlg</class>
|
||||
<widget class="QDialog" name="ConsoleDlg" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>512</width>
|
||||
<height>497</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>qBittorrent console</string>
|
||||
</property>
|
||||
<property name="windowIcon" >
|
||||
<iconset resource="icons.qrc" >:/Icons/log.png</iconset>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" >
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabConsole" >
|
||||
<property name="currentIndex" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab" >
|
||||
<attribute name="title" >
|
||||
<string>General</string>
|
||||
</attribute>
|
||||
<attribute name="icon" >
|
||||
<iconset resource="icons.qrc" >:/Icons/log.png</iconset>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" >
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textConsole" />
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="tab_2" >
|
||||
<attribute name="title" >
|
||||
<string>Blocked IPs</string>
|
||||
</attribute>
|
||||
<attribute name="icon" >
|
||||
<iconset resource="icons.qrc" >:/Icons/filter.png</iconset>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" >
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBannedPeers" />
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="icons.qrc" />
|
||||
</resources>
|
||||
<connections/>
|
||||
</ui>
|
50
src/console_imp.h
Normal file
@@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt4 and libtorrent.
|
||||
* Copyright (C) 2006 Christophe Dumez
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*
|
||||
* Contact : chris@qbittorrent.org
|
||||
*/
|
||||
|
||||
#ifndef CONSOLE_H
|
||||
#define CONSOLE_H
|
||||
|
||||
#include "bittorrent.h"
|
||||
#include "ui_console.h"
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
class consoleDlg : public QDialog, private Ui_ConsoleDlg{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
bittorrent *BTSession;
|
||||
|
||||
public:
|
||||
consoleDlg(QWidget *parent, bittorrent* _BTSession) : QDialog(parent) {
|
||||
setupUi(this);
|
||||
setAttribute(Qt::WA_DeleteOnClose);
|
||||
BTSession = _BTSession;
|
||||
textConsole->setHtml(BTSession->getConsoleMessages().join("<br>"));
|
||||
textBannedPeers->setHtml(BTSession->getPeerBanMessages().join("<br>"));
|
||||
show();
|
||||
}
|
||||
|
||||
~consoleDlg() {}
|
||||
|
||||
};
|
||||
|
||||
#endif
|
132
src/download.ui
@@ -18,7 +18,16 @@
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<property name="leftMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
@@ -48,93 +57,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTabWidget" name="tabBottom" >
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>142</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="tabPosition" >
|
||||
<enum>QTabWidget::West</enum>
|
||||
</property>
|
||||
<property name="currentIndex" >
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="log_tab" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>765</width>
|
||||
<height>138</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="title" >
|
||||
<string>Log</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="infoBar" >
|
||||
<property name="sizePolicy" >
|
||||
<sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>120</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="contextMenuPolicy" >
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QWidget" name="filter_tab" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>765</width>
|
||||
<height>138</height>
|
||||
</rect>
|
||||
</property>
|
||||
<attribute name="title" >
|
||||
<string>IP filter</string>
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" >
|
||||
<property name="spacing" >
|
||||
<number>6</number>
|
||||
</property>
|
||||
<property name="margin" >
|
||||
<number>9</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBlockedUsers" >
|
||||
<property name="maximumSize" >
|
||||
<size>
|
||||
<width>16777215</width>
|
||||
<height>123</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
<action name="actionStart" >
|
||||
<property name="text" >
|
||||
@@ -151,11 +73,6 @@
|
||||
<string>Delete</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionClearLog" >
|
||||
<property name="text" >
|
||||
<string>Clear</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionPreview_file" >
|
||||
<property name="text" >
|
||||
<string>Preview file</string>
|
||||
@@ -183,8 +100,7 @@
|
||||
</action>
|
||||
<action name="actionOpen_destination_folder" >
|
||||
<property name="icon" >
|
||||
<iconset resource="icons.qrc" >
|
||||
<normaloff>:/Icons/folder.png</normaloff>:/Icons/folder.png</iconset>
|
||||
<iconset resource="icons.qrc" >:/Icons/folder.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Open destination folder</string>
|
||||
@@ -232,15 +148,33 @@
|
||||
</action>
|
||||
<action name="actionBuy_it" >
|
||||
<property name="icon" >
|
||||
<iconset resource="icons.qrc" >
|
||||
<normaloff>:/Icons/money.png</normaloff>:/Icons/money.png</iconset>
|
||||
<iconset resource="icons.qrc" >:/Icons/money.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Buy it</string>
|
||||
</property>
|
||||
</action>
|
||||
<zorder>tabBottom</zorder>
|
||||
<zorder></zorder>
|
||||
<action name="actionHOSColPriority" >
|
||||
<property name="text" >
|
||||
<string>Priority</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionIncreasePriority" >
|
||||
<property name="icon" >
|
||||
<iconset resource="icons.qrc" >:/Icons/skin/increase.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Increase priority</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionDecreasePriority" >
|
||||
<property name="icon" >
|
||||
<iconset resource="icons.qrc" >:/Icons/skin/decrease.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Decrease priority</string>
|
||||
</property>
|
||||
</action>
|
||||
</widget>
|
||||
<resources>
|
||||
<include location="icons.qrc" />
|
||||
|
@@ -91,11 +91,11 @@ void subDownloadThread::run(){
|
||||
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYHOST, 0);
|
||||
// PROXY SUPPORT
|
||||
QSettings settings("qBittorrent", "qBittorrent");
|
||||
int intValue = settings.value(QString::fromUtf8("Preferences/Connection/ProxyType"), 0).toInt();
|
||||
int intValue = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxyType"), 0).toInt();
|
||||
if(intValue > 0) {
|
||||
// Proxy enabled
|
||||
QString IP = settings.value(QString::fromUtf8("Preferences/Connection/Proxy/IP"), "0.0.0.0").toString();
|
||||
QString port = settings.value(QString::fromUtf8("Preferences/Connection/Proxy/Port"), 8080).toString();
|
||||
QString IP = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/IP"), "0.0.0.0").toString();
|
||||
QString port = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/Port"), 8080).toString();
|
||||
qDebug("Using proxy: %s", (IP+QString(":")+port).toUtf8().data());
|
||||
curl_easy_setopt(curl, CURLOPT_PROXYPORT, (IP+QString(":")+port).toUtf8().data());
|
||||
// Default proxy type is HTTP, we must change if it is SOCKS5
|
||||
@@ -106,8 +106,8 @@ void subDownloadThread::run(){
|
||||
// Authentication?
|
||||
if(intValue > 2) {
|
||||
qDebug("Proxy requires authentication, authenticating");
|
||||
QString username = settings.value(QString::fromUtf8("Preferences/Connection/Proxy/Username"), QString()).toString();
|
||||
QString password = settings.value(QString::fromUtf8("Preferences/Connection/Proxy/Password"), QString()).toString();
|
||||
QString username = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/Username"), QString()).toString();
|
||||
QString password = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/Password"), QString()).toString();
|
||||
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, (username+QString(":")+password).toUtf8().data());
|
||||
}
|
||||
}
|
||||
|