Compare commits

..

55 Commits

Author SHA1 Message Date
Christophe Dumez
aab28cda94 - Tagged 1.3.5 release 2009-07-24 08:36:27 +00:00
Christophe Dumez
4e1ae6e448 - Updated Changelog 2009-07-24 08:32:01 +00:00
Christophe Dumez
fb28a3821a Remember visual indexes of columns in transfer lists 2009-07-24 05:55:32 +00:00
Christophe Dumez
0af506f38a - Save properties window size, position, columns width and restore them
- Set a minimum default width for NAME column in properties
2009-07-24 03:38:44 +00:00
Christophe Dumez
5adca06912 - BUGFIX: Fixed possible overflow in progress calculation in arborescence.
h
2009-07-24 03:03:48 +00:00
Christophe Dumez
1ace2303fb Fixed a small typo in one of the last commits 2009-07-24 02:41:21 +00:00
Christophe Dumez
197d9af8ef - Updated version number to v1.3.5 2009-07-23 09:18:32 +00:00
Christophe Dumez
b582c5d338 - Fixed torrent creation tool 2009-07-23 09:14:05 +00:00
Christophe Dumez
bde7ebd60e - Updated TODO 2009-07-15 11:02:56 +00:00
Christophe Dumez
01a1088252 Made IP filter more robust 2009-07-14 07:10:05 +00:00
Christophe Dumez
9b86ea56ab - Updated v1.3.4 date in changelog 2009-07-12 09:14:56 +00:00
Christophe Dumez
a326307b0d - Display date as well as time in log window
- bump to v1.3.4
2009-07-12 09:13:11 +00:00
Christophe Dumez
2e888a1e68 Tuned lists properties to make sure they are displayed properly 2009-07-12 09:01:18 +00:00
Christophe Dumez
2b1755eb2a - BUGFIX: Remove last separator in top tool bar 2009-07-12 08:46:44 +00:00
Christophe Dumez
7f3832a73d Display a ratio of 0.0 if total_upload and total_download are both 0 2009-07-12 08:26:01 +00:00
Christophe Dumez
935de375b9 - BUGFIX: Torrents with an infinite ratio are no longer affected by ratio_limit set in program preferences (closes #364730) 2009-07-12 07:27:24 +00:00
Christophe Dumez
b88ea10937 - Fixed memory leak in search engine 2009-07-12 06:44:55 +00:00
Christophe Dumez
9b29302d42 - Cleanly fixed popup menus position in lists (no more workarounds) 2009-07-12 06:07:20 +00:00
Christophe Dumez
e67d3243e8 - Fixed percentages disapearing with default version of cleanlooks style 2009-07-12 03:39:24 +00:00
Christophe Dumez
977dba4be6 - Updated Changelog 2009-07-12 03:12:41 +00:00
Christophe Dumez
114d96195b - Suppressed QLayout: Attempting to add QLayout "" to properties "properties" warning message when opening a properties dialog (closes #380414) 2009-07-12 03:07:40 +00:00
Christophe Dumez
99786cdf17 - Fixing compiling with Qt 4.3 2009-06-21 15:04:17 +00:00
Christophe Dumez
0ad7781c8b - Fixed a bug in download_url() function in helpers.py 2009-06-19 06:54:54 +00:00
Christophe Dumez
dceba7e2e1 - Fixed ip filter parsing on 64bits (Fix by Eric Porter) 2009-05-03 15:39:49 +00:00
Christophe Dumez
3a6b5af494 - Fixed copyright in helpers.py 2009-04-07 06:48:30 +00:00
Christophe Dumez
d6ca454bad - Forgot to commit those headers 2009-04-05 18:49:27 +00:00
Christophe Dumez
e7581df394 - Fixed typo in novaprinter (Thanks Cristian Greco) 2009-04-05 17:13:03 +00:00
Christophe Dumez
65d763b30b - Cosmetic fix to license
- Updated Changelog
2009-04-05 17:03:17 +00:00
Christophe Dumez
16798879b9 - License fix due to problems with OpenSSL 2009-04-05 17:01:07 +00:00
Christophe Dumez
74ce8fc87e - Added ico favicon support to search engine plugins manager (until now, only png was supported)
- Updated server url for search plugins update (new search engine plugins are not compatible with qBittorrent < v1.3.3)
2009-03-30 21:40:35 +00:00
Christophe Dumez
7dde3423f7 - Updated nova2.py version to force update 2009-03-30 20:32:14 +00:00
Christophe Dumez
4a960a289e - Fix search item download when a column was sorted 2009-03-30 13:43:20 +00:00
Christophe Dumez
aad78a92f6 - Updated Finnish translation 2009-03-30 07:37:13 +00:00
Christophe Dumez
edaad3f605 - fix compilation with Qt <= 4.3 2009-03-28 19:55:44 +00:00
Christophe Dumez
6ef317da16 - bump to v1.3.3 2009-03-27 22:44:06 +00:00
Christophe Dumez
4ba084e7d5 - Torrent downloading is now handled by search engine plugins to allow for more flexibility 2009-03-27 22:29:42 +00:00
Christophe Dumez
6732d2e3de - Removed useless variable 2009-03-27 19:57:11 +00:00
Christophe Dumez
8e5f0404a8 - Force UTF-8 printing to term in search engine for avoid encoding problems 2009-03-27 14:35:35 +00:00
Christophe Dumez
080965f0e5 BUGFIX: Fixed search engine bug that prevented a torrent from appearing more than
once among all tabs
2009-03-27 13:30:21 +00:00
Christophe Dumez
cd9b6ec54e - fix for last commit 2009-03-26 21:00:47 +00:00
Christophe Dumez
e01a87e644 - Removed some debug output 2009-03-26 20:25:28 +00:00
Christophe Dumez
e0cba78dac - Should completely fix unicode problems in search engine 2009-03-26 20:17:14 +00:00
Christophe Dumez
22ff0374d5 - Fixed unicode support in btjunkie and mininova search engines 2009-03-26 16:53:17 +00:00
Christophe Dumez
813f52f452 - forgot to commit this file 2009-03-14 15:23:32 +00:00
Christophe Dumez
2dd376a5b1 BUGFIX: Fixed Web UI torrent upload form 2009-03-12 13:26:12 +00:00
Christophe Dumez
16832d52c0 - Updated changelog 2009-03-06 23:47:20 +00:00
Christophe Dumez
d128b734b0 - Updated splash screen 2009-03-06 23:37:04 +00:00
Christophe Dumez
9a300db87a - BUGFIX: RSS items read status is now remembered upon restart 2009-03-06 23:22:16 +00:00
Christophe Dumez
c6698cbf5a - Added patches for v1.3.2 2009-03-06 22:25:42 +00:00
Christophe Dumez
4c8ecf5459 - Tagged v1.3.x 2009-03-06 22:22:19 +00:00
Christophe Dumez
1a2fdc259c - BUGFIX: Fixed "hide top toolBar" feature 2009-02-04 19:16:56 +00:00
Christophe Dumez
5c3f2f0aed - Updated release date 2009-01-26 15:16:02 +00:00
Christophe Dumez
e0ef409220 - Updated release date 2009-01-26 15:15:19 +00:00
Christophe Dumez
d9199ce836 Moved v1.3.x to its own branch 2009-01-26 15:12:59 +00:00
Christophe Dumez
d78a47ad30 Tagged v1.3.1 release 2009-01-26 15:10:23 +00:00
155 changed files with 23146 additions and 20117 deletions

View File

@@ -17,11 +17,6 @@ Images Authors:
license: GPLv2 license: GPLv2
url: http://ftp.acc.umu.se/pub/GNOME/sources/gnome-icon-theme url: http://ftp.acc.umu.se/pub/GNOME/sources/gnome-icon-theme
* files: src/oxygen/*.png
copyright: Oxygen Icon Theme (KDE)
license: LGPL
url: http://www.oxygen-icons.org
* files: src/Icons/flags/*.png * files: src/Icons/flags/*.png
copyright: Open Clip Art Library copyright: Open Clip Art Library
license: Creative Commons Public Domain Dedication license: Creative Commons Public Domain Dedication

View File

@@ -1,14 +1,10 @@
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.4.0 * Fri Jul 24 2009 - Christophe DUMEZ <chris@qbittorrent.org> - 1.3.5
- FEATURE: Display swarm information in lists - BUGFIX: Made IP filter parser more robust
- FEATURE: Allow to define temporary download folder - BUGFIX: Fixed torrent creation tool
- FEATURE: Display total amount of uploaded data in finished list - BUGFIX: Fixed possible overflow in progress calculation in arborescence.h
- FEATURE: Resizing a column in a search results tab affects all tabs - BUGFIX: Save properties window size, position, columns width and restore them
- FEATURE: Search results tab columns are now remembered upon startup - BUGFIX: Set a minimum default width for NAME column in properties
- FEATURE: Added right click menu in search engine to clear completion history - BUGFIX: Remember visual indexes of columns in transfer lists
- BUGFIX: Provide more helpful explanation when an I/O error occured
- BUGFIX: Stop enforcing UTF-8 and use system locale instead
- COSMETIC: Redesigned program preferences
- COSMETIC: Updated icons set
* Sun Jul 12 2009 - Christophe DUMEZ <chris@qbittorrent.org> - v1.3.4 * Sun Jul 12 2009 - Christophe DUMEZ <chris@qbittorrent.org> - v1.3.4
- BUGFIX: Fixed IP filter file parsing on 64bits - BUGFIX: Fixed IP filter file parsing on 64bits

25
TODO
View File

@@ -1,27 +1,2 @@
See https://blueprints.launchpad.net/qbittorrent/ See https://blueprints.launchpad.net/qbittorrent/
// TODO in v1.4.0
- Display peers information (disabled as a default)
- Automatically move torrent to another directory on completion (disabled as a default)
- Rework program preferences (make easier)
- Provide better errors messages to make debugging easier
// translations done in v1.3.0
- Romanian
- Russian
- Hungarian
- German
- Chinese (traditional)
- Chinese (simplified)
- Italian
- Swedish
- Turkish
- French
- Slovak
- Czech
- Korean
- Portuguese
- Brazilian
- Greek
- Bulgarian
- Finnish

View File

@@ -44,11 +44,9 @@
#define F_NAME 0 #define F_NAME 0
#define F_SIZE 1 #define F_SIZE 1
#define F_UPSPEED 2 #define F_UPSPEED 2
#define F_SWARM 3 #define F_LEECH 3
#define F_PEERS 4 #define F_RATIO 4
#define F_UPLOAD 5 #define F_HASH 5
#define F_RATIO 6
#define F_HASH 7
#define MAX_RATIO 100. #define MAX_RATIO 100.
@@ -64,7 +62,6 @@ class FinishedListDelegate: public QItemDelegate {
QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option); QStyleOptionViewItemV2 opt = QItemDelegate::setOptions(index, option);
switch(index.column()){ switch(index.column()){
case F_SIZE: case F_SIZE:
case F_UPLOAD:
QItemDelegate::drawBackground(painter, opt, index); QItemDelegate::drawBackground(painter, opt, index);
QItemDelegate::drawDisplay(painter, opt, option.rect, misc::friendlyUnit(index.data().toLongLong())); QItemDelegate::drawDisplay(painter, opt, option.rect, misc::friendlyUnit(index.data().toLongLong()));
break; break;

View File

@@ -46,13 +46,11 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
setupUi(this); setupUi(this);
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png"))); actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png"))); actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
finishedListModel = new QStandardItemModel(0,8); finishedListModel = new QStandardItemModel(0,6);
finishedListModel->setHeaderData(F_NAME, Qt::Horizontal, tr("Name", "i.e: file name")); 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_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_UPSPEED, Qt::Horizontal, tr("UP Speed", "i.e: Upload speed"));
finishedListModel->setHeaderData(F_SWARM, Qt::Horizontal, tr("Seeds / Leechers")); finishedListModel->setHeaderData(F_LEECH, Qt::Horizontal, tr("Leechers", "i.e: full/partial sources"));
finishedListModel->setHeaderData(F_PEERS, Qt::Horizontal, tr("Connected peers"));
finishedListModel->setHeaderData(F_UPLOAD, Qt::Horizontal, tr("Total uploaded", "i.e: Total amount of uploaded data"));
finishedListModel->setHeaderData(F_RATIO, Qt::Horizontal, tr("Ratio")); finishedListModel->setHeaderData(F_RATIO, Qt::Horizontal, tr("Ratio"));
finishedList->setModel(finishedListModel); finishedList->setModel(finishedListModel);
finishedList->setRootIsDecorated(false); finishedList->setRootIsDecorated(false);
@@ -92,9 +90,7 @@ FinishedTorrents::FinishedTorrents(QObject *parent, bittorrent *BTSession) : par
connect(actionHOSColName, SIGNAL(triggered()), this, SLOT(hideOrShowColumnName())); connect(actionHOSColName, SIGNAL(triggered()), this, SLOT(hideOrShowColumnName()));
connect(actionHOSColSize, SIGNAL(triggered()), this, SLOT(hideOrShowColumnSize())); connect(actionHOSColSize, SIGNAL(triggered()), this, SLOT(hideOrShowColumnSize()));
connect(actionHOSColUpSpeed, SIGNAL(triggered()), this, SLOT(hideOrShowColumnUpSpeed())); connect(actionHOSColUpSpeed, SIGNAL(triggered()), this, SLOT(hideOrShowColumnUpSpeed()));
connect(actionHOSColSwarm, SIGNAL(triggered()), this, SLOT(hideOrShowColumnSwarm())); connect(actionHOSColLeechers, SIGNAL(triggered()), this, SLOT(hideOrShowColumnLeechers()));
connect(actionHOSColPeers, SIGNAL(triggered()), this, SLOT(hideOrShowColumnPeers()));
connect(actionHOSColUpload, SIGNAL(triggered()), this, SLOT(hideOrShowColumnUpload()));
connect(actionHOSColRatio, SIGNAL(triggered()), this, SLOT(hideOrShowColumnRatio())); connect(actionHOSColRatio, SIGNAL(triggered()), this, SLOT(hideOrShowColumnRatio()));
} }
@@ -121,9 +117,7 @@ void FinishedTorrents::addTorrent(QString hash){
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(h.name())); finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(h.name()));
finishedListModel->setData(finishedListModel->index(row, F_SIZE), QVariant((qlonglong)h.actual_size())); finishedListModel->setData(finishedListModel->index(row, F_SIZE), QVariant((qlonglong)h.actual_size()));
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)0.)); finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)0.));
finishedListModel->setData(finishedListModel->index(row, F_SWARM), QVariant("-1/-1")); finishedListModel->setData(finishedListModel->index(row, F_LEECH), QVariant("0"));
finishedListModel->setData(finishedListModel->index(row, F_PEERS), QVariant("0"));
finishedListModel->setData(finishedListModel->index(row, F_UPLOAD), QVariant((qlonglong)h.all_time_upload()));
finishedListModel->setData(finishedListModel->index(row, F_RATIO), QVariant(QString::fromUtf8(misc::toString(BTSession->getRealRatio(hash)).c_str()))); finishedListModel->setData(finishedListModel->index(row, F_RATIO), QVariant(QString::fromUtf8(misc::toString(BTSession->getRealRatio(hash)).c_str())));
finishedListModel->setData(finishedListModel->index(row, F_HASH), QVariant(hash)); finishedListModel->setData(finishedListModel->index(row, F_HASH), QVariant(hash));
if(h.is_paused()) { if(h.is_paused()) {
@@ -182,6 +176,23 @@ bool FinishedTorrents::loadColWidthFinishedList(){
finishedList->header()->resizeSection(i, width_list.at(i).toInt()); finishedList->header()->resizeSection(i, width_list.at(i).toInt());
} }
loadLastSortedColumn(); loadLastSortedColumn();
QVariantList visualIndexes = settings.value(QString::fromUtf8("FinishedListVisualIndexes"), QVariantList()).toList();
if(visualIndexes.size() != finishedListModel->columnCount()-1) {
qDebug("Corrupted values for download list columns sizes");
return false;
}
bool change = false;
do {
change = false;
for(int i=0;i<visualIndexes.size(); ++i) {
int new_visual_index = visualIndexes.at(finishedList->header()->logicalIndex(i)).toInt();
if(i != new_visual_index) {
qDebug("Moving column from %d to %d", finishedList->header()->logicalIndex(i), new_visual_index);
finishedList->header()->moveSection(i, new_visual_index);
change = true;
}
}
}while(change);
qDebug("Finished list columns width loaded"); qDebug("Finished list columns width loaded");
return true; return true;
} }
@@ -216,7 +227,7 @@ void FinishedTorrents::saveColWidthFinishedList() const{
width_list = line.split(' '); width_list = line.split(' ');
} }
for(short i=0; i<nbColumns; ++i){ for(short i=0; i<nbColumns; ++i){
if(finishedList->columnWidth(i)<1 && width_list.size() == nbColumns && width_list.at(i).toInt()>=1) { if(finishedList->columnWidth(i)<1 && width_list.size() == finishedListModel->columnCount()-1 && width_list.at(i).toInt()>=1) {
// load the former width // load the former width
new_width_list << width_list.at(i); new_width_list << width_list.at(i);
} else if(finishedList->columnWidth(i)>=1) { } else if(finishedList->columnWidth(i)>=1) {
@@ -229,6 +240,11 @@ void FinishedTorrents::saveColWidthFinishedList() const{
} }
} }
settings.setValue("FinishedListColsWidth", new_width_list.join(" ")); settings.setValue("FinishedListColsWidth", new_width_list.join(" "));
QVariantList visualIndexes;
for(int i=0; i<nbColumns; ++i) {
visualIndexes.append(finishedList->header()->visualIndex(i));
}
settings.setValue(QString::fromUtf8("FinishedListVisualIndexes"), visualIndexes);
qDebug("Finished list columns width saved"); qDebug("Finished list columns width saved");
} }
@@ -253,25 +269,22 @@ void FinishedTorrents::updateTorrent(QTorrentHandle h) {
row = getRowFromHash(hash); row = getRowFromHash(hash);
} }
Q_ASSERT(row != -1); Q_ASSERT(row != -1);
if(!finishedList->isColumnHidden(F_SWARM)) {
finishedListModel->setData(finishedListModel->index(row, F_SWARM), misc::toQString(h.num_complete())+QString("/")+misc::toQString(h.num_incomplete()));
}
if(h.is_paused()) return; if(h.is_paused()) return;
// Update queued torrent // Update queued torrent
if(BTSession->isQueueingEnabled() && h.is_queued()) { if(BTSession->isQueueingEnabled() && h.is_queued()) {
if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking){ if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking){
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/oxygen/time.png"))), Qt::DecorationRole); finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
} else { } else {
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/queued.png"))), Qt::DecorationRole); finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/skin/queued.png"))), Qt::DecorationRole);
} }
// Reset upload speed and seeds/leech // Reset upload speed and seeds/leech
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), 0.); finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), 0.);
finishedListModel->setData(finishedListModel->index(row, F_PEERS), "0"); finishedListModel->setData(finishedListModel->index(row, F_LEECH), "0");
setRowColor(row, QString::fromUtf8("grey")); setRowColor(row, QString::fromUtf8("grey"));
return; return;
} }
if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking){ if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking){
finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/oxygen/time.png"))), Qt::DecorationRole); finishedListModel->setData(finishedListModel->index(row, F_NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
setRowColor(row, QString::fromUtf8("grey")); setRowColor(row, QString::fromUtf8("grey"));
return; return;
} }
@@ -280,11 +293,8 @@ void FinishedTorrents::updateTorrent(QTorrentHandle h) {
if(!finishedList->isColumnHidden(F_UPSPEED)) { if(!finishedList->isColumnHidden(F_UPSPEED)) {
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)h.upload_payload_rate())); finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)h.upload_payload_rate()));
} }
if(!finishedList->isColumnHidden(F_PEERS)) { if(!finishedList->isColumnHidden(F_LEECH)) {
finishedListModel->setData(finishedListModel->index(row, F_PEERS), misc::toQString(h.num_peers() - h.num_seeds(), true)); finishedListModel->setData(finishedListModel->index(row, F_LEECH), misc::toQString(h.num_peers() - h.num_seeds(), true));
}
if(!finishedList->isColumnHidden(F_UPLOAD)) {
finishedListModel->setData(finishedListModel->index(row, F_UPLOAD), QVariant((double)h.all_time_upload()));
} }
if(!finishedList->isColumnHidden(F_RATIO)) { if(!finishedList->isColumnHidden(F_RATIO)) {
finishedListModel->setData(finishedListModel->index(row, F_RATIO), QVariant(misc::toQString(BTSession->getRealRatio(hash)))); finishedListModel->setData(finishedListModel->index(row, F_RATIO), QVariant(misc::toQString(BTSession->getRealRatio(hash))));
@@ -308,7 +318,7 @@ void FinishedTorrents::pauseTorrent(QString hash) {
return; return;
finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)0.0)); finishedListModel->setData(finishedListModel->index(row, F_UPSPEED), QVariant((double)0.0));
finishedListModel->setData(finishedListModel->index(row, F_NAME), QIcon(QString::fromUtf8(":/Icons/skin/paused.png")), Qt::DecorationRole); finishedListModel->setData(finishedListModel->index(row, F_NAME), QIcon(QString::fromUtf8(":/Icons/skin/paused.png")), Qt::DecorationRole);
finishedListModel->setData(finishedListModel->index(row, F_PEERS), QVariant(QString::fromUtf8("0"))); finishedListModel->setData(finishedListModel->index(row, F_LEECH), QVariant(QString::fromUtf8("0")));
setRowColor(row, QString::fromUtf8("red")); setRowColor(row, QString::fromUtf8("red"));
} }
@@ -364,7 +374,6 @@ void FinishedTorrents::forceRecheck(){
if(index.column() == F_NAME){ if(index.column() == F_NAME){
QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString(); QString hash = finishedListModel->data(finishedListModel->index(index.row(), F_HASH)).toString();
QTorrentHandle h = BTSession->getTorrentHandle(hash); QTorrentHandle h = BTSession->getTorrentHandle(hash);
qDebug("Forcing recheck for torrent %s", hash.toLocal8Bit().data());
h.force_recheck(); h.force_recheck();
} }
} }
@@ -449,12 +458,12 @@ void FinishedTorrents::hideOrShowColumn(int index) {
if(nbVisibleColumns <= 1) return; if(nbVisibleColumns <= 1) return;
// User can hide the column, do it. // User can hide the column, do it.
finishedList->setColumnHidden(index, true); finishedList->setColumnHidden(index, true);
getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/button_cancel.png"))); getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
--nbVisibleColumns; --nbVisibleColumns;
} else { } else {
// User want to display the column // User want to display the column
finishedList->setColumnHidden(index, false); finishedList->setColumnHidden(index, false);
getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/button_ok.png"))); getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
++nbVisibleColumns; ++nbVisibleColumns;
} }
//resize all others non-hidden columns //resize all others non-hidden columns
@@ -477,16 +486,8 @@ void FinishedTorrents::hideOrShowColumnUpSpeed() {
hideOrShowColumn(F_UPSPEED); hideOrShowColumn(F_UPSPEED);
} }
void FinishedTorrents::hideOrShowColumnSwarm() { void FinishedTorrents::hideOrShowColumnLeechers() {
hideOrShowColumn(F_SWARM); hideOrShowColumn(F_LEECH);
}
void FinishedTorrents::hideOrShowColumnPeers() {
hideOrShowColumn(F_PEERS);
}
void FinishedTorrents::hideOrShowColumnUpload() {
hideOrShowColumn(F_UPLOAD);
} }
void FinishedTorrents::hideOrShowColumnRatio() { void FinishedTorrents::hideOrShowColumnRatio() {
@@ -512,9 +513,9 @@ bool FinishedTorrents::loadHiddenColumns() {
for(int i=0; i<finishedListModel->columnCount()-1; i++) { for(int i=0; i<finishedListModel->columnCount()-1; i++) {
if(loaded && ishidden_list.at(i) == "0") { if(loaded && ishidden_list.at(i) == "0") {
finishedList->setColumnHidden(i, true); finishedList->setColumnHidden(i, true);
getActionHoSCol(i)->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/button_cancel.png"))); getActionHoSCol(i)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
} else { } else {
getActionHoSCol(i)->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/button_ok.png"))); getActionHoSCol(i)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
} }
} }
return loaded; return loaded;
@@ -548,14 +549,8 @@ QAction* FinishedTorrents::getActionHoSCol(int index) {
case F_UPSPEED : case F_UPSPEED :
return actionHOSColUpSpeed; return actionHOSColUpSpeed;
break; break;
case F_SWARM : case F_LEECH :
return actionHOSColSwarm; return actionHOSColLeechers;
break;
case F_PEERS :
return actionHOSColPeers;
break;
case F_UPLOAD :
return actionHOSColUpload;
break; break;
case F_RATIO : case F_RATIO :
return actionHOSColRatio; return actionHOSColRatio;
@@ -579,7 +574,6 @@ void FinishedTorrents::toggleFinishedListSortOrder(int index) {
case F_SIZE: case F_SIZE:
case F_UPSPEED: case F_UPSPEED:
case F_RATIO: case F_RATIO:
case F_UPLOAD:
sortFinishedListFloat(index, sortOrder); sortFinishedListFloat(index, sortOrder);
break; break;
default: default:
@@ -604,8 +598,6 @@ void FinishedTorrents::sortFinishedList(int index, Qt::SortOrder sortOrder){
switch(index) { switch(index) {
case F_SIZE: case F_SIZE:
case F_UPSPEED: case F_UPSPEED:
case F_UPLOAD:
case F_RATIO:
sortFinishedListFloat(index, sortOrder); sortFinishedListFloat(index, sortOrder);
break; break;
default: default:

View File

@@ -79,9 +79,7 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
void hideOrShowColumnName(); void hideOrShowColumnName();
void hideOrShowColumnSize(); void hideOrShowColumnSize();
void hideOrShowColumnUpSpeed(); void hideOrShowColumnUpSpeed();
void hideOrShowColumnSwarm(); void hideOrShowColumnLeechers();
void hideOrShowColumnPeers();
void hideOrShowColumnUpload();
void hideOrShowColumnRatio(); void hideOrShowColumnRatio();
void forceRecheck(); void forceRecheck();

View File

@@ -99,14 +99,14 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
qDebug("Info: System tray unavailable"); qDebug("Info: System tray unavailable");
} }
// Setting icons // Setting icons
this->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/skin/qbittorrent32.png"))); this->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/qbittorrent32.png")));
actionOpen->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/open.png"))); actionOpen->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/open.png")));
actionExit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/exit.png"))); actionExit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/exit.png")));
actionDownload_from_URL->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/url.png"))); actionDownload_from_URL->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/url.png")));
actionOptions->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/settings.png"))); actionOptions->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/settings.png")));
actionAbout->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/info.png"))); actionAbout->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/info.png")));
actionWebsite->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/qbittorrent32.png"))); actionWebsite->setIcon(QIcon(QString::fromUtf8(":/Icons/qbittorrent32.png")));
actionBugReport->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/bug.png"))); actionBugReport->setIcon(QIcon(QString::fromUtf8(":/Icons/newmsg.png")));
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png"))); actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png"))); actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png"))); actionDelete->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete.png")));
@@ -132,7 +132,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
options = new options_imp(this); options = new options_imp(this);
connect(options, SIGNAL(status_changed(bool)), this, SLOT(OptionsSaved(bool))); connect(options, SIGNAL(status_changed(bool)), this, SLOT(OptionsSaved(bool)));
BTSession = new bittorrent(); BTSession = new bittorrent();
connect(BTSession, SIGNAL(fullDiskError(QTorrentHandle&, QString)), this, SLOT(fullDiskError(QTorrentHandle&, QString))); connect(BTSession, SIGNAL(fullDiskError(QTorrentHandle&)), this, SLOT(fullDiskError(QTorrentHandle&)));
connect(BTSession, SIGNAL(finishedTorrent(QTorrentHandle&)), this, SLOT(finishedTorrent(QTorrentHandle&))); connect(BTSession, SIGNAL(finishedTorrent(QTorrentHandle&)), this, SLOT(finishedTorrent(QTorrentHandle&)));
connect(BTSession, SIGNAL(addedTorrent(QTorrentHandle&)), this, SLOT(addedTorrent(QTorrentHandle&))); connect(BTSession, SIGNAL(addedTorrent(QTorrentHandle&)), this, SLOT(addedTorrent(QTorrentHandle&)));
connect(BTSession, SIGNAL(pausedTorrent(QTorrentHandle&)), this, SLOT(pausedTorrent(QTorrentHandle&))); connect(BTSession, SIGNAL(pausedTorrent(QTorrentHandle&)), this, SLOT(pausedTorrent(QTorrentHandle&)));
@@ -249,9 +249,6 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
if(!settings.value(QString::fromUtf8("Preferences/General/StartMinimized"), false).toBool()) { if(!settings.value(QString::fromUtf8("Preferences/General/StartMinimized"), false).toBool()) {
show(); show();
} }
scrapeTimer = new QTimer(this);
connect(scrapeTimer, SIGNAL(timeout()), this, SLOT(scrapeTrackers()));
scrapeTimer->start(20000);
qDebug("GUI Built"); qDebug("GUI Built");
} }
@@ -263,8 +260,6 @@ GUI::~GUI() {
BTSession->saveDHTEntry(); BTSession->saveDHTEntry();
BTSession->saveSessionState(); BTSession->saveSessionState();
BTSession->saveFastResumeData(); BTSession->saveFastResumeData();
scrapeTimer->stop();
delete scrapeTimer;
delete dlSpeedLbl; delete dlSpeedLbl;
delete upSpeedLbl; delete upSpeedLbl;
delete ratioLbl; delete ratioLbl;
@@ -324,16 +319,6 @@ void GUI::displayRSSTab(bool enable) {
} }
} }
void GUI::scrapeTrackers() {
std::vector<torrent_handle> torrents = BTSession->getTorrents();
std::vector<torrent_handle>::iterator torrentIT;
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
QTorrentHandle h = QTorrentHandle(*torrentIT);
if(!h.is_valid()) continue;
h.scrape_tracker();
}
}
void GUI::updateRatio() { void GUI::updateRatio() {
// Update ratio info // Update ratio info
float ratio = 1.; float ratio = 1.;
@@ -433,15 +418,15 @@ void GUI::checkedTorrent(QTorrentHandle& h) const {
} }
// Notification when disk is full // Notification when disk is full
void GUI::fullDiskError(QTorrentHandle& h, QString msg) const { void GUI::fullDiskError(QTorrentHandle& h) const {
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
bool useNotificationBalloons = settings.value(QString::fromUtf8("Preferences/General/NotificationBaloons"), true).toBool(); bool useNotificationBalloons = settings.value(QString::fromUtf8("Preferences/General/NotificationBaloons"), true).toBool();
if(systrayIntegration && useNotificationBalloons) { if(systrayIntegration && useNotificationBalloons) {
myTrayIcon->showMessage(tr("I/O Error", "i.e: Input/Output Error"), tr("An I/O error occured for torrent %1.\n Reason: %2", "e.g: An error occured for torrent xxx.avi.\n Reason: disk is full.").arg(h.name()).arg(msg), QSystemTrayIcon::Critical, TIME_TRAY_BALLOON); myTrayIcon->showMessage(tr("I/O Error", "i.e: Input/Output Error"), tr("An error occured when trying to read or write %1. The disk is probably full, download has been paused", "e.g: An error occured when trying to read or write xxx.avi. The disk is probably full, download has been paused").arg(h.name()), QSystemTrayIcon::Critical, TIME_TRAY_BALLOON);
} }
// Download will be paused by libtorrent. Updating GUI information accordingly // Download will be paused by libtorrent. Updating GUI information accordingly
QString hash = h.hash(); QString hash = h.hash();
qDebug("Full disk error, pausing torrent %s", hash.toLocal8Bit().data()); qDebug("Full disk error, pausing torrent %s", hash.toUtf8().data());
if(h.is_seed()) { if(h.is_seed()) {
// In finished list // In finished list
qDebug("Automatically paused torrent was in finished list"); qDebug("Automatically paused torrent was in finished list");
@@ -685,8 +670,7 @@ void GUI::closeEvent(QCloseEvent *e) {
bool goToSystrayOnExit = settings.value(QString::fromUtf8("Preferences/General/CloseToTray"), false).toBool(); bool goToSystrayOnExit = settings.value(QString::fromUtf8("Preferences/General/CloseToTray"), false).toBool();
if(!force_exit && systrayIntegration && goToSystrayOnExit && !this->isHidden()) { if(!force_exit && systrayIntegration && goToSystrayOnExit && !this->isHidden()) {
hide(); hide();
//e->ignore(); e->ignore();
e->accept();
return; return;
} }
if(settings.value(QString::fromUtf8("Preferences/General/ExitConfirm"), true).toBool() && downloadingTorrentTab->getNbTorrentsInList()) { if(settings.value(QString::fromUtf8("Preferences/General/ExitConfirm"), true).toBool() && downloadingTorrentTab->getNbTorrentsInList()) {
@@ -758,7 +742,7 @@ void GUI::dropEvent(QDropEvent *event) {
bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool(); bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
foreach(QString file, files) { foreach(QString file, files) {
file = file.trimmed().replace(QString::fromUtf8("file://"), QString::fromUtf8(""), Qt::CaseInsensitive); file = file.trimmed().replace(QString::fromUtf8("file://"), QString::fromUtf8(""), Qt::CaseInsensitive);
qDebug("Dropped file %s on download list", file.toLocal8Bit().data()); qDebug("Dropped file %s on download list", file.toUtf8().data());
if(file.startsWith(QString::fromUtf8("http://"), Qt::CaseInsensitive) || file.startsWith(QString::fromUtf8("ftp://"), Qt::CaseInsensitive) || file.startsWith(QString::fromUtf8("https://"), Qt::CaseInsensitive)) { if(file.startsWith(QString::fromUtf8("http://"), Qt::CaseInsensitive) || file.startsWith(QString::fromUtf8("ftp://"), Qt::CaseInsensitive) || file.startsWith(QString::fromUtf8("https://"), Qt::CaseInsensitive)) {
BTSession->downloadFromUrl(file); BTSession->downloadFromUrl(file);
continue; continue;
@@ -775,7 +759,7 @@ void GUI::dropEvent(QDropEvent *event) {
// Decode if we accept drag 'n drop or not // Decode if we accept drag 'n drop or not
void GUI::dragEnterEvent(QDragEnterEvent *event) { void GUI::dragEnterEvent(QDragEnterEvent *event) {
foreach(const QString &mime, event->mimeData()->formats()){ foreach(const QString &mime, event->mimeData()->formats()){
qDebug("mimeData: %s", mime.toLocal8Bit().data()); qDebug("mimeData: %s", mime.toUtf8().data());
} }
if (event->mimeData()->hasFormat(QString::fromUtf8("text/plain")) || event->mimeData()->hasFormat(QString::fromUtf8("text/uri-list"))) { if (event->mimeData()->hasFormat(QString::fromUtf8("text/plain")) || event->mimeData()->hasFormat(QString::fromUtf8("text/uri-list"))) {
event->acceptProposedAction(); event->acceptProposedAction();
@@ -970,11 +954,6 @@ void GUI::configureSession(bool deleteOptions) {
// Downloads // Downloads
// * Save path // * Save path
BTSession->setDefaultSavePath(options->getSavePath()); BTSession->setDefaultSavePath(options->getSavePath());
if(options->isTempPathEnabled()) {
BTSession->setDefaultTempPath(options->getTempPath());
} else {
BTSession->setDefaultTempPath(QString::null);
}
BTSession->preAllocateAllFiles(options->preAllocateAllFiles()); BTSession->preAllocateAllFiles(options->preAllocateAllFiles());
BTSession->startTorrentsInPause(options->addTorrentsInPause()); BTSession->startTorrentsInPause(options->addTorrentsInPause());
// * Scan dir // * Scan dir
@@ -1191,11 +1170,11 @@ void GUI::configureSession(bool deleteOptions) {
// We need this for urllib in search engine plugins // We need this for urllib in search engine plugins
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
char proxystr[512]; char proxystr[512];
snprintf(proxystr, 512, "http_proxy=%s", proxy_str.toLocal8Bit().data()); snprintf(proxystr, 512, "http_proxy=%s", proxy_str.toUtf8().data());
putenv(proxystr); putenv(proxystr);
#else #else
qDebug("HTTP: proxy string: %s", proxy_str.toLocal8Bit().data()); qDebug("HTTP: proxy string: %s", proxy_str.toUtf8().data());
setenv("http_proxy", proxy_str.toLocal8Bit().data(), 1); setenv("http_proxy", proxy_str.toUtf8().data(), 1);
#endif #endif
} else { } else {
qDebug("Disabling search proxy"); qDebug("Disabling search proxy");
@@ -1522,10 +1501,10 @@ void GUI::createSystrayDelayed() {
void GUI::createTrayIcon() { void GUI::createTrayIcon() {
// Tray icon // Tray icon
#ifdef Q_WS_WIN #ifdef Q_WS_WIN
myTrayIcon = new QSystemTrayIcon(QIcon(QString::fromUtf8(":/Icons/skin/qbittorrent16.png")), this); myTrayIcon = new QSystemTrayIcon(QIcon(QString::fromUtf8(":/Icons/qbittorrent16.png")), this);
#endif #endif
#ifndef Q_WS_WIN #ifndef Q_WS_WIN
myTrayIcon = new QSystemTrayIcon(QIcon(QString::fromUtf8(":/Icons/skin/qbittorrent22.png")), this); myTrayIcon = new QSystemTrayIcon(QIcon(QString::fromUtf8(":/Icons/qbittorrent22.png")), this);
#endif #endif
// Tray icon Menu // Tray icon Menu
myTrayIconMenu = new QMenu(this); myTrayIconMenu = new QMenu(this);

View File

@@ -70,7 +70,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
// Bittorrent // Bittorrent
bittorrent *BTSession; bittorrent *BTSession;
QTimer *checkConnect; QTimer *checkConnect;
QTimer *scrapeTimer;
QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers; QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers;
// GUI related // GUI related
QTabWidget *tabs; QTabWidget *tabs;
@@ -140,7 +139,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
void createTrayIcon(); void createTrayIcon();
void updateUnfinishedTorrentNumber(unsigned int nb); void updateUnfinishedTorrentNumber(unsigned int nb);
void updateFinishedTorrentNumber(unsigned int nb); void updateFinishedTorrentNumber(unsigned int nb);
void fullDiskError(QTorrentHandle& h, QString msg) const; void fullDiskError(QTorrentHandle& h) const;
void handleDownloadFromUrlFailure(QString, QString) const; void handleDownloadFromUrlFailure(QString, QString) const;
void createSystrayDelayed(); void createSystrayDelayed();
// Keyboard shortcuts // Keyboard shortcuts
@@ -178,7 +177,6 @@ class GUI : public QMainWindow, private Ui::MainWindow{
bool initWebUi(QString username, QString password, int port); bool initWebUi(QString username, QString password, int port);
void on_actionIncreasePriority_triggered(); void on_actionIncreasePriority_triggered();
void on_actionDecreasePriority_triggered(); void on_actionDecreasePriority_triggered();
void scrapeTrackers();
// Options slots // Options slots
void on_actionOptions_triggered(); void on_actionOptions_triggered();
void OptionsSaved(bool deleteOptions); void OptionsSaved(bool deleteOptions);

BIN
src/Icons/bt_settings.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/Icons/button_cancel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/Icons/button_ok.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/Icons/configure.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

BIN
src/Icons/connection.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 820 B

BIN
src/Icons/description.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 821 B

BIN
src/Icons/download.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 575 B

After

Width:  |  Height:  |  Size: 575 B

View File

Before

Width:  |  Height:  |  Size: 750 B

After

Width:  |  Height:  |  Size: 750 B

View File

Before

Width:  |  Height:  |  Size: 704 B

After

Width:  |  Height:  |  Size: 704 B

BIN
src/Icons/filter.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 998 B

View File

Before

Width:  |  Height:  |  Size: 449 B

After

Width:  |  Height:  |  Size: 449 B

BIN
src/Icons/gear.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
src/Icons/home.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

BIN
src/Icons/log.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 846 B

View File

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 22 KiB

BIN
src/Icons/newmsg.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 796 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 733 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 860 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 892 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 937 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 541 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 813 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

BIN
src/Icons/password.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

BIN
src/Icons/proxy.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@@ -1,6 +1,6 @@
[Desktop Entry] [Desktop Entry]
Categories=Qt;Network;P2P Categories=Qt;Network;P2P
Comment=V1.4.0 Comment=V1.3.5
Exec=qbittorrent %f Exec=qbittorrent %f
GenericName=Bittorrent client GenericName=Bittorrent client
GenericName[bg]=Торент клиент GenericName[bg]=Торент клиент

View File

Before

Width:  |  Height:  |  Size: 965 B

After

Width:  |  Height:  |  Size: 965 B

View File

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

BIN
src/Icons/star.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

BIN
src/Icons/style.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

Before

Width:  |  Height:  |  Size: 739 B

After

Width:  |  Height:  |  Size: 739 B

BIN
src/Icons/systemtray.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

Before

Width:  |  Height:  |  Size: 856 B

After

Width:  |  Height:  |  Size: 856 B

BIN
src/Icons/unavailable.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

View File

Before

Width:  |  Height:  |  Size: 1.7 KiB

After

Width:  |  Height:  |  Size: 1.7 KiB

View File

Before

Width:  |  Height:  |  Size: 765 B

After

Width:  |  Height:  |  Size: 765 B

BIN
src/Icons/wizard.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@@ -1,8 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?> <ui version="4.0" >
<ui version="4.0">
<class>MainWindow</class> <class>MainWindow</class>
<widget class="QMainWindow" name="MainWindow"> <widget class="QMainWindow" name="MainWindow" >
<property name="geometry"> <property name="geometry" >
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
@@ -10,266 +9,263 @@
<height>563</height> <height>563</height>
</rect> </rect>
</property> </property>
<property name="contextMenuPolicy"> <property name="contextMenuPolicy" >
<enum>Qt::CustomContextMenu</enum> <enum>Qt::CustomContextMenu</enum>
</property> </property>
<property name="windowTitle"> <property name="windowTitle" >
<string/> <string/>
</property> </property>
<widget class="QWidget" name="centralwidget"> <widget class="QWidget" name="centralwidget" >
<layout class="QVBoxLayout"/> <layout class="QVBoxLayout" />
</widget> </widget>
<widget class="QMenuBar" name="menubar"> <widget class="QMenuBar" name="menubar" >
<property name="geometry"> <property name="geometry" >
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>914</width> <width>914</width>
<height>23</height> <height>26</height>
</rect> </rect>
</property> </property>
<widget class="QMenu" name="menu_Edit"> <widget class="QMenu" name="menu_Edit" >
<property name="title"> <property name="title" >
<string>&amp;Edit</string> <string>&amp;Edit</string>
</property> </property>
<addaction name="actionStart_All"/> <addaction name="actionStart_All" />
<addaction name="actionPause_All"/> <addaction name="actionPause_All" />
<addaction name="separator"/> <addaction name="separator" />
<addaction name="actionStart"/> <addaction name="actionStart" />
<addaction name="actionPause"/> <addaction name="actionPause" />
<addaction name="separator"/> <addaction name="separator" />
<addaction name="actionTorrent_Properties"/> <addaction name="actionTorrent_Properties" />
<addaction name="separator"/> <addaction name="separator" />
<addaction name="actionDelete"/> <addaction name="actionDelete" />
<addaction name="actionDelete_Permanently"/> <addaction name="actionDelete_Permanently" />
<addaction name="actionDecreasePriority"/> <addaction name="actionDecreasePriority" />
<addaction name="actionIncreasePriority"/> <addaction name="actionIncreasePriority" />
</widget> </widget>
<widget class="QMenu" name="menu_Help"> <widget class="QMenu" name="menu_Help" >
<property name="title"> <property name="title" >
<string>&amp;Help</string> <string>&amp;Help</string>
</property> </property>
<addaction name="actionBugReport"/> <addaction name="actionBugReport" />
<addaction name="actionWebsite"/> <addaction name="actionWebsite" />
<addaction name="actionDocumentation"/> <addaction name="actionDocumentation" />
<addaction name="actionAbout"/> <addaction name="actionAbout" />
</widget> </widget>
<widget class="QMenu" name="menu_Options"> <widget class="QMenu" name="menu_Options" >
<property name="title"> <property name="title" >
<string>Options</string> <string>Options</string>
</property> </property>
<addaction name="actionOptions"/> <addaction name="actionOptions" />
<addaction name="actionShow_console"/> <addaction name="actionShow_console" />
</widget> </widget>
<widget class="QMenu" name="menu_File"> <widget class="QMenu" name="menu_File" >
<property name="title"> <property name="title" >
<string>&amp;File</string> <string>&amp;File</string>
</property> </property>
<addaction name="actionOpen"/> <addaction name="actionOpen" />
<addaction name="actionDownload_from_URL"/> <addaction name="actionDownload_from_URL" />
<addaction name="actionCreate_torrent"/> <addaction name="actionCreate_torrent" />
<addaction name="actionExit"/> <addaction name="actionExit" />
</widget> </widget>
<addaction name="menu_File"/> <addaction name="menu_File" />
<addaction name="menu_Edit"/> <addaction name="menu_Edit" />
<addaction name="menu_Options"/> <addaction name="menu_Options" />
<addaction name="menu_Help"/> <addaction name="menu_Help" />
</widget> </widget>
<widget class="QToolBar" name="toolBar"> <widget class="QToolBar" name="toolBar" >
<property name="enabled"> <property name="enabled" >
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="contextMenuPolicy"> <property name="contextMenuPolicy" >
<enum>Qt::NoContextMenu</enum> <enum>Qt::NoContextMenu</enum>
</property> </property>
<property name="movable"> <property name="movable" >
<bool>false</bool> <bool>false</bool>
</property> </property>
<property name="orientation"> <property name="orientation" >
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
</property> </property>
<property name="iconSize"> <property name="iconSize" >
<size> <size>
<width>32</width> <width>32</width>
<height>32</height> <height>32</height>
</size> </size>
</property> </property>
<property name="floatable"> <property name="floatable" >
<bool>false</bool> <bool>false</bool>
</property> </property>
<attribute name="toolBarArea"> <attribute name="toolBarArea" >
<enum>TopToolBarArea</enum> <enum>TopToolBarArea</enum>
</attribute> </attribute>
<attribute name="toolBarBreak"> <attribute name="toolBarBreak" >
<bool>false</bool> <bool>false</bool>
</attribute> </attribute>
<addaction name="actionOpen"/> <addaction name="actionOpen" />
<addaction name="actionDownload_from_URL"/> <addaction name="actionDownload_from_URL" />
<addaction name="separator"/> <addaction name="separator" />
<addaction name="actionDelete"/> <addaction name="actionDelete" />
<addaction name="actionDelete_Permanently"/> <addaction name="actionDelete_Permanently" />
<addaction name="separator"/> <addaction name="separator" />
<addaction name="actionTorrent_Properties"/> <addaction name="actionTorrent_Properties" />
<addaction name="separator"/> <addaction name="separator" />
<addaction name="actionStart"/> <addaction name="actionStart" />
<addaction name="actionPause"/> <addaction name="actionPause" />
<addaction name="separator"/> <addaction name="separator" />
<addaction name="actionStart_All"/> <addaction name="actionStart_All" />
<addaction name="actionPause_All"/> <addaction name="actionPause_All" />
<addaction name="separator"/> <addaction name="separator" />
<addaction name="actionOptions"/> <addaction name="actionOptions" />
<addaction name="actionDecreasePriority"/> <addaction name="actionDecreasePriority" />
<addaction name="actionIncreasePriority"/> <addaction name="actionIncreasePriority" />
<addaction name="separator"/> <addaction name="separator" />
<addaction name="actionExit"/> <addaction name="actionExit" />
</widget> </widget>
<widget class="QStatusBar" name="statusBar"/> <widget class="QStatusBar" name="statusBar" />
<action name="actionOpen"> <action name="actionOpen" >
<property name="text"> <property name="text" >
<string>Open</string> <string>Open</string>
</property> </property>
</action> </action>
<action name="actionExit"> <action name="actionExit" >
<property name="text"> <property name="text" >
<string>Exit</string> <string>Exit</string>
</property> </property>
</action> </action>
<action name="actionOptions"> <action name="actionOptions" >
<property name="text"> <property name="text" >
<string>Preferences</string> <string>Preferences</string>
</property> </property>
</action> </action>
<action name="actionAbout"> <action name="actionAbout" >
<property name="text"> <property name="text" >
<string>About</string> <string>About</string>
</property> </property>
</action> </action>
<action name="actionStart"> <action name="actionStart" >
<property name="text"> <property name="text" >
<string>Start</string> <string>Start</string>
</property> </property>
</action> </action>
<action name="actionPause"> <action name="actionPause" >
<property name="text"> <property name="text" >
<string>Pause</string> <string>Pause</string>
</property> </property>
</action> </action>
<action name="actionDelete"> <action name="actionDelete" >
<property name="text"> <property name="text" >
<string>Delete</string> <string>Delete</string>
</property> </property>
</action> </action>
<action name="actionPause_All"> <action name="actionPause_All" >
<property name="text"> <property name="text" >
<string>Pause All</string> <string>Pause All</string>
</property> </property>
</action> </action>
<action name="actionStart_All"> <action name="actionStart_All" >
<property name="text"> <property name="text" >
<string>Start All</string> <string>Start All</string>
</property> </property>
</action> </action>
<action name="actionWebsite"> <action name="actionWebsite" >
<property name="text"> <property name="text" >
<string>Visit website</string> <string>Visit website</string>
</property> </property>
</action> </action>
<action name="actionDelete_Permanently"> <action name="actionDelete_Permanently" >
<property name="text"> <property name="text" >
<string>Delete Permanently</string> <string>Delete Permanently</string>
</property> </property>
</action> </action>
<action name="actionTorrent_Properties"> <action name="actionTorrent_Properties" >
<property name="text"> <property name="text" >
<string>Torrent Properties</string> <string>Torrent Properties</string>
</property> </property>
</action> </action>
<action name="actionDownload_from_URL"> <action name="actionDownload_from_URL" >
<property name="text"> <property name="text" >
<string>Download from URL</string> <string>Download from URL</string>
</property> </property>
</action> </action>
<action name="actionCreate_torrent"> <action name="actionCreate_torrent" >
<property name="text"> <property name="text" >
<string>Create torrent</string> <string>Create torrent</string>
</property> </property>
</action> </action>
<action name="actionPreview_file"> <action name="actionPreview_file" >
<property name="text"> <property name="text" >
<string>Preview file</string> <string>Preview file</string>
</property> </property>
</action> </action>
<action name="actionClearLog"> <action name="actionClearLog" >
<property name="text"> <property name="text" >
<string>Clear log</string> <string>Clear log</string>
</property> </property>
</action> </action>
<action name="actionBugReport"> <action name="actionBugReport" >
<property name="text"> <property name="text" >
<string>Report a bug</string> <string>Report a bug</string>
</property> </property>
</action> </action>
<action name="actionSet_upload_limit"> <action name="actionSet_upload_limit" >
<property name="text"> <property name="text" >
<string>Set upload limit</string> <string>Set upload limit</string>
</property> </property>
</action> </action>
<action name="actionSet_download_limit"> <action name="actionSet_download_limit" >
<property name="text"> <property name="text" >
<string>Set download limit</string> <string>Set download limit</string>
</property> </property>
</action> </action>
<action name="actionDocumentation"> <action name="actionDocumentation" >
<property name="text"> <property name="text" >
<string>Documentation</string> <string>Documentation</string>
</property> </property>
</action> </action>
<action name="actionSet_global_download_limit"> <action name="actionSet_global_download_limit" >
<property name="text"> <property name="text" >
<string>Set global download limit</string> <string>Set global download limit</string>
</property> </property>
</action> </action>
<action name="actionSet_global_upload_limit"> <action name="actionSet_global_upload_limit" >
<property name="text"> <property name="text" >
<string>Set global upload limit</string> <string>Set global upload limit</string>
</property> </property>
</action> </action>
<action name="actionDecreasePriority"> <action name="actionDecreasePriority" >
<property name="icon"> <property name="icon" >
<iconset resource="icons.qrc"> <iconset resource="icons.qrc" >:/Icons/skin/decrease.png</iconset>
<normaloff>:/Icons/skin/decrease.png</normaloff>:/Icons/skin/decrease.png</iconset>
</property> </property>
<property name="text"> <property name="text" >
<string>Decrease priority</string> <string>Decrease priority</string>
</property> </property>
<property name="visible"> <property name="visible" >
<bool>false</bool> <bool>false</bool>
</property> </property>
</action> </action>
<action name="actionIncreasePriority"> <action name="actionIncreasePriority" >
<property name="icon"> <property name="icon" >
<iconset resource="icons.qrc"> <iconset resource="icons.qrc" >:/Icons/skin/increase.png</iconset>
<normaloff>:/Icons/skin/increase.png</normaloff>:/Icons/skin/increase.png</iconset>
</property> </property>
<property name="text"> <property name="text" >
<string>Increase priority</string> <string>Increase priority</string>
</property> </property>
<property name="visible"> <property name="visible" >
<bool>false</bool> <bool>false</bool>
</property> </property>
</action> </action>
<action name="actionShow_console"> <action name="actionShow_console" >
<property name="icon"> <property name="icon" >
<iconset resource="icons.qrc"> <iconset resource="icons.qrc" >:/Icons/log.png</iconset>
<normaloff>:/Icons/oxygen/log.png</normaloff>:/Icons/oxygen/log.png</iconset>
</property> </property>
<property name="text"> <property name="text" >
<string>Console</string> <string>Console</string>
</property> </property>
</action> </action>
</widget> </widget>
<resources> <resources>
<include location="icons.qrc"/> <include location="icons.qrc" />
</resources> </resources>
<connections/> <connections/>
</ui> </ui>

View File

@@ -75,36 +75,19 @@ SearchTab::SearchTab(SearchEngine *parent) : QWidget()
connect(resultsBrowser->header(), SIGNAL(sectionPressed(int)), this, SLOT(sortSearchList(int))); connect(resultsBrowser->header(), SIGNAL(sectionPressed(int)), this, SLOT(sortSearchList(int)));
// Load last columns width for search results list // Load last columns width for search results list
if(!loadColWidthResultsList()){ if(!loadColWidthSearchList()){
resultsBrowser->header()->resizeSection(0, 275); resultsBrowser->header()->resizeSection(0, 275);
} }
} }
SearchTab::~SearchTab() { SearchTab::~SearchTab()
{
saveColWidthSearchList();
delete resultsBrowser; delete resultsBrowser;
delete SearchListModel; delete SearchListModel;
delete SearchDelegate; delete SearchDelegate;
} }
QHeaderView* SearchTab::header() const {
return resultsBrowser->header();
}
bool SearchTab::loadColWidthResultsList() {
QSettings settings("qBittorrent", "qBittorrent");
QString line = settings.value("SearchResultsColsWidth", QString()).toString();
if(line.isEmpty())
return false;
QStringList width_list = line.split(' ');
if(width_list.size() < SearchListModel->columnCount())
return false;
unsigned int listSize = width_list.size();
for(unsigned int i=0; i<listSize; ++i){
resultsBrowser->header()->resizeSection(i, width_list.at(i).toInt());
}
return true;
}
QLabel* SearchTab::getCurrentLabel() QLabel* SearchTab::getCurrentLabel()
{ {
return results_lbl; return results_lbl;
@@ -184,3 +167,33 @@ void SearchTab::sortSearchListString(int index, Qt::SortOrder sortOrder){
SearchListModel->removeRows(0, nbRows_old); SearchListModel->removeRows(0, nbRows_old);
} }
// Save columns width in a file to remember them
// (download list)
void SearchTab::saveColWidthSearchList() const{
qDebug("Saving columns width in search list");
QSettings settings("qBittorrent", "qBittorrent");
QStringList width_list;
for(int i=0; i<SearchListModel->columnCount(); ++i){
width_list << misc::toQString(resultsBrowser->columnWidth(i));
}
settings.setValue("SearchListColsWidth", width_list.join(" "));
qDebug("Search list columns width saved");
}
// Load columns width in a file that were saved previously
// (search list)
bool SearchTab::loadColWidthSearchList(){
qDebug("Loading columns width for search list");
QSettings settings("qBittorrent", "qBittorrent");
QString line = settings.value("SearchListColsWidth", QString()).toString();
if(line.isEmpty())
return false;
QStringList width_list = line.split(' ');
if(width_list.size() != SearchListModel->columnCount())
return false;
for(int i=0; i<width_list.size(); ++i){
resultsBrowser->header()->resizeSection(i, width_list.at(i).toInt());
}
qDebug("Search list columns width loaded");
return true;
}

View File

@@ -39,7 +39,6 @@
class SearchListDelegate; class SearchListDelegate;
class SearchEngine; class SearchEngine;
class QTreeView; class QTreeView;
class QHeaderView;
class QStandardItemModel; class QStandardItemModel;
class SearchTab : public QWidget, public Ui::search_engine class SearchTab : public QWidget, public Ui::search_engine
@@ -55,17 +54,16 @@ class SearchTab : public QWidget, public Ui::search_engine
public: public:
SearchTab(SearchEngine *parent); SearchTab(SearchEngine *parent);
~SearchTab(); ~SearchTab();
bool loadColWidthResultsList(); bool loadColWidthSearchList();
QLabel * getCurrentLabel(); QLabel * getCurrentLabel();
QStandardItemModel * getCurrentSearchListModel(); QStandardItemModel * getCurrentSearchListModel();
QTreeView * getCurrentTreeView(); QTreeView * getCurrentTreeView();
void setRowColor(int row, QString color); void setRowColor(int row, QString color);
QHeaderView* header() const;
protected slots: protected slots:
void sortSearchList(int index); void sortSearchList(int index);
void sortSearchListInt(int index, Qt::SortOrder sortOrder); void sortSearchListInt(int index, Qt::SortOrder sortOrder);
void sortSearchListString(int index, Qt::SortOrder sortOrder); void sortSearchListString(int index, Qt::SortOrder sortOrder);
void saveColWidthSearchList() const;
}; };

View File

@@ -46,8 +46,8 @@ class about : public QDialog, private Ui::AboutDlg{
setupUi(this); setupUi(this);
setAttribute(Qt::WA_DeleteOnClose); setAttribute(Qt::WA_DeleteOnClose);
// Set icons // Set icons
logo->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/qbittorrent22.png"))); logo->setPixmap(QPixmap(QString::fromUtf8(":/Icons/qbittorrent22.png")));
mascot_lbl->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/mascot.png"))); mascot_lbl->setPixmap(QPixmap(QString::fromUtf8(":/Icons/mascot.png")));
//Title //Title
lb_name->setText(QString::fromUtf8("<b><h1>")+tr("qBittorrent")+QString::fromUtf8(" "VERSION"</h1></b>")); lb_name->setText(QString::fromUtf8("<b><h1>")+tr("qBittorrent")+QString::fromUtf8(" "VERSION"</h1></b>"));
// Thanks // Thanks

View File

@@ -51,6 +51,8 @@ class torrent_file {
torrent_file(torrent_file *parent, QString path, bool dir, size_type size=0, int index=-1, float progress=0., int priority=1): parent(parent), is_dir(dir), size(size), progress(progress), priority(priority), index(index){ torrent_file(torrent_file *parent, QString path, bool dir, size_type size=0, int index=-1, float progress=0., int priority=1): parent(parent), is_dir(dir), size(size), progress(progress), priority(priority), index(index){
qDebug("created a file with index %d", index); qDebug("created a file with index %d", index);
rel_path = QDir::cleanPath(path); rel_path = QDir::cleanPath(path);
Q_ASSERT(progress >= 0.);
Q_ASSERT(progress <= 1.);
if(parent) { if(parent) {
parent->updateProgress(); parent->updateProgress();
parent->updatePriority(priority); parent->updatePriority(priority);
@@ -75,8 +77,8 @@ class torrent_file {
progress = 0.; progress = 0.;
return; return;
} }
float wanted = 0.; double wanted = 0.;
float done = 0.; double done = 0.;
foreach(const torrent_file *child, children) { foreach(const torrent_file *child, children) {
wanted += child->getSize(); wanted += child->getSize();
done += child->getSize()*child->getProgress(); done += child->getSize()*child->getProgress();
@@ -150,7 +152,7 @@ class torrent_file {
bool removeFromFS(QString saveDir) const { bool removeFromFS(QString saveDir) const {
QString full_path = saveDir + QDir::separator() + rel_path; QString full_path = saveDir + QDir::separator() + rel_path;
if(!QFile::exists(full_path)) { if(!QFile::exists(full_path)) {
qDebug("%s does not exist, no need to remove it", full_path.toLocal8Bit().data()); qDebug("%s does not exist, no need to remove it", full_path.toUtf8().data());
return true; return true;
} }
bool success = true; bool success = true;
@@ -160,11 +162,11 @@ class torrent_file {
success = s && success; success = s && success;
} }
if(is_dir) { if(is_dir) {
qDebug("trying to remove directory: %s", full_path.toLocal8Bit().data()); qDebug("trying to remove directory: %s", full_path.toUtf8().data());
QDir dir(full_path); QDir dir(full_path);
dir.rmdir(full_path); dir.rmdir(full_path);
} else { } else {
qDebug("trying to remove file: %s", full_path.toLocal8Bit().data()); qDebug("trying to remove file: %s", full_path.toUtf8().data());
bool s = QFile::remove(full_path); bool s = QFile::remove(full_path);
success = s && success; success = s && success;
} }
@@ -205,13 +207,13 @@ class arborescence {
} else { } else {
// XXX: Will crash if there is no file in torrent // XXX: Will crash if there is no file in torrent
qDebug("one file in the torrent, setting it as root with index 0"); qDebug("one file in the torrent, setting it as root with index 0");
root = new torrent_file(0, misc::toQString(t.name()), false, fi->size, 0, ((float)fp[0])/t.file_at(0).size, prioritiesTab[0]); root = new torrent_file(0, misc::toQString(t.name()), false, fi->size, 0, ((double)fp[0])/t.file_at(0).size, prioritiesTab[0]);
return; return;
} }
int i = 0; int i = 0;
while(fi != t.end_files()) { while(fi != t.end_files()) {
QString path = QDir::cleanPath(misc::toQString(fi->path.string())); QString path = QDir::cleanPath(misc::toQString(fi->path.string()));
addFile(path, fi->size, i, ((float)fp[i])/t.file_at(i).size, prioritiesTab[i]); addFile(path, fi->size, i, ((double)fp[i])/t.file_at(i).size, prioritiesTab[i]);
fi++; fi++;
++i; ++i;
} }

View File

@@ -260,7 +260,7 @@ unsigned int bittorrent::getUnfinishedPausedTorrentsNb() const {
// Delete a torrent from the session, given its hash // Delete a torrent from the session, given its hash
// permanent = true means that the torrent will be removed from the hard-drive too // permanent = true means that the torrent will be removed from the hard-drive too
void bittorrent::deleteTorrent(QString hash, bool permanent) { void bittorrent::deleteTorrent(QString hash, bool permanent) {
qDebug("Deleting torrent with hash: %s", hash.toLocal8Bit().data()); qDebug("Deleting torrent with hash: %s", hash.toUtf8().data());
QTorrentHandle h = getTorrentHandle(hash); QTorrentHandle h = getTorrentHandle(hash);
if(!h.is_valid()) { if(!h.is_valid()) {
qDebug("/!\\ Error: Invalid handle"); qDebug("/!\\ Error: Invalid handle");
@@ -344,7 +344,7 @@ void bittorrent::loadWebSeeds(QString hash) {
QStringList seeds_to_delete; QStringList seeds_to_delete;
QStringList existing_seeds = h.url_seeds(); QStringList existing_seeds = h.url_seeds();
foreach(const QString &existing_seed, existing_seeds) { foreach(const QString &existing_seed, existing_seeds) {
if(!url_seeds.contains(existing_seed.toLocal8Bit())) { if(!url_seeds.contains(existing_seed.toUtf8())) {
seeds_to_delete << existing_seed; seeds_to_delete << existing_seed;
} }
} }
@@ -372,7 +372,7 @@ QTorrentHandle bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
// create it if it is not // create it if it is not
if(! torrentBackup.exists()) { if(! torrentBackup.exists()) {
if(! torrentBackup.mkpath(torrentBackup.path())) { if(! torrentBackup.mkpath(torrentBackup.path())) {
std::cerr << "Couldn't create the directory: '" << torrentBackup.path().toLocal8Bit().data() << "'\n"; std::cerr << "Couldn't create the directory: '" << torrentBackup.path().toUtf8().data() << "'\n";
exit(1); exit(1);
} }
} }
@@ -382,11 +382,11 @@ QTorrentHandle bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
return h; return h;
} }
Q_ASSERT(!file.startsWith("http://", Qt::CaseInsensitive) && !file.startsWith("https://", Qt::CaseInsensitive) && !file.startsWith("ftp://", Qt::CaseInsensitive)); Q_ASSERT(!file.startsWith("http://", Qt::CaseInsensitive) && !file.startsWith("https://", Qt::CaseInsensitive) && !file.startsWith("ftp://", Qt::CaseInsensitive));
qDebug("Adding %s to download list", file.toLocal8Bit().data()); qDebug("Adding %s to download list", file.toUtf8().data());
boost::intrusive_ptr<torrent_info> t; boost::intrusive_ptr<torrent_info> t;
try { try {
// Getting torrent file informations // Getting torrent file informations
t = new torrent_info(file.toLocal8Bit().data()); t = new torrent_info(file.toUtf8().data());
} catch(std::exception&) { } catch(std::exception&) {
if(!from_url.isNull()) { if(!from_url.isNull()) {
addConsoleMessage(tr("Unable to decode torrent file: '%1'", "e.g: Unable to decode torrent file: '/home/y/xxx.torrent'").arg(from_url), QString::fromUtf8("red")); addConsoleMessage(tr("Unable to decode torrent file: '%1'", "e.g: Unable to decode torrent file: '/home/y/xxx.torrent'").arg(from_url), QString::fromUtf8("red"));
@@ -410,7 +410,7 @@ QTorrentHandle bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
QFileInfo fi(file); QFileInfo fi(file);
QString old_hash = fi.baseName(); QString old_hash = fi.baseName();
if(old_hash != hash){ if(old_hash != hash){
qDebug("* ERROR: Strange, hash changed from %s to %s", old_hash.toLocal8Bit().data(), hash.toLocal8Bit().data()); qDebug("* ERROR: Strange, hash changed from %s to %s", old_hash.toUtf8().data(), hash.toUtf8().data());
} }
} }
// Check if torrent is already in download list // Check if torrent is already in download list
@@ -436,8 +436,8 @@ QTorrentHandle bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
add_torrent_params p; add_torrent_params p;
//Getting fast resume data if existing //Getting fast resume data if existing
std::vector<char> buf; std::vector<char> buf;
qDebug("Trying to load fastresume data: %s", (torrentBackup.path()+QDir::separator()+hash+QString(".fastresume")).toLocal8Bit().data()); qDebug("Trying to load fastresume data: %s", (torrentBackup.path()+QDir::separator()+hash+QString(".fastresume")).toUtf8().data());
if (load_file((torrentBackup.path()+QDir::separator()+hash+QString(".fastresume")).toLocal8Bit().data(), buf) == 0) { if (load_file((torrentBackup.path()+QDir::separator()+hash+QString(".fastresume")).toUtf8().data(), buf) == 0) {
fastResume = true; fastResume = true;
p.resume_data = &buf; p.resume_data = &buf;
qDebug("Successfuly loaded"); qDebug("Successfuly loaded");
@@ -447,14 +447,10 @@ QTorrentHandle bittorrent::addTorrent(QString path, bool fromScanDir, QString fr
QFile savepath_file(misc::qBittorrentPath()+QString::fromUtf8("BT_backup")+QDir::separator()+hash+QString::fromUtf8(".savepath")); QFile savepath_file(misc::qBittorrentPath()+QString::fromUtf8("BT_backup")+QDir::separator()+hash+QString::fromUtf8(".savepath"));
if(!savepath_file.exists()) { if(!savepath_file.exists()) {
savepath_file.open(QIODevice::WriteOnly | QIODevice::Text); savepath_file.open(QIODevice::WriteOnly | QIODevice::Text);
savepath_file.write(savePath.toLocal8Bit()); savepath_file.write(savePath.toUtf8());
savepath_file.close(); savepath_file.close();
} }
if(defaultTempPath.isEmpty()) { p.save_path = savePath.toUtf8().data();
p.save_path = savePath.toLocal8Bit().data();
} else {
p.save_path = defaultTempPath.toLocal8Bit().data();
}
p.ti = t; p.ti = t;
// Preallocate all? // Preallocate all?
if(preAllocateAll) if(preAllocateAll)
@@ -648,7 +644,7 @@ void bittorrent::enableLSD(bool b) {
} }
void bittorrent::loadSessionState() { void bittorrent::loadSessionState() {
boost::filesystem::ifstream ses_state_file((misc::qBittorrentPath()+QString::fromUtf8("ses_state")).toLocal8Bit().data() boost::filesystem::ifstream ses_state_file((misc::qBittorrentPath()+QString::fromUtf8("ses_state")).toUtf8().data()
, std::ios_base::binary); , std::ios_base::binary);
ses_state_file.unsetf(std::ios_base::skipws); ses_state_file.unsetf(std::ios_base::skipws);
s->load_state(bdecode( s->load_state(bdecode(
@@ -659,7 +655,7 @@ void bittorrent::loadSessionState() {
void bittorrent::saveSessionState() { void bittorrent::saveSessionState() {
qDebug("Saving session state to disk..."); qDebug("Saving session state to disk...");
entry session_state = s->state(); entry session_state = s->state();
boost::filesystem::ofstream out((misc::qBittorrentPath()+QString::fromUtf8("ses_state")).toLocal8Bit().data() boost::filesystem::ofstream out((misc::qBittorrentPath()+QString::fromUtf8("ses_state")).toUtf8().data()
, std::ios_base::binary); , std::ios_base::binary);
out.unsetf(std::ios_base::skipws); out.unsetf(std::ios_base::skipws);
bencode(std::ostream_iterator<char>(out), session_state); bencode(std::ostream_iterator<char>(out), session_state);
@@ -672,7 +668,7 @@ bool bittorrent::enableDHT(bool b) {
entry dht_state; entry dht_state;
QString dht_state_path = misc::qBittorrentPath()+QString::fromUtf8("dht_state"); QString dht_state_path = misc::qBittorrentPath()+QString::fromUtf8("dht_state");
if(QFile::exists(dht_state_path)) { if(QFile::exists(dht_state_path)) {
boost::filesystem::ifstream dht_state_file(dht_state_path.toLocal8Bit().data(), std::ios_base::binary); boost::filesystem::ifstream dht_state_file(dht_state_path.toUtf8().data(), std::ios_base::binary);
dht_state_file.unsetf(std::ios_base::skipws); dht_state_file.unsetf(std::ios_base::skipws);
try{ try{
dht_state = bdecode(std::istream_iterator<char>(dht_state_file), std::istream_iterator<char>()); dht_state = bdecode(std::istream_iterator<char>(dht_state_file), std::istream_iterator<char>());
@@ -701,13 +697,13 @@ bool bittorrent::enableDHT(bool b) {
} }
void bittorrent::saveTorrentSpeedLimits(QString hash) { void bittorrent::saveTorrentSpeedLimits(QString hash) {
qDebug("Saving speedLimits file for %s", hash.toLocal8Bit().data()); qDebug("Saving speedLimits file for %s", hash.toUtf8().data());
QTorrentHandle h = getTorrentHandle(hash); QTorrentHandle h = getTorrentHandle(hash);
int download_limit = h.download_limit(); int download_limit = h.download_limit();
int upload_limit = h.upload_limit(); int upload_limit = h.upload_limit();
QFile speeds_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".speedLimits"); QFile speeds_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".speedLimits");
if(!speeds_file.open(QIODevice::WriteOnly | QIODevice::Text)) { if(!speeds_file.open(QIODevice::WriteOnly | QIODevice::Text)) {
qDebug("* Error: Couldn't open speed limits file for torrent: %s", hash.toLocal8Bit().data()); qDebug("* Error: Couldn't open speed limits file for torrent: %s", hash.toUtf8().data());
return; return;
} }
speeds_file.write(misc::toQByteArray(download_limit)+QByteArray(" ")+misc::toQByteArray(upload_limit)); speeds_file.write(misc::toQByteArray(download_limit)+QByteArray(" ")+misc::toQByteArray(upload_limit));
@@ -715,7 +711,7 @@ void bittorrent::saveTorrentSpeedLimits(QString hash) {
} }
void bittorrent::loadTorrentSpeedLimits(QString hash) { void bittorrent::loadTorrentSpeedLimits(QString hash) {
// qDebug("Loading speedLimits file for %s", hash.toLocal8Bit().data()); // qDebug("Loading speedLimits file for %s", hash.toUtf8().data());
QTorrentHandle h = getTorrentHandle(hash); QTorrentHandle h = getTorrentHandle(hash);
QFile speeds_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".speedLimits"); QFile speeds_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".speedLimits");
if(!speeds_file.open(QIODevice::ReadOnly | QIODevice::Text)) { if(!speeds_file.open(QIODevice::ReadOnly | QIODevice::Text)) {
@@ -748,7 +744,7 @@ void bittorrent::loadFilesPriorities(QTorrentHandle &h) {
} }
// Read saved file // Read saved file
if(!pieces_file.open(QIODevice::ReadOnly | QIODevice::Text)) { if(!pieces_file.open(QIODevice::ReadOnly | QIODevice::Text)) {
qDebug("* Error: Couldn't open priorities file: %s", hash.toLocal8Bit().data()); qDebug("* Error: Couldn't open priorities file: %s", hash.toUtf8().data());
return; return;
} }
QByteArray pieces_priorities = pieces_file.readAll(); QByteArray pieces_priorities = pieces_file.readAll();
@@ -835,7 +831,7 @@ void bittorrent::saveFastResumeData() {
// Remove old fastresume file if it exists // Remove old fastresume file if it exists
QFile::remove(torrentBackup.path()+QDir::separator()+ h.hash() + ".fastresume"); QFile::remove(torrentBackup.path()+QDir::separator()+ h.hash() + ".fastresume");
QString file = h.hash()+".fastresume"; QString file = h.hash()+".fastresume";
boost::filesystem::ofstream out(fs::path(torrentBackup.path().toLocal8Bit().data()) / file.toLocal8Bit().data(), std::ios_base::binary); boost::filesystem::ofstream out(fs::path(torrentBackup.path().toUtf8().data()) / file.toUtf8().data(), std::ios_base::binary);
out.unsetf(std::ios_base::skipws); out.unsetf(std::ios_base::skipws);
bencode(std::ostream_iterator<char>(out), *rd->resume_data); bencode(std::ostream_iterator<char>(out), *rd->resume_data);
// Remove torrent from session // Remove torrent from session
@@ -890,7 +886,7 @@ bool bittorrent::isFilePreviewPossible(QString hash) const{
// and add them to download list // and add them to download list
void bittorrent::scanDirectory(QString scan_dir) { void bittorrent::scanDirectory(QString scan_dir) {
FSMutex->lock(); FSMutex->lock();
qDebug("Scanning directory: %s", scan_dir.toLocal8Bit().data()); qDebug("Scanning directory: %s", scan_dir.toUtf8().data());
QDir dir(scan_dir); QDir dir(scan_dir);
QStringList filters; QStringList filters;
filters << "*.torrent"; filters << "*.torrent";
@@ -899,10 +895,10 @@ void bittorrent::scanDirectory(QString scan_dir) {
QString fullPath = dir.path()+QDir::separator()+file; QString fullPath = dir.path()+QDir::separator()+file;
QFile torrent(fullPath); QFile torrent(fullPath);
if(torrent.size() != 0) { if(torrent.size() != 0) {
qDebug("Adding for scan_dir: %s", fullPath.toLocal8Bit().data()); qDebug("Adding for scan_dir: %s", fullPath.toUtf8().data());
addTorrent(fullPath, true); addTorrent(fullPath, true);
} else { } else {
qDebug("Ignoring empty file: %s", fullPath.toLocal8Bit().data()); qDebug("Ignoring empty file: %s", fullPath.toUtf8().data());
} }
} }
FSMutex->unlock(); FSMutex->unlock();
@@ -912,32 +908,6 @@ void bittorrent::setDefaultSavePath(QString savepath) {
defaultSavePath = savepath; defaultSavePath = savepath;
} }
void bittorrent::setDefaultTempPath(QString temppath) {
if(defaultTempPath == temppath)
return;
if(temppath.isEmpty()) {
// Disabling temp dir
// Moving all torrents to their destination folder
std::vector<torrent_handle> torrents = getTorrents();
std::vector<torrent_handle>::iterator torrentIT;
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
QTorrentHandle h = QTorrentHandle(*torrentIT);
if(!h.is_valid()) continue;
h.move_storage(getSavePath(h.hash()));
}
} else {
std::vector<torrent_handle> torrents = getTorrents();
std::vector<torrent_handle>::iterator torrentIT;
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
QTorrentHandle h = QTorrentHandle(*torrentIT);
if(!h.is_valid()) continue;
if(!h.is_seed())
h.move_storage(temppath);
}
}
defaultTempPath = temppath;
}
// Enable directory scanning // Enable directory scanning
void bittorrent::enableDirectoryScanning(QString scan_dir) { void bittorrent::enableDirectoryScanning(QString scan_dir) {
if(!scan_dir.isEmpty()) { if(!scan_dir.isEmpty()) {
@@ -1057,7 +1027,7 @@ bool bittorrent::loadTrackerFile(QString hash) {
} }
void bittorrent::saveTrackerFile(QString hash) { void bittorrent::saveTrackerFile(QString hash) {
qDebug("Saving tracker file for %s", hash.toLocal8Bit().data()); qDebug("Saving tracker file for %s", hash.toUtf8().data());
QDir torrentBackup(misc::qBittorrentPath() + "BT_backup"); QDir torrentBackup(misc::qBittorrentPath() + "BT_backup");
QFile tracker_file(torrentBackup.path()+QDir::separator()+ hash + ".trackers"); QFile tracker_file(torrentBackup.path()+QDir::separator()+ hash + ".trackers");
if(tracker_file.exists()) { if(tracker_file.exists()) {
@@ -1153,17 +1123,8 @@ void bittorrent::readAlerts() {
QFile finished_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".finished"); QFile finished_file(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+hash+".finished");
finished_file.open(QIODevice::WriteOnly | QIODevice::Text); finished_file.open(QIODevice::WriteOnly | QIODevice::Text);
finished_file.close(); finished_file.close();
// Move to download directory if necessary
if(!defaultTempPath.isEmpty()) {
// Check if directory is different
QDir current_dir(h.save_path());
QDir save_dir(getSavePath(h.hash()));
if(current_dir != save_dir) {
h.move_storage(save_dir.path());
}
}
h.save_resume_data(); h.save_resume_data();
qDebug("Received finished alert for %s", h.name().toLocal8Bit().data()); qDebug("Received finished alert for %s", h.name().toUtf8().data());
} }
} }
else if (save_resume_data_alert* p = dynamic_cast<save_resume_data_alert*>(a.get())) { else if (save_resume_data_alert* p = dynamic_cast<save_resume_data_alert*>(a.get())) {
@@ -1173,10 +1134,10 @@ void bittorrent::readAlerts() {
// Delete old fastresume file if necessary // Delete old fastresume file if necessary
if(QFile::exists(file)) if(QFile::exists(file))
QFile::remove(file); QFile::remove(file);
qDebug("Saving fastresume data in %s", file.toLocal8Bit().data()); qDebug("Saving fastresume data in %s", file.toUtf8().data());
if (p->resume_data) if (p->resume_data)
{ {
boost::filesystem::ofstream out(fs::path(torrentBackup.path().toLocal8Bit().data()) / file.toLocal8Bit().data(), std::ios_base::binary); boost::filesystem::ofstream out(fs::path(torrentBackup.path().toUtf8().data()) / file.toUtf8().data(), std::ios_base::binary);
out.unsetf(std::ios_base::skipws); out.unsetf(std::ios_base::skipws);
bencode(std::ostream_iterator<char>(out), *p->resume_data); bencode(std::ostream_iterator<char>(out), *p->resume_data);
} }
@@ -1184,9 +1145,9 @@ void bittorrent::readAlerts() {
else if (file_error_alert* p = dynamic_cast<file_error_alert*>(a.get())) { else if (file_error_alert* p = dynamic_cast<file_error_alert*>(a.get())) {
QTorrentHandle h(p->handle); QTorrentHandle h(p->handle);
h.auto_managed(false); h.auto_managed(false);
std::cerr << "File Error: " << p->message().c_str() << std::endl; qDebug("File Error: %s", p->message().c_str());
if(h.is_valid()) if(h.is_valid())
emit fullDiskError(h, misc::toQString(p->message())); emit fullDiskError(h);
} }
else if (dynamic_cast<listen_failed_alert*>(a.get())) { else if (dynamic_cast<listen_failed_alert*>(a.get())) {
// Level: fatal // Level: fatal
@@ -1213,7 +1174,7 @@ void bittorrent::readAlerts() {
else if (tracker_reply_alert* p = dynamic_cast<tracker_reply_alert*>(a.get())) { else if (tracker_reply_alert* p = dynamic_cast<tracker_reply_alert*>(a.get())) {
QTorrentHandle h(p->handle); QTorrentHandle h(p->handle);
if(h.is_valid()){ if(h.is_valid()){
qDebug("Received a tracker reply from %s", (const char*)h.current_tracker().toLocal8Bit()); qDebug("Received a tracker reply from %s", (const char*)h.current_tracker().toUtf8());
QString hash = h.hash(); QString hash = h.hash();
QHash<QString, QString> errors = trackersErrors.value(hash, QHash<QString, QString>()); QHash<QString, QString> errors = trackersErrors.value(hash, QHash<QString, QString>());
// p->url requires at least libtorrent v0.13.1 // p->url requires at least libtorrent v0.13.1
@@ -1241,7 +1202,7 @@ void bittorrent::readAlerts() {
else if (fastresume_rejected_alert* p = dynamic_cast<fastresume_rejected_alert*>(a.get())) { else if (fastresume_rejected_alert* p = dynamic_cast<fastresume_rejected_alert*>(a.get())) {
QTorrentHandle h(p->handle); QTorrentHandle h(p->handle);
if(h.is_valid()){ if(h.is_valid()){
qDebug("/!\\ Fast resume failed for %s, reason: %s", h.name().toLocal8Bit().data(), p->message().c_str()); qDebug("/!\\ Fast resume failed for %s, reason: %s", h.name().toUtf8().data(), p->message().c_str());
addConsoleMessage(tr("Fast resume data was rejected for torrent %1, checking again...").arg(h.name()), QString::fromUtf8("red")); addConsoleMessage(tr("Fast resume data was rejected for torrent %1, checking again...").arg(h.name()), QString::fromUtf8("red"));
//emit fastResumeDataRejected(h.name()); //emit fastResumeDataRejected(h.name());
} }
@@ -1254,7 +1215,7 @@ void bittorrent::readAlerts() {
QTorrentHandle h(p->handle); QTorrentHandle h(p->handle);
if(h.is_valid()){ if(h.is_valid()){
QString hash = h.hash(); QString hash = h.hash();
qDebug("%s have just finished checking", hash.toLocal8Bit().data()); qDebug("%s have just finished checking", hash.toUtf8().data());
emit torrentFinishedChecking(h); emit torrentFinishedChecking(h);
} }
} }
@@ -1293,7 +1254,7 @@ QString bittorrent::getSavePath(QString hash) {
QDir saveDir(savePath); QDir saveDir(savePath);
if(!saveDir.exists()) { if(!saveDir.exists()) {
if(!saveDir.mkpath(saveDir.path())) { if(!saveDir.mkpath(saveDir.path())) {
std::cerr << "Couldn't create the save directory: " << saveDir.path().toLocal8Bit().data() << "\n"; std::cerr << "Couldn't create the save directory: " << saveDir.path().toUtf8().data() << "\n";
// XXX: handle this better // XXX: handle this better
return QDir::homePath(); return QDir::homePath();
} }
@@ -1359,7 +1320,7 @@ void bittorrent::saveDHTEntry() {
if(DHTEnabled) { if(DHTEnabled) {
try{ try{
entry dht_state = s->dht_state(); entry dht_state = s->dht_state();
boost::filesystem::ofstream out((misc::qBittorrentPath()+QString::fromUtf8("dht_state")).toLocal8Bit().data(), std::ios_base::binary); boost::filesystem::ofstream out((misc::qBittorrentPath()+QString::fromUtf8("dht_state")).toUtf8().data(), std::ios_base::binary);
out.unsetf(std::ios_base::skipws); out.unsetf(std::ios_base::skipws);
bencode(std::ostream_iterator<char>(out), dht_state); bencode(std::ostream_iterator<char>(out), dht_state);
qDebug("DHT entry saved"); qDebug("DHT entry saved");

View File

@@ -60,7 +60,6 @@ class bittorrent : public QObject {
bool DHTEnabled; bool DHTEnabled;
QPointer<downloadThread> downloader; QPointer<downloadThread> downloader;
QString defaultSavePath; QString defaultSavePath;
QString defaultTempPath;
QHash<QString, QHash<QString, QString> > trackersErrors; QHash<QString, QHash<QString, QString> > trackersErrors;
QStringList consoleMessages; QStringList consoleMessages;
QStringList peerBanMessages; QStringList peerBanMessages;
@@ -152,7 +151,6 @@ class bittorrent : public QObject {
void setSessionSettings(session_settings sessionSettings); void setSessionSettings(session_settings sessionSettings);
void startTorrentsInPause(bool b); void startTorrentsInPause(bool b);
void setDefaultSavePath(QString savepath); void setDefaultSavePath(QString savepath);
void setDefaultTempPath(QString temppath);
void applyEncryptionSettings(pe_settings se); void applyEncryptionSettings(pe_settings se);
void loadFilesPriorities(QTorrentHandle& h); void loadFilesPriorities(QTorrentHandle& h);
void setDownloadLimit(QString hash, long val); void setDownloadLimit(QString hash, long val);
@@ -178,7 +176,7 @@ class bittorrent : public QObject {
void pausedTorrent(QTorrentHandle& h); void pausedTorrent(QTorrentHandle& h);
void resumedTorrent(QTorrentHandle& h); void resumedTorrent(QTorrentHandle& h);
void finishedTorrent(QTorrentHandle& h); void finishedTorrent(QTorrentHandle& h);
void fullDiskError(QTorrentHandle& h, QString msg); void fullDiskError(QTorrentHandle& h);
void trackerError(QString hash, QString time, QString msg); void trackerError(QString hash, QString time, QString msg);
void trackerAuthenticationRequired(QTorrentHandle& h); void trackerAuthenticationRequired(QTorrentHandle& h);
void newDownloadedTorrent(QString path, QString url); void newDownloadedTorrent(QString path, QString url);

View File

@@ -13,7 +13,7 @@
<string>qBittorrent console</string> <string>qBittorrent console</string>
</property> </property>
<property name="windowIcon" > <property name="windowIcon" >
<iconset resource="icons.qrc" >:/Icons/oxygen/log.png</iconset> <iconset resource="icons.qrc" >:/Icons/log.png</iconset>
</property> </property>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>
@@ -26,7 +26,7 @@
<string>General</string> <string>General</string>
</attribute> </attribute>
<attribute name="icon" > <attribute name="icon" >
<iconset resource="icons.qrc" >:/Icons/oxygen/log.png</iconset> <iconset resource="icons.qrc" >:/Icons/log.png</iconset>
</attribute> </attribute>
<layout class="QVBoxLayout" > <layout class="QVBoxLayout" >
<item> <item>

View File

@@ -184,7 +184,6 @@ void createtorrent::on_createButton_clicked(){
void createtorrent::handleCreationFailure(QString msg) { void createtorrent::handleCreationFailure(QString msg) {
QMessageBox::information(0, tr("Torrent creation"), tr("Torrent creation was unsuccessful, reason: %1").arg(msg)); QMessageBox::information(0, tr("Torrent creation"), tr("Torrent creation was unsuccessful, reason: %1").arg(msg));
hide();
} }
void createtorrent::handleCreationSuccess(QString path, const char* branch_path) { void createtorrent::handleCreationSuccess(QString path, const char* branch_path) {
@@ -192,7 +191,7 @@ void createtorrent::handleCreationSuccess(QString path, const char* branch_path)
// Create save path file // Create save path file
boost::intrusive_ptr<torrent_info> t; boost::intrusive_ptr<torrent_info> t;
try { try {
t = new torrent_info(path.toLocal8Bit().data()); t = new torrent_info(path.toUtf8().data());
} catch(std::exception&) { } catch(std::exception&) {
QMessageBox::critical(0, tr("Torrent creation"), tr("Created torrent file is invalid. It won't be added to download list.")); QMessageBox::critical(0, tr("Torrent creation"), tr("Created torrent file is invalid. It won't be added to download list."));
return; return;
@@ -205,7 +204,7 @@ void createtorrent::handleCreationSuccess(QString path, const char* branch_path)
emit torrent_to_seed(path); emit torrent_to_seed(path);
} }
QMessageBox::information(0, tr("Torrent creation"), tr("Torrent was created successfully:")+" "+path); QMessageBox::information(0, tr("Torrent creation"), tr("Torrent was created successfully:")+" "+path);
hide(); close();
} }
void createtorrent::updateProgressBar(int progress) { void createtorrent::updateProgressBar(int progress) {
@@ -228,8 +227,12 @@ void torrentCreatorThread::create(QString _input_path, QString _save_path, QStri
start(); start();
} }
void sendProgressUpdateSignal(int i, int num, QDialog *parent){ void sendProgressUpdateSignal(int i, int num, torrentCreatorThread *parent){
((createtorrent*)parent)->updateProgressBar((int)(i*100./(float)num)); parent->sendProgressSignal((int)(i*100./(float)num));
}
void torrentCreatorThread::sendProgressSignal(int progress) {
emit updateProgress(progress);
} }
void torrentCreatorThread::run() { void torrentCreatorThread::run() {
@@ -238,7 +241,7 @@ void torrentCreatorThread::run() {
try { try {
file_storage fs; file_storage fs;
file_pool fp; file_pool fp;
path full_path = complete(path(input_path.toLocal8Bit().data())); path full_path = complete(path(input_path.toUtf8().data()));
// Adding files to the torrent // Adding files to the torrent
add_files(fs, full_path, file_filter); add_files(fs, full_path, file_filter);
if(abort) return; if(abort) return;
@@ -247,25 +250,23 @@ void torrentCreatorThread::run() {
// Add url seeds // Add url seeds
QString seed; QString seed;
foreach(seed, url_seeds){ foreach(seed, url_seeds){
t.add_url_seed(seed.toLocal8Bit().data()); t.add_url_seed(seed.toUtf8().data());
} }
for(int i=0; i<trackers.size(); ++i){ for(int i=0; i<trackers.size(); ++i){
t.add_tracker(trackers.at(i).toLocal8Bit().data()); t.add_tracker(trackers.at(i).toUtf8().data());
} }
if(abort) return; if(abort) return;
// calculate the hash for all pieces // calculate the hash for all pieces
set_piece_hashes(t, full_path.branch_path(), boost::bind<void>(&sendProgressUpdateSignal, _1, t.num_pieces(), parent)); set_piece_hashes(t, full_path.branch_path(), boost::bind<void>(&sendProgressUpdateSignal, _1, t.num_pieces(), this));
// Set qBittorrent as creator and add user comment to // Set qBittorrent as creator and add user comment to
// torrent_info structure // torrent_info structure
t.set_creator(creator_str); t.set_creator(creator_str);
t.set_comment((const char*)comment.toLocal8Bit()); t.set_comment((const char*)comment.toUtf8());
// Is private ? // Is private ?
if(is_private){ t.set_priv(is_private);
t.set_priv(true);
}
if(abort) return; if(abort) return;
// create the torrent and print it to out // create the torrent and print it to out
ofstream out(complete(path((const char*)save_path.toLocal8Bit())), std::ios_base::binary); ofstream out(complete(path((const char*)save_path.toUtf8())), std::ios_base::binary);
bencode(std::ostream_iterator<char>(out), t.generate()); bencode(std::ostream_iterator<char>(out), t.generate());
emit updateProgress(100); emit updateProgress(100);
emit creationSuccess(save_path, full_path.branch_path().string().c_str()); emit creationSuccess(save_path, full_path.branch_path().string().c_str());

View File

@@ -57,6 +57,7 @@ class torrentCreatorThread : public QThread {
wait(); wait();
} }
void create(QString _input_path, QString _save_path, QStringList _trackers, QStringList _url_seeds, QString _comment, bool _is_private, int _piece_size); void create(QString _input_path, QString _save_path, QStringList _trackers, QStringList _url_seeds, QString _comment, bool _is_private, int _piece_size);
void sendProgressSignal(int progress);
protected: protected:
void run(); void run();
@@ -64,6 +65,8 @@ class torrentCreatorThread : public QThread {
signals: signals:
void creationFailure(QString msg); void creationFailure(QString msg);
void creationSuccess(QString path, const char* branch_path); void creationSuccess(QString path, const char* branch_path);
signals:
void updateProgress(int progress); void updateProgress(int progress);
}; };

View File

@@ -92,7 +92,7 @@
<action name="actionOpen_destination_folder" > <action name="actionOpen_destination_folder" >
<property name="icon" > <property name="icon" >
<iconset resource="icons.qrc" > <iconset resource="icons.qrc" >
<normaloff>:/Icons/oxygen/folder.png</normaloff>:/Icons/oxygen/folder.png</iconset> <normaloff>:/Icons/folder.png</normaloff>:/Icons/folder.png</iconset>
</property> </property>
<property name="text" > <property name="text" >
<string>Open destination folder</string> <string>Open destination folder</string>
@@ -173,7 +173,7 @@
<action name="actionForce_recheck" > <action name="actionForce_recheck" >
<property name="icon" > <property name="icon" >
<iconset resource="icons.qrc" > <iconset resource="icons.qrc" >
<normaloff>:/Icons/oxygen/gear.png</normaloff>:/Icons/oxygen/gear.png</iconset> <normaloff>:/Icons/gear.png</normaloff>:/Icons/gear.png</iconset>
</property> </property>
<property name="text" > <property name="text" >
<string>Force recheck</string> <string>Force recheck</string>

View File

@@ -84,7 +84,7 @@ void subDownloadThread::run(){
filePath = tmpfile->fileName(); filePath = tmpfile->fileName();
} }
delete tmpfile; delete tmpfile;
FILE *f = fopen(filePath.toLocal8Bit().data(), "wb"); FILE *f = fopen(filePath.toUtf8().data(), "wb");
if(!f) { if(!f) {
std::cerr << "couldn't open destination file" << "\n"; std::cerr << "couldn't open destination file" << "\n";
return; return;
@@ -93,7 +93,7 @@ void subDownloadThread::run(){
CURLcode res = (CURLcode)-1; CURLcode res = (CURLcode)-1;
curl = curl_easy_init(); curl = curl_easy_init();
if(curl) { if(curl) {
std::string c_url = url.toLocal8Bit().data(); std::string c_url = url.toUtf8().data();
curl_easy_setopt(curl, CURLOPT_URL, c_url.c_str()); curl_easy_setopt(curl, CURLOPT_URL, c_url.c_str());
// SSL support // SSL support
curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0); curl_easy_setopt(curl, CURLOPT_SSL_VERIFYPEER, 0);
@@ -105,8 +105,8 @@ void subDownloadThread::run(){
// Proxy enabled // Proxy enabled
QString IP = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/IP"), "0.0.0.0").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(); QString port = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/Port"), 8080).toString();
qDebug("Using proxy: %s", (IP+QString(":")+port).toLocal8Bit().data()); qDebug("Using proxy: %s", (IP+QString(":")+port).toUtf8().data());
curl_easy_setopt(curl, CURLOPT_PROXYPORT, (IP+QString(":")+port).toLocal8Bit().data()); curl_easy_setopt(curl, CURLOPT_PROXYPORT, (IP+QString(":")+port).toUtf8().data());
// Default proxy type is HTTP, we must change if it is SOCKS5 // Default proxy type is HTTP, we must change if it is SOCKS5
if(intValue%2==0) { if(intValue%2==0) {
qDebug("Proxy is SOCKS5, not HTTP"); qDebug("Proxy is SOCKS5, not HTTP");
@@ -117,7 +117,7 @@ void subDownloadThread::run(){
qDebug("Proxy requires authentication, authenticating"); qDebug("Proxy requires authentication, authenticating");
QString username = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/Username"), 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(); QString password = settings.value(QString::fromUtf8("Preferences/Connection/HTTPProxy/Password"), QString()).toString();
curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, (username+QString(":")+password).toLocal8Bit().data()); curl_easy_setopt(curl, CURLOPT_PROXYUSERPWD, (username+QString(":")+password).toUtf8().data());
} }
} }
// We have to define CURLOPT_WRITEFUNCTION or it will crash on windows // We have to define CURLOPT_WRITEFUNCTION or it will crash on windows
@@ -131,7 +131,7 @@ void subDownloadThread::run(){
curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 1); curl_easy_setopt(curl, CURLOPT_AUTOREFERER, 1);
curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1); curl_easy_setopt(curl, CURLOPT_FOLLOWLOCATION, 1);
curl_easy_setopt(curl, CURLOPT_MAXREDIRS, -1); curl_easy_setopt(curl, CURLOPT_MAXREDIRS, -1);
qDebug("Downloading %s", url.toLocal8Bit().data()); qDebug("Downloading %s", url.toUtf8().data());
if(!abort) if(!abort)
res = curl_easy_perform(curl); res = curl_easy_perform(curl);
/* always cleanup */ /* always cleanup */

View File

@@ -53,8 +53,8 @@ DownloadingTorrents::DownloadingTorrents(QObject *parent, bittorrent *BTSession)
actionSet_download_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/downloading.png"))); actionSet_download_limit->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/downloading.png")));
actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png"))); actionDelete_Permanently->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/delete_perm.png")));
actionTorrent_Properties->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/properties.png"))); actionTorrent_Properties->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/properties.png")));
// tabBottom->setTabIcon(0, QIcon(QString::fromUtf8(":/Icons/oxygen/log.png"))); // tabBottom->setTabIcon(0, QIcon(QString::fromUtf8(":/Icons/log.png")));
// tabBottom->setTabIcon(1, QIcon(QString::fromUtf8(":/Icons/oxygen/filter.png"))); // tabBottom->setTabIcon(1, QIcon(QString::fromUtf8(":/Icons/filter.png")));
// Set Download list model // Set Download list model
DLListModel = new QStandardItemModel(0,10); DLListModel = new QStandardItemModel(0,10);
@@ -327,12 +327,12 @@ void DownloadingTorrents::hideOrShowColumn(int index) {
if(nbVisibleColumns <= 1) return; if(nbVisibleColumns <= 1) return;
// User can hide the column, do it. // User can hide the column, do it.
downloadList->setColumnHidden(index, true); downloadList->setColumnHidden(index, true);
getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/button_cancel.png"))); getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
--nbVisibleColumns; --nbVisibleColumns;
} else { } else {
// User want to display the column // User want to display the column
downloadList->setColumnHidden(index, false); downloadList->setColumnHidden(index, false);
getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/button_ok.png"))); getActionHoSCol(index)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
++nbVisibleColumns; ++nbVisibleColumns;
} }
//resize all others non-hidden columns //resize all others non-hidden columns
@@ -346,9 +346,9 @@ void DownloadingTorrents::hideOrShowColumn(int index) {
void DownloadingTorrents::hidePriorityColumn(bool hide) { void DownloadingTorrents::hidePriorityColumn(bool hide) {
downloadList->setColumnHidden(PRIORITY, hide); downloadList->setColumnHidden(PRIORITY, hide);
if(hide) if(hide)
getActionHoSCol(PRIORITY)->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/button_cancel.png"))); getActionHoSCol(PRIORITY)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
else else
getActionHoSCol(PRIORITY)->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/button_ok.png"))); getActionHoSCol(PRIORITY)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
} }
// save the hidden columns in settings // save the hidden columns in settings
@@ -386,9 +386,9 @@ bool DownloadingTorrents::loadHiddenColumns() {
for(int i=0; i<DLListModel->columnCount()-1; i++) { for(int i=0; i<DLListModel->columnCount()-1; i++) {
if(loaded && ishidden_list.at(i) == "0") { if(loaded && ishidden_list.at(i) == "0") {
downloadList->setColumnHidden(i, true); downloadList->setColumnHidden(i, true);
getActionHoSCol(i)->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/button_cancel.png"))); getActionHoSCol(i)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
} else { } else {
getActionHoSCol(i)->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/button_ok.png"))); getActionHoSCol(i)->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
} }
} }
return loaded; return loaded;
@@ -498,7 +498,7 @@ bool DownloadingTorrents::updateTorrent(QTorrentHandle h) {
DLListModel->setData(DLListModel->index(row, PRIORITY), QVariant((int)BTSession->getDlTorrentPriority(hash))); DLListModel->setData(DLListModel->index(row, PRIORITY), QVariant((int)BTSession->getDlTorrentPriority(hash)));
if(h.is_queued()) { if(h.is_queued()) {
if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking) { if(h.state() == torrent_status::checking_files || h.state() == torrent_status::queued_for_checking) {
DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/oxygen/time.png"))), Qt::DecorationRole); DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
if(!downloadList->isColumnHidden(PROGRESS)) { if(!downloadList->isColumnHidden(PROGRESS)) {
DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress())); DLListModel->setData(DLListModel->index(row, PROGRESS), QVariant((double)h.progress()));
} }
@@ -525,7 +525,7 @@ bool DownloadingTorrents::updateTorrent(QTorrentHandle h) {
switch(h.state()) { switch(h.state()) {
case torrent_status::checking_files: case torrent_status::checking_files:
case torrent_status::queued_for_checking: case torrent_status::queued_for_checking:
DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/oxygen/time.png"))), Qt::DecorationRole); DLListModel->setData(DLListModel->index(row, NAME), QVariant(QIcon(QString::fromUtf8(":/Icons/time.png"))), Qt::DecorationRole);
setRowColor(row, QString::fromUtf8("grey")); setRowColor(row, QString::fromUtf8("grey"));
break; break;
case torrent_status::downloading: case torrent_status::downloading:
@@ -556,13 +556,7 @@ bool DownloadingTorrents::updateTorrent(QTorrentHandle h) {
} }
} }
if(!downloadList->isColumnHidden(SEEDSLEECH)) { if(!downloadList->isColumnHidden(SEEDSLEECH)) {
QString tmp = misc::toQString(h.num_seeds(), true); DLListModel->setData(DLListModel->index(row, SEEDSLEECH), QVariant(misc::toQString(h.num_seeds(), true)+QString::fromUtf8("/")+misc::toQString(h.num_peers() - h.num_seeds(), true)));
if(h.num_complete() >= 0)
tmp.append(QString("(")+misc::toQString(h.num_complete())+QString(")"));
tmp.append(QString("/")+misc::toQString(h.num_peers() - h.num_seeds(), true));
if(h.num_incomplete() >= 0)
tmp.append(QString("(")+misc::toQString(h.num_incomplete())+QString(")"));
DLListModel->setData(DLListModel->index(row, SEEDSLEECH), QVariant(tmp));
} }
if(!downloadList->isColumnHidden(RATIO)) { if(!downloadList->isColumnHidden(RATIO)) {
DLListModel->setData(DLListModel->index(row, RATIO), QVariant(misc::toQString(BTSession->getRealRatio(hash)))); DLListModel->setData(DLListModel->index(row, RATIO), QVariant(misc::toQString(BTSession->getRealRatio(hash))));
@@ -574,7 +568,7 @@ bool DownloadingTorrents::updateTorrent(QTorrentHandle h) {
void DownloadingTorrents::addTorrent(QString hash) { void DownloadingTorrents::addTorrent(QString hash) {
QTorrentHandle h = BTSession->getTorrentHandle(hash); QTorrentHandle h = BTSession->getTorrentHandle(hash);
int row = getRowFromHash(hash); int row = getRowFromHash(hash);
qDebug("DL: addTorrent(): %s, row: %d", (const char*)hash.toLocal8Bit(), row); qDebug("DL: addTorrent(): %s, row: %d", (const char*)hash.toUtf8(), row);
if(row != -1) return; if(row != -1) return;
row = DLListModel->rowCount(); row = DLListModel->rowCount();
// Adding torrent to download list // Adding torrent to download list
@@ -725,7 +719,7 @@ void DownloadingTorrents::saveColWidthDLList() const{
width_list = line.split(' '); width_list = line.split(' ');
} }
for(short i=0; i<nbColumns; ++i){ for(short i=0; i<nbColumns; ++i){
if(downloadList->columnWidth(i)<1 && width_list.size() == nbColumns && width_list.at(i).toInt()>=1) { if(downloadList->columnWidth(i)<1 && width_list.size() == DLListModel->columnCount()-1 && width_list.at(i).toInt()>=1) {
// load the former width // load the former width
new_width_list << width_list.at(i); new_width_list << width_list.at(i);
} else if(downloadList->columnWidth(i)>=1) { } else if(downloadList->columnWidth(i)>=1) {
@@ -738,6 +732,11 @@ void DownloadingTorrents::saveColWidthDLList() const{
} }
} }
settings.setValue(QString::fromUtf8("DownloadListColsWidth"), new_width_list.join(QString::fromUtf8(" "))); settings.setValue(QString::fromUtf8("DownloadListColsWidth"), new_width_list.join(QString::fromUtf8(" ")));
QVariantList visualIndexes;
for(int i=0; i<nbColumns; ++i) {
visualIndexes.append(downloadList->header()->visualIndex(i));
}
settings.setValue(QString::fromUtf8("DownloadListVisualIndexes"), visualIndexes);
qDebug("Download list columns width saved"); qDebug("Download list columns width saved");
} }
@@ -758,6 +757,23 @@ bool DownloadingTorrents::loadColWidthDLList() {
for(unsigned int i=0; i<listSize; ++i) { for(unsigned int i=0; i<listSize; ++i) {
downloadList->header()->resizeSection(i, width_list.at(i).toInt()); downloadList->header()->resizeSection(i, width_list.at(i).toInt());
} }
QVariantList visualIndexes = settings.value(QString::fromUtf8("DownloadListVisualIndexes"), QVariantList()).toList();
if(visualIndexes.size() != DLListModel->columnCount()-1) {
qDebug("Corrupted values for download list columns sizes");
return false;
}
bool change = false;
do {
change = false;
for(int i=0;i<visualIndexes.size(); ++i) {
int new_visual_index = visualIndexes.at(downloadList->header()->logicalIndex(i)).toInt();
if(i != new_visual_index) {
qDebug("Moving column from %d to %d", downloadList->header()->logicalIndex(i), new_visual_index);
downloadList->header()->moveSection(i, new_visual_index);
change = true;
}
}
}while(change);
qDebug("Download list columns width loaded"); qDebug("Download list columns width loaded");
return true; return true;
} }

View File

@@ -57,8 +57,8 @@ engineSelectDlg::engineSelectDlg(QWidget *parent) : QDialog(parent) {
pluginsTree->header()->resizeSection(0, 170); pluginsTree->header()->resizeSection(0, 170);
pluginsTree->header()->resizeSection(1, 220); pluginsTree->header()->resizeSection(1, 220);
pluginsTree->hideColumn(ENGINE_ID); pluginsTree->hideColumn(ENGINE_ID);
actionEnable->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/button_ok.png"))); actionEnable->setIcon(QIcon(QString::fromUtf8(":/Icons/button_ok.png")));
actionDisable->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/button_cancel.png"))); actionDisable->setIcon(QIcon(QString::fromUtf8(":/Icons/button_cancel.png")));
actionUninstall->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/remove.png"))); actionUninstall->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/remove.png")));
connect(actionEnable, SIGNAL(triggered()), this, SLOT(enableSelection())); connect(actionEnable, SIGNAL(triggered()), this, SLOT(enableSelection()));
connect(actionDisable, SIGNAL(triggered()), this, SLOT(disableSelection())); connect(actionDisable, SIGNAL(triggered()), this, SLOT(disableSelection()));
@@ -85,7 +85,7 @@ void engineSelectDlg::dropEvent(QDropEvent *event) {
QStringList files=event->mimeData()->text().split(QString::fromUtf8("\n")); QStringList files=event->mimeData()->text().split(QString::fromUtf8("\n"));
QString file; QString file;
foreach(file, files) { foreach(file, files) {
qDebug("dropped %s", file.toLocal8Bit().data()); qDebug("dropped %s", file.toUtf8().data());
file = file.replace("file://", ""); file = file.replace("file://", "");
if(file.startsWith("http://", Qt::CaseInsensitive) || file.startsWith("https://", Qt::CaseInsensitive) || file.startsWith("ftp://", Qt::CaseInsensitive)) { if(file.startsWith("http://", Qt::CaseInsensitive) || file.startsWith("https://", Qt::CaseInsensitive) || file.startsWith("ftp://", Qt::CaseInsensitive)) {
downloader->downloadUrl(file); downloader->downloadUrl(file);
@@ -108,7 +108,7 @@ void engineSelectDlg::dropEvent(QDropEvent *event) {
void engineSelectDlg::dragEnterEvent(QDragEnterEvent *event) { void engineSelectDlg::dragEnterEvent(QDragEnterEvent *event) {
QString mime; QString mime;
foreach(mime, event->mimeData()->formats()){ foreach(mime, event->mimeData()->formats()){
qDebug("mimeData: %s", mime.toLocal8Bit().data()); qDebug("mimeData: %s", mime.toUtf8().data());
} }
if (event->mimeData()->hasFormat(QString::fromUtf8("text/plain")) || event->mimeData()->hasFormat(QString::fromUtf8("text/uri-list"))) { if (event->mimeData()->hasFormat(QString::fromUtf8("text/plain")) || event->mimeData()->hasFormat(QString::fromUtf8("text/uri-list"))) {
event->acceptProposedAction(); event->acceptProposedAction();
@@ -123,7 +123,7 @@ void engineSelectDlg::saveSettings() {
foreach(engine, installed_engines.keys()) { foreach(engine, installed_engines.keys()) {
known_engines << engine; known_engines << engine;
known_enginesEnabled << QVariant(installed_engines.value(engine, true)); known_enginesEnabled << QVariant(installed_engines.value(engine, true));
qDebug("Engine %s has state: %d", engine.toLocal8Bit().data(), installed_engines.value(engine, true)); qDebug("Engine %s has state: %d", engine.toUtf8().data(), installed_engines.value(engine, true));
} }
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent")); QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
settings.setValue(QString::fromUtf8("SearchEngines/knownEngines"), known_engines); settings.setValue(QString::fromUtf8("SearchEngines/knownEngines"), known_engines);
@@ -264,7 +264,7 @@ bool engineSelectDlg::checkInstalled(QString plugin_name) const {
result = result.replace("\r", ""); result = result.replace("\r", "");
result = result.replace("\n", ""); result = result.replace("\n", "");
QList<QByteArray> plugins_list = result.split(','); QList<QByteArray> plugins_list = result.split(',');
return plugins_list.contains(plugin_name.toLocal8Bit()); return plugins_list.contains(plugin_name.toUtf8());
} }
void engineSelectDlg::loadSupportedSearchEngines(bool first) { void engineSelectDlg::loadSupportedSearchEngines(bool first) {
@@ -379,7 +379,7 @@ bool engineSelectDlg::isUpdateNeeded(QString plugin_name, float new_version) con
void engineSelectDlg::installZipPlugin(QString path) { void engineSelectDlg::installZipPlugin(QString path) {
QStringList plugins; QStringList plugins;
QStringList favicons; QStringList favicons;
ZZIP_DIR* dir = zzip_dir_open(path.toLocal8Bit().data(), 0); ZZIP_DIR* dir = zzip_dir_open(path.toUtf8().data(), 0);
if(!dir) { if(!dir) {
QMessageBox::warning(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("Search engine plugin archive could not be read.")); QMessageBox::warning(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("Search engine plugin archive could not be read."));
return; return;
@@ -412,8 +412,8 @@ void engineSelectDlg::installZipPlugin(QString path) {
foreach(plugin, plugins) { foreach(plugin, plugins) {
QString plugin_name = plugin.split(QDir::separator()).last(); QString plugin_name = plugin.split(QDir::separator()).last();
plugin_name.chop(3); // Remove .py extension plugin_name.chop(3); // Remove .py extension
qDebug("Detected plugin %s in archive", plugin_name.toLocal8Bit().data()); qDebug("Detected plugin %s in archive", plugin_name.toUtf8().data());
ZZIP_FILE* fp = zzip_file_open(dir, plugin.toLocal8Bit().data(), 0); ZZIP_FILE* fp = zzip_file_open(dir, plugin.toUtf8().data(), 0);
if(fp) { if(fp) {
QTemporaryFile *tmpfile = new QTemporaryFile(); QTemporaryFile *tmpfile = new QTemporaryFile();
QString tmpPath; QString tmpPath;
@@ -430,7 +430,7 @@ void engineSelectDlg::installZipPlugin(QString path) {
tmpfile->close(); tmpfile->close();
} else { } else {
qDebug("Could not open tmp file"); qDebug("Could not open tmp file");
QMessageBox::warning(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin could not be installed.", "%1 is the name of the search engine").arg(plugin_name.toLocal8Bit().data())); QMessageBox::warning(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin could not be installed.", "%1 is the name of the search engine").arg(plugin_name.toUtf8().data()));
delete tmpfile; delete tmpfile;
continue; continue;
} }
@@ -441,12 +441,12 @@ void engineSelectDlg::installZipPlugin(QString path) {
qDebug("Deleted tmpfile"); qDebug("Deleted tmpfile");
} else { } else {
qDebug("Cannot read file in archive"); qDebug("Cannot read file in archive");
QMessageBox::warning(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin could not be installed.", "%1 is the name of the search engine").arg(plugin_name.toLocal8Bit().data())); QMessageBox::warning(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin could not be installed.", "%1 is the name of the search engine").arg(plugin_name.toUtf8().data()));
} }
} }
QString favicon; QString favicon;
foreach(favicon, favicons) { foreach(favicon, favicons) {
qDebug("Detected favicon %s in archive", favicon.toLocal8Bit().data()); qDebug("Detected favicon %s in archive", favicon.toUtf8().data());
// Ok we have a favicon here // Ok we have a favicon here
QString plugin_name = favicon.split(QDir::separator()).last(); QString plugin_name = favicon.split(QDir::separator()).last();
plugin_name.chop(4); // Remove .png extension plugin_name.chop(4); // Remove .png extension
@@ -457,7 +457,7 @@ void engineSelectDlg::installZipPlugin(QString path) {
if(QFile::exists(iconPath)) { if(QFile::exists(iconPath)) {
QFile::remove(iconPath); QFile::remove(iconPath);
} }
ZZIP_FILE* fp = zzip_file_open(dir, favicon.toLocal8Bit().data(), 0); ZZIP_FILE* fp = zzip_file_open(dir, favicon.toUtf8().data(), 0);
if(fp) { if(fp) {
QFile dest_icon(iconPath); QFile dest_icon(iconPath);
// Write icon // Write icon
@@ -482,12 +482,12 @@ void engineSelectDlg::installZipPlugin(QString path) {
#endif #endif
void engineSelectDlg::installPlugin(QString path, QString plugin_name) { void engineSelectDlg::installPlugin(QString path, QString plugin_name) {
qDebug("Asked to install plugin at %s", path.toLocal8Bit().data()); qDebug("Asked to install plugin at %s", path.toUtf8().data());
float new_version = misc::getPluginVersion(path); float new_version = misc::getPluginVersion(path);
qDebug("Version to be installed: %.2f", new_version); qDebug("Version to be installed: %.2f", new_version);
if(!isUpdateNeeded(plugin_name, new_version)) { if(!isUpdateNeeded(plugin_name, new_version)) {
qDebug("Apparently update it not needed, we have a more recent version"); qDebug("Apparently update it not needed, we have a more recent version");
QMessageBox::information(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("A more recent version of %1 search engine plugin is already installed.", "%1 is the name of the search engine").arg(plugin_name.toLocal8Bit().data())); QMessageBox::information(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("A more recent version of %1 search engine plugin is already installed.", "%1 is the name of the search engine").arg(plugin_name.toUtf8().data()));
return; return;
} }
// Process with install // Process with install
@@ -509,12 +509,12 @@ void engineSelectDlg::installPlugin(QString path, QString plugin_name) {
// restore backup // restore backup
QFile::copy(dest_path+".bak", dest_path); QFile::copy(dest_path+".bak", dest_path);
QFile::remove(dest_path+".bak"); QFile::remove(dest_path+".bak");
QMessageBox::warning(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin could not be updated, keeping old version.", "%1 is the name of the search engine").arg(plugin_name.toLocal8Bit().data())); QMessageBox::warning(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin could not be updated, keeping old version.", "%1 is the name of the search engine").arg(plugin_name.toUtf8().data()));
return; return;
} else { } else {
// Remove broken file // Remove broken file
QFile::remove(dest_path); QFile::remove(dest_path);
QMessageBox::warning(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin could not be installed.", "%1 is the name of the search engine").arg(plugin_name.toLocal8Bit().data())); QMessageBox::warning(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin could not be installed.", "%1 is the name of the search engine").arg(plugin_name.toUtf8().data()));
return; return;
} }
} }
@@ -525,10 +525,10 @@ void engineSelectDlg::installPlugin(QString path, QString plugin_name) {
// Refresh plugin list // Refresh plugin list
loadSupportedSearchEngines(); loadSupportedSearchEngines();
if(update) { if(update) {
QMessageBox::information(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin was successfully updated.", "%1 is the name of the search engine").arg(plugin_name.toLocal8Bit().data())); QMessageBox::information(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin was successfully updated.", "%1 is the name of the search engine").arg(plugin_name.toUtf8().data()));
return; return;
} else { } else {
QMessageBox::information(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin was successfully installed.", "%1 is the name of the search engine").arg(plugin_name.toLocal8Bit().data())); QMessageBox::information(this, tr("Search plugin install")+" -- "+tr("qBittorrent"), tr("%1 search engine plugin was successfully installed.", "%1 is the name of the search engine").arg(plugin_name.toUtf8().data()));
return; return;
} }
} }
@@ -595,17 +595,17 @@ bool engineSelectDlg::parseVersionsFile(QString versions_file, QString updateSer
plugin_name.chop(1); // remove trailing ':' plugin_name.chop(1); // remove trailing ':'
bool ok; bool ok;
float version = list.last().toFloat(&ok); float version = list.last().toFloat(&ok);
qDebug("read line %s: %.2f", plugin_name.toLocal8Bit().data(), version); qDebug("read line %s: %.2f", plugin_name.toUtf8().data(), version);
if(!ok) continue; if(!ok) continue;
file_correct = true; file_correct = true;
if(isUpdateNeeded(plugin_name, version)) { if(isUpdateNeeded(plugin_name, version)) {
qDebug("Plugin: %s is outdated", plugin_name.toLocal8Bit().data()); qDebug("Plugin: %s is outdated", plugin_name.toUtf8().data());
// Downloading update // Downloading update
downloader->downloadUrl(updateServer+plugin_name+".pyqBT"); // Actually this is really a .py downloader->downloadUrl(updateServer+plugin_name+".pyqBT"); // Actually this is really a .py
downloader->downloadUrl(updateServer+plugin_name+".png"); downloader->downloadUrl(updateServer+plugin_name+".png");
updated = true; updated = true;
}else { }else {
qDebug("Plugin: %s is up to date", plugin_name.toLocal8Bit().data()); qDebug("Plugin: %s is up to date", plugin_name.toUtf8().data());
} }
} }
// Close file // Close file
@@ -619,7 +619,7 @@ bool engineSelectDlg::parseVersionsFile(QString versions_file, QString updateSer
} }
void engineSelectDlg::processDownloadedFile(QString url, QString filePath) { void engineSelectDlg::processDownloadedFile(QString url, QString filePath) {
qDebug("engineSelectDlg received %s", url.toLocal8Bit().data()); qDebug("engineSelectDlg received %s", url.toUtf8().data());
if(url.endsWith("favicon.ico", Qt::CaseInsensitive)){ if(url.endsWith("favicon.ico", Qt::CaseInsensitive)){
// Icon downloaded // Icon downloaded
QImage fileIcon; QImage fileIcon;
@@ -677,7 +677,7 @@ void engineSelectDlg::processDownloadedFile(QString url, QString filePath) {
void engineSelectDlg::handleDownloadFailure(QString url, QString reason) { void engineSelectDlg::handleDownloadFailure(QString url, QString reason) {
if(url.endsWith("favicon.ico", Qt::CaseInsensitive)){ if(url.endsWith("favicon.ico", Qt::CaseInsensitive)){
qDebug("Could not download favicon: %s, reason: %s", url.toLocal8Bit().data(), reason.toLocal8Bit().data()); qDebug("Could not download favicon: %s, reason: %s", url.toUtf8().data(), reason.toUtf8().data());
return; return;
} }
if(url == "http://www.dchris.eu/search_engine2/versions.txt") { if(url == "http://www.dchris.eu/search_engine2/versions.txt") {
@@ -695,13 +695,13 @@ void engineSelectDlg::handleDownloadFailure(QString url, QString reason) {
QString plugin_name = url.split('/').last(); QString plugin_name = url.split('/').last();
plugin_name.replace(".pyqBT", "", Qt::CaseInsensitive); plugin_name.replace(".pyqBT", "", Qt::CaseInsensitive);
plugin_name.replace(".py", "", Qt::CaseInsensitive); plugin_name.replace(".py", "", Qt::CaseInsensitive);
QMessageBox::warning(this, tr("Search plugin update")+" -- "+tr("qBittorrent"), tr("Sorry, %1 search plugin install failed.", "%1 is the name of the search engine").arg(plugin_name.toLocal8Bit().data())); QMessageBox::warning(this, tr("Search plugin update")+" -- "+tr("qBittorrent"), tr("Sorry, %1 search plugin install failed.", "%1 is the name of the search engine").arg(plugin_name.toUtf8().data()));
} }
#ifdef HAVE_ZZIP #ifdef HAVE_ZZIP
if(url.endsWith(".zip", Qt::CaseInsensitive)) { if(url.endsWith(".zip", Qt::CaseInsensitive)) {
QString plugin_name = url.split('/').last(); QString plugin_name = url.split('/').last();
plugin_name.replace(".zip", "", Qt::CaseInsensitive); plugin_name.replace(".zip", "", Qt::CaseInsensitive);
QMessageBox::warning(this, tr("Search plugin update")+" -- "+tr("qBittorrent"), tr("Sorry, %1 search plugin install failed.", "%1 is the name of the search engine").arg(plugin_name.toLocal8Bit().data())); QMessageBox::warning(this, tr("Search plugin update")+" -- "+tr("qBittorrent"), tr("Sorry, %1 search plugin install failed.", "%1 is the name of the search engine").arg(plugin_name.toUtf8().data()));
} }
#endif #endif
} }

View File

@@ -191,17 +191,21 @@ class FilterParserThread : public QThread {
if(IPv4) { if(IPv4) {
//IPv4 addresses //IPv4 addresses
IP = strStartIP.split('.'); IP = strStartIP.split('.');
if(IP.size() != 4)
throw exception();
address_v4 start((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt()); address_v4 start((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt());
IP = strEndIP.split('.'); IP = strEndIP.split('.');
if(IP.size() != 4)
throw exception();
address_v4 last((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt()); address_v4 last((IP.at(0).toUInt() << 24) + (IP.at(1).toUInt() << 16) + (IP.at(2).toUInt() << 8) + IP.at(3).toUInt());
// Apply to bittorrent session // Apply to bittorrent session
filter.add_rule(start, last, ip_filter::blocked); filter.add_rule(start, last, ip_filter::blocked);
} else { } else {
// IPv6, ex : 1fff:0000:0a88:85a3:0000:0000:ac1f:8001 // IPv6, ex : 1fff:0000:0a88:85a3:0000:0000:ac1f:8001
IP = strStartIP.split(':'); IP = strStartIP.split(':');
address_v6 start = address_v6::from_string(strStartIP.remove(':', 0).toLocal8Bit().data()); address_v6 start = address_v6::from_string(strStartIP.remove(':', 0).toUtf8().data());
IP = strEndIP.split(':'); IP = strEndIP.split(':');
address_v6 last = address_v6::from_string(strEndIP.remove(':', 0).toLocal8Bit().data()); address_v6 last = address_v6::from_string(strEndIP.remove(':', 0).toUtf8().data());
// Apply to bittorrent session // Apply to bittorrent session
filter.add_rule(start, last, ip_filter::blocked); filter.add_rule(start, last, ip_filter::blocked);
} }

View File

@@ -56,12 +56,12 @@ HttpConnection::~HttpConnection()
} }
void HttpConnection::processDownloadedFile(QString url, QString file_path) { void HttpConnection::processDownloadedFile(QString url, QString file_path) {
qDebug("URL %s successfully downloaded !", (const char*)url.toLocal8Bit()); qDebug("URL %s successfully downloaded !", (const char*)url.toUtf8());
emit torrentReadyToBeDownloaded(file_path, false, url, false); emit torrentReadyToBeDownloaded(file_path, false, url, false);
} }
void HttpConnection::handleDownloadFailure(QString url, QString reason) { void HttpConnection::handleDownloadFailure(QString url, QString reason) {
std::cerr << "Could not download " << (const char*)url.toLocal8Bit() << ", reason: " << (const char*)reason.toLocal8Bit() << "\n"; std::cerr << "Could not download " << (const char*)url.toUtf8() << ", reason: " << (const char*)reason.toUtf8() << "\n";
} }
void HttpConnection::read() void HttpConnection::read()
@@ -103,7 +103,7 @@ void HttpConnection::respond()
{ {
//qDebug("Respond called"); //qDebug("Respond called");
QStringList auth = parser.value("Authorization").split(" ", QString::SkipEmptyParts); QStringList auth = parser.value("Authorization").split(" ", QString::SkipEmptyParts);
if (auth.size() != 2 || QString::compare(auth[0], "Basic", Qt::CaseInsensitive) != 0 || !parent->isAuthorized(auth[1].toLocal8Bit())) if (auth.size() != 2 || QString::compare(auth[0], "Basic", Qt::CaseInsensitive) != 0 || !parent->isAuthorized(auth[1].toUtf8()))
{ {
generator.setStatusLine(401, "Unauthorized"); generator.setStatusLine(401, "Unauthorized");
generator.setValue("WWW-Authenticate", "Basic realm=\"you know what\""); generator.setValue("WWW-Authenticate", "Basic realm=\"you know what\"");
@@ -187,7 +187,7 @@ void HttpConnection::respondCommand(QString command)
foreach(QString url, list){ foreach(QString url, list){
url = url.trimmed(); url = url.trimmed();
if(!url.isEmpty()){ if(!url.isEmpty()){
qDebug("Downloading url: %s", (const char*)url.toLocal8Bit()); qDebug("Downloading url: %s", (const char*)url.toUtf8());
emit UrlReadyToBeDownloaded(url); emit UrlReadyToBeDownloaded(url);
} }
} }

View File

@@ -39,7 +39,7 @@ void HttpResponseGenerator::setMessage(const QByteArray message)
void HttpResponseGenerator::setMessage(const QString message) void HttpResponseGenerator::setMessage(const QString message)
{ {
setMessage(message.QString::toLocal8Bit()); setMessage(message.QString::toUtf8());
} }
void HttpResponseGenerator::stripMessage() void HttpResponseGenerator::stripMessage()
@@ -49,7 +49,7 @@ void HttpResponseGenerator::stripMessage()
QByteArray HttpResponseGenerator::toByteArray() const QByteArray HttpResponseGenerator::toByteArray() const
{ {
return QHttpResponseHeader::toString().toLocal8Bit() + message; return QHttpResponseHeader::toString().toUtf8() + message;
} }
void HttpResponseGenerator::setContentTypeByExt(const QString ext) void HttpResponseGenerator::setContentTypeByExt(const QString ext)

View File

@@ -96,7 +96,7 @@ void HttpServer::onTimer() {
void HttpServer::setAuthorization(QString username, QString password) void HttpServer::setAuthorization(QString username, QString password)
{ {
QString cat = username + ":" + password; QString cat = username + ":" + password;
base64 = QByteArray(cat.toLocal8Bit()).toBase64(); base64 = QByteArray(cat.toUtf8()).toBase64();
} }
bool HttpServer::isAuthorized(QByteArray auth) const bool HttpServer::isAuthorized(QByteArray auth) const

View File

@@ -2,18 +2,51 @@
<qresource> <qresource>
<file>Icons/add_file.png</file> <file>Icons/add_file.png</file>
<file>Icons/add_folder.png</file> <file>Icons/add_folder.png</file>
<file>Icons/bt_settings.png</file>
<file>Icons/button_cancel.png</file>
<file>Icons/button_ok.png</file>
<file>Icons/configure.png</file>
<file>Icons/connection.png</file>
<file>Icons/description.png</file>
<file>Icons/downarrow.png</file> <file>Icons/downarrow.png</file>
<file>Icons/download.png</file>
<file>Icons/edit_clear.png</file>
<file>Icons/encrypted.png</file>
<file>Icons/file.png</file>
<file>Icons/filter.png</file>
<file>Icons/folder.png</file>
<file>Icons/gear.png</file>
<file>Icons/gnome-shutdown.png</file> <file>Icons/gnome-shutdown.png</file>
<file>Icons/home.png</file>
<file>Icons/loading.png</file> <file>Icons/loading.png</file>
<file>Icons/locale.png</file> <file>Icons/locale.png</file>
<file>Icons/log.png</file>
<file>Icons/mascot.png</file>
<file>Icons/money.png</file> <file>Icons/money.png</file>
<file>Icons/newmsg.png</file>
<file>Icons/password.png</file>
<file>Icons/proxy.png</file>
<file>Icons/qbittorrent16.png</file>
<file>Icons/qbittorrent22.png</file>
<file>Icons/qbittorrent32.png</file>
<file>Icons/refresh.png</file> <file>Icons/refresh.png</file>
<file>Icons/rss16.png</file> <file>Icons/rss16.png</file>
<file>Icons/rss32.png</file> <file>Icons/rss32.png</file>
<file>Icons/sphere.png</file> <file>Icons/sphere.png</file>
<file>Icons/sphere2.png</file> <file>Icons/sphere2.png</file>
<file>Icons/splash.png</file>
<file>Icons/star.png</file>
<file>Icons/style.png</file>
<file>Icons/subscribe.png</file>
<file>Icons/subscribe16.png</file>
<file>Icons/systemtray.png</file>
<file>Icons/time.png</file>
<file>Icons/unavailable.png</file>
<file>Icons/unsubscribe.png</file>
<file>Icons/unsubscribe16.png</file>
<file>Icons/uparrow.png</file> <file>Icons/uparrow.png</file>
<file>Icons/url.png</file> <file>Icons/url.png</file>
<file>Icons/wizard.png</file>
<file>Icons/flags/brazil.png</file> <file>Icons/flags/brazil.png</file>
<file>Icons/flags/bulgaria.png</file> <file>Icons/flags/bulgaria.png</file>
<file>Icons/flags/china.png</file> <file>Icons/flags/china.png</file>
@@ -41,33 +74,6 @@
<file>Icons/flags/turkey.png</file> <file>Icons/flags/turkey.png</file>
<file>Icons/flags/ukraine.png</file> <file>Icons/flags/ukraine.png</file>
<file>Icons/flags/united_kingdom.png</file> <file>Icons/flags/united_kingdom.png</file>
<file>Icons/oxygen/browse.png</file>
<file>Icons/oxygen/bt_settings.png</file>
<file>Icons/oxygen/bug.png</file>
<file>Icons/oxygen/button_cancel.png</file>
<file>Icons/oxygen/button_ok.png</file>
<file>Icons/oxygen/configure.png</file>
<file>Icons/oxygen/connection.png</file>
<file>Icons/oxygen/download.png</file>
<file>Icons/oxygen/edit-clear.png</file>
<file>Icons/oxygen/edit-copy.png</file>
<file>Icons/oxygen/edit-cut.png</file>
<file>Icons/oxygen/edit-paste.png</file>
<file>Icons/oxygen/edit_clear.png</file>
<file>Icons/oxygen/encrypted.png</file>
<file>Icons/oxygen/file.png</file>
<file>Icons/oxygen/filter.png</file>
<file>Icons/oxygen/folder.png</file>
<file>Icons/oxygen/gear.png</file>
<file>Icons/oxygen/log.png</file>
<file>Icons/oxygen/proxy.png</file>
<file>Icons/oxygen/subscribe.png</file>
<file>Icons/oxygen/subscribe16.png</file>
<file>Icons/oxygen/time.png</file>
<file>Icons/oxygen/unavailable.png</file>
<file>Icons/oxygen/unsubscribe.png</file>
<file>Icons/oxygen/unsubscribe16.png</file>
<file>Icons/oxygen/webui.png</file>
<file>Icons/skin/add.png</file> <file>Icons/skin/add.png</file>
<file>Icons/skin/connected.png</file> <file>Icons/skin/connected.png</file>
<file>Icons/skin/decrease.png</file> <file>Icons/skin/decrease.png</file>
@@ -79,7 +85,6 @@
<file>Icons/skin/firewalled.png</file> <file>Icons/skin/firewalled.png</file>
<file>Icons/skin/increase.png</file> <file>Icons/skin/increase.png</file>
<file>Icons/skin/info.png</file> <file>Icons/skin/info.png</file>
<file>Icons/skin/mascot.png</file>
<file>Icons/skin/new.png</file> <file>Icons/skin/new.png</file>
<file>Icons/skin/open.png</file> <file>Icons/skin/open.png</file>
<file>Icons/skin/pause.png</file> <file>Icons/skin/pause.png</file>
@@ -90,15 +95,11 @@
<file>Icons/skin/preview.png</file> <file>Icons/skin/preview.png</file>
<file>Icons/skin/properties.png</file> <file>Icons/skin/properties.png</file>
<file>Icons/skin/qb_question.png</file> <file>Icons/skin/qb_question.png</file>
<file>Icons/skin/qbittorrent16.png</file>
<file>Icons/skin/qbittorrent22.png</file>
<file>Icons/skin/qbittorrent32.png</file>
<file>Icons/skin/queued.png</file> <file>Icons/skin/queued.png</file>
<file>Icons/skin/remove.png</file> <file>Icons/skin/remove.png</file>
<file>Icons/skin/search.png</file> <file>Icons/skin/search.png</file>
<file>Icons/skin/seeding.png</file> <file>Icons/skin/seeding.png</file>
<file>Icons/skin/settings.png</file> <file>Icons/skin/settings.png</file>
<file>Icons/skin/splash.png</file>
<file>Icons/skin/stalled.png</file> <file>Icons/skin/stalled.png</file>
<file>Icons/skin/tabs.gif</file> <file>Icons/skin/tabs.gif</file>
<file>Icons/skin/url.png</file> <file>Icons/skin/url.png</file>

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

Binary file not shown.

Some files were not shown because too many files have changed in this diff Show More