Compare commits
283 Commits
release-2.
...
release-2.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
89c9a646ad | ||
![]() |
1ee45151a1 | ||
![]() |
772f05c5d4 | ||
![]() |
de9e215404 | ||
![]() |
eeabf85e3b | ||
![]() |
6b99c84fe3 | ||
![]() |
7d42969505 | ||
![]() |
90351c4a57 | ||
![]() |
492b9dc88f | ||
![]() |
c9a8c1d053 | ||
![]() |
c8fdf8dc10 | ||
![]() |
119f83fbf0 | ||
![]() |
e8db20a558 | ||
![]() |
508a811a8a | ||
![]() |
296267ec20 | ||
![]() |
39d4af1d6e | ||
![]() |
2e8f50b709 | ||
![]() |
fdccf9cc1c | ||
![]() |
31819e148f | ||
![]() |
5371fb15f8 | ||
![]() |
f845acb207 | ||
![]() |
f42eec5ad9 | ||
![]() |
ec1a06d7c8 | ||
![]() |
e9b6a726e3 | ||
![]() |
a3f54fc3b9 | ||
![]() |
10f58b4eed | ||
![]() |
52fef5ac38 | ||
![]() |
4d0cdea1c9 | ||
![]() |
86ca755dfe | ||
![]() |
659664509a | ||
![]() |
412f947db5 | ||
![]() |
ad47565b93 | ||
![]() |
89175ea827 | ||
![]() |
8dc34463e3 | ||
![]() |
cab38857d1 | ||
![]() |
14db21c241 | ||
![]() |
975ab9ad64 | ||
![]() |
b810278452 | ||
![]() |
86ac0a430e | ||
![]() |
78a0f34645 | ||
![]() |
3ae09658c9 | ||
![]() |
7d9caad31e | ||
![]() |
c9c627dec2 | ||
![]() |
5b104cdd9b | ||
![]() |
8f667dce5c | ||
![]() |
89412e5050 | ||
![]() |
63c121ecc7 | ||
![]() |
33b60779d6 | ||
![]() |
26b2367833 | ||
![]() |
9b40a036a7 | ||
![]() |
d4cc0e9e4a | ||
![]() |
ca802a6233 | ||
![]() |
35394c4966 | ||
![]() |
077dd11af6 | ||
![]() |
a5c9c8d670 | ||
![]() |
1ef0bcbc06 | ||
![]() |
e15eab9b6a | ||
![]() |
8f1c56babd | ||
![]() |
aaeb6b90ed | ||
![]() |
d124ada755 | ||
![]() |
31105aefe4 | ||
![]() |
44c258796e | ||
![]() |
26100120a9 | ||
![]() |
0db8ce891b | ||
![]() |
979aba5685 | ||
![]() |
396da6bd94 | ||
![]() |
1b0d86220f | ||
![]() |
957d2c0d1a | ||
![]() |
455657912a | ||
![]() |
e3da1902df | ||
![]() |
d0f8e9208f | ||
![]() |
de50346428 | ||
![]() |
c7ca51f950 | ||
![]() |
4522174555 | ||
![]() |
126230ad08 | ||
![]() |
6aa1f4156a | ||
![]() |
2726faa090 | ||
![]() |
230b84032d | ||
![]() |
9c4c5e2d1a | ||
![]() |
2bf8e2d2d7 | ||
![]() |
9bb05c8dea | ||
![]() |
2707aa2818 | ||
![]() |
93c644da88 | ||
![]() |
4a114c0fdc | ||
![]() |
f95108155d | ||
![]() |
75f75854c2 | ||
![]() |
e20c3cd0b6 | ||
![]() |
2273ea4099 | ||
![]() |
b115b0c6a3 | ||
![]() |
9d79a51f18 | ||
![]() |
db9005158e | ||
![]() |
4491999a8c | ||
![]() |
113a502a7e | ||
![]() |
7ad39003f4 | ||
![]() |
4b43871708 | ||
![]() |
aa8f7552a2 | ||
![]() |
19d94b53d2 | ||
![]() |
ca98a261e6 | ||
![]() |
535ec2ced6 | ||
![]() |
a300c236ba | ||
![]() |
b16c26b24c | ||
![]() |
1b1dde3fc8 | ||
![]() |
bd5880843f | ||
![]() |
abf35a31f3 | ||
![]() |
015638035a | ||
![]() |
8e27fe83f1 | ||
![]() |
ce4b105065 | ||
![]() |
37a7b79a6f | ||
![]() |
ef19e8aeef | ||
![]() |
f6886b4749 | ||
![]() |
8306959cb4 | ||
![]() |
d1918ee206 | ||
![]() |
b2b76f9e35 | ||
![]() |
a07fb264e8 | ||
![]() |
881f2d04d2 | ||
![]() |
e1b629df88 | ||
![]() |
eab6a194e1 | ||
![]() |
3733bc9148 | ||
![]() |
ae5746a636 | ||
![]() |
cb509cebb3 | ||
![]() |
511c4474c7 | ||
![]() |
d063aea977 | ||
![]() |
447efc52d8 | ||
![]() |
296acf820c | ||
![]() |
6ae49acb69 | ||
![]() |
af1b06c5be | ||
![]() |
4732c8565d | ||
![]() |
52dd1476db | ||
![]() |
63170b9214 | ||
![]() |
2203b399df | ||
![]() |
d80f7a6ef3 | ||
![]() |
88c56d8250 | ||
![]() |
fca24a8f84 | ||
![]() |
6d140a141a | ||
![]() |
a18e325c18 | ||
![]() |
c4d9c51e49 | ||
![]() |
27e980de28 | ||
![]() |
3c4906bb4d | ||
![]() |
da796c80c3 | ||
![]() |
7a2af0f506 | ||
![]() |
3e562e7450 | ||
![]() |
4fc777268b | ||
![]() |
037e57b687 | ||
![]() |
2b289655c1 | ||
![]() |
118ea6093d | ||
![]() |
cac6f7428c | ||
![]() |
ae6acc4ca2 | ||
![]() |
641c6f0132 | ||
![]() |
56dc8cad71 | ||
![]() |
7cc07d842c | ||
![]() |
baaadf07fa | ||
![]() |
719b32ba36 | ||
![]() |
af5c1096b5 | ||
![]() |
3008222b92 | ||
![]() |
5ef9faacd5 | ||
![]() |
ff65b6ea2f | ||
![]() |
4c8a087b81 | ||
![]() |
8f4bf93f02 | ||
![]() |
824b2f6fff | ||
![]() |
ba0c7334b7 | ||
![]() |
a1dd724220 | ||
![]() |
a7820e5f08 | ||
![]() |
1a2eee8060 | ||
![]() |
4a2713a9f0 | ||
![]() |
5ece0b4f70 | ||
![]() |
44e8ec2b37 | ||
![]() |
d7e5f4b895 | ||
![]() |
b0c7bdf82b | ||
![]() |
a239ac1a52 | ||
![]() |
99459dc55d | ||
![]() |
78ba99778a | ||
![]() |
96d3df3135 | ||
![]() |
cbe4bbac6a | ||
![]() |
f502e82ec4 | ||
![]() |
a5d8766a9e | ||
![]() |
55d8e3d76b | ||
![]() |
7b7fb4d278 | ||
![]() |
09c7c50ad3 | ||
![]() |
131250dc03 | ||
![]() |
130187723c | ||
![]() |
7bac95c9ad | ||
![]() |
add2475700 | ||
![]() |
533e402bca | ||
![]() |
b87a23037e | ||
![]() |
6d88bb5b83 | ||
![]() |
435801c893 | ||
![]() |
9d0577fa5c | ||
![]() |
f2891dae74 | ||
![]() |
a43a1f5b67 | ||
![]() |
ee9ca1ece7 | ||
![]() |
8271e20fac | ||
![]() |
132b1f7ffe | ||
![]() |
77b4d97069 | ||
![]() |
2168d5a30e | ||
![]() |
7ad90b1b80 | ||
![]() |
f60ef5dbd5 | ||
![]() |
4dc26d0a77 | ||
![]() |
551273b831 | ||
![]() |
d5a09674ae | ||
![]() |
907e620e9e | ||
![]() |
f96ec75eec | ||
![]() |
4d00db2b42 | ||
![]() |
db564b4521 | ||
![]() |
3f2076d195 | ||
![]() |
ed13c43e93 | ||
![]() |
b5a9fe71e1 | ||
![]() |
d0037d90f4 | ||
![]() |
e885ee0d35 | ||
![]() |
ff5e5d1062 | ||
![]() |
1bfadf5219 | ||
![]() |
4f9eca78d9 | ||
![]() |
7aa2994078 | ||
![]() |
1128b3ea83 | ||
![]() |
9d06947125 | ||
![]() |
14cc600a8b | ||
![]() |
4f3fd86f91 | ||
![]() |
e663717d64 | ||
![]() |
8b5d388e77 | ||
![]() |
22d781edd5 | ||
![]() |
4252832ba5 | ||
![]() |
fab58296af | ||
![]() |
e142877e10 | ||
![]() |
6f6e453ae4 | ||
![]() |
50e620daf2 | ||
![]() |
c334439df6 | ||
![]() |
2d9b4f273e | ||
![]() |
15c7099e85 | ||
![]() |
d2b1f6176f | ||
![]() |
8306d7931b | ||
![]() |
b07fbb726e | ||
![]() |
9586f0e61c | ||
![]() |
7d66c07cef | ||
![]() |
28ecb2fe1d | ||
![]() |
a9cafeaa76 | ||
![]() |
5fc69ccb73 | ||
![]() |
bc626e3512 | ||
![]() |
98561f9db9 | ||
![]() |
b56dee2a92 | ||
![]() |
885a7f592e | ||
![]() |
6965448a24 | ||
![]() |
475d63dad8 | ||
![]() |
c87a0bde0b | ||
![]() |
c1bc9886b7 | ||
![]() |
88f8437c5a | ||
![]() |
411a1c641d | ||
![]() |
dc0ad73eca | ||
![]() |
04e008afa0 | ||
![]() |
a6207f70d5 | ||
![]() |
b8a30be7bc | ||
![]() |
67d60766c1 | ||
![]() |
97c0b28a98 | ||
![]() |
c61aded388 | ||
![]() |
1fd57b5d63 | ||
![]() |
755b8dec30 | ||
![]() |
ecd5c1fcc3 | ||
![]() |
db5402385a | ||
![]() |
09ef3073a1 | ||
![]() |
6dd3833e0f | ||
![]() |
d4762a4d8d | ||
![]() |
38cc55ea09 | ||
![]() |
5d60295db3 | ||
![]() |
18bd3b855c | ||
![]() |
868d423c82 | ||
![]() |
edb6857de0 | ||
![]() |
ed803fb994 | ||
![]() |
83d83a364d | ||
![]() |
690bb92154 | ||
![]() |
8e39eef7aa | ||
![]() |
1923a51c59 | ||
![]() |
3dc1107b40 | ||
![]() |
dd22e9009c | ||
![]() |
c7ccf39abf | ||
![]() |
af166f53d3 | ||
![]() |
21eb26a374 | ||
![]() |
e2aaf5d1de | ||
![]() |
0b7ca15c4f | ||
![]() |
07ee2a4aff | ||
![]() |
141d3b6737 | ||
![]() |
e2c3e6dbaa | ||
![]() |
b1126556c0 | ||
![]() |
69cb8d1398 | ||
![]() |
094d979ce6 | ||
![]() |
92dd669597 |
8
AUTHORS
@@ -12,6 +12,10 @@ Code from other projects:
|
||||
copyright: Malte Starostik <malte@kde.org>
|
||||
license: LGPL
|
||||
|
||||
* files src/search_engine/socks.py
|
||||
copyright: Dan Haim <negativeiq@users.sourceforge.net>
|
||||
license: BSD
|
||||
|
||||
Images Authors:
|
||||
* files: src/Icons/*.png
|
||||
copyright: Gnome Icon Theme
|
||||
@@ -57,7 +61,7 @@ Translations authors:
|
||||
copyright:
|
||||
- Brazilian: Nick Marinho (nickmarinho@gmail.com)
|
||||
- Bulgarian: Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)
|
||||
- Catalan: Gekko Dam Beer (gekko04@users.sourceforge.net)
|
||||
- Catalan: Francisco Luque Contreras (frannoe@ya.com)
|
||||
- Chinese (Simplified): Guo Yue (yue.guo0418@gmail.com)
|
||||
- Chinese (Traditional): Yi-Shun Wang (dnextstep@gmail.com)
|
||||
- Czech: Jirka Vilim (web@tets.cz)
|
||||
@@ -79,7 +83,7 @@ Translations authors:
|
||||
- Russian: Nick Khazov (m2k3d0n at users.sourceforge.net)
|
||||
- Serbian: Anaximandar Milet (anaximandar at operamail.com)
|
||||
- Slovak: helix84
|
||||
- Spanish: Vicente Raul Plata Fonseca (silverxnt@users.sourceforge.net)
|
||||
- Spanish: Francisco Luque Contreras (frannoe@ya.com)
|
||||
- Swedish: Daniel Nylander (po@danielnylander.se)
|
||||
- Turkish: Hasan Yilmaz (iletisim@hedefturkce.com)
|
||||
- Ukrainian: Andrey Shpachenko (masterfix@users.sourceforge.net)
|
||||
|
129
Changelog
@@ -1,3 +1,132 @@
|
||||
* Mon Feb 8 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.1.4
|
||||
- BUGFIX: Fix file prioritizing in a torrent
|
||||
- BUGFIX: Make sure seeding torrents display a progress of 100%
|
||||
- BUGFIX: Usage display was improved and localized (--help)
|
||||
- BUGFIX: Fix possible crash when deleting a torrent
|
||||
- BUGFIX: Fix possible crash when changing torrents label
|
||||
|
||||
* Sun Jan 31 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.1.3
|
||||
- BUGFIX: Fix "Append .!qB extension to complete files" (libtorrent v0.15)
|
||||
- BUGFIX: Make sure bandwidth limiting dialogs are centered on screen
|
||||
- BUGFIX: Added support for HTTP redirection
|
||||
- BUGFIX: Fix compilation error when geoip database is embedded
|
||||
- BUGFIX: Fix crash when double-clicking on a torrent that has no metadata to open its save path
|
||||
- BUGFIX: Fix Scan directory preferences in Web UI
|
||||
- BUGFIX: Clear torrent error state when resuming it
|
||||
|
||||
* Sun Jan 24 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.1.2
|
||||
- FEATURE: Added back file prioritizing in a torrent
|
||||
- BUGFIX: Fix issue causing torrents not to be displayed in the list
|
||||
- BUGFIX: Make sure invalid torrent are removed from the transfer list
|
||||
- BUGFIX: Fix overwrite check when renaming a folder in a torrent
|
||||
- BUGFIX: Force a recheck after renaming files to avoid overwriting
|
||||
- BUGFIX: Improve "Open destination folder" behavior
|
||||
- BUGFIX: Fix race condition in RSS that could cause a crash on startup
|
||||
- BUGFIX: Improved user friendlyness of size units
|
||||
- BUGFIX: Optimized transfer list repainting
|
||||
- COSMETIC: Improved transfer speed display in peers list
|
||||
|
||||
* Wed Jan 20 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.1.1
|
||||
- BUGFIX: Fix compilation with Qt4.4
|
||||
- BUGFIX: Save torrent metadata so that it does not have to be re-downloaded on restart (Magnet links)
|
||||
- BUGFIX: Fix folder renaming in a torrent (would rename children under certain conditions)
|
||||
- BUGFIX: Nox version no longer requires libQtXml
|
||||
- BUGFIX: Configure file now checks for pkg-config executable which is required
|
||||
- BUGFIX: Torrents added from magnet links were not remembered on restart
|
||||
- BUGFIX: "Add in pause" setting can be ignored from torrent addition dialog
|
||||
- BUGFIX: Fix renaming of files with unicode characters in their name
|
||||
- BUGFIX: Fix typo in legal notice (startup)
|
||||
- BUGFIX: Can listen on ports < 1024 (must be root)
|
||||
- BUGFIX: Paused torrents can now be rechecked
|
||||
- BUGFIX: Fix "open torrent destination" feature when path contains spaces
|
||||
- I18N: Updated translations (Hungarian, Chinese, Russian)
|
||||
|
||||
* Mon Jan 18 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.1.0
|
||||
- FEATURE: Graphical User Interface can be disabled at compilation time (headless running)
|
||||
- FEATURE: Torrents can be labeled/categorized
|
||||
- FEATURE: Labeled torrent can be downloaded corresponding subfolders
|
||||
- FEATURE: Disk cache size can be set from preferences
|
||||
- FEATURE: Peer Exchange (PeX) can be disabled from preferences
|
||||
- FEATURE: Append !.qB extension to incomplete files option (libtorrent >= v0.15 only)
|
||||
- FEATURE: Torrent files/folders can be renamed (torrent addition dialog or files properties)
|
||||
- FEATURE: uTorrent compatible tracker list support (use torrentz.com url as a default)
|
||||
- FEATURE: Better proxy support and preferences remodeling
|
||||
- FEATURE: qBittorrent can identify itself as uTorrent, Vuze or KTorrent (Any stable version)
|
||||
- FEATURE: Torrents can be renamed in transfer list
|
||||
- FEATURE: Display torrent addition dialog for magnet links too
|
||||
- FEATURE: Files contained in a torrent are opened on double click (files panel)
|
||||
- FEATURE: Added support for magnet links in search engine
|
||||
- FEATURE: Added vertor.com and torrentdownloads.net search plugins
|
||||
- FEATURE: Search engine can now use a SOCKS5 proxy
|
||||
- FEATURE: HTTP proxy support for peer communication
|
||||
- BUGFIX: Search engine loads new proxy settings without program restart
|
||||
- BUGFIX: Use XDG folders (.cache, .local) instead of .qbittorrent
|
||||
- BUGFIX: Added legal notice on startup that the user must accept
|
||||
- BUGFIX: Protect Web UI authentication against brute forcing
|
||||
- BUGFIX: Use HTTP digest mode for Web UI authentication (instead of Basic)
|
||||
- BUGFIX: Properly display torrents with one file in subfolder(s)
|
||||
- BUGFIX: Display Web UI favicon
|
||||
- BUGFIX: File priority can be set for finished torrents that have filtered files
|
||||
- COSMETIC: Use checkboxes to filter torrent content instead of comboboxes
|
||||
- COSMETIC: Use alternating row colors in transfer list (set in program preferences)
|
||||
- COSMETIC: Added a spin box to speed limiting dialog for manual input
|
||||
|
||||
* Mon Jan 11 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.0.7
|
||||
- BUGFIX: Fix 'Add in pause' setting in torrent addition dialog
|
||||
- BUGFIX: Update RSS feed as soon as feed downloader is enabled
|
||||
- BUGFIX: RSS Feed downloader ignores articles above maximum number of articles
|
||||
- BUGFIX: Fix possible bug when deleting a RSS folder
|
||||
- BUGFIX: Remove persistant data when a RSS feed is deleted
|
||||
- BUGFIX: RSS filters are now alphabetically sorted
|
||||
- BUGFIX: Fix crash when renaming currently displayed RSS filter
|
||||
- BUGFIX: Remove overwriting confirmation when exporting RSS filters since Qt takes care of it
|
||||
|
||||
* Tue Jan 5 2010 - Christophe Dumez <chris@qbittorrent.org> - v2.0.6
|
||||
- BUGFIX: Fix detection of invalid torrent files
|
||||
- BUGFIX: Stop catching signals once one has been caught to avoid possible infinite loop
|
||||
- BUGFIX: Force data recheck whenever a torrent is moved
|
||||
- BUGFIX: Detect existing torrent data even if incomplete torrents are saved to a different folder
|
||||
- COSMETIC: Improve torrent deletion confirmation dialog so that the text that not get truncated
|
||||
|
||||
* Thu Dec 31 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.5
|
||||
- BUGFIX: Fix crash with downloaded/availability bars when the torrent has too many pieces
|
||||
|
||||
* Wed Dec 30 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.4
|
||||
- BUGFIX: Fix PeerGuardian .p2b binary filter support
|
||||
- BUGFIX: Fix possible crash when closing a search engine tab
|
||||
- BUGFIX: Make sure service port does not change
|
||||
- BUGFIX: Fix possible DHT port saving issue
|
||||
- BUGFIX: Fix communication between qBittorrent and Web UI (Qt 4.6)
|
||||
- BUGFIX: Use Wildcard matching instead of full regex in RSS feed downloader
|
||||
- BUGFIX: Fix code for listening on a random port whenever it failed to listen on the one defined
|
||||
- BUGFIX: Use global maximum transfer rates as maximum values in per-torrent speed limiting dialogs
|
||||
- BUGFIX: Fix global download rate limiting from Web UI
|
||||
- COSMETIC: Display a disconnected icon in status bar whenever qBittorrent failed to listen on the port defined
|
||||
|
||||
* Wed Dec 23 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.3
|
||||
- BUGFIX: Minor cosmetic fix to program preferences
|
||||
- BUGFIX: Fix "Temp path" button in program preferences
|
||||
- BUGFIX: Handle paths with [~, ., ..] properly
|
||||
- BUGFIX: Trackers are now displayed for torrents without metadata
|
||||
- BUGFIX: Fix issue with speed limiting (unlimited was not handled properly)
|
||||
- BUGFIX: Use the save path set in program preferences as a default in torrent addition dialog
|
||||
|
||||
* Fri Dec 18 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.2
|
||||
- BUGFIX: Fix .qbittorrent folder not being created (critical bug introduced in v2.0.1 that makes qBittorrent unusuable for new users)
|
||||
- BUGFIX: Fix RSS Feed downloader for some feeds
|
||||
- BUGFIX: Do not use home folder as a fallback when the save path is not accessible
|
||||
- BUGFIX: Fix Mininova, ThePirateBay search engine plugins
|
||||
- BUGFIX: Read RSS articles are remembered on restart for feeds with no torrents attached
|
||||
|
||||
* Sun Dec 13 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.1
|
||||
- BUGFIX: µTorrent user-agent is now spoofed correctly
|
||||
- BUGFIX: Fix column hiding behavior when queueing system is disabled
|
||||
- BUGFIX: Fix link to plugins.qbittorrent.org in plugins dialog
|
||||
- BUGFIX: ~/qBT_dir is created only when it is actually used
|
||||
- BUGFIX: Fix possible missing slot message (toggleSelectedTorrentsSuperSeeding)
|
||||
- BUGFIX: Fix possible crash in torrent properties (files)
|
||||
- BUGFIX: Added Hex Magnet Links support (Thanks Haypo)
|
||||
|
||||
* Thu Dec 10 2009 - Christophe Dumez <chris@qbittorrent.org> - v2.0.0
|
||||
- FEATURE: Added program option to disable splash screen
|
||||
- FEATURE: Dropped dependency on libcurl and libzzip
|
||||
|
61
INSTALL
@@ -1,32 +1,55 @@
|
||||
qBittorrent - A BitTorrent client in C++ / Qt4
|
||||
------------------------------------------
|
||||
|
||||
./configure
|
||||
make && make install
|
||||
qbittorrent
|
||||
1) Compile and install qBittorrent with Qt4 Graphical Interface
|
||||
|
||||
will install and execute qBittorrent hopefully without any problems.
|
||||
$ ./configure
|
||||
$ make && make install
|
||||
$ qbittorrent
|
||||
|
||||
Dependencies:
|
||||
- Qt >= 4.4.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml)
|
||||
will install and execute qBittorrent hopefully without any problems.
|
||||
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.0 REQUIRED, >= v0.15.0 ADVISED)
|
||||
-> http://www.qbittorrent.org/download.php (advised)
|
||||
-> http://www.libtorrent.net
|
||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
||||
Dependencies:
|
||||
- Qt >= 4.4.0 (libqt-devel, libqtgui, libqtcore, libqtnetwork, libqtxml)
|
||||
|
||||
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
|
||||
- pkg-config executable
|
||||
|
||||
- python >= 2.3 (needed by search engine)
|
||||
* Run time only dependency
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, >= v0.15.0 ADVISED)
|
||||
-> http://www.libtorrent.net
|
||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
||||
|
||||
- libnotify >= 0.4.2, glib-2.0 (optional)
|
||||
* Can be used for system notifications to replace standard Qt notifications
|
||||
so that it integrates better into the Desktop
|
||||
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
|
||||
|
||||
- python >= 2.3 (needed by search engine)
|
||||
* Run time only dependency
|
||||
|
||||
- libnotify >= 0.4.2, glib-2.0 (optional)
|
||||
* Can be used for system notifications to replace standard Qt notifications
|
||||
so that it integrates better into the Desktop
|
||||
|
||||
- geoip-database (optional)
|
||||
* If qBittorrent cannot find this database, it will try to resolve countries using the Internet but it will be a lot slower.
|
||||
* Run time only dependency
|
||||
|
||||
2) Compile and install qBittorrent without Qt4 Graphical interface
|
||||
|
||||
$ ./configure --disable-gui
|
||||
$ make && make install
|
||||
$ qbittorrent
|
||||
|
||||
will install and execute qBittorrent hopefully without any problems.
|
||||
|
||||
Dependencies:
|
||||
- Qt >= 4.4.0 (libqt-devel, libqtcore, libqtnetwork)
|
||||
|
||||
- pkg-config executable
|
||||
|
||||
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, >= v0.15.0 ADVISED)
|
||||
-> http://www.libtorrent.net
|
||||
Be careful: another library (the one used by rTorrent) uses a similar name.
|
||||
|
||||
- libboost: libboost-filesystem, libboost-date-time, libboost-thread, libboost-serialization
|
||||
|
||||
- geoip-database (optional)
|
||||
* If qBittorrent cannot find this database, it will try to resolve countries using the Internet but it will be a lot slower.
|
||||
* Run time only dependency
|
||||
|
||||
DOCUMENTATION:
|
||||
Please note that there is a documentation with a "compiling howto" at http://wiki.qbittorrent.org.
|
||||
|
55
configure
vendored
@@ -18,6 +18,8 @@ Main options:
|
||||
--help This help text.
|
||||
|
||||
Dependency options:
|
||||
--disable-gui Disable qBittorrent Graphical user
|
||||
interface for headless running
|
||||
--with-libboost-inc=[path] Path to libboost include files
|
||||
--disable-libnotify Disable use of libnotify
|
||||
--disable-geoip-database Disable use of geoip-database
|
||||
@@ -140,6 +142,11 @@ while [ $# -gt 0 ]; do
|
||||
shift
|
||||
;;
|
||||
|
||||
--disable-gui)
|
||||
QC_DISABLE_GUI="Y"
|
||||
shift
|
||||
;;
|
||||
|
||||
--with-libboost-inc=*)
|
||||
QC_WITH_LIBBOOST_INC=$optarg
|
||||
shift
|
||||
@@ -181,6 +188,7 @@ echo PREFIX=$PREFIX
|
||||
echo BINDIR=$BINDIR
|
||||
echo DATADIR=$DATADIR
|
||||
echo EX_QTDIR=$EX_QTDIR
|
||||
echo QC_DISABLE_GUI=$QC_DISABLE_GUI
|
||||
echo QC_WITH_LIBBOOST_INC=$QC_WITH_LIBBOOST_INC
|
||||
echo QC_DISABLE_libnotify=$QC_DISABLE_libnotify
|
||||
echo QC_DISABLE_geoip_database=$QC_DISABLE_geoip_database
|
||||
@@ -290,6 +298,7 @@ cat >$1/modules.cpp <<EOT
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Qt >= 4.4
|
||||
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_qt4 : public ConfObj
|
||||
@@ -300,6 +309,9 @@ public:
|
||||
QString shortname() const { return "Qt 4.4"; }
|
||||
bool exec()
|
||||
{
|
||||
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
||||
conf->addDefine("DISABLE_GUI");
|
||||
}
|
||||
if(QT_VERSION >= 0x040500) {
|
||||
conf->addDefine("QT_4_5");
|
||||
}
|
||||
@@ -307,6 +319,23 @@ public:
|
||||
|
||||
}
|
||||
};
|
||||
#line 1 "pkg-config.qcm"
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: pkg-config
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
#include <QProcess>
|
||||
class qc_pkg_config : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_pkg_config(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "pkg-config executable"; }
|
||||
QString shortname() const { return "pkg-config"; }
|
||||
bool exec(){
|
||||
return !conf->findProgram("pkg-config").isEmpty();
|
||||
}
|
||||
};
|
||||
#line 1 "libtorrent-rasterbar.qcm"
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
@@ -318,11 +347,11 @@ class qc_libtorrent_rasterbar : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14.0 (>= 0.15.0 advised)"; }
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14.4"; }
|
||||
QString shortname() const { return "libtorrent-rasterbar"; }
|
||||
bool exec(){
|
||||
QStringList incs;
|
||||
QString req_ver = "0.14.0";
|
||||
QString req_ver = "0.14.4";
|
||||
QString adv_ver = "0.15.0";
|
||||
QString version, libs, other;
|
||||
VersionMode mode = VersionMin;
|
||||
@@ -333,7 +362,7 @@ public:
|
||||
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.\nAlthough it will compile and run, you will be missing some features. Please consider updating to v%s.\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
|
||||
printf("\nWarning: libtorrent-rasterbar v%s was detected. Some feature will be disabled because they require v%s.\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
|
||||
else
|
||||
conf->addDefine("LIBTORRENT_0_15");
|
||||
return true;
|
||||
@@ -409,7 +438,15 @@ public:
|
||||
qc_libnotify(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libnotify >= 0.4.2 (optional)"; }
|
||||
QString shortname() const { return "libnotify"; }
|
||||
QString checkString() const {
|
||||
if(!conf->getenv("QC_DISABLE_libnotify").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
|
||||
return "";
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
bool exec(){
|
||||
if(!conf->getenv("QC_DISABLE_libnotify").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
QStringList incs;
|
||||
QString req_ver = "0.4.2";
|
||||
QString version, libs, other;
|
||||
@@ -452,7 +489,15 @@ public:
|
||||
qc_geoip_database(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "GeoIP Database (optional)"; }
|
||||
QString shortname() const { return "GeoIP Database"; }
|
||||
QString checkString() const {
|
||||
if(!conf->getenv("QC_DISABLE_geoip_database").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
|
||||
return "";
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
bool exec() {
|
||||
if(!conf->getenv("QC_DISABLE_geoip_database").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
#ifdef Q_WS_X11
|
||||
if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) {
|
||||
#endif
|
||||
@@ -474,6 +519,9 @@ cat >$1/modules_new.cpp <<EOT
|
||||
o = new qc_qt4(conf);
|
||||
o->required = true;
|
||||
o->disabled = false;
|
||||
o = new qc_pkg_config(conf);
|
||||
o->required = true;
|
||||
o->disabled = false;
|
||||
o = new qc_libtorrent_rasterbar(conf);
|
||||
o->required = true;
|
||||
o->disabled = false;
|
||||
@@ -1431,6 +1479,7 @@ export PREFIX
|
||||
export BINDIR
|
||||
export DATADIR
|
||||
export EX_QTDIR
|
||||
export QC_DISABLE_GUI
|
||||
export QC_WITH_LIBBOOST_INC
|
||||
export QC_DISABLE_libnotify
|
||||
export QC_DISABLE_geoip_database
|
||||
|
44
doc/qbittorrent-nox.1
Normal file
@@ -0,0 +1,44 @@
|
||||
.\" This manpage has been automatically generated by docbook2man
|
||||
.\" from a DocBook document. This tool can be found at:
|
||||
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>.
|
||||
.TH "QBITTORRENT\-NOX" "1" "January 16th 2010" "Command line Bittorrent client written in C++ / Qt4" ""
|
||||
|
||||
.SH "NAME"
|
||||
qBittorrent\-nox \- a command line Bittorrent client written in C++ / Qt4
|
||||
|
||||
.SH "SYNOPSIS"
|
||||
|
||||
\fBqbittorrent\-nox\fR [\-\-webui-port=x] [TORRENT_FILE | URL]...
|
||||
|
||||
\fBqbittorrent\-nox\fR \-\-help
|
||||
|
||||
\fBqbittorrent\-nox\fR \-\-version
|
||||
|
||||
.PP
|
||||
.SH "DESCRIPTION"
|
||||
|
||||
\fBqBittorrent-nox\fR is an advanced command-line Bittorrent client written in C++ / Qt4,
|
||||
using the \fBlibtorrent-rasterbar\fR library by Arvid Norberg. qBittorrent\-nox aims
|
||||
to be a good alternative to other command line bittorrent clients and provides features similar to popular graphical clients.
|
||||
|
||||
qBittorrent\-nox is fast, stable, light and it supports unicode.
|
||||
It also comes with UPnP port forwarding / NAT-PMP, encryption (Vuze compatible),
|
||||
FAST extension (mainline) and PeX support (utorrent compatible).
|
||||
|
||||
qBittorrent\-nox is meant to be controlled via its feature-rich Web UI which is accessible as a default on http://localhost:8080. The Web UI access is secured and the default account user name is "admin" with "adminadmin" as a password.
|
||||
|
||||
.SH "OPTIONS"
|
||||
|
||||
\fB--help\fR Prints the command line options.
|
||||
|
||||
\fB--version\fR Prints qbittorrent program version number.
|
||||
|
||||
\fB--webui-port=x\fR Changes Web UI port to x (default: 8080).
|
||||
|
||||
.SH "BUGS"
|
||||
|
||||
If you find a bug, please report it at http://bugs.qbittorrent.org
|
||||
|
||||
.SH "AUTHOR"
|
||||
|
||||
Christophe Dumez <chris@qbittorrent.org>
|
@@ -1,14 +1,14 @@
|
||||
.\" This manpage has been automatically generated by docbook2man
|
||||
.\" from a DocBook document. This tool can be found at:
|
||||
.\" <http://shell.ipoline.com/~elmert/comp/docbook2X/>.
|
||||
.TH "QBITTORRENT" "1" "September 30th 2009" "Bittorrent client written in C++ / Qt4" ""
|
||||
.TH "QBITTORRENT" "1" "January 16th 2010" "Bittorrent client written in C++ / Qt4" ""
|
||||
|
||||
.SH "NAME"
|
||||
qBittorrent \- a Bittorrent client written in C++ / Qt4
|
||||
|
||||
.SH "SYNOPSIS"
|
||||
|
||||
\fBqbittorrent\fR [\-\-no-splash] [TORRENT_FILE | URL]...
|
||||
\fBqbittorrent\fR [\-\-no-splash] [\-\-webui-port=x] [TORRENT_FILE | URL]...
|
||||
|
||||
\fBqbittorrent\fR \-\-help
|
||||
|
||||
@@ -18,10 +18,9 @@ qBittorrent \- a Bittorrent client written in C++ / Qt4
|
||||
.SH "DESCRIPTION"
|
||||
|
||||
\fBqBittorrent\fR is an advanced Bittorrent client written in C++ / Qt4,
|
||||
using the \fBrblibtorrent\fR library by Arvid Norberg. qBittorrent aims
|
||||
to be a good alternative to all other bittorrent clients out there. qBittorrent
|
||||
using the \fBlibtorrent-rasterbar\fR library by Arvid Norberg. qBittorrent is similar to uTorrent. qBittorrent
|
||||
is fast, stable, light, it supports unicode and it provides a good integrated search engine.
|
||||
It also comes with UPnP port forwarding / NAT-PMP, encryption (Azureus compatible),
|
||||
It also comes with UPnP port forwarding / NAT-PMP, encryption (Vuze compatible),
|
||||
FAST extension (mainline) and PeX support (utorrent compatible).
|
||||
|
||||
.SH "OPTIONS"
|
||||
@@ -32,6 +31,8 @@ FAST extension (mainline) and PeX support (utorrent compatible).
|
||||
|
||||
\fB--no-splash\fR Disables splash screen on startup.
|
||||
|
||||
\fB--webui-port=x\fR Changes Web UI port to x (default: 8080).
|
||||
|
||||
.SH "BUGS"
|
||||
|
||||
If you find a bug, please report it at http://bugs.qbittorrent.org
|
||||
|
@@ -1,6 +1,4 @@
|
||||
TEMPLATE = subdirs
|
||||
|
||||
include(conf.pri)
|
||||
|
||||
SUBDIRS += src
|
||||
|
||||
|
@@ -6,6 +6,9 @@
|
||||
<dep type='qt4'>
|
||||
<required/>
|
||||
</dep>
|
||||
<dep type='pkg-config'>
|
||||
<required/>
|
||||
</dep>
|
||||
<dep type='libtorrent-rasterbar'>
|
||||
<required/>
|
||||
</dep>
|
||||
|
@@ -11,7 +11,15 @@ public:
|
||||
qc_geoip_database(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "GeoIP Database (optional)"; }
|
||||
QString shortname() const { return "GeoIP Database"; }
|
||||
QString checkString() const {
|
||||
if(!conf->getenv("QC_DISABLE_geoip_database").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
|
||||
return "";
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
bool exec() {
|
||||
if(!conf->getenv("QC_DISABLE_geoip_database").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
#ifdef Q_WS_X11
|
||||
if(!conf->getenv("QC_WITH_GEOIP_DATABASE_EMBEDDED").isEmpty()) {
|
||||
#endif
|
||||
|
@@ -10,7 +10,15 @@ public:
|
||||
qc_libnotify(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libnotify >= 0.4.2 (optional)"; }
|
||||
QString shortname() const { return "libnotify"; }
|
||||
QString checkString() const {
|
||||
if(!conf->getenv("QC_DISABLE_libnotify").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty())
|
||||
return "";
|
||||
return ConfObj::checkString();
|
||||
}
|
||||
bool exec(){
|
||||
if(!conf->getenv("QC_DISABLE_libnotify").isEmpty() || !conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
||||
return false;
|
||||
}
|
||||
QStringList incs;
|
||||
QString req_ver = "0.4.2";
|
||||
QString version, libs, other;
|
||||
|
@@ -8,11 +8,11 @@ class qc_libtorrent_rasterbar : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14.0 (>= 0.15.0 advised)"; }
|
||||
QString name() const { return "libtorrent-rasterbar >= 0.14.4"; }
|
||||
QString shortname() const { return "libtorrent-rasterbar"; }
|
||||
bool exec(){
|
||||
QStringList incs;
|
||||
QString req_ver = "0.14.0";
|
||||
QString req_ver = "0.14.4";
|
||||
QString adv_ver = "0.15.0";
|
||||
QString version, libs, other;
|
||||
VersionMode mode = VersionMin;
|
||||
@@ -23,7 +23,7 @@ public:
|
||||
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.\nAlthough it will compile and run, you will be missing some features. Please consider updating to v%s.\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
|
||||
printf("\nWarning: libtorrent-rasterbar v%s was detected. Some feature will be disabled because they require v%s.\n", version.toLocal8Bit().data(), adv_ver.toUtf8().data());
|
||||
else
|
||||
conf->addDefine("LIBTORRENT_0_15");
|
||||
return true;
|
||||
|
16
qcm/pkg-config.qcm
Normal file
@@ -0,0 +1,16 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: pkg-config
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
#include <QProcess>
|
||||
class qc_pkg_config : public ConfObj
|
||||
{
|
||||
public:
|
||||
qc_pkg_config(Conf *c) : ConfObj(c) {}
|
||||
QString name() const { return "pkg-config executable"; }
|
||||
QString shortname() const { return "pkg-config"; }
|
||||
bool exec(){
|
||||
return !conf->findProgram("pkg-config").isEmpty();
|
||||
}
|
||||
};
|
@@ -1,6 +1,7 @@
|
||||
/*
|
||||
-----BEGIN QCMOD-----
|
||||
name: Qt >= 4.4
|
||||
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
|
||||
-----END QCMOD-----
|
||||
*/
|
||||
class qc_qt4 : public ConfObj
|
||||
@@ -11,6 +12,9 @@ public:
|
||||
QString shortname() const { return "Qt 4.4"; }
|
||||
bool exec()
|
||||
{
|
||||
if(!conf->getenv("QC_DISABLE_GUI").isEmpty()) {
|
||||
conf->addDefine("DISABLE_GUI");
|
||||
}
|
||||
if(QT_VERSION >= 0x040500) {
|
||||
conf->addDefine("QT_4_5");
|
||||
}
|
||||
|
53
src/GUI.cpp
@@ -35,7 +35,6 @@
|
||||
|
||||
#include <QFileDialog>
|
||||
#include <QMessageBox>
|
||||
#include <QDesktopWidget>
|
||||
#include <QTimer>
|
||||
#include <QDesktopServices>
|
||||
#include <QStatusBar>
|
||||
@@ -60,6 +59,8 @@
|
||||
#include "speedlimitdlg.h"
|
||||
#include "preferences.h"
|
||||
#include "console_imp.h"
|
||||
#include "trackerlist.h"
|
||||
#include "peerlistwidget.h"
|
||||
#include "torrentpersistentdata.h"
|
||||
#include "transferlistfilterswidget.h"
|
||||
#include "propertieswidget.h"
|
||||
@@ -78,6 +79,7 @@ using namespace libtorrent;
|
||||
// Constructor
|
||||
GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), displaySpeedInTitle(false), force_exit(false) {
|
||||
setupUi(this);
|
||||
|
||||
setWindowTitle(tr("qBittorrent %1", "e.g: qBittorrent v0.x").arg(QString::fromUtf8(VERSION)));
|
||||
// Setting icons
|
||||
this->setWindowIcon(QIcon(QString::fromUtf8(":/Icons/skin/qbittorrent32.png")));
|
||||
@@ -185,6 +187,15 @@ GUI::GUI(QWidget *parent, QStringList torrentCmdLine) : QMainWindow(parent), dis
|
||||
readSettings();
|
||||
properties->readSettings();
|
||||
|
||||
// Limit status filters list height
|
||||
int cur_height = 80;
|
||||
do {
|
||||
transferListFilters->getStatusFilters()->setFixedHeight(cur_height);
|
||||
cur_height += 10;
|
||||
transferListFilters->getStatusFilters()->scrollToBottom();
|
||||
}while(transferListFilters->getStatusFilters()->verticalScrollBar()->sliderPosition() > 0);
|
||||
transferListFilters->getStatusFilters()->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
|
||||
if(Preferences::startMinimized()) {
|
||||
setWindowState(Qt::WindowMinimized);
|
||||
}
|
||||
@@ -344,7 +355,7 @@ void GUI::readSettings() {
|
||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
settings.beginGroup(QString::fromUtf8("MainWindow"));
|
||||
resize(settings.value(QString::fromUtf8("size"), size()).toSize());
|
||||
move(settings.value(QString::fromUtf8("pos"), screenCenter()).toPoint());
|
||||
move(settings.value(QString::fromUtf8("pos"), misc::screenCenter(this)).toPoint());
|
||||
QStringList sizes_str = settings.value("vSplitterSizes", QStringList()).toStringList();
|
||||
// Splitter size
|
||||
QList<int> sizes;
|
||||
@@ -463,22 +474,6 @@ void GUI::toggleVisibility(QSystemTrayIcon::ActivationReason e) {
|
||||
}
|
||||
}
|
||||
|
||||
// Center window
|
||||
QPoint GUI::screenCenter() const{
|
||||
int scrn = 0;
|
||||
QWidget *w = this->topLevelWidget();
|
||||
|
||||
if(w)
|
||||
scrn = QApplication::desktop()->screenNumber(w);
|
||||
else if(QApplication::desktop()->isVirtualDesktop())
|
||||
scrn = QApplication::desktop()->screenNumber(QCursor::pos());
|
||||
else
|
||||
scrn = QApplication::desktop()->screenNumber(this);
|
||||
|
||||
QRect desk(QApplication::desktop()->availableGeometry(scrn));
|
||||
return QPoint((desk.width() - this->frameGeometry().width()) / 2, (desk.height() - this->frameGeometry().height()) / 2);
|
||||
}
|
||||
|
||||
// Display About Dialog
|
||||
void GUI::on_actionAbout_triggered() {
|
||||
//About dialog
|
||||
@@ -650,8 +645,12 @@ void GUI::processParams(const QStringList& params) {
|
||||
BTSession->downloadFromUrl(param);
|
||||
}else{
|
||||
if(param.startsWith("magnet:", Qt::CaseInsensitive)) {
|
||||
// FIXME: Possibily skipped torrent addition dialog
|
||||
BTSession->addMagnetUri(param);
|
||||
if(useTorrentAdditionDialog) {
|
||||
torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession);
|
||||
dialog->showLoadMagnetURI(param);
|
||||
} else {
|
||||
BTSession->addMagnetUri(param);
|
||||
}
|
||||
} else {
|
||||
if(useTorrentAdditionDialog) {
|
||||
torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession);
|
||||
@@ -724,7 +723,10 @@ void GUI::loadPreferences(bool configure_session) {
|
||||
}
|
||||
unsigned int new_refreshInterval = Preferences::getRefreshInterval();
|
||||
transferList->setRefreshInterval(new_refreshInterval);
|
||||
|
||||
transferList->setAlternatingRowColors(Preferences::useAlternatingRowColors());
|
||||
properties->getFilesList()->setAlternatingRowColors(Preferences::useAlternatingRowColors());
|
||||
properties->getTrackerList()->setAlternatingRowColors(Preferences::useAlternatingRowColors());
|
||||
properties->getPeerList()->setAlternatingRowColors(Preferences::useAlternatingRowColors());
|
||||
// Queueing System
|
||||
if(Preferences::isQueueingSystemEnabled()) {
|
||||
if(!configure_session || !BTSession->isQueueingEnabled()) {
|
||||
@@ -832,9 +834,16 @@ void GUI::showNotificationBaloon(QString title, QString msg) const {
|
||||
*****************************************************/
|
||||
|
||||
void GUI::downloadFromURLList(const QStringList& url_list) {
|
||||
QSettings settings(QString::fromUtf8("qBittorrent"), QString::fromUtf8("qBittorrent"));
|
||||
bool useTorrentAdditionDialog = settings.value(QString::fromUtf8("Preferences/Downloads/AdditionDialog"), true).toBool();
|
||||
foreach(const QString url, url_list) {
|
||||
if(url.startsWith("magnet:", Qt::CaseInsensitive)) {
|
||||
BTSession->addMagnetUri(url);
|
||||
if(useTorrentAdditionDialog) {
|
||||
torrentAdditionDialog *dialog = new torrentAdditionDialog(this, BTSession);
|
||||
dialog->showLoadMagnetURI(url);
|
||||
} else {
|
||||
BTSession->addMagnetUri(url);
|
||||
}
|
||||
} else {
|
||||
BTSession->downloadFromUrl(url);
|
||||
}
|
||||
|
186
src/GUI.h
@@ -59,104 +59,104 @@ class StatusBar;
|
||||
class GUI : public QMainWindow, private Ui::MainWindow{
|
||||
Q_OBJECT
|
||||
|
||||
private:
|
||||
// Bittorrent
|
||||
Bittorrent *BTSession;
|
||||
QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers; // Still needed?
|
||||
// GUI related
|
||||
QTimer *guiUpdater;
|
||||
QTabWidget *tabs;
|
||||
StatusBar *status_bar;
|
||||
QPointer<options_imp> options;
|
||||
QPointer<QSystemTrayIcon> systrayIcon;
|
||||
QPointer<QTimer> systrayCreator;
|
||||
QMenu *myTrayIconMenu;
|
||||
TransferListWidget *transferList;
|
||||
TransferListFiltersWidget *transferListFilters;
|
||||
PropertiesWidget *properties;
|
||||
bool displaySpeedInTitle;
|
||||
bool force_exit;
|
||||
// Keyboard shortcuts
|
||||
QShortcut *switchSearchShortcut;
|
||||
QShortcut *switchSearchShortcut2;
|
||||
QShortcut *switchTransferShortcut;
|
||||
QShortcut *switchRSSShortcut;
|
||||
// Widgets
|
||||
QAction *prioSeparator;
|
||||
QAction *prioSeparator2;
|
||||
QSplitter *hSplitter;
|
||||
QSplitter *vSplitter;
|
||||
// Search
|
||||
SearchEngine *searchEngine;
|
||||
// RSS
|
||||
QPointer<RSSImp> rssWidget;
|
||||
// Misc
|
||||
QLocalServer *localServer;
|
||||
private:
|
||||
// Bittorrent
|
||||
Bittorrent *BTSession;
|
||||
QList<QPair<QTorrentHandle,QString> > unauthenticated_trackers; // Still needed?
|
||||
// GUI related
|
||||
QTimer *guiUpdater;
|
||||
QTabWidget *tabs;
|
||||
StatusBar *status_bar;
|
||||
QPointer<options_imp> options;
|
||||
QPointer<QSystemTrayIcon> systrayIcon;
|
||||
QPointer<QTimer> systrayCreator;
|
||||
QMenu *myTrayIconMenu;
|
||||
TransferListWidget *transferList;
|
||||
TransferListFiltersWidget *transferListFilters;
|
||||
PropertiesWidget *properties;
|
||||
bool displaySpeedInTitle;
|
||||
bool force_exit;
|
||||
// Keyboard shortcuts
|
||||
QShortcut *switchSearchShortcut;
|
||||
QShortcut *switchSearchShortcut2;
|
||||
QShortcut *switchTransferShortcut;
|
||||
QShortcut *switchRSSShortcut;
|
||||
// Widgets
|
||||
QAction *prioSeparator;
|
||||
QAction *prioSeparator2;
|
||||
QSplitter *hSplitter;
|
||||
QSplitter *vSplitter;
|
||||
// Search
|
||||
SearchEngine *searchEngine;
|
||||
// RSS
|
||||
QPointer<RSSImp> rssWidget;
|
||||
// Misc
|
||||
QLocalServer *localServer;
|
||||
|
||||
protected slots:
|
||||
// GUI related slots
|
||||
void dropEvent(QDropEvent *event);
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
void toggleVisibility(QSystemTrayIcon::ActivationReason e);
|
||||
void on_actionAbout_triggered();
|
||||
void on_actionCreate_torrent_triggered();
|
||||
void on_actionWebsite_triggered() const;
|
||||
void on_actionBugReport_triggered() const;
|
||||
void on_actionShow_console_triggered();
|
||||
void readParamsOnSocket();
|
||||
void acceptConnection();
|
||||
void balloonClicked();
|
||||
void writeSettings();
|
||||
void readSettings();
|
||||
void on_actionExit_triggered();
|
||||
void createTrayIcon();
|
||||
void fullDiskError(QTorrentHandle& h, QString msg) const;
|
||||
void handleDownloadFromUrlFailure(QString, QString) const;
|
||||
void createSystrayDelayed();
|
||||
void tab_changed(int);
|
||||
// Keyboard shortcuts
|
||||
void createKeyboardShortcuts();
|
||||
void displayTransferTab() const;
|
||||
void displaySearchTab() const;
|
||||
void displayRSSTab() const;
|
||||
// Torrent actions
|
||||
void on_actionSet_global_upload_limit_triggered();
|
||||
void on_actionSet_global_download_limit_triggered();
|
||||
void on_actionDocumentation_triggered() const;
|
||||
void on_actionOpen_triggered();
|
||||
void updateGUI();
|
||||
void loadPreferences(bool configure_session=true);
|
||||
void processParams(const QStringList& params);
|
||||
void addTorrent(QString path);
|
||||
void addUnauthenticatedTracker(QPair<QTorrentHandle,QString> tracker);
|
||||
void processDownloadedFiles(QString path, QString url);
|
||||
void downloadFromURLList(const QStringList& urls);
|
||||
void finishedTorrent(QTorrentHandle& h) const;
|
||||
// Options slots
|
||||
void on_actionOptions_triggered();
|
||||
void optionsSaved();
|
||||
// HTTP slots
|
||||
void on_actionDownload_from_URL_triggered();
|
||||
protected slots:
|
||||
// GUI related slots
|
||||
void dropEvent(QDropEvent *event);
|
||||
void dragEnterEvent(QDragEnterEvent *event);
|
||||
void toggleVisibility(QSystemTrayIcon::ActivationReason e);
|
||||
void on_actionAbout_triggered();
|
||||
void on_actionCreate_torrent_triggered();
|
||||
void on_actionWebsite_triggered() const;
|
||||
void on_actionBugReport_triggered() const;
|
||||
void on_actionShow_console_triggered();
|
||||
void readParamsOnSocket();
|
||||
void acceptConnection();
|
||||
void balloonClicked();
|
||||
void writeSettings();
|
||||
void readSettings();
|
||||
void on_actionExit_triggered();
|
||||
void createTrayIcon();
|
||||
void fullDiskError(QTorrentHandle& h, QString msg) const;
|
||||
void handleDownloadFromUrlFailure(QString, QString) const;
|
||||
void createSystrayDelayed();
|
||||
void tab_changed(int);
|
||||
// Keyboard shortcuts
|
||||
void createKeyboardShortcuts();
|
||||
void displayTransferTab() const;
|
||||
void displaySearchTab() const;
|
||||
void displayRSSTab() const;
|
||||
// Torrent actions
|
||||
void on_actionSet_global_upload_limit_triggered();
|
||||
void on_actionSet_global_download_limit_triggered();
|
||||
void on_actionDocumentation_triggered() const;
|
||||
void on_actionOpen_triggered();
|
||||
void updateGUI();
|
||||
void loadPreferences(bool configure_session=true);
|
||||
void processParams(const QStringList& params);
|
||||
void addTorrent(QString path);
|
||||
void addUnauthenticatedTracker(QPair<QTorrentHandle,QString> tracker);
|
||||
void processDownloadedFiles(QString path, QString url);
|
||||
void finishedTorrent(QTorrentHandle& h) const;
|
||||
// Options slots
|
||||
void on_actionOptions_triggered();
|
||||
void optionsSaved();
|
||||
// HTTP slots
|
||||
void on_actionDownload_from_URL_triggered();
|
||||
|
||||
|
||||
public slots:
|
||||
void trackerAuthenticationRequired(QTorrentHandle& h);
|
||||
void setTabText(int index, QString text) const;
|
||||
void showNotificationBaloon(QString title, QString msg) const;
|
||||
public slots:
|
||||
void trackerAuthenticationRequired(QTorrentHandle& h);
|
||||
void setTabText(int index, QString text) const;
|
||||
void showNotificationBaloon(QString title, QString msg) const;
|
||||
void downloadFromURLList(const QStringList& urls);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *);
|
||||
void showEvent(QShowEvent *);
|
||||
bool event(QEvent * event);
|
||||
void displayRSSTab(bool enable);
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *);
|
||||
void showEvent(QShowEvent *);
|
||||
bool event(QEvent * event);
|
||||
void displayRSSTab(bool enable);
|
||||
|
||||
public:
|
||||
// Construct / Destruct
|
||||
GUI(QWidget *parent=0, QStringList torrentCmdLine=QStringList());
|
||||
~GUI();
|
||||
// Methods
|
||||
int getCurrentTabIndex() const;
|
||||
QPoint screenCenter() const;
|
||||
public:
|
||||
// Construct / Destruct
|
||||
GUI(QWidget *parent=0, QStringList torrentCmdLine=QStringList());
|
||||
~GUI();
|
||||
// Methods
|
||||
int getCurrentTabIndex() const;
|
||||
TransferListWidget* getTransferList() const { return transferList; }
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Before Width: | Height: | Size: 743 B |
Before Width: | Height: | Size: 659 B |
BIN
src/Icons/oxygen/feed-subscribe.png
Normal file
After Width: | Height: | Size: 1.0 KiB |
BIN
src/Icons/oxygen/folder-documents.png
Normal file
After Width: | Height: | Size: 409 B |
BIN
src/Icons/oxygen/services.png
Normal file
After Width: | Height: | Size: 722 B |
@@ -1,6 +1,6 @@
|
||||
[Desktop Entry]
|
||||
Categories=Qt;Network;P2P;
|
||||
Comment=V2.0.0
|
||||
Comment=V2.1.4
|
||||
Exec=qbittorrent %f
|
||||
GenericName=Bittorrent client
|
||||
GenericName[bg]=Торент клиент
|
||||
|
BIN
src/Icons/skin/disconnected.png
Executable file
After Width: | Height: | Size: 1.4 KiB |
Before Width: | Height: | Size: 78 KiB After Width: | Height: | Size: 78 KiB |
@@ -64,7 +64,7 @@ class about : public QDialog, private Ui::AboutDlg{
|
||||
te_translation->append(QString::fromUtf8(
|
||||
"<i>- <u>Brazilian:</u> Nick Marinho (nickmarinho@gmail.com)<br>\
|
||||
- <u>Bulgarian:</u> Tsvetan & Boiko Bankov (emerge_life@users.sourceforge.net)<br>\
|
||||
- <u>Catalan:</u> Gekko Dam Beer (gekko04@users.sourceforge.net)<br>\
|
||||
- <u>Catalan:</u> Francisco Luque Contreras (frannoe@ya.com)<br>\
|
||||
- <u>Chinese (Simplified):</u> Guo Yue (yue.guo0418@gmail.com)<br>\
|
||||
- <u>Chinese (Traditional):</u> Yi-Shun Wang (dnextstep@gmail.com)<br>\
|
||||
- <u>Czech:</u> Jirka Vilim (web@tets.cz)<br>\
|
||||
@@ -84,7 +84,7 @@ class about : public QDialog, private Ui::AboutDlg{
|
||||
- <u>Russian:</u> Nick Khazov (m2k3d0n@users.sourceforge.net) and Alexey Morsov (samurai@ricom.ru)<br>\
|
||||
- <u>Serbian:</u> Anaximandar Milet (anaximandar@operamail.com)<br>\
|
||||
- <u>Slovak:</u> helix84<br>\
|
||||
- <u>Spanish:</u> Vicente Raul Plata Fonseca (silverxnt@users.sourceforge.net) and Gabriel de Oliveira (deadloop@hotmail.com)<br>\
|
||||
- <u>Spanish:</u> Francisco Luque Contreras (frannoe@ya.com)<br>\
|
||||
- <u>Swedish:</u> Daniel Nylander (po@danielnylander.se)<br>\
|
||||
- <u>Turkish:</u> Hasan YILMAZ (iletisim@hedefturkce.com) and Erdem Bingöl (erdem84@gmail.com)<br>\
|
||||
- <u>Ukrainian:</u> Andrey Shpachenko (masterfix@users.sourceforge.net)<br><br>"));
|
||||
|
2118
src/bittorrent.cpp
@@ -34,8 +34,12 @@
|
||||
#include <QMap>
|
||||
#include <QUrl>
|
||||
#include <QStringList>
|
||||
#ifdef DISABLE_GUI
|
||||
#include <QCoreApplication>
|
||||
#else
|
||||
#include <QApplication>
|
||||
#include <QPalette>
|
||||
#endif
|
||||
#include <QPointer>
|
||||
|
||||
#include <libtorrent/session.hpp>
|
||||
@@ -90,6 +94,7 @@ private:
|
||||
QPointer<QTimer> timerAlerts;
|
||||
QMap<QUrl, QString> savepath_fromurl;
|
||||
QHash<QString, QHash<QString, TrackerInfos> > trackersInfos;
|
||||
QStringList torrentsToPausedAfterChecking;
|
||||
// Ratio
|
||||
QPointer<QTimer> BigRatioTimer;
|
||||
// HTTP
|
||||
@@ -107,12 +112,20 @@ private:
|
||||
bool NATPMPEnabled;
|
||||
bool LSDEnabled;
|
||||
bool DHTEnabled;
|
||||
int current_dht_port;
|
||||
bool PeXEnabled;
|
||||
bool queueingEnabled;
|
||||
bool appendLabelToSavePath;
|
||||
#ifdef LIBTORRENT_0_15
|
||||
bool appendqBExtension;
|
||||
#endif
|
||||
QString defaultSavePath;
|
||||
QString defaultTempPath;
|
||||
// GeoIP
|
||||
#ifndef DISABLE_GUI
|
||||
bool resolve_countries;
|
||||
bool geoipDBLoaded;
|
||||
#endif
|
||||
// ETA Computation
|
||||
QPointer<QTimer> timerETA;
|
||||
QHash<QString, QList<int> > ETA_samples;
|
||||
@@ -168,6 +181,7 @@ public slots:
|
||||
void deleteTorrent(QString hash, bool delete_local_files = false);
|
||||
void startUpTorrents();
|
||||
session_proxy asyncDeletion();
|
||||
void recheckTorrent(QString hash);
|
||||
/* Needed by Web UI */
|
||||
void pauseAllTorrents();
|
||||
void pauseTorrent(QString hash);
|
||||
@@ -194,10 +208,18 @@ public slots:
|
||||
void setGlobalRatio(float ratio);
|
||||
void setDeleteRatio(float ratio);
|
||||
void setDHTPort(int dht_port);
|
||||
void setProxySettings(proxy_settings proxySettings, bool trackers=true, bool peers=true, bool web_seeds=true, bool dht=true);
|
||||
void setPeerProxySettings(proxy_settings proxySettings);
|
||||
void setHTTPProxySettings(proxy_settings proxySettings);
|
||||
void setSessionSettings(session_settings sessionSettings);
|
||||
void startTorrentsInPause(bool b);
|
||||
void setDefaultTempPath(QString temppath);
|
||||
void setAppendLabelToSavePath(bool append);
|
||||
void appendLabelToTorrentSavePath(QTorrentHandle h);
|
||||
void changeLabelInTorrentSavePath(QTorrentHandle h, QString old_label, QString new_label);
|
||||
#ifdef LIBTORRENT_0_15
|
||||
void appendqBextensionToTorrent(QTorrentHandle h, bool append);
|
||||
void setAppendqBExtension(bool append);
|
||||
#endif
|
||||
void applyEncryptionSettings(pe_settings se);
|
||||
void setDownloadLimit(QString hash, long val);
|
||||
void setUploadLimit(QString hash, long val);
|
||||
@@ -205,7 +227,11 @@ public slots:
|
||||
void enableNATPMP(bool b);
|
||||
void enableLSD(bool b);
|
||||
bool enableDHT(bool b);
|
||||
#ifdef DISABLE_GUI
|
||||
void addConsoleMessage(QString msg, QString color=QString::null);
|
||||
#else
|
||||
void addConsoleMessage(QString msg, QColor color=QApplication::palette().color(QPalette::WindowText));
|
||||
#endif
|
||||
void addPeerBanMessage(QString msg, bool from_ipfilter);
|
||||
void processDownloadedFile(QString, QString);
|
||||
void addMagnetSkipAddDlg(QString uri);
|
||||
@@ -233,6 +259,8 @@ signals:
|
||||
void downloadFromUrlFailure(QString url, QString reason);
|
||||
void torrentFinishedChecking(QTorrentHandle& h);
|
||||
void metadataReceived(QTorrentHandle &h);
|
||||
void savePathChanged(QTorrentHandle &h);
|
||||
void newConsoleMessage(QString msg);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <QDialog>
|
||||
#include "ui_confirmdeletiondlg.h"
|
||||
#include "misc.h"
|
||||
|
||||
class DeletionConfirmationDlg : public QDialog, private Ui::confirmDeletionDlg {
|
||||
Q_OBJECT
|
||||
@@ -40,6 +41,7 @@ class DeletionConfirmationDlg : public QDialog, private Ui::confirmDeletionDlg {
|
||||
public:
|
||||
DeletionConfirmationDlg(QWidget *parent=0): QDialog(parent) {
|
||||
setupUi(this);
|
||||
move(misc::screenCenter(this));
|
||||
}
|
||||
|
||||
bool shouldDeleteLocalFiles() const {
|
||||
|
@@ -36,6 +36,7 @@
|
||||
#include <QList>
|
||||
#include <QPixmap>
|
||||
#include <libtorrent/bitfield.hpp>
|
||||
#include <math.h>
|
||||
|
||||
using namespace libtorrent;
|
||||
#define BAR_HEIGHT 18
|
||||
@@ -55,19 +56,46 @@ public:
|
||||
void setProgress(bitfield pieces) {
|
||||
if(pieces.empty()) {
|
||||
// Empty bar
|
||||
pixmap = QPixmap(1, 1);
|
||||
QPainter painter(&pixmap);
|
||||
painter.setPen(Qt::white);
|
||||
painter.drawPoint(0,0);
|
||||
QPixmap pix = QPixmap(1, 1);
|
||||
pix.fill();
|
||||
pixmap = pix;
|
||||
} else {
|
||||
pixmap = QPixmap(pieces.size(), 1);
|
||||
QPainter painter(&pixmap);
|
||||
for(uint i=0; i<pieces.size(); ++i) {
|
||||
if(pieces[i])
|
||||
painter.setPen(Qt::blue);
|
||||
else
|
||||
painter.setPen(Qt::white);
|
||||
painter.drawPoint(i,0);
|
||||
int nb_pieces = pieces.size();
|
||||
// Reduce the number of pieces before creating the pixmap
|
||||
// otherwise it can crash when there are too many pieces
|
||||
if(nb_pieces > width()) {
|
||||
int ratio = floor(nb_pieces/(double)width());
|
||||
QVector<bool> scaled_pieces;
|
||||
for(int i=0; i<nb_pieces; i+= ratio) {
|
||||
bool have = true;
|
||||
for(int j=i; j<qMin(i+ratio, nb_pieces); ++j) {
|
||||
if(!pieces[i]) { have = false; break; }
|
||||
}
|
||||
scaled_pieces << have;
|
||||
}
|
||||
QPixmap pix = QPixmap(scaled_pieces.size(), 1);
|
||||
pix.fill();
|
||||
QPainter painter(&pix);
|
||||
for(int i=0; i<scaled_pieces.size(); ++i) {
|
||||
if(scaled_pieces[i])
|
||||
painter.setPen(Qt::blue);
|
||||
else
|
||||
painter.setPen(Qt::white);
|
||||
painter.drawPoint(i,0);
|
||||
}
|
||||
pixmap = pix;
|
||||
} else {
|
||||
QPixmap pix = QPixmap(pieces.size(), 1);
|
||||
pix.fill();
|
||||
QPainter painter(&pix);
|
||||
for(uint i=0; i<pieces.size(); ++i) {
|
||||
if(pieces[i])
|
||||
painter.setPen(Qt::blue);
|
||||
else
|
||||
painter.setPen(Qt::white);
|
||||
painter.drawPoint(i,0);
|
||||
}
|
||||
pixmap = pix;
|
||||
}
|
||||
}
|
||||
update();
|
||||
|
@@ -35,6 +35,8 @@
|
||||
#include <QNetworkRequest>
|
||||
#include <QNetworkProxy>
|
||||
|
||||
enum ProxyType {HTTP=1, SOCKS5=2, HTTP_PW=3, SOCKS5_PW=4, SOCKS4=5};
|
||||
|
||||
/** Download Thread **/
|
||||
|
||||
downloadThread::downloadThread(QObject* parent) : QObject(parent) {
|
||||
@@ -54,6 +56,18 @@ void downloadThread::processDlFinished(QNetworkReply* reply) {
|
||||
// Failure
|
||||
emit downloadFailure(url, errorCodeToString(reply->error()));
|
||||
} else {
|
||||
QVariant redirection = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
|
||||
if(redirection.isValid()) {
|
||||
// We should redirect
|
||||
qDebug("Redirecting from %s to %s", url.toLocal8Bit().data(), redirection.toUrl().toString().toLocal8Bit().data());
|
||||
redirect_mapping.insert(redirection.toUrl().toString(), url);
|
||||
downloadUrl(redirection.toUrl().toString());
|
||||
return;
|
||||
}
|
||||
// Checking if it was redirecting, restoring initial URL
|
||||
if(redirect_mapping.contains(url)) {
|
||||
url = redirect_mapping.take(url);
|
||||
}
|
||||
// Success
|
||||
QString filePath;
|
||||
QTemporaryFile tmpfile;
|
||||
@@ -105,7 +119,7 @@ void downloadThread::applyProxySettings() {
|
||||
qDebug("Using proxy: %s", (IP+QString(":")+port).toLocal8Bit().data());
|
||||
proxy.setPort(port.toUShort());
|
||||
// Default proxy type is HTTP, we must change if it is SOCKS5
|
||||
if(intValue%2==0) {
|
||||
if(intValue == SOCKS5 || intValue == SOCKS5_PW) {
|
||||
qDebug("Proxy is SOCKS5, not HTTP");
|
||||
proxy.setType(QNetworkProxy::Socks5Proxy);
|
||||
} else {
|
||||
|
@@ -33,6 +33,7 @@
|
||||
|
||||
#include <QNetworkReply>
|
||||
#include <QObject>
|
||||
#include <QHash>
|
||||
|
||||
class QNetworkAccessManager;
|
||||
|
||||
@@ -41,6 +42,7 @@ class downloadThread : public QObject {
|
||||
|
||||
private:
|
||||
QNetworkAccessManager *networkManager;
|
||||
QHash<QString, QString> redirect_mapping;
|
||||
|
||||
signals:
|
||||
void downloadFinished(QString url, QString file_path);
|
||||
|
@@ -170,7 +170,7 @@ void engineSelectDlg::on_actionUninstall_triggered() {
|
||||
}else {
|
||||
// Proceed with uninstall
|
||||
// remove it from hard drive
|
||||
QDir enginesFolder(misc::qBittorrentPath()+"search_engine"+QDir::separator()+"engines");
|
||||
QDir enginesFolder(misc::searchEngineLocation()+QDir::separator()+"engines");
|
||||
QStringList filters;
|
||||
filters << id+".*";
|
||||
QStringList files = enginesFolder.entryList(filters, QDir::Files, QDir::Unsorted);
|
||||
@@ -245,7 +245,7 @@ QTreeWidgetItem* engineSelectDlg::findItemWithID(QString id){
|
||||
}
|
||||
|
||||
bool engineSelectDlg::isUpdateNeeded(QString plugin_name, float new_version) const {
|
||||
float old_version = SearchEngine::getPluginVersion(misc::qBittorrentPath()+"search_engine"+QDir::separator()+"engines"+QDir::separator()+plugin_name+".py");
|
||||
float old_version = SearchEngine::getPluginVersion(misc::searchEngineLocation()+QDir::separator()+"engines"+QDir::separator()+plugin_name+".py");
|
||||
qDebug("IsUpdate needed? tobeinstalled: %.2f, alreadyinstalled: %.2f", new_version, old_version);
|
||||
return (new_version > old_version);
|
||||
}
|
||||
@@ -260,7 +260,7 @@ void engineSelectDlg::installPlugin(QString path, QString plugin_name) {
|
||||
return;
|
||||
}
|
||||
// Process with install
|
||||
QString dest_path = misc::qBittorrentPath()+"search_engine"+QDir::separator()+"engines"+QDir::separator()+plugin_name+".py";
|
||||
QString dest_path = misc::searchEngineLocation()+QDir::separator()+"engines"+QDir::separator()+plugin_name+".py";
|
||||
bool update = false;
|
||||
if(QFile::exists(dest_path)) {
|
||||
// Backup in case install fails
|
||||
@@ -324,12 +324,12 @@ void engineSelectDlg::addNewEngine(QString engine_name) {
|
||||
setRowColor(pluginsTree->indexOfTopLevelItem(item), "red");
|
||||
}
|
||||
// Handle icon
|
||||
QString iconPath = misc::qBittorrentPath()+"search_engine"+QDir::separator()+"engines"+QDir::separator()+engine->getName()+".png";
|
||||
QString iconPath = misc::searchEngineLocation()+QDir::separator()+"engines"+QDir::separator()+engine->getName()+".png";
|
||||
if(QFile::exists(iconPath)) {
|
||||
// Good, we already have the icon
|
||||
item->setData(ENGINE_NAME, Qt::DecorationRole, QVariant(QIcon(iconPath)));
|
||||
} else {
|
||||
iconPath = misc::qBittorrentPath()+"search_engine"+QDir::separator()+"engines"+QDir::separator()+engine->getName()+".ico";
|
||||
iconPath = misc::searchEngineLocation()+QDir::separator()+"engines"+QDir::separator()+engine->getName()+".ico";
|
||||
if(QFile::exists(iconPath)) { // ICO support
|
||||
item->setData(ENGINE_NAME, Qt::DecorationRole, QVariant(QIcon(iconPath)));
|
||||
} else {
|
||||
@@ -427,9 +427,9 @@ void engineSelectDlg::processDownloadedFile(QString url, QString filePath) {
|
||||
QFile icon(filePath);
|
||||
icon.open(QIODevice::ReadOnly);
|
||||
if(ICOHandler::canRead(&icon))
|
||||
iconPath = misc::qBittorrentPath()+"search_engine"+QDir::separator()+"engines"+QDir::separator()+id+".ico";
|
||||
iconPath = misc::searchEngineLocation()+QDir::separator()+"engines"+QDir::separator()+id+".ico";
|
||||
else
|
||||
iconPath = misc::qBittorrentPath()+"search_engine"+QDir::separator()+"engines"+QDir::separator()+id+".png";
|
||||
iconPath = misc::searchEngineLocation()+QDir::separator()+"engines"+QDir::separator()+id+".png";
|
||||
QFile::copy(filePath, iconPath);
|
||||
item->setData(ENGINE_NAME, Qt::DecorationRole, QVariant(QIcon(iconPath)));
|
||||
}
|
||||
|
@@ -33,12 +33,12 @@
|
||||
#include "bittorrent.h"
|
||||
#include "misc.h"
|
||||
#include "preferences.h"
|
||||
#include "proplistdelegate.h"
|
||||
//#include "proplistdelegate.h"
|
||||
#include "torrentpersistentdata.h"
|
||||
#include <QDebug>
|
||||
|
||||
EventManager::EventManager(QObject *parent, Bittorrent *BTSession)
|
||||
: QObject(parent), BTSession(BTSession)
|
||||
: QObject(parent), BTSession(BTSession)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -103,13 +103,9 @@ QList<QVariantMap> EventManager::getPropFilesInfo(QString hash) const {
|
||||
int i=0;
|
||||
for(fi=t.begin_files(); fi != t.end_files(); fi++) {
|
||||
QVariantMap file;
|
||||
if(h.num_files() == 1) {
|
||||
file["name"] = h.name();
|
||||
} else {
|
||||
QString path = QDir::cleanPath(misc::toQString(fi->path.string()));
|
||||
QString name = path.split('/').last();
|
||||
file["name"] = name;
|
||||
}
|
||||
QString path = QDir::cleanPath(misc::toQString(fi->path.string()));
|
||||
QString name = path.split('/').last();
|
||||
file["name"] = name;
|
||||
file["size"] = misc::friendlyUnit((double)fi->size);
|
||||
if(fi->size > 0)
|
||||
file["progress"] = fp[i]/(double)fi->size;
|
||||
@@ -122,14 +118,162 @@ QList<QVariantMap> EventManager::getPropFilesInfo(QString hash) const {
|
||||
return files;
|
||||
}
|
||||
|
||||
void EventManager::setGlobalPreferences(QVariantMap m) const {
|
||||
// UI
|
||||
if(m.contains("locale"))
|
||||
Preferences::setLocale(m["locale"].toString());
|
||||
// Downloads
|
||||
if(m.contains("save_path"))
|
||||
Preferences::setSavePath(m["save_path"].toString());
|
||||
if(m.contains("temp_path_enabled"))
|
||||
Preferences::setTempPathEnabled(m["temp_path_enabled"].toBool());
|
||||
if(m.contains("temp_path"))
|
||||
Preferences::setTempPath(m["temp_path"].toString());
|
||||
if(m.contains("scan_dir"))
|
||||
Preferences::setScanDir(m["scan_dir"].toString());
|
||||
if(m.contains("preallocate_all"))
|
||||
Preferences::preAllocateAllFiles(m["preallocate_all"].toBool());
|
||||
if(m.contains("queueing_enabled"))
|
||||
Preferences::setQueueingSystemEnabled(m["queueing_enabled"].toBool());
|
||||
if(m.contains("max_active_downloads"))
|
||||
Preferences::setMaxActiveDownloads(m["max_active_downloads"].toInt());
|
||||
if(m.contains("max_active_torrents"))
|
||||
Preferences::setMaxActiveTorrents(m["max_active_torrents"].toInt());
|
||||
if(m.contains("max_active_uploads"))
|
||||
Preferences::setMaxActiveUploads(m["max_active_uploads"].toInt());
|
||||
#ifdef LIBTORRENT_0_15
|
||||
if(m.contains("incomplete_files_ext"))
|
||||
Preferences::useIncompleteFilesExtension(m["incomplete_files_ext"].toBool());
|
||||
#endif
|
||||
// Connection
|
||||
if(m.contains("listen_port"))
|
||||
Preferences::setSessionPort(m["listen_port"].toInt());
|
||||
if(m.contains("upnp"))
|
||||
Preferences::setUPnPEnabled(m["upnp"].toBool());
|
||||
if(m.contains("natpmp"))
|
||||
Preferences::setNATPMPEnabled(m["natpmp"].toBool());
|
||||
if(m.contains("dl_limit"))
|
||||
Preferences::setGlobalDownloadLimit(m["dl_limit"].toInt());
|
||||
if(m.contains("up_limit"))
|
||||
Preferences::setGlobalUploadLimit(m["up_limit"].toInt());
|
||||
if(m.contains("max_connec"))
|
||||
Preferences::setMaxConnecs(m["max_connec"].toInt());
|
||||
if(m.contains("max_connec_per_torrent"))
|
||||
Preferences::setMaxConnecsPerTorrent(m["max_connec_per_torrent"].toInt());
|
||||
if(m.contains("max_uploads_per_torrent"))
|
||||
Preferences::setMaxUploadsPerTorrent(m["max_uploads_per_torrent"].toInt());
|
||||
// Bittorrent
|
||||
if(m.contains("dht"))
|
||||
Preferences::setDHTEnabled(m["dht"].toBool());
|
||||
if(m.contains("pex"))
|
||||
Preferences::setPeXEnabled(m["pex"].toBool());
|
||||
qDebug("Pex support: %d", (int)m["pex"].toBool());
|
||||
if(m.contains("lsd"))
|
||||
Preferences::setLSDEnabled(m["lsd"].toBool());
|
||||
if(m.contains("encryption"))
|
||||
Preferences::setEncryptionSetting(m["encryption"].toInt());
|
||||
if(m.contains("peer_id"))
|
||||
Preferences::setPeerID(m["peer_id"].toString());
|
||||
if(m.contains("peer_version"))
|
||||
Preferences::setClientVersion(m["peer_version"].toString());
|
||||
if(m.contains("peer_build"))
|
||||
Preferences::setClientBuild(m["peer_build"].toString());
|
||||
// Proxy
|
||||
if(m.contains("proxy_type"))
|
||||
Preferences::setPeerProxyType(m["proxy_type"].toInt());
|
||||
if(m.contains("proxy_ip"))
|
||||
Preferences::setPeerProxyIp(m["proxy_ip"].toString());
|
||||
if(m.contains("proxy_port"))
|
||||
Preferences::setPeerProxyPort(m["proxy_port"].toUInt());
|
||||
if(m.contains("proxy_auth_enabled"))
|
||||
Preferences::setPeerProxyAuthEnabled(m["proxy_auth_enabled"].toBool());
|
||||
if(m.contains("proxy_username"))
|
||||
Preferences::setPeerProxyUsername(m["proxy_username"].toString());
|
||||
if(m.contains("proxy_password"))
|
||||
Preferences::setPeerProxyPassword(m["proxy_password"].toString());
|
||||
if(m.contains("http_proxy_type"))
|
||||
Preferences::setHTTPProxyType(m["http_proxy_type"].toInt());
|
||||
if(m.contains("http_proxy_ip"))
|
||||
Preferences::setHTTPProxyIp(m["http_proxy_ip"].toString());
|
||||
if(m.contains("http_proxy_port"))
|
||||
Preferences::setHTTPProxyPort(m["http_proxy_port"].toUInt());
|
||||
if(m.contains("http_proxy_auth_enabled"))
|
||||
Preferences::setHTTPProxyAuthEnabled(m["http_proxy_auth_enabled"].toBool());
|
||||
if(m.contains("http_proxy_username"))
|
||||
Preferences::setHTTPProxyUsername(m["http_proxy_username"].toString());
|
||||
if(m.contains("http_proxy_password"))
|
||||
Preferences::setHTTPProxyPassword(m["http_proxy_password"].toString());
|
||||
// IP Filter
|
||||
if(m.contains("ip_filter_enabled"))
|
||||
Preferences::setFilteringEnabled(m["ip_filter_enabled"].toBool());
|
||||
if(m.contains("ip_filter_path"))
|
||||
Preferences::setFilter(m["ip_filter_path"].toString());
|
||||
// Web UI
|
||||
if(m.contains("web_ui_port"))
|
||||
Preferences::setWebUiPort(m["web_ui_port"].toUInt());
|
||||
if(m.contains("web_ui_username"))
|
||||
Preferences::setWebUiUsername(m["web_ui_username"].toString());
|
||||
if(m.contains("web_ui_password"))
|
||||
Preferences::setWebUiPassword(m["web_ui_password"].toString());
|
||||
// Reload preferences
|
||||
BTSession->configureSession();
|
||||
}
|
||||
|
||||
QVariantMap EventManager::getGlobalPreferences() const {
|
||||
QVariantMap data;
|
||||
// UI
|
||||
data["locale"] = Preferences::getLocale();
|
||||
// Downloads
|
||||
data["save_path"] = Preferences::getSavePath();
|
||||
data["temp_path_enabled"] = Preferences::isTempPathEnabled();
|
||||
data["temp_path"] = Preferences::getTempPath();
|
||||
data["scan_dir_enabled"] = Preferences::isDirScanEnabled();
|
||||
data["scan_dir"] = Preferences::getScanDir();
|
||||
data["preallocate_all"] = Preferences::preAllocateAllFiles();
|
||||
data["queueing_enabled"] = Preferences::isQueueingSystemEnabled();
|
||||
data["max_active_downloads"] = Preferences::getMaxActiveDownloads();
|
||||
data["max_active_torrents"] = Preferences::getMaxActiveTorrents();
|
||||
data["max_active_uploads"] = Preferences::getMaxActiveUploads();
|
||||
#ifdef LIBTORRENT_0_15
|
||||
data["incomplete_files_ext"] = Preferences::useIncompleteFilesExtension();
|
||||
#endif
|
||||
// Connection
|
||||
data["listen_port"] = Preferences::getSessionPort();
|
||||
data["upnp"] = Preferences::isUPnPEnabled();
|
||||
data["natpmp"] = Preferences::isNATPMPEnabled();
|
||||
data["dl_limit"] = Preferences::getGlobalDownloadLimit();
|
||||
data["up_limit"] = Preferences::getGlobalUploadLimit();
|
||||
data["dht"] = Preferences::isDHTEnabled();
|
||||
data["max_connec"] = Preferences::getMaxConnecs();
|
||||
data["max_connec_per_torrent"] = Preferences::getMaxConnecsPerTorrent();
|
||||
data["max_uploads_per_torrent"] = Preferences::getMaxUploadsPerTorrent();
|
||||
// Bittorrent
|
||||
data["dht"] = Preferences::isDHTEnabled();
|
||||
data["pex"] = Preferences::isPeXEnabled();
|
||||
data["lsd"] = Preferences::isLSDEnabled();
|
||||
data["encryption"] = Preferences::getEncryptionSetting();
|
||||
data["peer_id"] = Preferences::getPeerID();
|
||||
data["peer_version"] = Preferences::getClientVersion();
|
||||
data["peer_build"] = Preferences::getClientBuild();
|
||||
// Proxy
|
||||
data["proxy_type"] = Preferences::getPeerProxyType();
|
||||
data["proxy_ip"] = Preferences::getPeerProxyIp();
|
||||
data["proxy_port"] = Preferences::getPeerProxyPort();
|
||||
data["proxy_auth_enabled"] = Preferences::isPeerProxyAuthEnabled();
|
||||
data["proxy_username"] = Preferences::getPeerProxyUsername();
|
||||
data["proxy_password"] = Preferences::getPeerProxyPassword();
|
||||
data["http_proxy_type"] = Preferences::getHTTPProxyType();
|
||||
data["http_proxy_ip"] = Preferences::getHTTPProxyIp();
|
||||
data["http_proxy_port"] = Preferences::getHTTPProxyPort();
|
||||
data["http_proxy_auth_enabled"] = Preferences::isHTTPProxyAuthEnabled();
|
||||
data["http_proxy_username"] = Preferences::getHTTPProxyUsername();
|
||||
data["http_proxy_password"] = Preferences::getHTTPProxyPassword();
|
||||
// IP Filter
|
||||
data["ip_filter_enabled"] = Preferences::isFilteringEnabled();
|
||||
data["ip_filter_path"] = Preferences::getFilter();
|
||||
// Web UI
|
||||
data["web_ui_port"] = Preferences::getWebUiPort();
|
||||
data["web_ui_username"] = Preferences::getWebUiUsername();
|
||||
data["web_ui_password"] = Preferences::getWebUiPassword();
|
||||
return data;
|
||||
}
|
||||
|
||||
@@ -162,10 +306,10 @@ QVariantMap EventManager::getPropGeneralInfo(QString hash) const {
|
||||
data["nb_connections"] = QString::number(h.num_connections())+" ("+tr("%1 max", "e.g. 10 max").arg(QString::number(h.connections_limit()))+")";
|
||||
// Update ratio info
|
||||
double ratio = BTSession->getRealRatio(h.hash());
|
||||
if(ratio > 100.)
|
||||
data["share_ratio"] = QString::fromUtf8("∞");
|
||||
else
|
||||
data["share_ratio"] = QString(QByteArray::number(ratio, 'f', 1));
|
||||
if(ratio > 100.)
|
||||
data["share_ratio"] = QString::fromUtf8("∞");
|
||||
else
|
||||
data["share_ratio"] = QString(QByteArray::number(ratio, 'f', 1));
|
||||
}
|
||||
return data;
|
||||
}
|
||||
@@ -233,7 +377,7 @@ void EventManager::modifiedTorrent(QTorrentHandle h)
|
||||
}
|
||||
event["name"] = QVariant(h.name());
|
||||
event["size"] = QVariant(misc::friendlyUnit(h.actual_size()));
|
||||
event["progress"] = QVariant(h.progress());
|
||||
event["progress"] = QVariant((double)h.progress());
|
||||
event["dlspeed"] = QVariant(tr("%1/s", "e.g. 120 KiB/s").arg(misc::friendlyUnit(h.download_payload_rate())));
|
||||
if(BTSession->isQueueingEnabled()) {
|
||||
if(h.queue_position() >= 0)
|
||||
|