Compare commits
177 Commits
release-1.
...
release-1.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
11276174c1 | ||
|
|
05948e2edf | ||
|
|
c9c4f7001a | ||
|
|
6cd185d0d5 | ||
|
|
063219cbe7 | ||
|
|
e324f3792b | ||
|
|
0267ecc342 | ||
|
|
e53c7aaea6 | ||
|
|
3e90e56266 | ||
|
|
1c1b8acd67 | ||
|
|
811846e5fa | ||
|
|
3ba28885b9 | ||
|
|
8ed1c57c29 | ||
|
|
af5d24c5bc | ||
|
|
9dcd572d60 | ||
|
|
e024a3ff35 | ||
|
|
37342e0f0c | ||
|
|
bfbbc1f497 | ||
|
|
5d31dcdb15 | ||
|
|
6f89b1f131 | ||
|
|
9d35bda43c | ||
|
|
e780d83fd0 | ||
|
|
7a59d5e47c | ||
|
|
f2ea524be9 | ||
|
|
a33094519c | ||
|
|
e313ae808f | ||
|
|
dc9802fe1e | ||
|
|
64f1d306f4 | ||
|
|
f3af4867fd | ||
|
|
4fe22dbc57 | ||
|
|
1d9b524b77 | ||
|
|
63761afd0a | ||
|
|
8da148ffa1 | ||
|
|
e2dc2207d8 | ||
|
|
6e87d6655a | ||
|
|
d72485a955 | ||
|
|
04c6760892 | ||
|
|
382f3e3c86 | ||
|
|
c1378450fc | ||
|
|
4e10a8dbf7 | ||
|
|
4f7b4c2a55 | ||
|
|
f98f076335 | ||
|
|
b148a93a8f | ||
|
|
37cf23fe33 | ||
|
|
87f43123c6 | ||
|
|
11dd2d81b8 | ||
|
|
d18d07efed | ||
|
|
518a120c07 | ||
|
|
290bc8b7a6 | ||
|
|
0ede09efb5 | ||
|
|
15de12f6dd | ||
|
|
ef95d6df81 | ||
|
|
f382ba4fd0 | ||
|
|
01d504d992 | ||
|
|
cdd894a6a1 | ||
|
|
d7b2d3497f | ||
|
|
5dbd5c4326 | ||
|
|
9a14c4c599 | ||
|
|
3fa14cd47f | ||
|
|
941d9b9bd9 | ||
|
|
3d88b7b05c | ||
|
|
8d39e2a776 | ||
|
|
4a1c8a7279 | ||
|
|
b8d8862562 | ||
|
|
40e9105ee5 | ||
|
|
0984b8b8e1 | ||
|
|
3dd7dcc58f | ||
|
|
6ba5df3ec8 | ||
|
|
1560b4ca3b | ||
|
|
68d8a9ed47 | ||
|
|
ca00f3084d | ||
|
|
39c16b20ae | ||
|
|
666d4622b9 | ||
|
|
27388643b1 | ||
|
|
90d17d16a4 | ||
|
|
df0f01cd71 | ||
|
|
480d00d747 | ||
|
|
a0923741a4 | ||
|
|
8e2efc2950 | ||
|
|
91dee6058e | ||
|
|
f5c1343722 | ||
|
|
d4d0a08390 | ||
|
|
d02aca7323 | ||
|
|
fd81567ecd | ||
|
|
8e5f5b5d65 | ||
|
|
215d561b82 | ||
|
|
dc18780a97 | ||
|
|
06fb19e8be | ||
|
|
3550e31871 | ||
|
|
46c6c4fc9a | ||
|
|
e126de8ff5 | ||
|
|
f2d2e70967 | ||
|
|
48b14d1066 | ||
|
|
725700420c | ||
|
|
480df1f5dc | ||
|
|
2fa43dd973 | ||
|
|
b9f1586068 | ||
|
|
07dbe388f4 | ||
|
|
b2af40c95b | ||
|
|
05569a5011 | ||
|
|
73dbce45b2 | ||
|
|
fdaeafc701 | ||
|
|
9ca4e2f1f6 | ||
|
|
2b53aa7e81 | ||
|
|
8e79e918c5 | ||
|
|
687842a949 | ||
|
|
645ee86860 | ||
|
|
f50762dfa8 | ||
|
|
7e252d3fbd | ||
|
|
2dc9f10bf4 | ||
|
|
bca03706a0 | ||
|
|
e7663e7b6b | ||
|
|
2b0e05b453 | ||
|
|
4d67170d3e | ||
|
|
538c028f8a | ||
|
|
2cbbd6ef50 | ||
|
|
955d8069e2 | ||
|
|
25d998f1b5 | ||
|
|
462f6c41cd | ||
|
|
298f1e6a9a | ||
|
|
2926745102 | ||
|
|
c6003c7403 | ||
|
|
66e5a6672a | ||
|
|
c35500dd29 | ||
|
|
f80bd42361 | ||
|
|
0b9c05d41b | ||
|
|
2477dc1fc0 | ||
|
|
706362333d | ||
|
|
6fcf25af52 | ||
|
|
c8e8306e0a | ||
|
|
e429126934 | ||
|
|
7e71de558a | ||
|
|
09d8a4797d | ||
|
|
1bcb8b1ed8 | ||
|
|
d132d50f4d | ||
|
|
e619b6977a | ||
|
|
2742a54d6e | ||
|
|
360a327d7d | ||
|
|
b659303419 | ||
|
|
43108712be | ||
|
|
a038616fe5 | ||
|
|
81e5c295b6 | ||
|
|
08d079a563 | ||
|
|
454c8dc2bc | ||
|
|
337fc72ee6 | ||
|
|
b1e9c1ccf5 | ||
|
|
64806cb199 | ||
|
|
8e8e7cd3e7 | ||
|
|
27a18e01e2 | ||
|
|
fc9e7d74a3 | ||
|
|
037a1875f9 | ||
|
|
66baa4d3dc | ||
|
|
9e522a8a6c | ||
|
|
cfa4edd140 | ||
|
|
9e9134cd44 | ||
|
|
83a798b07e | ||
|
|
baee85684c | ||
|
|
88afb0f0e7 | ||
|
|
6f212f18f5 | ||
|
|
f04e600340 | ||
|
|
5140886567 | ||
|
|
0aa59694fd | ||
|
|
66d31b5ca1 | ||
|
|
47135932a4 | ||
|
|
40d0e44f15 | ||
|
|
16c30a2f10 | ||
|
|
7f2639fcbd | ||
|
|
8ad987a672 | ||
|
|
b24194068a | ||
|
|
f4e9b00ce3 | ||
|
|
5c0a24d58b | ||
|
|
c4aa23c86b | ||
|
|
96911a2c48 | ||
|
|
85abb80f43 | ||
|
|
2372f434cf | ||
|
|
ee6bc3c2e9 | ||
|
|
b6c6637c3b |
39
Changelog
@@ -1,15 +1,52 @@
|
||||
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.4.0
|
||||
* Unknown - Christophe Dumez <chris@qbittorrent.org> - v1.5.0
|
||||
- FEATURE: Added Magnet URI support
|
||||
- FEATURE: Search engine supports category-based requests
|
||||
- FEATURE: Make use of torrent enclosure in RSS feeds for direct download
|
||||
- FEATURE: Implemented a RSS feed downloader with filter support
|
||||
- FEATURE: Save old RSS item to hard disk to remember them on start up
|
||||
- FEATURE: Display free disk space in torrent addition dialog
|
||||
- FEATURE: In torrent addition from URL, paste clipboard content if it contains an URL
|
||||
- FEATURE: RSS feeds URLs can now be copied to clipboard
|
||||
- FEATURE: RSS feeds can now be grouped into folders
|
||||
- FEATURE: Added "Unread" item to RSS feed list to display all unread news
|
||||
- FEATURE: If a torrent contains a torrent file, process downloaded torrent file too
|
||||
- FEATURE: A random listening port can be chosen automatically
|
||||
- BUGFIX: torrent resume code rewrited
|
||||
- BUGFIX: Greatly improved column sorting code
|
||||
- BUGFIX: Possibility to create trackerless torrents
|
||||
- BUGFIX: Better item coloring in torrent content filtering dialog
|
||||
- COSMETIC: Redesigned search tab to improve usability
|
||||
- COSMETIC: Redesigned RSS tab to improve usability
|
||||
|
||||
* Sun Aug 21 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.4.1
|
||||
- BUGFIX: Fix problems when changing save path (if using temporary download folder)
|
||||
- BUGFIX: Display real save path instead of the temporary one in torrent properties
|
||||
- BUGFIX: Catching invalid_handle exception to avoid rare crashes
|
||||
- BUGFIX: Fixed popup menu position in RSS feeds list
|
||||
- BUGFIX: Don't save RSS feed state if it could not be updated
|
||||
|
||||
* Thu Aug 13 2009 - Christophe Dumez <chris@qbittorrent.org> - v1.4.0
|
||||
- FEATURE: Display swarm information in lists
|
||||
- FEATURE: Allow to define temporary download folder
|
||||
- FEATURE: Display total amount of uploaded data in finished list
|
||||
- FEATURE: Resizing a column in a search results tab affects all tabs
|
||||
- FEATURE: Search results tab columns are now remembered upon startup
|
||||
- FEATURE: Added right click menu in search engine to clear completion history
|
||||
- FEATURE: Allow to set a different port for DHT (UDP) than the one used for Bittorrent
|
||||
- FEATURE: Updated spoofing code to avoid trackers ban
|
||||
- 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
|
||||
|
||||
* Fri Jul 24 2009 - Christophe DUMEZ <chris@qbittorrent.org> - 1.3.5
|
||||
- BUGFIX: Made IP filter parser more robust
|
||||
- BUGFIX: Fixed torrent creation tool
|
||||
- BUGFIX: Fixed possible overflow in progress calculation in arborescence.h
|
||||
- BUGFIX: Save properties window size, position, columns width and restore them
|
||||
- BUGFIX: Set a minimum default width for NAME column in properties
|
||||
- BUGFIX: Remember visual indexes of columns in transfer lists
|
||||
|
||||
* Sun Jul 12 2009 - Christophe DUMEZ <chris@qbittorrent.org> - v1.3.4
|
||||
- BUGFIX: Fixed IP filter file parsing on 64bits
|
||||
- BUGFIX: Suppressed QLayout: Attempting to add QLayout "" to properties "properties" warning message when opening a properties dialog
|
||||
|
||||
25
TODO
@@ -1,27 +1,2 @@
|
||||
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
|
||||
|
||||
95
configure
vendored
@@ -18,11 +18,6 @@ Main options:
|
||||
--help This help text.
|
||||
|
||||
Dependency options:
|
||||
--with-libtorrent-inc=[path] Path to libtorrent-rasterbar include
|
||||
files
|
||||
--with-libtorrent-lib=[path] Path to libtorrent-rasterbar library
|
||||
files
|
||||
--with-libtorrent-static-lib=[path] Path to libtorrent-rasterbar .a file
|
||||
--with-libboost-inc=[path] Path to libboost include files
|
||||
--with-libcurl-inc=[path] Path to libcurl include files
|
||||
--with-libcurl-lib=[path] Path to libcurl library files
|
||||
@@ -145,21 +140,6 @@ while [ $# -gt 0 ]; do
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libtorrent-inc=*)
|
||||
QC_WITH_LIBTORRENT_INC=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libtorrent-lib=*)
|
||||
QC_WITH_LIBTORRENT_LIB=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libtorrent-static-lib=*)
|
||||
QC_WITH_LIBTORRENT_STATIC_LIB=$optarg
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libboost-inc=*)
|
||||
QC_WITH_LIBBOOST_INC=$optarg
|
||||
shift
|
||||
@@ -211,9 +191,6 @@ echo PREFIX=$PREFIX
|
||||
echo BINDIR=$BINDIR
|
||||
echo DATADIR=$DATADIR
|
||||
echo EX_QTDIR=$EX_QTDIR
|
||||
echo QC_WITH_LIBTORRENT_INC=$QC_WITH_LIBTORRENT_INC
|
||||
echo QC_WITH_LIBTORRENT_LIB=$QC_WITH_LIBTORRENT_LIB
|
||||
echo QC_WITH_LIBTORRENT_STATIC_LIB=$QC_WITH_LIBTORRENT_STATIC_LIB
|
||||
echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC
|
||||
echo QC_WITH_LIBCURL_INC=$QC_WITH_LIBCURL_INC
|
||||
echo QC_WITH_LIBCURL_LIB=$QC_WITH_LIBCURL_LIB
|
||||
@@ -346,70 +323,29 @@ public:
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libtorrent-rasterbar
|
||||
arg: with-libtorrent-inc=[path], Path to libtorrent-rasterbar include files
|
||||
arg: with-libtorrent-lib=[path], Path to libtorrent-rasterbar library files
|
||||
arg: with-libtorrent-static-lib=[path], Path to libtorrent-rasterbar .a file
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
// see Conf::findPkgConfig
|
||||
class qc_libtorrent_rasterbar : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14"; }
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14.0 (>= 0.14.4 advised)"; }
|
||||
QString shortname() const { return "libtorrent-rasterbar"; }
|
||||
bool exec(){
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "libtorrent/magnet_uri.hpp")) {
|
||||
QStringList incs;
|
||||
QString req_ver = "0.14.0";
|
||||
QString adv_ver = "0.14.4";
|
||||
QString version, libs, other;
|
||||
VersionMode mode = VersionMin;
|
||||
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "libtorrent/magnet_uri.hpp")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
conf->addIncludePath(s+QDir::separator()+"libtorrent");
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_STATIC_LIB");
|
||||
if(!s.isEmpty() && QFile::exists(s) && s.endsWith(".a")){
|
||||
conf->addLib(s);
|
||||
return true;
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "torrent-rasterbar")) {
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
sl << "/usr/lib64/";
|
||||
sl << "/usr/local/lib/";
|
||||
sl << "/usr/local/lib64/";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkLibrary(s, "torrent-rasterbar")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
for(int n = 0; n < incs.count(); ++n)
|
||||
conf->addIncludePath(incs[n]);
|
||||
if(!libs.isEmpty())
|
||||
conf->addLib(libs);
|
||||
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, adv_ver, &version, &incs, &libs, &other))
|
||||
printf("\nWarning: libtorrent-rasterbar v%s was detected. Although it will compile and run, you will probably experience some bugs. Please consider updating to v%s!\n", version.toUtf8().data(), adv_ver.toUtf8().data());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
@@ -1567,9 +1503,6 @@ export PREFIX
|
||||
export BINDIR
|
||||
export DATADIR
|
||||
export EX_QTDIR
|
||||
export QC_WITH_LIBTORRENT_INC
|
||||
export QC_WITH_LIBTORRENT_LIB
|
||||
export QC_WITH_LIBTORRENT_STATIC_LIB
|
||||
export QC_WITH_LIBBOOST_INC
|
||||
export QC_WITH_LIBCURL_INC
|
||||
export QC_WITH_LIBCURL_LIB
|
||||
|
||||
@@ -64,14 +64,11 @@ public:
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
QProcess magickConfig;
|
||||
QString out = "";
|
||||
QStringList params;
|
||||
params << "--libs";
|
||||
magickConfig.start("Magick++-config", params, QIODevice::ReadOnly);
|
||||
magickConfig.waitForStarted();
|
||||
magickConfig.waitForFinished();
|
||||
QByteArray result = magickConfig.readAll();
|
||||
result = result.replace("\n", "");
|
||||
qconf->doCommand("Magick++-config", params, &out);
|
||||
out = out.replace("\n", "");
|
||||
conf->addLib(result.data());
|
||||
conf->addDefine("HAVE_MAGICK");
|
||||
return true;
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: libtorrent-rasterbar
|
||||
arg: with-libtorrent-inc=[path], Path to libtorrent-rasterbar include files
|
||||
arg: with-libtorrent-lib=[path], Path to libtorrent-rasterbar library files
|
||||
arg: with-libtorrent-static-lib=[path], Path to libtorrent-rasterbar .a file
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
// see Conf::findPkgConfig
|
||||
@@ -11,61 +8,22 @@ class qc_libtorrent_rasterbar : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14"; }
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14.0 (>= 0.14.4 advised)"; }
|
||||
QString shortname() const { return "libtorrent-rasterbar"; }
|
||||
bool exec(){
|
||||
QString s;
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_INC");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkHeader(s, "libtorrent/magnet_uri.hpp")) {
|
||||
QStringList incs;
|
||||
QString req_ver = "0.14.0";
|
||||
QString adv_ver = "0.14.4";
|
||||
QString version, libs, other;
|
||||
VersionMode mode = VersionMin;
|
||||
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
|
||||
return false;
|
||||
}
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/include";
|
||||
sl << "/usr/local/include";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkHeader(s, "libtorrent/magnet_uri.hpp")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
conf->addIncludePath(s);
|
||||
conf->addIncludePath(s+QDir::separator()+"libtorrent");
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_STATIC_LIB");
|
||||
if(!s.isEmpty() && QFile::exists(s) && s.endsWith(".a")){
|
||||
conf->addLib(s);
|
||||
return true;
|
||||
}
|
||||
|
||||
s = conf->getenv("QC_WITH_LIBTORRENT_LIB");
|
||||
if(!s.isEmpty()) {
|
||||
if(!conf->checkLibrary(s, "torrent-rasterbar")) {
|
||||
return false;
|
||||
}
|
||||
conf->addLib(QString("-L") + s);
|
||||
}else{
|
||||
QStringList sl;
|
||||
sl << "/usr/lib/";
|
||||
sl << "/usr/lib64/";
|
||||
sl << "/usr/local/lib/";
|
||||
sl << "/usr/local/lib64/";
|
||||
bool found = false;
|
||||
foreach(s, sl){
|
||||
if(conf->checkLibrary(s, "torrent-rasterbar")){
|
||||
found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if(!found) return false;
|
||||
conf->addLib(QString("-L") + s);
|
||||
}
|
||||
for(int n = 0; n < incs.count(); ++n)
|
||||
conf->addIncludePath(incs[n]);
|
||||
if(!libs.isEmpty())
|
||||
conf->addLib(libs);
|
||||
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, adv_ver, &version, &incs, &libs, &other))
|
||||
printf("\nWarning: libtorrent-rasterbar v%s was detected. Although it will compile and run, you will probably experience some bugs. Please consider updating to v%s!\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
|
||||
return true;
|
||||
}
|
||||
};
|
||||
|
||||
480
src/FeedDownloader.h
Normal file
546
src/FeedDownloader.ui
Normal file
@@ -35,6 +35,7 @@
|
||||
#include "qtorrenthandle.h"
|
||||
|
||||
class QStandardItemModel;
|
||||
class QSortFilterProxyModel;
|
||||
class bittorrent;
|
||||
class FinishedListDelegate;
|
||||
|
||||
@@ -47,6 +48,7 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
|
||||
bittorrent *BTSession;
|
||||
FinishedListDelegate *finishedListDelegate;
|
||||
QStandardItemModel *finishedListModel;
|
||||
QSortFilterProxyModel *proxyModel;
|
||||
unsigned int nbFinished;
|
||||
void hideOrShowColumn(int index);
|
||||
bool loadHiddenColumns();
|
||||
@@ -69,10 +71,6 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
|
||||
void displayFinishedHoSMenu(const QPoint&);
|
||||
void setRowColor(int row, QString color);
|
||||
void saveColWidthFinishedList() const;
|
||||
void toggleFinishedListSortOrder(int index);
|
||||
void sortFinishedList(int index=-1, Qt::SortOrder sortOrder=Qt::AscendingOrder);
|
||||
void sortFinishedListFloat(int index, Qt::SortOrder sortOrder);
|
||||
void sortFinishedListString(int index, Qt::SortOrder sortOrder);
|
||||
void updateFileSize(QString hash);
|
||||
void on_actionSet_upload_limit_triggered();
|
||||
void notifyTorrentDoubleClicked(const QModelIndex& index);
|
||||
@@ -93,6 +91,8 @@ class FinishedTorrents : public QWidget, public Ui::seeding {
|
||||
void deleteTorrent(QString hash);
|
||||
void showPropertiesFromHash(QString hash);
|
||||
void loadLastSortedColumn();
|
||||
void saveLastSortedColumn();
|
||||
void updateMetadata(QTorrentHandle &h);
|
||||
|
||||
signals:
|
||||
void torrentMovedFromFinishedList(QString);
|
||||
|
||||
95
src/GUI.cpp
@@ -34,6 +34,7 @@
|
||||
#include <QDesktopServices>
|
||||
#include <QStatusBar>
|
||||
#include <QFrame>
|
||||
#include <QClipboard>
|
||||
#ifdef QT_4_4
|
||||
#include <QLocalServer>
|
||||
#include <QLocalSocket>
|
||||
@@ -67,6 +68,7 @@
|
||||
#include <stdlib.h>
|
||||
#include "console_imp.h"
|
||||
#include "httpserver.h"
|
||||
#include "torrentPersistentData.h"
|
||||
|
||||
using namespace libtorrent;
|
||||
|
||||
@@ -105,7 +107,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
actionDownload_from_URL->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/url.png")));
|
||||
actionOptions->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/settings.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/skin/qbittorrent32.png")));
|
||||
actionBugReport->setIcon(QIcon(QString::fromUtf8(":/Icons/oxygen/bug.png")));
|
||||
actionStart->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/play.png")));
|
||||
actionPause->setIcon(QIcon(QString::fromUtf8(":/Icons/skin/pause.png")));
|
||||
@@ -142,6 +144,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
connect(BTSession, SIGNAL(newDownloadedTorrent(QString, QString)), this, SLOT(processDownloadedFiles(QString, QString)));
|
||||
connect(BTSession, SIGNAL(downloadFromUrlFailure(QString, QString)), this, SLOT(handleDownloadFromUrlFailure(QString, QString)));
|
||||
connect(BTSession, SIGNAL(deletedTorrent(QString)), this, SLOT(deleteTorrent(QString)));
|
||||
connect(BTSession, SIGNAL(torrentPaused(QTorrentHandle&)), this, SLOT(setPaused(QTorrentHandle&)));
|
||||
qDebug("create tabWidget");
|
||||
tabs = new QTabWidget();
|
||||
// Download torrents tab
|
||||
@@ -160,7 +163,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
// Search engine tab
|
||||
searchEngine = new SearchEngine(BTSession, myTrayIcon, systrayIntegration);
|
||||
tabs->addTab(searchEngine, tr("Search"));
|
||||
tabs->setTabIcon(2, QIcon(QString::fromUtf8(":/Icons/skin/search.png")));
|
||||
tabs->setTabIcon(2, QIcon(QString::fromUtf8(":/Icons/oxygen/edit-find.png")));
|
||||
readSettings();
|
||||
// RSS Tab
|
||||
rssWidget = 0;
|
||||
@@ -171,7 +174,7 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
// Configure BT session according to options
|
||||
configureSession(true);
|
||||
// Resume unfinished torrents
|
||||
BTSession->resumeUnfinishedTorrents();
|
||||
BTSession->startUpTorrents();
|
||||
downloadingTorrentTab->loadLastSortedColumn();
|
||||
finishedTorrentTab->loadLastSortedColumn();
|
||||
// Add torrent given on command line
|
||||
@@ -312,7 +315,7 @@ void GUI::displayRSSTab(bool enable) {
|
||||
if(enable) {
|
||||
// RSS tab
|
||||
if(rssWidget == 0) {
|
||||
rssWidget = new RSSImp();
|
||||
rssWidget = new RSSImp(BTSession);
|
||||
tabs->addTab(rssWidget, tr("RSS"));
|
||||
tabs->setTabIcon(3, QIcon(QString::fromUtf8(":/Icons/rss32.png")));
|
||||
}
|
||||
@@ -378,7 +381,7 @@ void GUI::finishedTorrent(QTorrentHandle& h) const {
|
||||
qDebug("In GUI, a torrent has finished");
|
||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
bool show_msg = true;
|
||||
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".finished"))
|
||||
if(TorrentPersistentData::isSeed(h.hash()))
|
||||
show_msg = false;
|
||||
QString fileName = h.name();
|
||||
bool useNotificationBalloons = settings.value(QString::fromUtf8("Preferences/General/NotificationBaloons"), true).toBool();
|
||||
@@ -424,8 +427,8 @@ void GUI::checkedTorrent(QTorrentHandle& h) const {
|
||||
finishedTorrentTab->addTorrent(h.hash());
|
||||
} else {
|
||||
// Move torrent back to download list (if necessary)
|
||||
if(QFile::exists(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".finished")) {
|
||||
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".finished");
|
||||
if(TorrentPersistentData::isSeed(h.hash())) {
|
||||
TorrentPersistentData::saveSeedStatus(h);
|
||||
finishedTorrentTab->deleteTorrent(h.hash());
|
||||
downloadingTorrentTab->addTorrent(h.hash());
|
||||
}
|
||||
@@ -442,14 +445,20 @@ void GUI::fullDiskError(QTorrentHandle& h, QString msg) const {
|
||||
// Download will be paused by libtorrent. Updating GUI information accordingly
|
||||
QString hash = h.hash();
|
||||
qDebug("Full disk error, pausing torrent %s", hash.toLocal8Bit().data());
|
||||
setPaused(h);
|
||||
BTSession->addConsoleMessage(tr("An error occured (full disk?), '%1' paused.", "e.g: An error occured (full disk?), 'xxx.avi' paused.").arg(h.name()));
|
||||
}
|
||||
|
||||
void GUI::setPaused(QTorrentHandle &h) const {
|
||||
if(!h.is_paused()) return;
|
||||
qDebug("Marking torrent %s as paused", h.hash().toLocal8Bit().data());
|
||||
if(h.is_seed()) {
|
||||
// In finished list
|
||||
qDebug("Automatically paused torrent was in finished list");
|
||||
finishedTorrentTab->pauseTorrent(hash);
|
||||
finishedTorrentTab->pauseTorrent(h.hash());
|
||||
}else{
|
||||
downloadingTorrentTab->pauseTorrent(hash);
|
||||
downloadingTorrentTab->pauseTorrent(h.hash());
|
||||
}
|
||||
BTSession->addConsoleMessage(tr("An error occured (full disk?), '%1' paused.", "e.g: An error occured (full disk?), 'xxx.avi' paused.").arg(h.name()));
|
||||
}
|
||||
|
||||
void GUI::createKeyboardShortcuts() {
|
||||
@@ -590,6 +599,28 @@ void GUI::openDestinationFolder() const {
|
||||
}
|
||||
}
|
||||
|
||||
void GUI::copyMagnetURI() const {
|
||||
QStringList hashes;
|
||||
switch(tabs->currentIndex()){
|
||||
case 0:
|
||||
hashes = downloadingTorrentTab->getSelectedTorrents();
|
||||
break;
|
||||
case 1:
|
||||
hashes = finishedTorrentTab->getSelectedTorrents();
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
QStringList magnet_uris;
|
||||
foreach(QString hash, hashes) {
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||
if(h.is_valid()) {
|
||||
magnet_uris << misc::toQString(make_magnet_uri(h.get_torrent_info()));
|
||||
}
|
||||
}
|
||||
qApp->clipboard()->setText(magnet_uris.join("\n"));
|
||||
}
|
||||
|
||||
void GUI::goBuyPage() const {
|
||||
QStringList hashes;
|
||||
switch(tabs->currentIndex()){
|
||||
@@ -745,8 +776,7 @@ void GUI::dropEvent(QDropEvent *event) {
|
||||
if(event->mimeData()->hasUrls()) {
|
||||
QList<QUrl> urls = event->mimeData()->urls();
|
||||
foreach(const QUrl &url, urls) {
|
||||
QString tmp = url.toString();
|
||||
tmp.trimmed();
|
||||
QString tmp = url.toString().trimmed();
|
||||
if(!tmp.isEmpty())
|
||||
files << url.toString();
|
||||
}
|
||||
@@ -763,6 +793,11 @@ void GUI::dropEvent(QDropEvent *event) {
|
||||
BTSession->downloadFromUrl(file);
|
||||
continue;
|
||||
}
|
||||
if(file.startsWith("magnet:", Qt::CaseInsensitive)) {
|
||||
// FIXME: Possibly skipped torrent addition dialog
|
||||
BTSession->addMagnetUri(file);
|
||||
continue;
|
||||
}
|
||||
if(useTorrentAdditionDialog) {
|
||||
torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession);
|
||||
dialog->showLoad(file);
|
||||
@@ -876,7 +911,7 @@ void GUI::on_actionDelete_triggered() {
|
||||
inDownloadList = false;
|
||||
break;
|
||||
case 3: //RSSImp
|
||||
rssWidget->on_delStream_button_clicked();
|
||||
rssWidget->deleteSelectedItems();
|
||||
return;
|
||||
default:
|
||||
return;
|
||||
@@ -920,6 +955,10 @@ void GUI::processParams(const QStringList& params) {
|
||||
param = param.trimmed();
|
||||
if(param.startsWith(QString::fromUtf8("http://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("ftp://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("https://"), Qt::CaseInsensitive)) {
|
||||
BTSession->downloadFromUrl(param);
|
||||
}else{
|
||||
if(param.startsWith("magnet:", Qt::CaseInsensitive)) {
|
||||
// FIXME: Possibily skipped torrent addition dialog
|
||||
BTSession->addMagnetUri(param);
|
||||
} else {
|
||||
if(useTorrentAdditionDialog) {
|
||||
torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession);
|
||||
@@ -930,6 +969,7 @@ void GUI::processParams(const QStringList& params) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GUI::addTorrent(QString path) {
|
||||
BTSession->addTorrent(path);
|
||||
@@ -987,10 +1027,10 @@ void GUI::configureSession(bool deleteOptions) {
|
||||
// Connection
|
||||
// * Ports binding
|
||||
unsigned short old_listenPort = BTSession->getListenPort();
|
||||
BTSession->setListeningPortsRange(options->getPorts());
|
||||
BTSession->setListeningPort(options->getPort());
|
||||
unsigned short new_listenPort = BTSession->getListenPort();
|
||||
if(new_listenPort != old_listenPort) {
|
||||
BTSession->addConsoleMessage(tr("qBittorrent is bind to port: %1", "e.g: qBittorrent is bind to port: 1666").arg( misc::toQString(new_listenPort)));
|
||||
BTSession->addConsoleMessage(tr("qBittorrent is bound to port: TCP/%1", "e.g: qBittorrent is bound to port: 6881").arg( misc::toQString(new_listenPort)));
|
||||
}
|
||||
// * Global download limit
|
||||
QPair<int, int> limits = options->getGlobalBandwidthLimits();
|
||||
@@ -1079,9 +1119,12 @@ void GUI::configureSession(bool deleteOptions) {
|
||||
// * DHT
|
||||
if(options->isDHTEnabled()) {
|
||||
// Set DHT Port
|
||||
BTSession->setDHTPort(new_listenPort);
|
||||
BTSession->setDHTPort(options->getDHTPort());
|
||||
if(BTSession->enableDHT(true)) {
|
||||
BTSession->addConsoleMessage(tr("DHT support [ON], port: %1").arg(new_listenPort), QString::fromUtf8("blue"));
|
||||
int dht_port = new_listenPort;
|
||||
if(options->getDHTPort())
|
||||
dht_port = options->getDHTPort();
|
||||
BTSession->addConsoleMessage(tr("DHT support [ON], port: UDP/%1").arg(dht_port), QString::fromUtf8("blue"));
|
||||
} else {
|
||||
BTSession->addConsoleMessage(tr("DHT support [OFF]"), QString::fromUtf8("red"));
|
||||
}
|
||||
@@ -1331,6 +1374,7 @@ void GUI::on_actionPause_triggered() {
|
||||
} else {
|
||||
hashes = finishedTorrentTab->getSelectedTorrents();
|
||||
}
|
||||
qDebug("nb hashes: %d", hashes.size());
|
||||
foreach(const QString &hash, hashes) {
|
||||
QTorrentHandle h = BTSession->getTorrentHandle(hash);
|
||||
if(!h.is_paused()){
|
||||
@@ -1418,6 +1462,7 @@ void GUI::updateLists(bool force) {
|
||||
for(torrentIT = torrents.begin(); torrentIT != torrents.end(); torrentIT++) {
|
||||
QTorrentHandle h = QTorrentHandle(*torrentIT);
|
||||
if(!h.is_valid()) continue;
|
||||
try {
|
||||
if(h.is_seed()) {
|
||||
// Update in finished list
|
||||
finishedTorrentTab->updateTorrent(h);
|
||||
@@ -1426,9 +1471,12 @@ void GUI::updateLists(bool force) {
|
||||
if(downloadingTorrentTab->updateTorrent(h)) {
|
||||
// Torrent was added, we may need to remove it from finished tab
|
||||
finishedTorrentTab->deleteTorrent(h.hash());
|
||||
QFile::remove(misc::qBittorrentPath()+"BT_backup"+QDir::separator()+h.hash()+".finished");
|
||||
TorrentPersistentData::saveSeedStatus(h);
|
||||
}
|
||||
}
|
||||
} catch(invalid_handle e) {
|
||||
qDebug("Caught Invalid handle exception, lucky us.");
|
||||
}
|
||||
}
|
||||
}
|
||||
if(displaySpeedInTitle) {
|
||||
@@ -1488,8 +1536,14 @@ void GUI::checkConnectionStatus() {
|
||||
* *
|
||||
*****************************************************/
|
||||
|
||||
void GUI::downloadFromURLList(const QStringList& urls) {
|
||||
BTSession->downloadFromURLList(urls);
|
||||
void GUI::downloadFromURLList(const QStringList& url_list) {
|
||||
foreach(const QString url, url_list) {
|
||||
if(url.startsWith("magnet:", Qt::CaseInsensitive)) {
|
||||
BTSession->addMagnetUri(url);
|
||||
} else {
|
||||
BTSession->downloadFromUrl(url);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*****************************************************
|
||||
@@ -1607,3 +1661,4 @@ void GUI::on_actionDownload_from_URL_triggered() {
|
||||
downloadFromURL *downloadFromURLDialog = new downloadFromURL(this);
|
||||
connect(downloadFromURLDialog, SIGNAL(urlsReadyToBeDownloaded(const QStringList&)), BTSession, SLOT(downloadFromURLList(const QStringList&)));
|
||||
}
|
||||
|
||||
|
||||
@@ -143,6 +143,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
void fullDiskError(QTorrentHandle& h, QString msg) const;
|
||||
void handleDownloadFromUrlFailure(QString, QString) const;
|
||||
void createSystrayDelayed();
|
||||
void setPaused(QTorrentHandle &h) const;
|
||||
// Keyboard shortcuts
|
||||
void createKeyboardShortcuts();
|
||||
void displayDownTab() const;
|
||||
@@ -191,6 +192,7 @@ class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
void setTabText(int index, QString text) const;
|
||||
void openDestinationFolder() const;
|
||||
void goBuyPage() const;
|
||||
void copyMagnetURI() const;
|
||||
void updateRatio();
|
||||
|
||||
protected:
|
||||
|
||||
|
Before Width: | Height: | Size: 1005 B |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
BIN
src/Icons/magnet.png
Normal file
|
After Width: | Height: | Size: 7.0 KiB |
|
Before Width: | Height: | Size: 813 B |
BIN
src/Icons/oxygen/application-x-kgetlist-no.png
Normal file
|
After Width: | Height: | Size: 743 B |
BIN
src/Icons/oxygen/application-x-kgetlist.png
Normal file
|
After Width: | Height: | Size: 659 B |
|
Before Width: | Height: | Size: 2.1 KiB |
BIN
src/Icons/oxygen/document-new.png
Normal file
|
After Width: | Height: | Size: 873 B |
BIN
src/Icons/oxygen/edit-find.png
Normal file
|
After Width: | Height: | Size: 627 B |
BIN
src/Icons/oxygen/folder-new.png
Normal file
|
After Width: | Height: | Size: 923 B |
BIN
src/Icons/oxygen/list-add.png
Normal file
|
After Width: | Height: | Size: 907 B |
BIN
src/Icons/oxygen/list-remove.png
Normal file
|
After Width: | Height: | Size: 498 B |
BIN
src/Icons/oxygen/mail-folder-inbox.png
Normal file
|
After Width: | Height: | Size: 739 B |
BIN
src/Icons/oxygen/preferences-desktop.png
Normal file
|
After Width: | Height: | Size: 2.2 KiB |
0
src/Icons/skin/remove.png → src/Icons/oxygen/remove.png
Normal file → Executable file
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
|
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 739 B After Width: | Height: | Size: 752 B |
BIN
src/Icons/oxygen/tab-close.png
Normal file
|
After Width: | Height: | Size: 1.3 KiB |
BIN
src/Icons/oxygen/view-refresh.png
Normal file
|
After Width: | Height: | Size: 2.1 KiB |
BIN
src/Icons/oxygen/wallet.png
Normal file
|
After Width: | Height: | Size: 1.2 KiB |