You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-09 18:32:15 +02:00
Compare commits
260 Commits
release-3.
...
release-3.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
8cb3439422 | ||
![]() |
6eb2315f9a | ||
![]() |
6f5bc824e3 | ||
![]() |
f56def1508 | ||
![]() |
e3ea8b0213 | ||
![]() |
a7056f5a66 | ||
![]() |
601cb8bcfe | ||
![]() |
a7bf28b78f | ||
![]() |
afd7867151 | ||
![]() |
f490ea9583 | ||
![]() |
eb4a61ac02 | ||
![]() |
d0aabafb72 | ||
![]() |
cf301b865c | ||
![]() |
af0384b4ab | ||
![]() |
bd52ae74e6 | ||
![]() |
f59bad7aba | ||
![]() |
2c088df20b | ||
![]() |
d1347417db | ||
![]() |
7aab902a55 | ||
![]() |
7f66b0c80e | ||
![]() |
572098bab6 | ||
![]() |
f71c0f0a7e | ||
![]() |
a069394d8c | ||
![]() |
74a852e8a6 | ||
![]() |
8da508d107 | ||
![]() |
94cf8ca5aa | ||
![]() |
a85b16bf14 | ||
![]() |
9120afa123 | ||
![]() |
dabb47efb1 | ||
![]() |
c9e71c3e19 | ||
![]() |
9df25098b3 | ||
![]() |
af29f6a42b | ||
![]() |
3afd01d617 | ||
![]() |
ace4989763 | ||
![]() |
a09b10e3ec | ||
![]() |
9b16be2bf4 | ||
![]() |
c20dfe22a5 | ||
![]() |
7675c85839 | ||
![]() |
95cce1d678 | ||
![]() |
b0ed148c4c | ||
![]() |
67416c595a | ||
![]() |
037598a68a | ||
![]() |
cb59cd21d6 | ||
![]() |
874ab523e1 | ||
![]() |
7b0a13750e | ||
![]() |
1eed7cde3c | ||
![]() |
512516225b | ||
![]() |
1ef35da8eb | ||
![]() |
f334286a39 | ||
![]() |
a7daedb9b7 | ||
![]() |
47564a6774 | ||
![]() |
672e2e4a43 | ||
![]() |
1857960775 | ||
![]() |
4db41da967 | ||
![]() |
3977583329 | ||
![]() |
abcdada850 | ||
![]() |
ae5618c070 | ||
![]() |
55572d34b6 | ||
![]() |
3d71b071a6 | ||
![]() |
2f2b0afa12 | ||
![]() |
96c7fc8e48 | ||
![]() |
6935b8a7b6 | ||
![]() |
f4fd2b196f | ||
![]() |
2797964947 | ||
![]() |
9e7a958421 | ||
![]() |
12d51b86db | ||
![]() |
16d8073367 | ||
![]() |
0725a97586 | ||
![]() |
83e738ab46 | ||
![]() |
e5b14995c3 | ||
![]() |
0e15ffb2a4 | ||
![]() |
5022cce568 | ||
![]() |
0c0c81bc52 | ||
![]() |
c0394ce5a9 | ||
![]() |
b2b7bdb2bb | ||
![]() |
723f909f3b | ||
![]() |
eb38058c99 | ||
![]() |
f43565f0f2 | ||
![]() |
98d5cca3d6 | ||
![]() |
d1012a1b15 | ||
![]() |
573edb9bce | ||
![]() |
a04af57301 | ||
![]() |
1ec2f8278a | ||
![]() |
c137e2eb0b | ||
![]() |
0e59642d99 | ||
![]() |
8d033ac0e7 | ||
![]() |
578a43f445 | ||
![]() |
d8367a15fa | ||
![]() |
5b6d873fec | ||
![]() |
76b6d4ee2f | ||
![]() |
0996bd1165 | ||
![]() |
67a7f00e5e | ||
![]() |
60c6a8c279 | ||
![]() |
0c71d3f46d | ||
![]() |
082dce0a66 | ||
![]() |
29603d1902 | ||
![]() |
8f12cfc817 | ||
![]() |
933b2817ce | ||
![]() |
df86fbb1d7 | ||
![]() |
b1aa89fa21 | ||
![]() |
be739bb22d | ||
![]() |
d095d7fc17 | ||
![]() |
ae3eda2c7e | ||
![]() |
876216972d | ||
![]() |
fea51f6b60 | ||
![]() |
30db37605a | ||
![]() |
2e2a5c1fb6 | ||
![]() |
5056faed92 | ||
![]() |
a27c5efbb5 | ||
![]() |
b7d7bb3687 | ||
![]() |
6550c4f31e | ||
![]() |
4a05e100b7 | ||
![]() |
5dc3f3bf3e | ||
![]() |
bd2de9b0dc | ||
![]() |
c01a9d5a80 | ||
![]() |
52b1cdce6f | ||
![]() |
731963ef31 | ||
![]() |
43f5f81410 | ||
![]() |
04ff48fa0b | ||
![]() |
f051228666 | ||
![]() |
84500fdd0c | ||
![]() |
55259ff3ba | ||
![]() |
da5b49fe5a | ||
![]() |
89bc0fb3e3 | ||
![]() |
c86bfe53d0 | ||
![]() |
dd177c03e6 | ||
![]() |
6615d4987b | ||
![]() |
c6e0facc0b | ||
![]() |
c6845781c7 | ||
![]() |
5decf71772 | ||
![]() |
b7f313a35c | ||
![]() |
8c14c7926f | ||
![]() |
ca6ec01f1f | ||
![]() |
2c42ab7544 | ||
![]() |
2dbbfc1031 | ||
![]() |
3762401cd9 | ||
![]() |
65c0f3f041 | ||
![]() |
7ab877c95e | ||
![]() |
7b658a52dd | ||
![]() |
3705cb8067 | ||
![]() |
8b4be9bef6 | ||
![]() |
38bef752dc | ||
![]() |
a61a84d419 | ||
![]() |
553abb6442 | ||
![]() |
14419c190e | ||
![]() |
4e6ab18446 | ||
![]() |
fdeec686bf | ||
![]() |
25e4f562e7 | ||
![]() |
d86baf1ed8 | ||
![]() |
8112405498 | ||
![]() |
7f73eca01d | ||
![]() |
9951017f8b | ||
![]() |
57bbaeab06 | ||
![]() |
52fefd3dd6 | ||
![]() |
c1cddd2f7a | ||
![]() |
caabe526ca | ||
![]() |
19475f5abb | ||
![]() |
dca36a4817 | ||
![]() |
e38ef96c94 | ||
![]() |
43aff3885d | ||
![]() |
4b4d52d8d3 | ||
![]() |
735247f41f | ||
![]() |
422d0c9210 | ||
![]() |
6ea90c9741 | ||
![]() |
c2bbb5b71a | ||
![]() |
a2656670f7 | ||
![]() |
ae2781b4c8 | ||
![]() |
65a81f4fca | ||
![]() |
e025b2aa10 | ||
![]() |
9399f06db9 | ||
![]() |
2e6370084a | ||
![]() |
adc478a8dc | ||
![]() |
247c9a85e2 | ||
![]() |
40fc98d354 | ||
![]() |
5797d86c05 | ||
![]() |
62de16c56e | ||
![]() |
d89f2b0783 | ||
![]() |
d6b2131a91 | ||
![]() |
b085fc12d0 | ||
![]() |
0da431b7a3 | ||
![]() |
3e18308301 | ||
![]() |
47c7ffba99 | ||
![]() |
42b1dffbb9 | ||
![]() |
73ebe7e1fb | ||
![]() |
c9c3589946 | ||
![]() |
62596ab533 | ||
![]() |
0be1c661aa | ||
![]() |
eb10a80c3c | ||
![]() |
3679c79b5c | ||
![]() |
a0816d1ec6 | ||
![]() |
175ac42b43 | ||
![]() |
d39874551c | ||
![]() |
16402f75cf | ||
![]() |
aacea44d41 | ||
![]() |
f2a90520d7 | ||
![]() |
34d25006f4 | ||
![]() |
e382fb1bec | ||
![]() |
ba9e3558a2 | ||
![]() |
f6514b4e7d | ||
![]() |
fe7ffdd413 | ||
![]() |
8d1a4cb40a | ||
![]() |
ad3f4842f8 | ||
![]() |
944fc5cf38 | ||
![]() |
026c065ebc | ||
![]() |
00ac784a4d | ||
![]() |
7d99223547 | ||
![]() |
65a338b5c2 | ||
![]() |
b0fd6ac756 | ||
![]() |
c268ca1278 | ||
![]() |
13e3141dfb | ||
![]() |
70fbd61758 | ||
![]() |
db638319c7 | ||
![]() |
8d36a03f68 | ||
![]() |
2b8dc3df18 | ||
![]() |
11c5172588 | ||
![]() |
43f55f5d3c | ||
![]() |
153ebe2b77 | ||
![]() |
70d11217de | ||
![]() |
82beff5527 | ||
![]() |
2e4f0876b0 | ||
![]() |
072a72316f | ||
![]() |
d199482205 | ||
![]() |
eae7953061 | ||
![]() |
d88d4e9165 | ||
![]() |
cea36bc756 | ||
![]() |
c517444258 | ||
![]() |
a109274d1f | ||
![]() |
490cb9dfdb | ||
![]() |
ab748166d5 | ||
![]() |
a796df9019 | ||
![]() |
85abc98759 | ||
![]() |
041540de6b | ||
![]() |
72a06ad176 | ||
![]() |
eea69630fb | ||
![]() |
19846758d8 | ||
![]() |
7532fcfd3c | ||
![]() |
616575911f | ||
![]() |
227a1f6532 | ||
![]() |
2c7186a381 | ||
![]() |
b4775b9d29 | ||
![]() |
ad8d7e3373 | ||
![]() |
b5e7443ae3 | ||
![]() |
5a33c0d9ba | ||
![]() |
7064ac994b | ||
![]() |
3c05e660b3 | ||
![]() |
ed54c5f7ac | ||
![]() |
63d6dd3735 | ||
![]() |
02d56fd026 | ||
![]() |
d4c9da6475 | ||
![]() |
99f126d0b6 | ||
![]() |
8110d0eb01 | ||
![]() |
90a2021948 | ||
![]() |
7bfd0e058b | ||
![]() |
6dcfe5b215 | ||
![]() |
7daeb0297d | ||
![]() |
76597fa080 | ||
![]() |
14908f3fc8 | ||
![]() |
3269cdfa70 | ||
![]() |
5f0e3e3443 | ||
![]() |
fcd37dcbb4 |
53
.travis.yml
Normal file
53
.travis.yml
Normal file
@@ -0,0 +1,53 @@
|
||||
language:
|
||||
- cpp
|
||||
|
||||
env:
|
||||
# use libtorrent 0.15.10
|
||||
- lt_source=from_dist gui=true
|
||||
- lt_source=from_dist gui=false
|
||||
# use libtorrent 0.16.X from RC_0_16 svn branch
|
||||
- lt_source=from_svn gui=true
|
||||
- lt_source=from_svn gui=false
|
||||
|
||||
branches:
|
||||
except:
|
||||
- search_encoding_windows
|
||||
- v2_9_x
|
||||
|
||||
notifications:
|
||||
email:
|
||||
on_success: change
|
||||
on_failure: change
|
||||
|
||||
before_install:
|
||||
- shopt -s expand_aliases
|
||||
- alias sudo="sudo "
|
||||
# Using nprocs/2 sometimes may fail (gcc is killed by system), just use two threads
|
||||
- alias make="colormake -j2 "
|
||||
|
||||
# Also setup a virtual display for after_success target when gui == true
|
||||
- if ! $gui; then qbtconf="$qbtconf --disable-gui"; else export "DISPLAY=:99.0" && /sbin/start-stop-daemon --start --quiet --pidfile /tmp/custom_xvfb_99.pid --make-pidfile --background --exec /usr/bin/Xvfb -- :99 -ac -screen 0 1280x1024x16 ; fi
|
||||
- ltconf=" --with-libgeoip=system"
|
||||
|
||||
- echo settings
|
||||
- echo $lt_source
|
||||
- echo $ltconf
|
||||
- echo $gui
|
||||
- echo $qbtconf
|
||||
|
||||
- sudo apt-get -qq update
|
||||
# Travis can stall during heavy load if these packages are installed in one step - split the command
|
||||
- sudo apt-get -qq install debhelper qconf colormake libssl-dev libgeoip-dev
|
||||
- sudo apt-get -qq install libboost-dev libboost-filesystem-dev libboost-system-dev
|
||||
- sudo apt-get -qq install libqt4-dev
|
||||
|
||||
install:
|
||||
- if [[ "$lt_source" == "from_dist" ]]; then sudo apt-get -qq install libtorrent-rasterbar-dev; fi
|
||||
- if [[ "$lt_source" == "from_svn" ]]; then cd .. && svn co svn://svn.code.sf.net/p/libtorrent/code/branches/RC_0_16 ./libtorrent && (cd libtorrent && ./autotool.sh && ./configure $ltconf && sudo make install) && sudo ldconfig /usr/local/lib && cd $TRAVIS_BUILD_DIR ; fi
|
||||
|
||||
script:
|
||||
- qt-qconf
|
||||
- ./configure $qbtconf && sudo make install
|
||||
|
||||
after_success:
|
||||
- if $gui ; then qbittorrent --version ; else qbittorrent-nox --version ; fi
|
10
AUTHORS
10
AUTHORS
@@ -1,4 +1,7 @@
|
||||
Author:
|
||||
Current maintainer:
|
||||
* Sledgehammer999 <sledgehammer999@qbittorrent.org>
|
||||
|
||||
Original author:
|
||||
* Christophe Dumez <chris@qbittorrent.org>
|
||||
|
||||
Contributors:
|
||||
@@ -11,6 +14,7 @@ Contributors:
|
||||
* Grigis Gaëtan <cipher16@gmail.com>
|
||||
* Christian Kandeler <zambesi@users.sourceforge.net>
|
||||
* Silvan Scherrer <silvan.scherrer@aroa.ch>
|
||||
* Nick Tiskov <daymansmail@gmail.com>
|
||||
|
||||
Code from other projects:
|
||||
* files src/qtsingleapp/* src/lineedit/*
|
||||
@@ -25,6 +29,10 @@ Code from other projects:
|
||||
copyright: Dan Haim <negativeiq@users.sourceforge.net>
|
||||
license: BSD
|
||||
|
||||
* file src/stacktrace_win.h
|
||||
copyright: Quassel Project
|
||||
license: GPLv2/3
|
||||
|
||||
Images Authors:
|
||||
* files: src/Icons/*.png
|
||||
copyright: Gnome Icon Theme
|
||||
|
77
Changelog
77
Changelog
@@ -1,3 +1,80 @@
|
||||
* Mon Jul 29 2013 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.0.11
|
||||
- FEATURE: Allow more fine tuning of upload slots. It should improve speed (sledgehammer999)
|
||||
- FEATURE: Enable edit/rename via F2 or double click in various places (Gelmir)
|
||||
- BUGFIX: Fix Spanish and Basque translations being messed up on Windows (sledgehammer999)
|
||||
- BUGFIX: Don't allow newlines in rename dialog (Gelmir)
|
||||
- BUGFIX: Treat unfinished dates as the newest ones when sorting (sledgehammer999)
|
||||
- BUGFIX: Fix text size problem on Windows with custom DPI (sledgehammer999)
|
||||
- BUGFIX: Respect UI lock when clicking on tray notification (sledgehammer999)
|
||||
- BUGFIX: Fix kickass torrents search plugin (Gelmir)
|
||||
- BUGFIX: Use system language as default language. Closes #780 (sledgehammer999)
|
||||
- BUGFIX: Move completed files to .unwanted folder when they are unselected by the user (constantined)
|
||||
- BUGFIX: Show delete action when multiple feeds are selected (Gelmir)
|
||||
- BUGFIX: Use Unicode for libtorrent alert messages (Gelmir)
|
||||
- OTHER: Update translations
|
||||
- WINDOWS: Shave off ~4MB from the binary size (sledgehammer999)
|
||||
- WINDOWS: Remove wrong dependency on msvc2008 runtime (sledgehammer999)
|
||||
- WINDOWS: Disable stacktrace when building with mingw (Gelmir)
|
||||
- WINDOWS: Updated NSIS script to include/delete .pdb file. (sledgehammer999)
|
||||
|
||||
* Tue Jul 9 2013 - Christophe Dumez <chris@qbittorrent.org> and sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.0.10
|
||||
- BUGFIX: Fix LegitTorrents search plugin
|
||||
- BUGFIX: Improve peer host name resolution (closes #360)
|
||||
- BUGFIX: Context menu fix in the Web UI
|
||||
- BUGFIX: Respect 'don't show' torrent dialog in Search (sledgehammer999)
|
||||
- BUGFIX: Torrent creator can now use files/folders from disk root (Gelmir)
|
||||
- BUGFIX: Update free disk space when changing drives in the add new torrent dialog (sledgehammer999)
|
||||
- BUGFIX: Various fixes relating to RSS drag and drop (Gelmir)
|
||||
- BUGFIX: Properly rename torrent which changes position in filter model (Gelmir)
|
||||
- BUGFIX: Actually show tray notifications when a torrent finishes downloading (sledgehammer999)
|
||||
- BUGFIX: Don't download RSS items based on rules still being edited (Gelmir)
|
||||
- COSMETIC: Native look for the search boxes (Hyperz)
|
||||
- IMPROVEMENT: Use natural sorting where possible (Gelmir and sledgehammer999)
|
||||
- LINUX: Drop Boost.Thread dependency from configure script
|
||||
- OTHER: Update translations.
|
||||
- OTHER: Drop obsolete Boost.Thread dependency from configure script on linux (Dumez)
|
||||
- LIBTORRENT: SOCKS5 fixes (0.16.10)
|
||||
- LIBTORRENT: Fix hanging issue on Windows when closing files (0.16.10)
|
||||
- LIBTORRENT: Cache can now be returned to the OS (0.16.10)
|
||||
- PERFORMANCE: Impove drawing speed of tranferlist when there are many torrents(>100) (sledgehammer999)
|
||||
- PERFORMANCE: Impove drawing speed of peers list when there are many peers (sledgehammer999)
|
||||
|
||||
* Sat Mar 16 2013 - Christophe Dumez <chris@qbittorrent.org> - v3.0.9
|
||||
- BUGFIX: Raise qBittorrent windows when another instance is launched
|
||||
- BUGFIX: Show human readable names for network interfaces in preferences (Windows)
|
||||
- BUGFIX: Fix torrent creator bug when saving non-latin path (Windows)
|
||||
- BUGFIX: Enable 'copy magnet uri' for torrents without metadata too
|
||||
- BUGFIX: Fix a few JSON parser issues (Gelmir)
|
||||
- BUGFIX: Add support for gzipped encoded HTTP responses (daimor)
|
||||
- BUGFIX: Fix possibly missing "Add torrent" icon (Driim)
|
||||
- OTHER: Add search plugin for Legit Torrents
|
||||
|
||||
* Sun Jan 20 2013 - Christophe Dumez <chris@qbittorrent.org> - v3.0.8
|
||||
- BUGFIX: Fix support for --no-splash command line argument
|
||||
- BUGFIX: Fix compilation error with libtorrent v0.15
|
||||
- BUGFIX: Fix search issues with Python3
|
||||
- BUGFIX: Fix dead link about certificates in program preferences
|
||||
|
||||
* Sat Jan 19 2013 - Christophe Dumez <chris@qbittorrent.org> - v3.0.7
|
||||
- BUGFIX: Update max write cache size to 2048MB and set it to automatic by default (closes #148)
|
||||
- BUGFIX: Add m4v to the list of previewable file extensions (closes #216)
|
||||
- BUGFIX: Fix "Couldn't set environment variable..." message on start up (closes #245)
|
||||
- BUGFIX: Use right path separator in torrent addition dialog on Windows
|
||||
- BUGFIX: Fix "Set as default save path" setting (closes #254)
|
||||
- BUGFIX: Reenable disk cache on Windows since the memory issue seems to be gone
|
||||
- BUGFIX: Fixed several search engine plugins and removed the dead ones
|
||||
- BUGFIX: Use https links in search plugins when possible
|
||||
- BUGFIX: Bump Mootools to v1.4.5 (Web UI)
|
||||
- BUGFIX: Require password to exit qBittorrent from tray icon when locked (closes #311)
|
||||
- BUGFIX: Fix possible crash in loadPeers() (closes #222)
|
||||
|
||||
* Sun Oct 7 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.6
|
||||
- BUGFIX: Fix unicode support for command-line arguments on Windows (closes #139)
|
||||
- BUGFIX: Do not store created torrent in memory before writing it to a file (closes #133)
|
||||
- BUGFIX: No longer fallback to ANY interface if the user-selected interface cannot be found (closes #143)
|
||||
- BUGFIX: Fix timezone parsing in RSS (closes #136)
|
||||
- BUGFIX: Fix cookie support for RSS feeds (closes #119)
|
||||
|
||||
* Sun Sep 30 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.5
|
||||
- BUGFIX: Disabling systray icon no longer disables file association settings (closes #114)
|
||||
- BUGFIX: Import new trackers from magnet link in case of duplicate torrent (closes #111)
|
||||
|
2
configure
vendored
2
configure
vendored
@@ -507,7 +507,7 @@ public:
|
||||
#if LIBTORRENT_VERSION_MAJOR == 0 && LIBTORRENT_VERSION_MINOR < 16
|
||||
required_libs << "filesystem" ;
|
||||
#endif
|
||||
required_libs << "thread";
|
||||
//required_libs << "thread";
|
||||
QStringList libDirs;
|
||||
if (!s.isEmpty())
|
||||
libDirs << s;
|
||||
|
@@ -19,6 +19,8 @@ LIBS += -lboost_system-mt
|
||||
#LIBS += -lboost_filesystem-mt
|
||||
# Carbon
|
||||
LIBS += -framework Carbon -framework IOKit
|
||||
# Zlib
|
||||
LIBS += -lz
|
||||
|
||||
document_icon.path = Contents/Resources
|
||||
document_icon.files = mac/qBitTorrentDocument.icns
|
||||
|
@@ -7,7 +7,7 @@ LIBS += -ltorrent-rasterbar \
|
||||
-lboost_thread \
|
||||
-lboost_system \
|
||||
-lboost_filesystem \
|
||||
-lssl -lcrypto -lidn -lpthread
|
||||
-lssl -lcrypto -lidn -lpthread -lz
|
||||
|
||||
RC_FILE = qbittorrent_os2.rc
|
||||
|
||||
|
@@ -71,7 +71,7 @@ public:
|
||||
#if LIBTORRENT_VERSION_MAJOR == 0 && LIBTORRENT_VERSION_MINOR < 16
|
||||
required_libs << "filesystem" ;
|
||||
#endif
|
||||
required_libs << "thread";
|
||||
//required_libs << "thread";
|
||||
QStringList libDirs;
|
||||
if (!s.isEmpty())
|
||||
libDirs << s;
|
||||
|
288
src/about.ui
288
src/about.ui
File diff suppressed because one or more lines are too long
@@ -51,7 +51,7 @@ class about : public QDialog, private Ui::AboutDlg{
|
||||
// Set icons
|
||||
logo->setPixmap(QPixmap(QString::fromUtf8(":/Icons/skin/qbittorrent22.png")));
|
||||
//Title
|
||||
lb_name->setText(QString::fromUtf8("<b><h1>")+tr("qBittorrent")+QString::fromUtf8(" "VERSION"</h1></b>"));
|
||||
lb_name->setText(QString::fromUtf8("<b><h1>qBittorrent")+QString::fromUtf8(" "VERSION"</h1></b>"));
|
||||
// Thanks
|
||||
QString thanks_txt;
|
||||
thanks_txt += QString::fromUtf8("<p>I would first like to thank sourceforge.net for hosting qBittorrent project and for their support.</p>");
|
||||
@@ -93,7 +93,7 @@ class about : public QDialog, private Ui::AboutDlg{
|
||||
<li><u>Russian:</u> Nick Khazov (m2k3d0n@users.sourceforge.net) and Alexey Morsov (samurai@ricom.ru)</li>\
|
||||
<li><u>Serbian:</u> Anaximandar Milet (anaximandar@operamail.com)</li>\
|
||||
<li><u>Slovak:</u> helix84</li>\
|
||||
<li><u>Spanish:</u> Francisco Luque Contreras (frannoe@ya.com)</li>\
|
||||
<li><u>Spanish:</u> Alfredo Monclús (alfrix), Francisco Luque Contreras (frannoe@ya.com)</li>\
|
||||
<li><u>Swedish:</u> Daniel Nylander (po@danielnylander.se)</li>\
|
||||
<li><u>Turkish:</u> Hasan YILMAZ (iletisim@hedefturkce.com) and Erdem Bingöl (erdem84@gmail.com)</li>\
|
||||
<li><u>Ukrainian:</u> Oleh Prypin (blaxpirit@gmail.com)</li></ul>");
|
||||
|
@@ -65,7 +65,7 @@ AddNewTorrentDialog::AddNewTorrentDialog(QWidget *parent) :
|
||||
QIniSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
Preferences pref;
|
||||
ui->start_torrent_cb->setChecked(!pref.addTorrentsInPause());
|
||||
ui->save_path_combo->addItem(fsutils::toDisplayPath(pref.getSavePath()));
|
||||
ui->save_path_combo->addItem(fsutils::toDisplayPath(pref.getSavePath()), pref.getSavePath());
|
||||
loadSavePathHistory();
|
||||
ui->save_path_combo->insertSeparator(ui->save_path_combo->count());
|
||||
ui->save_path_combo->addItem(tr("Other...", "Other save path..."));
|
||||
@@ -81,6 +81,9 @@ AddNewTorrentDialog::AddNewTorrentDialog(QWidget *parent) :
|
||||
loadState();
|
||||
// Signal / slots
|
||||
connect(ui->adv_button, SIGNAL(clicked(bool)), SLOT(showAdvancedSettings(bool)));
|
||||
editHotkey = new QShortcut(QKeySequence("F2"), ui->content_tree, 0, 0, Qt::WidgetShortcut);
|
||||
connect(editHotkey, SIGNAL(activated()), SLOT(renameSelectedFile()));
|
||||
connect(ui->content_tree, SIGNAL(doubleClicked(QModelIndex)), SLOT(renameSelectedFile()));
|
||||
}
|
||||
|
||||
AddNewTorrentDialog::~AddNewTorrentDialog()
|
||||
@@ -89,6 +92,7 @@ AddNewTorrentDialog::~AddNewTorrentDialog()
|
||||
delete ui;
|
||||
if (m_contentModel)
|
||||
delete m_contentModel;
|
||||
delete editHotkey;
|
||||
}
|
||||
|
||||
void AddNewTorrentDialog::loadState()
|
||||
@@ -225,7 +229,7 @@ bool AddNewTorrentDialog::loadTorrent(const QString& torrent_path, const QString
|
||||
QString single_file_relpath = misc::toQStringU(m_torrentInfo->file_at(0).path.string());
|
||||
#endif
|
||||
for (int i=0; i<ui->save_path_combo->count()-1; ++i) {
|
||||
ui->save_path_combo->setItemText(i, QDir(ui->save_path_combo->itemText(i)).absoluteFilePath(single_file_relpath));
|
||||
ui->save_path_combo->setItemText(i, fsutils::toDisplayPath(QDir(ui->save_path_combo->itemText(i)).absoluteFilePath(single_file_relpath)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,7 +327,7 @@ void AddNewTorrentDialog::updateDiskSpaceLabel()
|
||||
void AddNewTorrentDialog::onSavePathChanged(int index)
|
||||
{
|
||||
static int old_index = 0;
|
||||
static QDir defaultSaveDir(ui->save_path_combo->itemData(0).toString());
|
||||
Preferences pref;
|
||||
|
||||
if (index == (ui->save_path_combo->count() - 1)) {
|
||||
disconnect(ui->save_path_combo, SIGNAL(currentIndexChanged(int)), this, SLOT(onSavePathChanged(int)));
|
||||
@@ -370,10 +374,12 @@ void AddNewTorrentDialog::onSavePathChanged(int index)
|
||||
}
|
||||
// Toggle default save path setting checkbox visibility
|
||||
ui->default_save_path_cb->setChecked(false);
|
||||
ui->default_save_path_cb->setVisible(QDir(ui->save_path_combo->itemData(ui->save_path_combo->currentIndex()).toString()) != defaultSaveDir);
|
||||
ui->default_save_path_cb->setVisible(QDir(ui->save_path_combo->itemData(ui->save_path_combo->currentIndex()).toString()) != pref.getSavePath());
|
||||
relayout();
|
||||
// Remember index
|
||||
old_index = ui->save_path_combo->currentIndex();
|
||||
if (!m_isMagnet)
|
||||
updateDiskSpaceLabel();
|
||||
}
|
||||
|
||||
void AddNewTorrentDialog::relayout()
|
||||
@@ -388,13 +394,14 @@ void AddNewTorrentDialog::relayout()
|
||||
void AddNewTorrentDialog::renameSelectedFile()
|
||||
{
|
||||
const QModelIndexList selectedIndexes = ui->content_tree->selectionModel()->selectedRows(0);
|
||||
Q_ASSERT(selectedIndexes.size() == 1);
|
||||
if (selectedIndexes.size() != 1)
|
||||
return;
|
||||
const QModelIndex &index = selectedIndexes.first();
|
||||
// Ask for new name
|
||||
bool ok;
|
||||
const QString new_name_last = QInputDialog::getText(this, tr("Rename the file"),
|
||||
tr("New name:"), QLineEdit::Normal,
|
||||
index.data().toString(), &ok);
|
||||
index.data().toString(), &ok).trimmed();
|
||||
if (ok && !new_name_last.isEmpty()) {
|
||||
if (!fsutils::isValidFileSystemName(new_name_last)) {
|
||||
QMessageBox::warning(this, tr("The file could not be renamed"),
|
||||
@@ -594,6 +601,8 @@ void AddNewTorrentDialog::on_buttonBox_accepted()
|
||||
saveSavePathHistory();
|
||||
// Save settings
|
||||
pref.useAdditionDialog(!ui->never_show_cb->isChecked());
|
||||
if (ui->default_save_path_cb->isChecked())
|
||||
if (ui->default_save_path_cb->isChecked()) {
|
||||
pref.setSavePath(ui->save_path_combo->itemData(ui->save_path_combo->currentIndex()).toString());
|
||||
QBtSession::instance()->setDefaultSavePath(pref.getSavePath());
|
||||
}
|
||||
}
|
||||
|
@@ -31,6 +31,7 @@
|
||||
#ifndef ADDNEWTORRENTDIALOG_H
|
||||
#define ADDNEWTORRENTDIALOG_H
|
||||
|
||||
#include <QShortcut>
|
||||
#include <QDialog>
|
||||
#include <QUrl>
|
||||
#include <libtorrent/torrent_info.hpp>
|
||||
@@ -86,6 +87,7 @@ private:
|
||||
boost::intrusive_ptr<libtorrent::torrent_info> m_torrentInfo;
|
||||
QStringList m_filesPath;
|
||||
bool m_hasRenamedFile;
|
||||
QShortcut *editHotkey;
|
||||
};
|
||||
|
||||
#endif // ADDNEWTORRENTDIALOG_H
|
||||
|
@@ -22,9 +22,6 @@
|
||||
<height>16777215</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Dialog</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QGroupBox" name="groupBox">
|
||||
|
@@ -50,6 +50,56 @@ DownloadThread::DownloadThread(QObject* parent) : QObject(parent) {
|
||||
#endif
|
||||
}
|
||||
|
||||
QByteArray DownloadThread::gUncompress(Bytef *inData, size_t len) {
|
||||
if (len <= 4) {
|
||||
qWarning("gUncompress: Input data is truncated");
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
QByteArray result;
|
||||
z_stream strm;
|
||||
static const int CHUNK_SIZE = 1024;
|
||||
char out[CHUNK_SIZE];
|
||||
|
||||
/* allocate inflate state */
|
||||
strm.zalloc = Z_NULL;
|
||||
strm.zfree = Z_NULL;
|
||||
strm.opaque = Z_NULL;
|
||||
strm.avail_in = len;
|
||||
strm.next_in = inData;
|
||||
|
||||
const int windowBits = 15;
|
||||
const int ENABLE_ZLIB_GZIP = 32;
|
||||
|
||||
int ret = inflateInit2(&strm, windowBits|ENABLE_ZLIB_GZIP); // gzip decoding
|
||||
if (ret != Z_OK)
|
||||
return QByteArray();
|
||||
|
||||
// run inflate()
|
||||
do {
|
||||
strm.avail_out = CHUNK_SIZE;
|
||||
strm.next_out = reinterpret_cast<unsigned char*>(out);
|
||||
|
||||
ret = inflate(&strm, Z_NO_FLUSH);
|
||||
Q_ASSERT(ret != Z_STREAM_ERROR); // state not clobbered
|
||||
|
||||
switch (ret) {
|
||||
case Z_NEED_DICT:
|
||||
case Z_DATA_ERROR:
|
||||
case Z_MEM_ERROR:
|
||||
(void) inflateEnd(&strm);
|
||||
|
||||
return QByteArray();
|
||||
}
|
||||
|
||||
result.append(out, CHUNK_SIZE - strm.avail_out);
|
||||
} while (!strm.avail_out);
|
||||
|
||||
// clean up and return
|
||||
inflateEnd(&strm);
|
||||
return result;
|
||||
}
|
||||
|
||||
void DownloadThread::processDlFinished(QNetworkReply* reply) {
|
||||
QString url = reply->url().toString();
|
||||
qDebug("Download finished: %s", qPrintable(url));
|
||||
@@ -72,7 +122,8 @@ void DownloadThread::processDlFinished(QNetworkReply* reply) {
|
||||
const QString newUrlString = newUrl.toString();
|
||||
qDebug("Redirecting from %s to %s", qPrintable(url), qPrintable(newUrlString));
|
||||
m_redirectMapping.insert(newUrlString, url);
|
||||
downloadUrl(newUrlString);
|
||||
// redirecting with first cookies
|
||||
downloadUrl(newUrlString, m_networkManager.cookieJar()->cookiesForUrl(url));
|
||||
reply->deleteLater();
|
||||
return;
|
||||
}
|
||||
@@ -87,8 +138,12 @@ void DownloadThread::processDlFinished(QNetworkReply* reply) {
|
||||
QString filePath = tmpfile->fileName();
|
||||
qDebug("Temporary filename is: %s", qPrintable(filePath));
|
||||
if (reply->isOpen() || reply->open(QIODevice::ReadOnly)) {
|
||||
// TODO: Support GZIP compression
|
||||
tmpfile->write(reply->readAll());
|
||||
QByteArray replyData = reply->readAll();
|
||||
if (reply->rawHeader("Content-Encoding") == "gzip") {
|
||||
// uncompress gzip reply
|
||||
replyData = gUncompress(reinterpret_cast<unsigned char*>(replyData.data()), replyData.length());
|
||||
}
|
||||
tmpfile->write(replyData);
|
||||
tmpfile->close();
|
||||
// XXX: tmpfile needs to be deleted on Windows before using the file
|
||||
// or it will complain that the file is used by another process.
|
||||
@@ -136,6 +191,8 @@ QNetworkReply* DownloadThread::downloadUrl(const QString &url, const QList<QNetw
|
||||
qDebug("%s=%s", m_networkManager.cookieJar()->cookiesForUrl(url).at(i).name().data(), m_networkManager.cookieJar()->cookiesForUrl(url).at(i).value().data());
|
||||
qDebug("Domain: %s, Path: %s", qPrintable(m_networkManager.cookieJar()->cookiesForUrl(url).at(i).domain()), qPrintable(m_networkManager.cookieJar()->cookiesForUrl(url).at(i).path()));
|
||||
}
|
||||
// accept gzip
|
||||
request.setRawHeader("Accept-Encoding", "gzip");
|
||||
return m_networkManager.get(request);
|
||||
}
|
||||
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include <QObject>
|
||||
#include <QHash>
|
||||
#include <QSslError>
|
||||
#include <zlib.h>
|
||||
|
||||
QT_BEGIN_NAMESPACE
|
||||
class QNetworkAccessManager;
|
||||
@@ -46,8 +47,8 @@ class DownloadThread : public QObject {
|
||||
|
||||
public:
|
||||
DownloadThread(QObject* parent = 0);
|
||||
QNetworkReply* downloadUrl(const QString &url, const QList<QNetworkCookie>& raw_cookies = QList<QNetworkCookie>());
|
||||
void downloadTorrentUrl(const QString &url, const QList<QNetworkCookie>& raw_cookies = QList<QNetworkCookie>());
|
||||
QNetworkReply* downloadUrl(const QString &url, const QList<QNetworkCookie>& cookies = QList<QNetworkCookie>());
|
||||
void downloadTorrentUrl(const QString &url, const QList<QNetworkCookie>& cookies = QList<QNetworkCookie>());
|
||||
//void setProxy(QString IP, int port, QString username, QString password);
|
||||
|
||||
signals:
|
||||
@@ -62,6 +63,7 @@ private slots:
|
||||
#endif
|
||||
|
||||
private:
|
||||
static QByteArray gUncompress(Bytef *inData, size_t len);
|
||||
QString errorCodeToString(QNetworkReply::NetworkError status);
|
||||
void applyProxySettings();
|
||||
|
||||
|
@@ -73,12 +73,7 @@ using namespace libtorrent;
|
||||
*/
|
||||
QString fsutils::toDisplayPath(const QString& path)
|
||||
{
|
||||
#if defined(Q_WS_WIN) || defined(Q_OS_OS2)
|
||||
QString ret = path;
|
||||
return ret.replace("/", "\\");
|
||||
#else
|
||||
return path;
|
||||
#endif
|
||||
return QDir::toNativeSeparators(path);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
Binary file not shown.
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user