1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-09 18:32:15 +02:00

Compare commits

...

397 Commits

Author SHA1 Message Date
Christophe Dumez
eb10a80c3c Bump version to v3.0.8 2013-01-20 11:27:53 +02:00
Christophe Dumez
3679c79b5c Add plugin versions.txt file for python3 2013-01-20 00:01:48 +02:00
Christophe Dumez
a0816d1ec6 Update plugin versions 2013-01-20 00:01:48 +02:00
Christophe Dumez
175ac42b43 Fix duplicate results in piratebay results 2013-01-19 23:28:41 +02:00
Christophe Dumez
d39874551c Update Changelog 2013-01-19 19:50:01 +02:00
Christophe Dumez
16402f75cf Fix dead link in preferences 2013-01-19 19:49:12 +02:00
Christophe Dumez
aacea44d41 Use HTTPS for btdigg 2013-01-19 19:36:10 +02:00
Christophe Dumez
f2a90520d7 Really fix kat search engine with python3 2013-01-19 19:30:28 +02:00
Christophe Dumez
34d25006f4 Update Changelog 2013-01-19 18:56:12 +02:00
Christophe Dumez
e382fb1bec Fix kat.ph search with python3 2013-01-19 18:55:32 +02:00
Christophe Dumez
ba9e3558a2 Update Changelog 2013-01-19 18:17:52 +02:00
Christophe Dumez
f6514b4e7d Fix compilation error with libtorrent v0.15 2013-01-19 18:17:20 +02:00
Christophe Dumez
fe7ffdd413 Better fix for --no-splash argument 2013-01-19 16:39:11 +02:00
Christophe Dumez
8d1a4cb40a Update Changelog 2013-01-19 16:23:54 +02:00
Christophe Dumez
ad3f4842f8 Fix support for --no-splash command line argument 2013-01-19 16:22:47 +02:00
Christophe Dumez
944fc5cf38 Bump version to v3.0.7 2013-01-19 13:55:42 +02:00
Christophe Dumez
026c065ebc Remove "Force reannounce" action
Does not work as intended.
2013-01-16 20:04:45 +02:00
Christophe Dumez
00ac784a4d Stop listening on port 4433 since we do not support SSL torrents 2013-01-16 19:08:32 +02:00
sledgehammer999
7d99223547 Store language settings for the installer. Use them in the unistaller too. 2013-01-13 18:51:36 +02:00
sledgehammer999
65a338b5c2 Remove qBittorrent Start Menu folder when uninstalling. Partially fixes #291. 2013-01-13 18:51:36 +02:00
Christophe Dumez
b0fd6ac756 Safer check 2013-01-13 13:01:24 +02:00
Christophe Dumez
c268ca1278 Update Changelog 2013-01-13 12:57:24 +02:00
Christophe Dumez
13e3141dfb Fix possible crash in loadPeers() (closes #222) 2013-01-13 12:57:01 +02:00
Christophe Dumez
70fbd61758 Update Changelog 2013-01-12 19:20:44 +02:00
Christophe Dumez
db638319c7 Require password to exit qBittorrent from tray icon when locked (closes #311) 2013-01-12 19:20:21 +02:00
Christophe Dumez
8d36a03f68 Update Changelog 2013-01-12 18:56:24 +02:00
Christophe Dumez
2b8dc3df18 Bump mootools to 1.4.5 2013-01-12 18:55:50 +02:00
Christophe Dumez
11c5172588 Update Changelog 2013-01-09 19:21:22 +02:00
Christophe Dumez
43f55f5d3c Update language files 2013-01-09 19:18:27 +02:00
Christophe Dumez
153ebe2b77 Fix torrentreactor engine plugin 2013-01-09 19:17:38 +02:00
Christophe Dumez
70d11217de Remove torrentdownloads.ws search plugin (Pretty much dead...) 2013-01-08 22:26:42 +02:00
Christophe Dumez
82beff5527 Really use HTTPS link for isohunt engine 2013-01-08 22:26:42 +02:00
Christophe Dumez
2e4f0876b0 Use HTTPS link for thepiratebay.se 2013-01-08 22:26:42 +02:00
Christophe Dumez
072a72316f Use HTTPS link for isohunt 2013-01-08 22:26:42 +02:00
Christophe Dumez
d199482205 Use HTTPS link for kat.ph plugin 2013-01-08 22:26:42 +02:00
Christophe Dumez
eae7953061 Search plugins: Properly uncompress gzipped responses in retrieve_url() 2013-01-08 22:25:58 +02:00
Christophe Dumez
d88d4e9165 Remove outdated torrentz link 2013-01-08 20:09:18 +02:00
Christophe Dumez
cea36bc756 Remove btjunkie search plugin 2013-01-08 18:58:28 +02:00
Christophe Dumez
c517444258 Update Italian translation. 2013-01-02 18:24:38 +02:00
Nick Tiskov
a109274d1f Move QTPLUGIN qmake macro to src.pro. 2012-12-30 19:03:33 +02:00
Nick Tiskov
490cb9dfdb Use qico plugin in static build. Required for RSS favicon capabilities. 2012-12-30 19:03:33 +02:00
Nick Tiskov
ab748166d5 Anonymous mode link is not opened in default browser. 2012-12-30 12:23:46 +02:00
Christophe Dumez
a796df9019 Merge pull request #259 from sledgehammer999/revert_disk_cache
Partially revert commit aeb5fa. See issue #258.
2012-12-26 21:34:52 +02:00
Christophe Dumez
85abc98759 Update Changelog 2012-12-03 18:53:14 +02:00
Christophe Dumez
041540de6b Reenable OS cache on Windows 2012-12-03 18:52:42 +02:00
Christophe Dumez
72a06ad176 Update Changelog 2012-12-01 17:59:25 +02:00
Christophe Dumez
eea69630fb Merge pull request #254 from sledgehammer999/fix_default_path
Fix behaviour of the torrent addition dialog. The 'set as default path' ...
2012-12-01 17:57:07 +02:00
sledgehammer999
19846758d8 Minor optimization in qbtsession. 2012-12-01 15:06:01 +02:00
Christophe Dumez
7532fcfd3c Update Changelog 2012-12-01 10:09:17 +02:00
sledgehammer999
616575911f Improve the display of paths in the 'Add new torrent' dialog. 2012-12-01 10:08:22 +02:00
sledgehammer999
227a1f6532 Improve the handling of native directory separators. 2012-12-01 10:08:22 +02:00
Christophe Dumez
2c7186a381 Update Changelog 2012-11-24 10:48:21 +02:00
Christophe Dumez
b4775b9d29 Fix "Couldn't set environment variable..." message on start up (closes #245) 2012-11-24 10:48:04 +02:00
Christophe Dumez
ad8d7e3373 Update Changelog 2012-11-11 19:25:04 +02:00
Christophe Dumez
b5e7443ae3 Add m4v to the list of previewable file extensions (closes #216)
Also optimize the misc::isPreviewable() function.
2012-11-11 19:24:39 +02:00
Nick Tiskov
5a33c0d9ba Fix 'must not contain' regexp with '|' character
Checking if we are using regexp was done in setMustContain and
setMustNotContain before m_useRegex  was even read, corrupting the
value.
Only m_mustNotContain is affected because of how
RssDownloadRule::setMustNotContain handles read string when m_useRegex
is false.
2012-11-10 19:56:28 +02:00
Christophe Dumez
7064ac994b Merge pull request #215 from sledgehammer999/create_torrent
Open stream in binary mode. Fixes issue #161
2012-11-10 19:55:23 +02:00
Christophe Dumez
3c05e660b3 Fixes to Italian translation 2012-10-14 09:48:59 +03:00
Christophe Dumez
ed54c5f7ac Update language files 2012-10-07 19:17:00 +03:00
Christophe Dumez
63d6dd3735 Update Changelog 2012-10-07 19:16:14 +03:00
Christophe Dumez
02d56fd026 Update max write cache size to 2048MB and set it to automatic by default (closes #148) 2012-10-07 19:14:53 +03:00
Christophe Dumez
d4c9da6475 Bump version to v3.0.6 2012-10-07 17:40:52 +03:00
Christophe Dumez
99f126d0b6 Update language files 2012-10-07 17:29:53 +03:00
Christophe Dumez
8110d0eb01 Update Changelog 2012-10-07 17:29:14 +03:00
Christophe Dumez
90a2021948 Fix cookie support for RSS feeds (closes #119) 2012-10-07 17:28:22 +03:00
Christophe Dumez
7bfd0e058b Update Changelog 2012-10-07 17:08:44 +03:00
Christophe Dumez
6dcfe5b215 Fix timezone parsing in RSS (closes #136) 2012-10-07 17:08:27 +03:00
Christophe Dumez
7daeb0297d Update Changelog 2012-10-07 16:05:37 +03:00
Christophe Dumez
76597fa080 No longer fallback to ANY interface if the user-selected interface cannot be found (closes #143) 2012-10-07 16:05:14 +03:00
Christophe Dumez
14908f3fc8 Update Changelog 2012-10-07 15:43:48 +03:00
Christophe Dumez
3269cdfa70 Do not store created torrent in memory before writing it to a file (closes #133) 2012-10-07 15:43:25 +03:00
Christophe Dumez
5f0e3e3443 Update Changelog 2012-10-07 08:58:14 +03:00
sledgehammer999
fcd37dcbb4 Fix encoding problem. Fixes #139 2012-10-07 08:56:47 +03:00
Christophe Dumez
528759fdaa Bump version to v3.0.5 2012-09-30 10:58:35 +03:00
Christophe Dumez
cfe1235b57 Fix Changelog 2012-09-29 16:22:44 +03:00
Christophe Dumez
e5d5f84ae7 Properly recover from HTTP parsing errors (Web UI)
May be related to issue #68.
2012-09-29 16:18:51 +03:00
Christophe Dumez
bbda5c4f44 Fix handling of simultaneous connections in Web UI.
May be related to issue #68.
2012-09-29 16:18:40 +03:00
Christophe Dumez
9605192834 Update Changelog 2012-09-29 14:00:58 +03:00
Christophe Dumez
4c6e526e6c Fix "Skip hash check" feature in torrent import dialog (closes #128) 2012-09-29 14:00:30 +03:00
Christophe Dumez
e43fa17429 Fix version in Changelog 2012-09-28 17:56:51 +03:00
Christophe Dumez
c5dd14788a Update Changelog 2012-09-28 17:50:03 +03:00
Christophe Dumez
334ba32d69 Add Basque locale to Web UI 2012-09-28 17:49:25 +03:00
Christophe Dumez
8ba1941ab9 Fix homepage link in Web UI (closes #118) 2012-09-23 19:31:51 +03:00
Christophe Dumez
ea85532cc2 Update Changelog 2012-09-23 11:11:47 +03:00
Christophe Dumez
d3ee2e66af Import new trackers from magnet link in case of duplicate torrent (closes #111) 2012-09-23 11:11:09 +03:00
Christophe Dumez
4ac917ef66 Update Changelog 2012-09-22 14:03:30 +03:00
Christophe Dumez
41660385d7 Disabling systray icon no longer disables file association settings (closes #114) 2012-09-22 14:02:38 +03:00
Christophe Dumez
e5ae8e5ac9 Fixes to Italian translation 2012-09-22 13:19:23 +03:00
Christophe Dumez
7fb87660ac Update Italian author 2012-09-20 20:51:28 +03:00
Christophe Dumez
6ea7b5b1d0 OS/2 fixes by Silvan Scherrer 2012-09-20 20:46:35 +03:00
sledgehammer999
b624ad312b Updated installer script to ommit specific translations. 2012-09-18 23:03:15 +03:00
sledgehammer999
b64f4081cf Packaging script for Windows. 2012-09-18 23:03:05 +03:00
Christophe Dumez
bd9b153e9b Remove qt translations for locales that are not supported by qBittorrent 2012-09-18 22:53:23 +03:00
Christophe Dumez
32ca66f234 Merge pull request #103 from sledgehammer999/translations
Update Qt translations to v4.8.3
2012-09-18 22:53:14 +03:00
Christophe Dumez
753e9181fe Update Changelog and bump version to v3.0.4 2012-09-18 20:05:01 +03:00
Christophe Dumez
9546a73182 Fix torrent temporary path functionality 2012-09-18 20:01:59 +03:00
Christophe Dumez
c0ee99c553 Improve Mac packaging.
We now ship qt translations.
2012-09-16 10:36:24 +03:00
Christophe Dumez
50976b8dc2 Bump version to v3.0.3 2012-09-16 09:31:45 +03:00
Christophe Dumez
6a312461a1 Merge pull request #98 from sledgehammer999/windows_build2
Added version info for the binary.
2012-09-16 09:07:14 +03:00
Christophe Dumez
3fe09bde12 Merge pull request #97 from sledgehammer999/windows_build
Some typo fix and library names fix.
2012-09-16 09:07:05 +03:00
Christophe Dumez
f851b18b80 Add new Italian translator's name to about dialog 2012-09-15 18:21:11 +03:00
Christophe Dumez
ced29ced1b Small build fix 2012-09-15 17:46:36 +03:00
Christophe Dumez
5023b1ab74 Update Changelog 2012-09-15 16:55:35 +03:00
Christophe Dumez
c2ef78de8d Address encoding issues when using search engine on Windows (closes #29) 2012-09-15 16:55:14 +03:00
Christophe Dumez
6fbe452b55 Update Changelog 2012-09-15 15:55:18 +03:00
Christophe Dumez
51c4a0d8d0 Fix issue with temporary directory not being taken into consideration
Closes issue #94.
2012-09-15 15:54:37 +03:00
Christophe Dumez
b191a977af Merge pull request #95 from sledgehammer999/update_windows_build
Updated Windows build conf files.
2012-09-15 13:47:35 +03:00
Christophe Dumez
61858814ee Update Changelog 2012-09-15 10:10:11 +03:00
Christophe Dumez
365387f092 Update language files 2012-09-15 10:08:04 +03:00
Christophe Dumez
df295d96c2 Add Hebrew translation 2012-09-15 10:07:57 +03:00
Spencer Oliver
a069f806d9 session: always output anonymous status
Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-09-13 19:05:38 +03:00
Spencer Oliver
4638a9e6ee options: ensure ui matches options
If we set anonymous mode make sure the ui is disabled to match.

Signed-off-by: Spencer Oliver <spen@spen-soft.co.uk>
2012-09-13 19:05:38 +03:00
Christophe Dumez
af790e40f8 Update Changelog 2012-09-10 21:10:51 +03:00
Christophe Dumez
76fd5d3eb4 "Completed On" column is not updated until restart (closes #84) 2012-09-10 21:10:33 +03:00
Christophe Dumez
dc8a8fbc06 Disable search completion (closes #89) 2012-09-10 19:44:30 +03:00
Christophe Dumez
30e0cc20c8 OS/2 Fixes from Silvan Scherrer 2012-09-06 15:40:03 +03:00
Christophe Dumez
63dcb81384 Update Changelog 2012-09-02 21:44:25 +03:00
Christophe Dumez
ce391ad328 Bypass cache when uploading a torrent file in Web UI (closes #68) 2012-09-02 21:42:33 +03:00
Christophe Dumez
7b908c7adf Merge pull request #78 from SuperGnarf/release-3.0.2
Remove macro for not existing variable t
2012-09-02 06:11:01 -07:00
SuperGnarf
0d26d734b3 Update src/torrentcontentmodelitem.cpp
removed macro for not existing variable t
2012-09-02 15:53:43 +03:00
Christophe Dumez
f836c40fc4 Bump version to v3.0.2 2012-09-01 14:08:47 +03:00
Christophe Dumez
21fe7f2ca6 Update Changelog 2012-09-01 13:52:59 +03:00
Christophe Dumez
da85a57f83 Fix possible crash due to labels (closes #64) 2012-09-01 13:52:27 +03:00
Christophe Dumez
e35664b188 Correctly escape transfer list filter value typed by user 2012-08-28 18:37:02 +03:00
Christophe Dumez
2fc350b265 Update changelog 2012-08-28 18:29:11 +03:00
Christophe Dumez
83bcd6a2d7 Fix label-based filtering of torrents whose label contains special characters 2012-08-28 18:28:36 +03:00
Christophe Dumez
edcfa4df12 TorrentContentModel code clean up 2012-08-26 21:39:28 +03:00
Christophe Dumez
12a83e1aec Update Changelog 2012-08-26 21:02:26 +03:00
Christophe Dumez
7d50a8b28c Stop updating file priorities regularly in torrent content panel
Performance improvement to address issue #24.
2012-08-26 21:01:07 +03:00
Christophe Dumez
232e112d84 Optimizations to TorrentContentModel
First step to address issue #24.
2012-08-26 15:01:49 +03:00
Christophe Dumez
5b1ee883b4 Update Changelog 2012-08-26 10:14:12 +03:00
Christophe Dumez
b07fceec65 Add "clear" functionality to search field (closes #59) 2012-08-26 10:14:11 +03:00
Christophe Dumez
4c9cf6c773 Update Changelog 2012-08-25 16:54:58 +03:00
Christophe Dumez
164f37e961 Fix encoding problem for detected XDG Download folder (closes #53)
Only affects Linux.
2012-08-25 16:54:37 +03:00
Christophe Dumez
093fb303f3 Minor code clean up 2012-08-25 16:34:35 +03:00
Christophe Dumez
f3d5039e33 Update Changelog. 2012-08-24 19:21:32 +03:00
Christophe Dumez
007c307388 Fix crash when a fastresume file is empty (closes #52) 2012-08-24 19:20:47 +03:00
Christophe Dumez
4079689f32 Update Changelog 2012-08-23 21:21:39 +03:00
Christophe Dumez
2b3d6926c8 Attempt to use qBittorrent icon from theme if available (closes #49) 2012-08-23 21:19:50 +03:00
Christophe Dumez
14b3414e9d Bump version to v3.0.1 2012-08-21 20:22:20 +03:00
Christophe Dumez
73254962f1 Update Changelog 2012-08-21 17:50:47 +03:00
Christophe Dumez
74f042516b Make uTP rate limited by default 2012-08-21 17:50:07 +03:00
Christophe Dumez
8c0853248c Fix wiki link for "Anonymous Mode" feature (#25) 2012-08-14 20:58:36 +03:00
Christophe Dumez
80ea0a67b5 Update Changelog 2012-08-14 20:44:42 +03:00
Christophe Dumez
6d2b51203c Update URL for search plugins updater (closes #25) 2012-08-14 20:44:02 +03:00
Christophe Dumez
8ac82156b3 Update Changelog 2012-08-12 17:59:39 +03:00
Christophe Dumez
c1806b099a Fix crash when using unauthorized characters in label names (closes #19) 2012-08-12 17:59:09 +03:00
Christophe Dumez
1046c816bf Remove unused function 2012-08-12 10:14:05 +03:00
Christophe Dumez
cfbb5ecde5 Update Changelog 2012-08-12 09:58:54 +03:00
Christophe Dumez
afdec02674 Remember queue position for torrents without metadata (closes #17) 2012-08-12 09:58:05 +03:00
Christophe Dumez
927e6bc6cc Fixes to Italian translation 2012-08-10 21:28:40 +03:00
Christophe Dumez
e862d3332c Update language files 2012-08-10 14:23:36 +03:00
Simone
699144a83d Update src/lang/qbittorrent_it.ts 2012-08-10 14:22:40 +03:00
Christophe Dumez
1792f44bfa Update Changelog 2012-08-10 11:23:06 +03:00
Christophe Dumez
64e4095ef1 Fix possible crash when adding a tracker to a magnet torrent without metadata (Closes #1034254) 2012-08-10 11:18:37 +03:00
Christophe Dumez
1d1ffcec7c Handle exceptions in readAlerts() 2012-08-10 10:04:28 +03:00
Christophe Dumez
e73bff817c Bump to v3.0.0 2012-08-09 13:38:04 +03:00
Christophe Dumez
486779ceb2 Update Arabic translation 2012-08-07 09:44:14 +03:00
Christophe Dumez
283a9950f3 Fixes to Norwegian translation 2012-07-31 11:02:44 +03:00
Christophe Dumez
4d601f5383 Fix build with Qt < 4.7 2012-07-21 18:02:09 +03:00
Christophe Dumez
4d76bd33fc Update Croatian translation 2012-07-20 19:03:38 +03:00
Christophe Dumez
179985954c Fix DHT wrongly reported as disabled for magnet links (closes #987340) 2012-07-14 17:39:39 +03:00
Christophe Dumez
ef34285855 Merge pull request #11 from BotanEgg/master
More end iterator caching and iterator preincrement.
2012-07-14 07:30:27 -07:00
Константин Гончарик
bbd1c9ee42 Iter cache more && prefix it 2012-07-14 19:45:40 +08:00
Christophe Dumez
7cffd267d8 Merge pull request #10 from BotanEgg/master
cache end iterators before loops (optimisation)
2012-07-13 23:53:50 -07:00
BotanEgg
bb11d11a72 Itr cache 2012-07-14 06:28:23 +08:00
Christophe Dumez
ae09bee193 Fixes to italian translation by Roberto Boriotti 2012-07-13 22:32:26 +03:00
Константин Гончарик
abf8c179fc Use preincrement for iterators instead of postincrement 2012-07-13 21:48:19 +03:00
Christophe Dumez
5874c7bd57 Bump to v3.0.0rc5 2012-07-11 20:26:56 +03:00
Christophe Dumez
12280c6a0f Fix RSS parsing 2012-07-11 20:26:12 +03:00
Christophe Dumez
c40801ce99 Fix possible crash when adding a new RSS stream 2012-07-11 20:10:15 +03:00
Christophe Dumez
cc192d7d47 Update Lithuanian translation 2012-07-11 19:17:25 +03:00
Christophe Dumez
64c256109a Fix Korean translation 2012-07-11 19:15:18 +03:00
Christophe Dumez
d93a63e01a Add more RSS debug 2012-07-11 18:44:43 +03:00
Christophe Dumez
1c6ef50b77 Add more RSS debug 2012-07-11 18:17:27 +03:00
Christophe Dumez
497e2e92f8 Update Greek and Bulgarian translations 2012-07-11 17:04:38 +03:00
Christophe Dumez
2e950cc28b Update Czech translation 2012-07-10 19:06:32 +03:00
Christophe Dumez
f09ea1a884 Basque translation update by Xabier Aramendi. 2012-07-08 20:32:01 +03:00
Christophe Dumez
eebb7c8477 Update Dutch translation 2012-07-08 17:30:43 +03:00
Christophe Dumez
8feb6644a3 Update Ukranian translator's name 2012-07-08 17:27:16 +03:00
Christophe Dumez
dd30ada095 Fixes to Ukrainian translation 2012-07-08 17:20:53 +03:00
Christophe Dumez
0627968c2f Bump to v3.0.0rc4 2012-07-08 10:35:39 +03:00
Christophe Dumez
89249c140f Fix "Set as default save path" checkbox in torrent addition dialog 2012-07-06 20:12:39 +03:00
Christophe Dumez
90373897d6 Fix permission problems on Windows (closes #1020227) 2012-07-05 19:10:13 +03:00
Christophe Dumez
a85ddada25 Minor code refactoring 2012-07-05 18:46:25 +03:00
Christophe Dumez
3bb474e12f Update Traditional Chinese translation 2012-07-05 18:21:08 +03:00
Christophe Dumez
3b4a312b97 Update Portuguese and Brazilian translations 2012-07-04 19:59:38 +03:00
Christophe Dumez
7a58df594d Update Norwegian translation 2012-07-04 19:56:21 +03:00
Christophe Dumez
524f837ca5 Update Polish translation 2012-07-04 17:50:35 +03:00
Christophe Dumez
4800b456c2 Bump to v3.0.0rc3 2012-07-03 19:14:54 +03:00
Christophe Dumez
4652eb8ff3 Remember torrent addition dialog expanded state 2012-07-03 19:12:53 +03:00
Christophe Dumez
c2096e2ecd Remember torrent addition dialog width 2012-07-03 18:51:48 +03:00
Christophe Dumez
e27a648594 Remember Y position of the torrent addition dialog 2012-07-03 18:47:27 +03:00
Christophe Dumez
90b1567d13 Remember column sizes in torrent addition dialog 2012-07-03 18:37:24 +03:00
Christophe Dumez
41132d39ae Fix double-click to open destination path (closes #1020366) 2012-07-03 18:09:46 +03:00
Christophe Dumez
0ffba231d4 Update Armenian translation 2012-07-03 18:07:42 +03:00
Christophe Dumez
c6ab0b148b Fix model update when setting the priority of a folder in torrent content 2012-07-02 22:51:03 +03:00
Christophe Dumez
183453488e Fix disk space lalel updating in torrent addition dialog 2012-07-02 22:19:05 +03:00
Christophe Dumez
c96f14a7c8 Update Turkish translation 2012-07-02 21:48:01 +03:00
Christophe Dumez
c5841146ff Fix issue when "minimize to systray" and "start minimized" are both enabled.
Window could not be restored.
2012-07-02 20:58:56 +03:00
Christophe Dumez
4ff249525b Bump to v3.0.0rc2 2012-07-02 20:31:38 +03:00
Christophe Dumez
5d5bf403a8 Fix hiding of unwanted files 2012-07-02 20:30:45 +03:00
Christophe Dumez
2747481816 Code clean up 2012-07-02 19:57:16 +03:00
Christophe Dumez
c9591a66e8 Update Chinese translation 2012-07-02 19:56:14 +03:00
Christophe Dumez
02c4be4eaa Fix "Open destination folder" functionality to consider torrent root folder 2012-07-02 19:51:26 +03:00
Christophe Dumez
ee96f83211 Fix torrent content sorting in torrent addition dialog (closes #1020160) 2012-07-02 19:31:51 +03:00
Christophe Dumez
b095a1e3fe Make sure the root folder is expanded in Torrent content panel 2012-07-02 19:27:39 +03:00
Christophe Dumez
d5aaa24ad6 Update Basque translation 2012-07-02 19:06:50 +03:00
Christophe Dumez
9efd576d53 Korean translation update by Woosuk Park 2012-07-02 18:27:45 +03:00
Christophe Dumez
8e0d01643f Update Japanese translation 2012-07-02 18:21:56 +03:00
Christophe Dumez
cb817bc06f Update Italian and Ukrainian translations 2012-07-02 18:19:08 +03:00
Christophe Dumez
1b905d5126 Merge pull request #8 from Tilka/master
Fix torrent transfer stats
2012-07-01 22:34:39 -07:00
Tilka
ca26cc0000 Fix torrent transfer stats, 2nd try
The constants themselves were also mixed up.
2012-07-01 22:59:12 +02:00
Tilka
00f40e6771 Fix torrent transfer stats 2012-07-01 22:14:16 +02:00
Christophe Dumez
7a64c1ebb4 Update Galician translation 2012-07-01 20:51:07 +03:00
Christophe Dumez
5d5f3cbdfd Slovak translation fix. 2012-07-01 20:47:24 +03:00
Christophe Dumez
8bd35852dc Update french translation 2012-07-01 20:44:40 +03:00
Christophe Dumez
92189b6c50 Fix error in translatable string 2012-07-01 20:38:14 +03:00
Christophe Dumez
e50ab2639e Remove a translatable strings 2012-07-01 20:29:05 +03:00
Christophe Dumez
33832a46c1 Update Slovak translation 2012-07-01 20:14:57 +03:00
Christophe Dumez
6a905fc9e0 Fix 2 strings 2012-07-01 20:13:10 +03:00
Christophe Dumez
15d1e3505c Update Norwegian translation 2012-07-01 20:10:56 +03:00
Christophe Dumez
fda1797149 Update Changelog 2012-07-01 16:20:44 +03:00
Christophe Dumez
096baaf441 Update Changelog 2012-07-01 16:19:53 +03:00
Christophe Dumez
69cb9b906f Update language files 2012-07-01 16:08:02 +03:00
Christophe Dumez
755dc40ee4 Update Python version for Windows 2012-07-01 16:06:23 +03:00
Christophe Dumez
f601aa3cfb Bump version to v3.0.0rc1 2012-07-01 14:45:55 +03:00
Christophe Dumez
79cb430878 Get rid of a Web UI hack for Safari since it seems useless now. 2012-07-01 14:44:14 +03:00
Christophe Dumez
90f90936e1 Fix ThePirateBay search plugin 2012-07-01 14:34:37 +03:00
Christophe Dumez
a98ad63d8b Add support for adding multiple local torrents at once (Web UI) 2012-07-01 13:23:41 +03:00
Christophe Dumez
6d31af676e Fix keyboard focus issues on Main window 2012-06-30 18:25:09 +03:00
Christophe Dumez
1204bf6e80 Fix unicode support in torrent addition dialog title 2012-06-30 18:06:23 +03:00
Christophe Dumez
48f2b6fb66 Fix OS2 build 2012-06-30 17:42:20 +03:00
Christophe Dumez
10a4556479 Windows build fixes 2012-06-30 17:40:58 +03:00
Christophe Dumez
f4320cb58a Bring window to front after restoring from systray 2012-06-29 19:41:21 +03:00
Christophe Dumez
d31d935522 Add some spacing between property panel buttons 2012-06-28 18:27:23 +03:00
Christophe Dumez
85d2fd8ce0 Fix torrent availability computation 2012-06-28 18:10:22 +03:00
Christophe Dumez
ad79cbb9a1 Compilation fix 2012-06-28 18:06:05 +03:00
Christophe Dumez
bdb0e125a4 Code optimization 2012-06-27 19:30:06 +03:00
Christophe Dumez
d26179cca0 Fix window visibility toggling bug with "minimized to systray" enabled
The issue seemed to affect Windows only.
2012-06-27 17:48:43 +03:00
Christophe Dumez
8d612e8e2d Bump to v3.0.0beta4 2012-06-24 20:35:04 +03:00
Christophe Dumez
e74b39f5af Build fix 2012-06-24 20:31:16 +03:00
Christophe Dumez
aaf3194670 Bump version to v3.0.0beta3 2012-06-24 17:05:54 +03:00
Christophe Dumez
74079b2c86 Support custom save path / label for RSS feeds using magnet links 2012-06-24 16:48:40 +03:00
Christophe Dumez
2eae22ac06 Fix issue with unreversible "Minimize to tray" 2012-06-24 16:29:50 +03:00
Christophe Dumez
80359f3e5e Fix torrent loading on Mac OS X (closes #1011229) 2012-06-24 15:06:44 +03:00
Christophe Dumez
ccefe68e4c Several Mac manifest file improvements 2012-06-24 15:06:26 +03:00
Christophe Dumez
f039cec4ca Update Mac plist file so that qBittorrent is properly detected as a torrent app 2012-06-24 15:05:28 +03:00
Christophe Dumez
5a65580169 Add support for RSS feeds using magnet links (Closes #1016379) 2012-06-24 10:27:32 +03:00
Christophe Dumez
39ea57fe29 Mac compilation fix 2012-06-24 09:59:12 +03:00
Christophe Dumez
361db3d2cd Update belarusian translation 2012-06-22 13:48:27 +03:00
Christophe Dumez
83494f999a Merge pull request #7 from Tilka/master
Change MIME type for PNG images to image/png
2012-06-20 10:13:35 -07:00
Christophe Dumez
de4cb2ede7 Merge pull request #6 from Tilka/patch-1
missing 'e' in updateQueueingSystem
2012-06-20 10:11:58 -07:00
Tillmann Karras
2f6ef9af51 Make mascot image URL relative 2012-06-20 07:18:07 +03:00
Tillmann Karras
2f0e15bc25 Change MIME type for PNG images to image/png
This is the official MIME type assigned by the IANA (see http://www.iana.org/assignments/media-types/image/png).
2012-06-19 02:52:54 +03:00
Tillmann Karras
0cd4c079e9 missing 'e' in updateQueueingSystem 2012-06-19 02:29:04 +03:00
Christophe Dumez
3197d5cc2f Minor code optimization 2012-06-10 20:49:50 +03:00
Christophe Dumez
81e4e39878 Web UI: Stop using absolute URLs in ajax requests (closes #1011226) 2012-06-10 20:17:58 +03:00
Christian Kandeler
55a6bc3855 Check for magnet links in watched folders.
Look for files ending with ".magnet" and interpret their contents as a
magnet link.
This allows scripts to collect magnet links from the web and let
qBittorrent download them non-interactively.
2012-05-30 22:28:53 +03:00
Christian Kandeler
acd4b64a8b Fix compilation with namespaced Qt. 2012-05-30 22:28:53 +03:00
Christian Kandeler
984acc581c Fix shadow builds under UNIX. 2012-05-30 22:28:53 +03:00
Christophe Dumez
75a65a5f49 Make sure !.qB extensions are not shown in the Web UI 2012-05-29 18:32:18 +03:00
Frédéric Brière
91af418254 Don't trip on absence of global ratio in QBtSession::processBigRatios()
QBtSession::processBigRatios() must fetch the global ratio, if
applicable, before checking for NO_RATIO_LIMIT.

LP: #835217
2012-05-27 21:40:12 +03:00
Christophe Dumez
901326c004 HTTP server code clean up 2012-05-27 11:06:09 +03:00
Christophe Dumez
8986d87ef3 HTTP request handling clean up and optimization 2012-05-27 10:57:00 +03:00
Christophe Dumez
a0d21ead18 Further rewriting of the JSON-related code 2012-05-26 22:58:53 +03:00
Christophe Dumez
122655758d Fix caching issues in last commit 2012-05-26 21:14:48 +03:00
Christophe Dumez
9a964d871d Rewrite code for returning information about torrents as JSON (Web UI)
- The new code is simpler, cleaner and more efficient
2012-05-26 20:42:44 +03:00
Christophe Dumez
fc4989d738 Remove 100kb limit for torrent file size in Web UI 2012-05-26 10:29:20 +03:00
Christophe Dumez
5f59ab7e48 Update Turkish translation 2012-05-22 22:22:59 +03:00
Christophe Dumez
99557543fc Fix left panel style 2012-05-20 19:09:04 +03:00
Christophe Dumez
d7c907d17d Bump version to v3.0.0beta2 2012-05-20 18:15:13 +03:00
Christophe Dumez
fd9ae50a57 Center new torrent addition dialog 2012-05-20 18:14:02 +03:00
Christophe Dumez
1398a39768 Fix KickAssTorrents plugin 2012-05-20 17:27:16 +03:00
Christophe Dumez
7b4b2fe0f5 Make sure the hide/show text in the tray icon menu is correct 2012-05-20 16:51:32 +03:00
Christophe Dumez
23848be6eb Fix compilation error with libtorrent v0.15 2012-05-20 16:37:22 +03:00
Christophe Dumez
d55f3b5aff RSS: Better cookies support 2012-05-20 16:03:10 +03:00
Christophe Dumez
716e84264e RSS code clean up 2012-05-20 15:09:31 +03:00
Christophe Dumez
600c33dfa3 Fix error message in new torrent addition dialog when a torrent is invalid 2012-05-20 14:17:24 +03:00
Christophe Dumez
e6e2baf3a8 RSS: Support items that don't have a guid (closes #1001777) 2012-05-20 14:01:34 +03:00
Christophe Dumez
cfb4ded943 Remove button to change save path from lower panel 2012-05-17 22:05:18 +03:00
Christophe Dumez
dfe5fbe34c Minor cosmetic changes to main window 2012-05-17 21:20:39 +03:00
Christophe Dumez
82788b9a02 Options: Make sure first tab is initially selected 2012-05-17 18:40:16 +03:00
Christophe Dumez
ff3cc4b8de Bump to beta1 2012-05-17 18:23:54 +03:00
Christophe Dumez
f74a471177 Improve left panel style 2012-05-17 18:12:31 +03:00
Christophe Dumez
50ee44a1cf Never disable the properties panel 2012-05-17 17:13:16 +03:00
Christophe Dumez
7a29f3d71d Remove focus from widgets on left panel 2012-05-17 16:49:14 +03:00
Christophe Dumez
30d5273bb5 Stop subclassing QObject in misc 2012-05-17 15:21:13 +03:00
Christophe Dumez
0f291629cc Move FileSystem utility functions out of misc.h
Use new fs_utils.h instead.
2012-05-16 21:19:05 +03:00
Christophe Dumez
e6e63fa529 Update Turkish translation 2012-05-15 20:53:30 +03:00
Christophe Dumez
766b210d06 Update language files 2012-05-15 20:49:27 +03:00
Christophe Dumez
c502edf9e1 Brand new torrent addition dialog 2012-05-15 19:57:31 +03:00
Christophe Dumez
53f55a79b3 Fix layout issue in options dialog 2012-05-15 19:21:35 +03:00
Christophe Dumez
f05ecf900a Fix browse button in torrent addition dialog.
Was broken by a recent pull request.
2012-05-12 16:09:01 +03:00
Christophe Dumez
810a9710d7 Minor clean up 2012-05-05 15:57:43 +03:00
Christophe Dumez
ef6c3f5a64 Clean up torrent addition dialog code a little 2012-05-05 15:34:36 +03:00
Christophe Dumez
0e425d6a04 Merge pull request #3 from mutoso/master
Add the ability to choose the save path when using magnet links
2012-05-05 04:51:38 -07:00
Christophe Dumez
29d28b1d96 Fix compilation on Mac OS 2012-05-05 14:46:20 +03:00
Mutoso
c12467ee3e Add the ability to choose the save path when using magnet links 2012-05-03 00:29:04 -05:00
Christophe Dumez
82e2b3a6cd Fix possible compilation error on Windows 2012-05-02 17:35:22 +03:00
Christophe Dumez
33a0828a33 Update Italian translation 2012-04-23 20:09:10 +03:00
Christophe Dumez
95e2b7ee1a Fix compilation warning 2012-04-15 21:54:41 +03:00
Christophe Dumez
bc6fd3aa72 Various style fixes 2012-04-15 21:26:37 +03:00
Christophe Dumez
a940917144 Add more vector length checks 2012-04-08 11:17:32 +03:00
Christophe Dumez
7bd4a1b849 Update Belarusian translation 2012-03-27 20:05:04 +03:00
Christophe Dumez
f62c38a8a7 Merge pull request #2 from Fisiu/patch-1
Fix build with gcc 4.7.
2012-03-26 08:05:34 -07:00
Fisiu
41c503eb54 Fix build with gcc 4.7. 2012-03-26 13:01:27 +03:00
Christophe Dumez
8cc538085f OS/2 fixes from Silvan Scherrer 2012-03-19 18:33:38 +02:00
Christophe Dumez
b93cebacb2 Fix important Web UI bug (HTTP request parsing bug)
(cherry picked from commit bdaf16123f)
2012-03-18 17:17:09 +02:00
Christophe Dumez
30a3110ca7 make dist now generates .tar.xz as well 2012-03-17 22:12:22 +02:00
Christophe Dumez
cf447296fb Fix compilation with libtorrent v0.16 2012-03-17 18:51:15 +02:00
Christophe Dumez
dfc5e02edd Bump version to v3.0.0alpha2 2012-03-17 17:44:43 +02:00
Christophe Dumez
bcb29fb5fa Make sure .unwanted parent is removed if empty (Closes #946826) 2012-03-17 16:36:02 +02:00
Christophe Dumez
41b57a0878 Make sure OS-created files do not prevent "empty" folder removal
Mac OS X creates .DS_Store files and Windows creates .Thumbs.db
files which can prevent otherwise empty folders removal.
2012-03-17 15:41:32 +02:00
Christophe Dumez
0b13fa6914 Fix possible Web UI authentication problem when using SSL (closes #941343) 2012-03-12 21:59:25 +02:00
Christophe Dumez
c32e651c39 Fix DHT port setting in Web UI (Closes #952182) 2012-03-12 20:54:33 +02:00
Christophe Dumez
fefc7df910 Fix crash when creating a new RSS download rule 2012-03-09 15:40:57 -08:00
Christophe Dumez
90b520651b RSS downloader should not ignore "Do not start automatically" rule
Closes #946910.
2012-03-08 20:18:52 -08:00
Christophe Dumez
3389820c73 Fix possible crash in TorrentContentModel 2012-03-07 08:21:01 -08:00
Christophe Dumez
85167c9043 Update language files 2012-03-07 08:12:37 -08:00
Christophe Dumez
ce6f942ed3 Integrate Basque translation 2012-03-07 08:12:14 -08:00
Christophe Dumez
5cf7e47ffa TorrentContentModel: Fix crash on exit 2012-03-01 21:11:37 +02:00
Christophe Dumez
bd4bb42e95 Link against boost thread 2012-02-26 21:24:32 +02:00
Christophe Dumez
6778b7460a Clean up PeerListWidget 2012-02-25 21:02:19 +02:00
Christophe Dumez
0c279e0567 Remove QT_VERSION checks for 4.5.0 2012-02-25 20:20:11 +02:00
Christophe Dumez
1bee9c6a9d Update Changelog 2012-02-25 20:13:56 +02:00
Christophe Dumez
691b976e11 Clean up TorrentContentModel 2012-02-25 20:05:11 +02:00
Christophe Dumez
75efd4ea6b Update language files 2012-02-25 15:32:31 +02:00
Christophe Dumez
9363b1b4f2 Merge pull request #1 from UnSleep/patch-1
Fix issue in spanish translation
2012-02-25 05:27:33 -08:00
Christophe Dumez
a69cbd2289 Update version in Info.plist 2012-02-25 15:21:45 +02:00
UnSleep
ca6f732c7b i reported a bug in launchpad but i thought i can fix it too ;) "bad traslation" 2012-02-23 20:05:59 +01:00
Christophe Dumez
5f5382297c Disable system tray icon on Mac OS X 2012-02-22 20:06:11 +02:00
Christophe Dumez
a5452d04ae Clean up and refactor torrent content model code 2012-02-21 21:54:24 +02:00
Christophe Dumez
8f4c4e8c40 BUGFIX: Fix name of progress column in torrent content panel 2012-02-21 20:27:19 +02:00
Christophe Dumez
b1f1fbf114 Optimize QTorrentHandle 2012-02-21 20:12:04 +02:00
Christophe Dumez
a2d9cce181 Code clean up 2012-02-20 21:46:02 +02:00
Christophe Dumez
06ccae591e Coding style changes 2012-02-20 21:32:58 +02:00
Christophe Dumez
30bc14c940 Update version 2012-02-20 21:21:41 +02:00
Christophe Dumez
33f5c8e903 Further RSS clean up 2012-02-20 21:20:42 +02:00
Christophe Dumez
8e529fc179 RSS code clean up
- Also drops support for Qt 4.5
2012-02-20 20:49:31 +02:00
Christophe Dumez
f3448125c3 Coding style clean up 2012-02-20 19:56:07 +02:00
Christophe Dumez
00b4ad6ec8 RSS: Remove last singleton 2012-02-20 19:49:35 +02:00
Christophe Dumez
a8a7b61ea9 Coding style clean up 2012-02-20 19:30:53 +02:00
Christophe Dumez
9acac03f14 RSS: Correctly mark virtual functions 2012-02-20 19:28:11 +02:00
Christophe Dumez
b78d6ba243 Several RSS fixes:
- Fix possible redownload of torrents marked as read (Closes #927495)
- Properly remove RSS feed settings/history upon feed removal
- Fix possible crash in RSS Downloader dialog in debug mode
2012-02-19 20:45:49 +02:00
Christophe Dumez
d53ca1d096 Fix import of new trackers when adding a torrent with same hash (Closes #747000) 2012-02-19 20:01:11 +02:00
Christophe Dumez
50a3e4e776 RSS: Use SharedPtr everywhere 2012-02-19 18:53:10 +02:00
Christophe Dumez
a13bb06ec3 Start RSS rewrite: Use SharedPtr for RssArticle objects 2012-02-19 16:38:41 +02:00
Christophe Dumez
32a6c89c8c RSS code clean up 2012-02-19 15:42:51 +02:00
Christophe Dumez
1905a6f0d1 Fix to last commit (reversed sort order of RSS articles) 2012-02-19 15:18:59 +02:00
Christophe Dumez
3bc75bb068 RSS optimizations 2012-02-19 15:13:39 +02:00
Christophe Dumez
f0f7924325 Update Github for search plugin updates 2012-02-18 21:16:27 +02:00
Christophe Dumez
5e48708920 Prevent log window buffer from filling up (Closes #929673) 2012-02-18 20:38:21 +02:00
Christophe Dumez
58603451b4 Fix torrent import dialog layout (Closes #930932) 2012-02-18 20:21:33 +02:00
Christophe Dumez
9e3deb68de Add Cmd+Delete shortcut to delete a torrent (Mac OS X) 2012-02-18 20:05:53 +02:00
Christophe Dumez
2fea7eaef2 Update Changelog 2012-02-18 16:45:33 +02:00
Christophe Dumez
a53a70742d Drop support for libtorrent v0.14.x 2012-02-18 16:44:20 +02:00
Christophe Dumez
0c9dbc15f9 Remove misc::time_tToQString() 2012-02-18 15:37:51 +02:00
Christophe Dumez
ed468083c5 Remove misc::chmod644() function 2012-02-18 15:31:08 +02:00
Christophe Dumez
737982e92f Remove unused code 2012-02-18 15:22:31 +02:00
Christophe Dumez
b43e641d21 Remove misc::removeEmptyFolder() 2012-02-18 13:38:48 +02:00
Christophe Dumez
c25586b500 Remove misc::safeRemove(): shouldn't be needed 2012-02-18 12:49:05 +02:00
Christophe Dumez
60d9bfe077 misc: Remove duplicate function to branch a path 2012-02-16 21:32:18 +02:00
Christophe Dumez
0d0c7559bf Optimize converter between QString and sha1_hash 2012-02-16 21:17:15 +02:00
Christophe Dumez
de4559659d Code clean up 2012-02-16 21:04:02 +02:00
Christophe Dumez
16071ec266 Remove unused code 2012-02-16 20:40:41 +02:00
Christophe Dumez
fb03682df4 Clean up misc::toValidFileSystemName() 2012-02-16 20:32:13 +02:00
Christophe Dumez
68041e382d Clean up misc::isValidFileSystemName() function 2012-02-15 21:57:40 +02:00
Christophe Dumez
fb60a6489b Fix potential bug when moving single file torrents to tmp folder (closes #932861) 2012-02-15 21:13:42 +02:00
Christophe Dumez
dd7e515f9c Cmd+M minimizes main window on Mac OS X (Closes #928216) 2012-02-07 19:48:25 +02:00
Christophe Dumez
1bc6130da5 Fixes to Belarusian translation 2012-02-02 20:47:18 +02:00
Christophe Dumez
323275c340 Update language files 2012-01-31 19:26:47 +02:00
Christophe Dumez
3da9fec665 Add Belarusian translation by Mihas Varantsou 2012-01-31 19:25:57 +02:00
Christophe Dumez
f6254e9db6 Bug #919905: qBittorrent does not handle redirection to relative URLs correctly
Thanks to luran for providing a first version of this patch.
2012-01-30 19:39:14 +02:00
Naglis Jonaitis
f06f820047 Update Lithuanian translation. 2012-01-17 20:54:18 +02:00
Christophe Dumez
05643ca5d9 Fix tarball generated by make dist
(cherry picked from commit 282ee0e879)
2011-12-29 23:44:40 +02:00
Christophe Dumez
c0eb048fe2 Program updater: More reliable version detection / comparison 2011-12-29 01:26:00 +02:00
Christophe Dumez
78bb4104b0 Web UI: Improve usability of small devices 2011-12-29 00:24:09 +02:00
Christophe Dumez
6c10936f6d Make torrent sorting case insensitive (Closes #857154) 2011-12-28 23:31:50 +02:00
Christophe Dumez
4ca665eb0c Do not report any progress for disabled files (Closes #56731485) 2011-12-28 14:37:59 +02:00
Christophe Dumez
39e1ebaa9b Mac OS X: Tweak project file to fix compilation errors 2011-12-28 14:24:59 +02:00
Christophe Dumez
0a0033b242 Fix torrent addition dialog layout problem (Closes #84650522) 2011-12-28 11:51:16 +02:00
Christophe Dumez
9eea35f530 Fix banning of IPv6 peers 2011-12-28 11:31:46 +02:00
Christophe Dumez
345e9ec870 Bump to v2.10.0alpha 2011-12-27 14:26:09 +02:00
Christophe Dumez
53be56746b Update language files 2011-12-27 13:29:58 +02:00
Christophe Dumez
26b8decb24 I18N: Add Georgian translation 2011-12-27 13:29:35 +02:00
btdigg research
a275e26ba7 btdigg: Python3 support and add torrent in magnet link 2011-12-13 18:47:06 +02:00
Christophe Dumez
96c918ff8d misc.cpp: Fix compilation on Mac OS X 2011-11-16 21:47:00 +02:00
Christophe Dumez
2283bd2358 Torrent addition dialog: Fix minimum dialog size 2011-10-29 10:35:32 +03:00
Christophe Dumez
f6b7b8bd6e Get rid of libboost-filesystem dependency if libtorrent >= v0.16.x is used 2011-10-25 20:56:54 +03:00
Christophe Dumez
1b8a2bf7c1 Web UI: Add support for speed limits scheduling 2011-10-19 19:55:11 +03:00
Christophe Dumez
33325cdfee Update DHT bootstrap nodes 2011-10-16 11:30:50 +03:00
Christophe Dumez
d81f633d6b Torrent addition dialog: Layout fixes 2011-10-16 10:07:13 +03:00
Christophe Dumez
422b483d78 Fix ratio calculation for purely seeded torrents 2011-10-16 09:41:59 +03:00
Christophe Dumez
ec5b9c769a Update Russian translation 2011-10-10 20:19:59 +03:00
Christophe Dumez
74081bc6f8 Completly disable Windows cache 2011-10-08 13:36:27 +03:00
Christophe Dumez
3c650038e2 Revert "Use %USERPROFILE%\Downloads as download folder on Windows"
This reverts commit 357e309dad.
2011-10-08 13:34:57 +03:00
314 changed files with 61640 additions and 32288 deletions

View File

@@ -74,6 +74,8 @@ Translations authors:
copyright:
- Arabic: SDERAWI (abz8868@msn.com) and sn51234 (nesseyan@gmail.com)
- Armenian: Hrant Ohanyan (hrantohanyan@mail.am)
- Basque: Xabier Aramendi (azpidatziak@gmail.com)
- Belarusian: Mihas Varantsou (meequz@gmail.com)
- Brazilian: Nick Marinho (nickmarinho@gmail.com)
- Bulgarian: Tsvetan & Boyko Bankoff (emerge_life@users.sourceforge.net)
- Catalan: Francisco Luque Contreras (frannoe@ya.com)
@@ -87,10 +89,12 @@ Translations authors:
- Finnish: Niklas Laxström (nikerabbit@users.sourceforge.net)
- French: Christophe Dumez (chris@qbittorrent.org)
- Galician: Marcos Lans (marcoslansgarza@gmail.com)
- Georgian: Beqa Arabuli (arabulibeqa@yahoo.com)
- German: Niels Hoffmann (zentralmaschine@users.sourceforge.net)
- Greek: Tsvetan Bankov (emerge_life@users.sourceforge.net) and Stephanos Antaris (santaris@csd.auth.gr)
- Hebrew: David Deutsch (d.deffo@gmail.com)
- Hungarian: Majoros Péter (majoros.j.p@t-online.hu)
- Italian: Matteo Sechi (bu17714@gmail.com)
- Italian: bovirus (bovirus@live.it) and Matteo Sechi (bu17714@gmail.com)
- Japanese: Masato Hashimoto (cabezon.hashimoto@gmail.com)
- Korean: Jin Woo Sin (jin828sin@users.sourceforge.net)
- Lithuanian: Naglis Jonaitis (njonaitis@gmail.com)
@@ -104,5 +108,5 @@ Translations authors:
- 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) and Oleh Prypin (blaxpirit@gmail.com)
- Ukrainian: Oleh Prypin (blaxpirit@gmail.com)
license: GPLv2

View File

@@ -1,3 +1,75 @@
* 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)
- BUGFIX: Fix "Skip hash check" feature in torrent import dialog (closes #128)
- BUGFIX: Several Web UI connection fixes
- BUGFIX: Add Basque locale to Web UI
* Tue Sep 18 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.4
- BUGFIX: Fix issue with downloads starting from scratch on startup if temporary
directory setting is enabled.
* Sun Sep 16 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.3
- BUGFIX: Fix issue with temporary directory not being taken into consideration (closes #94)
- BUGFIX: Address encoding issues when using search engine on Windows (closes #29)
- BUGFIX: Bypass cache when uploading a torrent file in Web UI (closes #68)
- BUGFIX: "Completed On" column is not updated until restart (closes #84)
- BUGFIX: Fix possible build error on some systems
- I18N: Add hebrew translation
* Sat Sep 1 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.2
- FEATURE: Add "clear" functionality to search field (closes #59)
- BUGFIX: Attempt to use qBittorrent icon from theme if available (closes #49)
- BUGFIX: Fix crash when a fastresume file is empty (closes #52)
- BUGFIX: Fix encoding problem for detected XDG Download folder (closes #53)
- BUGFIX: Improve performance when showing torrent content panel (Improves #24)
- BUGFIX: Fix label-based filtering of torrents whose label contains special characters
- BUGFIX: Fix possible crash due to labels (closes #64)
* Tue Aug 21 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.1
- BUGFIX: Fix possible crash when adding a tracker to a magnet torrent without metadata (Closes #1034254)
- BUGFIX: Remember queue position for torrents without metadata (closes #17)
- BUGFIX: Fix crash when using unauthorized characters in label names (closes #19)
- BUGFIX: Fix search plugins updating (closes #25)
- BUGFIX: Make uTP connections rate limited by default
* Thu Aug 09 2012 - Christophe Dumez <chris@qbittorrent.org> - v3.0.0
- FEATURE: Brand new torrent addition dialog
- FEATURE: Add the ability to choose the save path when using magnet links (mutoso)
- FEATURE: Add support for adding multiple local torrents at once (Web UI)
- COSMETIC: Improve style of left panel
- BUGFIX: Lower panels no longer gets disabled
- BUGFIX: Major code refactoring and various optimizations.
- BUGFIX: No longer strip root folder from torrent files
- OTHER: Drop support for libtorrent v0.14.x
- OTHER: Drop support for Qt 4.5
* Sat Oct 08 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.9.0
- FEATURE: Add file association settings to program preferences (Windows)
- FEATURE: Add setting to ignore slow torrents in queueing system

14
INSTALL
View File

@@ -10,19 +10,21 @@ qBittorrent - A BitTorrent client in C++ / Qt4
will install and execute qBittorrent hopefully without any problems.
Dependencies:
- Qt >= 4.5.0 (libqtgui, libqtcore, libqtnetwork, libqtxml, libqtdbus/optional)
- Qt >= 4.6.0 (libqtgui, libqtcore, libqtnetwork, libqtxml, libqtdbus/optional)
- pkg-config executable
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, compatible with v0.15.x)
- libtorrent-rasterbar by Arvid Norberg (>= 0.15.0)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.
- libboost 1.34.x (libboost-filesystem, libboost-date-time) + libasio
- libboost 1.34.x (libboost-filesystem°) + libasio
or
- libboost >= 1.35.x (libboost-system, libboost-filesystem, libboost-date-time)
- libboost >= 1.35.x (libboost-system, libboost-filesystem°)
°libboost-filesystem is not needed if libtorrent-rasterbar >= v0.16.x is used
- python >= 2.3 && < 3.0 (needed by search engine)
- python >= 2.3 (needed by search engine)
* Run time only dependency
- geoip-database (optional)
@@ -42,7 +44,7 @@ qBittorrent - A BitTorrent client in C++ / Qt4
- pkg-config executable
- libtorrent-rasterbar by Arvid Norberg (>= 0.14.4 REQUIRED, >= v0.15.0 ADVISED)
- libtorrent-rasterbar by Arvid Norberg (>= v0.15.0)
-> http://www.libtorrent.net
Be careful: another library (the one used by rTorrent) uses a similar name.

View File

@@ -27,7 +27,6 @@ First you need to create the conf.pri file in the same dir as this readme.os2 is
the conf.pri file has the following content:
##### conf.pri content beginn #####
PREFIX = .
BINDIR = ./bin
INCDIR = ./include
LIBDIR = ./lib
@@ -43,7 +42,10 @@ LIBS += -Lx:/trees/libtorrent/trunk/src/.libs \
Of course all the above path references have to be adjusted to your build env.
It should now be easy to build qBittorrent:
Now you can either do a normal build or a shadow build. A shadow build has the
advantage that no created files are in the same dir as the sources are.
For a normal build do the following:
Simply type:
$ qmake
@@ -51,6 +53,16 @@ $ qmake
Followed by:
$ make
For a shadow build do the following:
given your sources are in x:\trees\qbittorrent\trunk create a
x:\trees\qbittorrent\build directory
Now switch to the created directory and type:
$ qmake ..\trunk
Followed by:
$ make
If all works fine you should get a working qbittorrent executable.
If you have any question regarding the eCS (OS/2) port of qBittorrent you can meet me (_diver) on IRC:

124
configure vendored
View File

@@ -325,7 +325,7 @@ cat >$1/modules.cpp <<EOT
#line 1 "qt4.qcm"
/*
-----BEGIN QCMOD-----
name: Qt >= 4.5
name: Qt >= 4.6
arg: enable-debug, Enable debug mode
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
-----END QCMOD-----
@@ -334,8 +334,8 @@ class qc_qt4 : public ConfObj
{
public:
qc_qt4(Conf *c) : ConfObj(c) {}
QString name() const { return "Qt >= 4.5"; }
QString shortname() const { return "Qt 4.5"; }
QString name() const { return "Qt >= 4.6"; }
QString shortname() const { return "Qt 4.6"; }
bool exec()
{
// NOX mode
@@ -356,7 +356,7 @@ public:
#else
conf->addExtra("MANPREFIX = \$\$PREFIX/share");
#endif
return(QT_VERSION >= 0x040500);
return(QT_VERSION >= 0x040600);
}
};
#line 1 "qt-dbus.qcm"
@@ -419,11 +419,11 @@ class qc_libtorrent_rasterbar : public ConfObj
{
public:
qc_libtorrent_rasterbar(Conf *c) : ConfObj(c) {}
QString name() const { return "libtorrent-rasterbar >= 0.14.4"; }
QString name() const { return "libtorrent-rasterbar >= 0.15.0"; }
QString shortname() const { return "libtorrent-rasterbar"; }
bool exec(){
QStringList incs;
QString req_ver = "0.14.4";
QString req_ver = "0.15.0";
QString version, libs, other;
VersionMode mode = VersionMin;
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))
@@ -442,12 +442,15 @@ arg: with-libboost-lib=[path], Path to libboost library files
-----END QCMOD-----
*/
#include <boost/version.hpp>
#include <libtorrent/version.hpp>
class qc_libboost : public ConfObj
{
public:
qc_libboost(Conf *c) : ConfObj(c) {}
QString name() const { return "libboost"; }
QString shortname() const { return "libboost"; }
qc_libboost(Conf *c) : ConfObj(c) {}
QString name() const { return "libboost"; }
QString shortname() const { return "libboost"; }
QString findBoostLib(QString path, QString lib) const {
QString name;
QDir libDir(path);
@@ -471,77 +474,62 @@ public:
}
return name;
}
bool exec(){
QString s;
s = conf->getenv("QC_WITH_LIBBOOST_INC");
if(!s.isEmpty()) {
if(!conf->checkHeader(s, "boost/format.hpp")) {
return false;
}
if(!conf->checkHeader(s, "boost/date_time/posix_time/posix_time.hpp")) {
return false;
}
if(!conf->checkHeader(s, "boost/filesystem/path.hpp")) {
return false;
}
}else{
QStringList sl;
sl << "/usr/include";
sl << "/usr/local/include";
bool found = false;
foreach(s, sl){
if(conf->checkHeader(s, "boost/format.hpp")){
found = true;
break;
}
}
if(!found) {
return false;
}
if(!conf->checkHeader(s, "boost/date_time/posix_time/posix_time.hpp")) {
return false;
}
if(!conf->checkHeader(s, "boost/filesystem/path.hpp")) {
return false;
}
}
conf->addIncludePath(s);
// Find library
s = conf->getenv("QC_WITH_LIBBOOST_LIB");
bool exec(){
QStringList sl;
QString s = conf->getenv("QC_WITH_LIBBOOST_INC");
if (!s.isEmpty())
sl << s;
sl << "/usr/include";
sl << "/usr/local/include";
bool found = false;
foreach (s, sl) {
if (conf->checkHeader(s, "boost/format.hpp")
#if LIBTORRENT_VERSION_MAJOR == 0 && LIBTORRENT_VERSION_MINOR < 16
&& conf->checkHeader(s, "boost/filesystem/path.hpp")
#endif
) {
found = true;
break;
}
}
if (!found)
return false;
conf->addIncludePath(s);
// Find library
s = conf->getenv("QC_WITH_LIBBOOST_LIB");
QStringList required_libs;
#if BOOST_VERSION >= 103500
required_libs << "system";
#endif
#if LIBTORRENT_VERSION_MAJOR == 0 && LIBTORRENT_VERSION_MINOR < 16
required_libs << "filesystem" ;
#endif
required_libs << "thread";
QStringList libDirs;
if (!s.isEmpty())
libDirs << s;
libDirs << "/usr/lib/" << "/usr/lib64/" << "/usr/local/lib/" << "/usr/local/lib64/";
foreach(const QString& lib, required_libs) {
if(!s.isEmpty()) {
QString detected_name = findBoostLib(s, lib);
if(detected_name.isEmpty()) {
printf("Could not find boost %s library!\n", qPrintable(lib));
return false;
} else {
bool found = false;
foreach(const QString& libDir, libDirs) {
QString detected_name = findBoostLib(libDir, lib);
if(!detected_name.isEmpty()) {
conf->addLib("-l"+detected_name);
}
} else {
bool found = false;
foreach(const QString& libDir, libDirs) {
QString detected_name = findBoostLib(libDir, lib);
if(!detected_name.isEmpty()) {
conf->addLib("-l"+detected_name);
found = true;
break;
}
}
if(!found) {
printf("Could not find boost %s library!\n", qPrintable(lib));
return false;
found = true;
break;
}
}
if(!found) {
printf("Could not find boost %s library!\n", qPrintable(lib));
return false;
}
}
return true;
}
return true;
}
};
#line 1 "geoip-database.qcm"
/*

View File

@@ -11,7 +11,7 @@ QBittorrent installation
3. INSTALLATION
4. CONTACT
4. BUGREPORTS
5. CREDITS
@@ -29,17 +29,70 @@ Welcome to QBittorrent port for OS/2 and eComStation.
2. REQUIREMENTS
===============
* klibc 0.6.3 or later
The following requirements can be installed either by rpm or by zip files.
ftp://ftp.netlabs.org/pub/gcc/libc-0_6_3-csd3.wpi
RPM Installation:
* openssl 1.0
ftp://ftp.netlabs.org/pub/unixos2/ssl10.zip
klibc
-----
* Qt4 dll
1. yum install libc
see http://svn.netlabs.org/qt4 for more information whats needed and where to get the latest
openssl 1.0
-----------
1. yum install openssl
pthread
-------
1. yum install pthread
GCC4Core
--------
1. yum install libgcc
2. yum install gcc-stack-protector
3. yum install gcc-stdc++-shared-library
4. yum install gcc-supc++-shared-library
Qt4 dll
-------
1. yum install libqt4
ZIP Installation:
klibc
-----
1. Download klibc 0.6.5 or better (see http://svn.netlabs.org/libc for more information)
2. Install the files to your libpath eg x:\ecs\dll
openssl 1.0
-----------
1. Download the zip file from http://rpm.netlabs.org/release/00/zip
2. Install the files to your libpath eg. x:\ecs\dll
pthread
-------
1. Download pthread 2012-03-13 or better from http://rpm.netlabs.org/release/00/zip
2. Install the files to your libpath eg. x:\ecs\dll
GCC4Core
--------
1. Download GCC4Core 1.2.1 or better from http://ftp.netlabs.org/pub/gcc
2. Install the files to your libpath eg. x:\ecs\dll
Qt4 dll
-------
1. Download Qt4 4.7.3 or better (see http://svn.netlabs.org/qt4 for more information)
2. Install the files according to the readme
3. INSTALLATION
@@ -47,30 +100,6 @@ Welcome to QBittorrent port for OS/2 and eComStation.
To install QBittorrent, do the following:
klibc
-----
1. Download klibc 0.6.3 csd3 or later.
2. Install the package by double-clicking on the WPI file.
openssl 1.0
-----------
1. Download the zip file
2. Install the files to your libpath eg. x:\ecs\dll
Qt4 dll
-------
1. Download the package
2. Install the package by double-clicking on the wpi file.
QBittorrent
-----------
1. Create a directory for QBittorrent.
2. Extract the QBittorrent package to the new directory.
3. Create a WPS object for QBittorrent.exe.
@@ -78,18 +107,13 @@ QBittorrent
5. Happy torrenting
4. BUGREPORTS
=============
4. CONTACT
==========
Please send bugreports to:
ecs@aroa.ch
Please create bugreports at http://svn.netlabs.org/qtapps
Only bug reports with a reproducable bug are accepted. :-)
5. CREDITS
==========
@@ -122,6 +146,33 @@ development, you can do so in one of the following ways:
7. HISTORY
==========
2012-09-19
* updated to 3.0.4 code level of QBittorrent
* updated libtorrent to 0.16.3 level
2012-09-06
* updated to 3.0.2 code level of QBittorrent
2012-05-14
* updated to 2.9.8 code level of QBittorrent
2012-03-15
* updated to 2.9.5 code level of QBittorrent
2011-09-26
* updated to 2.8.5 code level of QBittorrent
* updated to Qt 4.7.3
2011-06-20
* updated to 2.7.3 code level of QBittorrent
* updated libtorrent to 0.15.6 level
2010-12-23
* updated to 2.5.2 code level of QBittorrent

View File

@@ -2,15 +2,64 @@ PREFIX = /usr/local
BINDIR = /usr/local/bin
DATADIR = /usr/local/share
INCLUDEPATH += /usr/local/include/libtorrent /usr/include/openssl /usr/include /opt/local/include/boost /opt/local/include
LIBS += -ltorrent-rasterbar -lcrypto -L/opt/local/lib -lboost_system-mt -lboost_filesystem-mt -lboost_thread-mt -framework Cocoa -framework Carbon -framework IOKit
# Use pkg-config to get all necessary libtorrent DEFINES
CONFIG += link_pkgconfig
PKGCONFIG += libtorrent-rasterbar
DEFINES += BOOST_ASIO_DYN_LINK
# Special include/libs paths (macports)
INCLUDEPATH += /usr/include/openssl /usr/include /opt/local/include/boost /opt/local/include
LIBS += -L/opt/local/lib
# OpenSSL lib
LIBS += -lssl -lcrypto
# Boost system lib
LIBS += -lboost_system-mt
# Boost filesystem lib (Not needed for libtorrent >= 0.16.0)
#LIBS += -lboost_filesystem-mt
# Carbon
LIBS += -framework Carbon -framework IOKit
document_icon.path = Contents/Resources
document_icon.files = Icons/qBitTorrentDocument.icns
document_icon.files = mac/qBitTorrentDocument.icns
QMAKE_BUNDLE_DATA += document_icon
ICON = Icons/qbittorrent_mac.icns
QMAKE_INFO_PLIST = Info.plist
qt_conf.path = Contents/Resources
qt_conf.files = mac/qt.conf
QMAKE_BUNDLE_DATA += qt_conf
qt_translations.path = Contents/MacOS/translations
qt_translations.files = qt-translations/qt_ar.qm \
qt-translations/qt_bg.qm \
qt-translations/qt_ca.qm \
qt-translations/qt_cs.qm \
qt-translations/qt_da.qm \
qt-translations/qt_de.qm \
qt-translations/qt_es.qm \
qt-translations/qt_fi.qm \
qt-translations/qt_fr.qm \
qt-translations/qt_gl.qm \
qt-translations/qt_he.qm \
qt-translations/qt_hu.qm \
qt-translations/qt_it.qm \
qt-translations/qt_ja.qm \
qt-translations/qt_ko.qm \
qt-translations/qt_lt.qm \
qt-translations/qt_nl.qm \
qt-translations/qt_pl.qm \
qt-translations/qt_pt.qm \
qt-translations/qt_pt_BR.qm \
qt-translations/qt_ru.qm \
qt-translations/qt_sk.qm \
qt-translations/qt_sv.qm \
qt-translations/qt_tr.qm \
qt-translations/qt_uk.qm \
qt-translations/qt_zh_CN.qm \
qt-translations/qt_zh_TW.qm
QMAKE_BUNDLE_DATA += qt_translations
ICON = mac/qbittorrent_mac.icns
QMAKE_INFO_PLIST = mac/Info.plist
DEFINES += WITH_GEOIP_EMBEDDED
message("On Mac OS X, GeoIP database must be embedded.")

View File

@@ -13,6 +13,7 @@ RC_FILE = qbittorrent_os2.rc
# LIBTORRENT DEFINES
DEFINES += WITH_SHIPPED_GEOIP_H
DEFINES += BOOST_ASIO_DYN_LINK
DEFINES += WITH_GEOIP_EMBEDDED
message("On eCS(OS/2), GeoIP database must be embedded.")

View File

@@ -9,7 +9,10 @@ dist.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/ &&
dist.commands += git clone . ../$${PROJECT_NAME}-$${PROJECT_VERSION} &&
dist.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/.git &&
dist.commands += rm -f ../$${PROJECT_NAME}-$${PROJECT_VERSION}/.gitignore &&
dist.commands += tar zcpvf ../$${PROJECT_NAME}-$${PROJECT_VERSION}.tar.gz ../$${PROJECT_NAME}-$${PROJECT_VERSION} &&
dist.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}
dist.commands += cd .. &&
dist.commands += tar czf $${PROJECT_NAME}-$${PROJECT_VERSION}.tar.gz $${PROJECT_NAME}-$${PROJECT_VERSION} &&
dist.commands += tar cf $${PROJECT_NAME}-$${PROJECT_VERSION}.tar $${PROJECT_NAME}-$${PROJECT_VERSION} &&
dist.commands += xz -f $${PROJECT_NAME}-$${PROJECT_VERSION}.tar &&
dist.commands += rm -fR $${PROJECT_NAME}-$${PROJECT_VERSION}
QMAKE_EXTRA_TARGETS += dist

View File

@@ -6,12 +6,15 @@ arg: with-libboost-lib=[path], Path to libboost library files
-----END QCMOD-----
*/
#include <boost/version.hpp>
#include <libtorrent/version.hpp>
class qc_libboost : public ConfObj
{
public:
qc_libboost(Conf *c) : ConfObj(c) {}
QString name() const { return "libboost"; }
QString shortname() const { return "libboost"; }
qc_libboost(Conf *c) : ConfObj(c) {}
QString name() const { return "libboost"; }
QString shortname() const { return "libboost"; }
QString findBoostLib(QString path, QString lib) const {
QString name;
QDir libDir(path);
@@ -35,75 +38,60 @@ public:
}
return name;
}
bool exec(){
QString s;
s = conf->getenv("QC_WITH_LIBBOOST_INC");
if(!s.isEmpty()) {
if(!conf->checkHeader(s, "boost/format.hpp")) {
return false;
}
if(!conf->checkHeader(s, "boost/date_time/posix_time/posix_time.hpp")) {
return false;
}
if(!conf->checkHeader(s, "boost/filesystem/path.hpp")) {
return false;
}
}else{
QStringList sl;
sl << "/usr/include";
sl << "/usr/local/include";
bool found = false;
foreach(s, sl){
if(conf->checkHeader(s, "boost/format.hpp")){
found = true;
break;
}
}
if(!found) {
return false;
}
if(!conf->checkHeader(s, "boost/date_time/posix_time/posix_time.hpp")) {
return false;
}
if(!conf->checkHeader(s, "boost/filesystem/path.hpp")) {
return false;
}
}
conf->addIncludePath(s);
// Find library
s = conf->getenv("QC_WITH_LIBBOOST_LIB");
bool exec(){
QStringList sl;
QString s = conf->getenv("QC_WITH_LIBBOOST_INC");
if (!s.isEmpty())
sl << s;
sl << "/usr/include";
sl << "/usr/local/include";
bool found = false;
foreach (s, sl) {
if (conf->checkHeader(s, "boost/format.hpp")
#if LIBTORRENT_VERSION_MAJOR == 0 && LIBTORRENT_VERSION_MINOR < 16
&& conf->checkHeader(s, "boost/filesystem/path.hpp")
#endif
) {
found = true;
break;
}
}
if (!found)
return false;
conf->addIncludePath(s);
// Find library
s = conf->getenv("QC_WITH_LIBBOOST_LIB");
QStringList required_libs;
#if BOOST_VERSION >= 103500
required_libs << "system";
#endif
#if LIBTORRENT_VERSION_MAJOR == 0 && LIBTORRENT_VERSION_MINOR < 16
required_libs << "filesystem" ;
#endif
required_libs << "thread";
QStringList libDirs;
if (!s.isEmpty())
libDirs << s;
libDirs << "/usr/lib/" << "/usr/lib64/" << "/usr/local/lib/" << "/usr/local/lib64/";
foreach(const QString& lib, required_libs) {
if(!s.isEmpty()) {
QString detected_name = findBoostLib(s, lib);
if(detected_name.isEmpty()) {
printf("Could not find boost %s library!\n", qPrintable(lib));
return false;
} else {
bool found = false;
foreach(const QString& libDir, libDirs) {
QString detected_name = findBoostLib(libDir, lib);
if(!detected_name.isEmpty()) {
conf->addLib("-l"+detected_name);
}
} else {
bool found = false;
foreach(const QString& libDir, libDirs) {
QString detected_name = findBoostLib(libDir, lib);
if(!detected_name.isEmpty()) {
conf->addLib("-l"+detected_name);
found = true;
break;
}
}
if(!found) {
printf("Could not find boost %s library!\n", qPrintable(lib));
return false;
found = true;
break;
}
}
if(!found) {
printf("Could not find boost %s library!\n", qPrintable(lib));
return false;
}
}
return true;
}
return true;
}
};

View File

@@ -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.4"; }
QString name() const { return "libtorrent-rasterbar >= 0.15.0"; }
QString shortname() const { return "libtorrent-rasterbar"; }
bool exec(){
QStringList incs;
QString req_ver = "0.14.4";
QString req_ver = "0.15.0";
QString version, libs, other;
VersionMode mode = VersionMin;
if(!conf->findPkgConfig("libtorrent-rasterbar", mode, req_ver, &version, &incs, &libs, &other))

View File

@@ -1,6 +1,6 @@
/*
-----BEGIN QCMOD-----
name: Qt >= 4.5
name: Qt >= 4.6
arg: enable-debug, Enable debug mode
arg: disable-gui, Disable qBittorrent Graphical user interface for headless running
-----END QCMOD-----
@@ -9,8 +9,8 @@ class qc_qt4 : public ConfObj
{
public:
qc_qt4(Conf *c) : ConfObj(c) {}
QString name() const { return "Qt >= 4.5"; }
QString shortname() const { return "Qt 4.5"; }
QString name() const { return "Qt >= 4.6"; }
QString shortname() const { return "Qt 4.6"; }
bool exec()
{
// NOX mode
@@ -31,6 +31,6 @@ public:
#else
conf->addExtra("MANPREFIX = $$PREFIX/share");
#endif
return(QT_VERSION >= 0x040500);
return(QT_VERSION >= 0x040600);
}
};

File diff suppressed because one or more lines are too long

View File

@@ -45,7 +45,7 @@ class about : public QDialog, private Ui::AboutDlg{
qDebug("Deleting about dlg");
}
about(QWidget *parent): QDialog(parent){
about(QWidget *parent): QDialog(parent) {
setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
// Set icons
@@ -64,6 +64,8 @@ class about : public QDialog, private Ui::AboutDlg{
QString trans_txt = "<p>"+tr("I would like to thank the following people who volunteered to translate qBittorrent:")+"</p>";
trans_txt += QString::fromUtf8("<ul><li><u>Arabic:</u> SDERAWI (abz8868@msn.com) and sn51234 (nesseyan@gmail.com)</li>\
<li><u>Armenian:</u> Hrant Ohanyan (hrantohanyan@mail.am)</li>\
<li><u>Basque:</u> Xabier Aramendi (azpidatziak@gmail.com)</li>\
<li><u>Belarusian:</u> Mihas Varantsou (meequz@gmail.com)</li>\
<li><u>Brazilian:</u> Nick Marinho (nickmarinho@gmail.com)</li>\
<li><u>Bulgarian:</u> Tsvetan & Boyko Bankoff (emerge_life@users.sourceforge.net)</li>\
<li><u>Catalan:</u> Francisco Luque Contreras (frannoe@ya.com)</li>\
@@ -75,10 +77,12 @@ class about : public QDialog, private Ui::AboutDlg{
<li><u>Dutch:</u> Pieter Heyvaert (pieter_heyvaert@hotmail.com)</li>\
<li><u>Finnish:</u> Niklas Laxström (nikerabbit@users.sourceforge.net) and Pekka Niemi (pekka.niemi@iki.fi)</li>\
<li><u>Galician:</u> Marcos Lans (marcoslansgarza@gmail.com)</li>\
<li><u>Georgian:</u> Beqa Arabuli (arabulibeqa@yahoo.com)</li>\
<li><u>German:</u> Niels Hoffmann (zentralmaschine@users.sourceforge.net)</li>\
<li><u>Greek:</u> Tsvetan Bankov (emerge_life@users.sourceforge.net)</li>\
<li><u>Hebrew:</u> David Deutsch (d.deffo@gmail.com)</li>\
<li><u>Hungarian:</u> Majoros Péter (majoros.peterj@gmail.com)</li>\
<li><u>Italian:</u> Matteo Sechi (bu17714@gmail.com)</li>\
<li><u>Italian:</u> bovirus (bovirus@live.it) and Matteo Sechi (bu17714@gmail.com)</li>\
<li><u>Japanese:</u> Masato Hashimoto (cabezon.hashimoto@gmail.com)</li>\
<li><u>Korean:</u> Jin Woo Sin (jin828sin@users.sourceforge.net)</li>\
<li><u>Lithuanian:</u> Naglis Jonaitis (njonaitis@gmail.com)</li>\
@@ -92,13 +96,13 @@ class about : public QDialog, private Ui::AboutDlg{
<li><u>Spanish:</u> 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> Andrey Shpachenko (masterfix@users.sourceforge.net) and Oleh Prypin (blaxpirit@gmail.com)</li></ul>");
<li><u>Ukrainian:</u> Oleh Prypin (blaxpirit@gmail.com)</li></ul>");
trans_txt += "<p>"+tr("Please contact me if you would like to translate qBittorrent into your own language.")+"</p>";
te_translation->setHtml(trans_txt);
// License
te_license->append(QString::fromUtf8("<a name='top'></a>"));
QFile licensefile(":/gpl.html");
if(licensefile.open(QIODevice::ReadOnly|QIODevice::Text)) {
if (licensefile.open(QIODevice::ReadOnly|QIODevice::Text)) {
te_license->setHtml(licensefile.readAll());
licensefile.close();
}

601
src/addnewtorrentdialog.cpp Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt4 and libtorrent.
* Copyright (C) 2006 Christophe Dumez
* Copyright (C) 2012 Christophe Dumez
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
@@ -28,70 +28,64 @@
* Contact : chris@qbittorrent.org
*/
#ifndef TORRENTADDITION_H
#define TORRENTADDITION_H
#include <QStringList>
#include "ui_torrentadditiondlg.h"
#ifndef ADDNEWTORRENTDIALOG_H
#define ADDNEWTORRENTDIALOG_H
#include <QDialog>
#include <QUrl>
#include <libtorrent/torrent_info.hpp>
class TorrentFilesFilterModel;
QT_BEGIN_NAMESPACE
namespace Ui {
class AddNewTorrentDialog;
}
QT_END_NAMESPACE
class TorrentContentFilterModel;
class PropListDelegate;
class torrentAdditionDialog : public QDialog, private Ui_addTorrentDialog{
class AddNewTorrentDialog : public QDialog
{
Q_OBJECT
public:
torrentAdditionDialog(QWidget *parent);
~torrentAdditionDialog();
void showLoadMagnetURI(QString magnet_uri);
void showLoad(QString filePath, QString from_url=QString::null);
QString getCurrentTruncatedSavePath(QString* root_folder_or_file_name = 0) const;
QString getTruncatedSavePath(QString save_path, QString* root_folder_or_file_name = 0) const;
bool allFiltered() const;
~AddNewTorrentDialog();
public slots:
void displayContentListMenu(const QPoint&);
static void showTorrent(const QString& torrent_path, const QString& from_url = QString());
static void showMagnet(const QString& torrent_link);
private slots:
void showAdvancedSettings(bool show);
void displayContentTreeMenu(const QPoint&);
void on_buttonBox_accepted();
void updateDiskSpaceLabel();
void onSavePathChanged(int);
void relayout();
void renameSelectedFile();
void updateDiskSpaceLabels();
void on_browseButton_clicked();
void on_CancelButton_clicked();
void savePiecesPriorities();
void on_OkButton_clicked();
void hideTorrentContent();
void limitDialogWidth();
void saveTruncatedPathHistory();
void setdialogPosition();
private:
explicit AddNewTorrentDialog(QWidget *parent = 0);
bool loadTorrent(const QString& torrent_path, const QString& from_url);
bool loadMagnet(const QString& magnet_uri);
void loadSavePathHistory();
void updateLabelInSavePath(QString label);
void updateSavePathCurrentText();
void resetComboLabelIndex(QString text);
protected:
void closeEvent(QCloseEvent *event);
void saveSavePathHistory() const;
int indexOfSavePath(const QString& save_path);
void updateFileNameInSavePaths(const QString& new_filename);
void loadState();
void saveState();
private:
void readSettings();
void saveSettings();
private:
QString fileName;
QString hash;
QString filePath;
QString from_url;
QString defaultSavePath;
QString old_label;
bool appendLabelToSavePath;
TorrentFilesFilterModel *PropListModel;
PropListDelegate *PropDelegate;
unsigned int nbFiles;
boost::intrusive_ptr<libtorrent::torrent_info> t;
QStringList files_path;
bool is_magnet;
int hidden_height;
QStringList path_history;
bool m_showContentList;
Ui::AddNewTorrentDialog *ui;
TorrentContentFilterModel *m_contentModel;
PropListDelegate *m_contentDelegate;
bool m_isMagnet;
QString m_filePath;
QString m_url;
QString m_hash;
boost::intrusive_ptr<libtorrent::torrent_info> m_torrentInfo;
QStringList m_filesPath;
bool m_hasRenamedFile;
};
#endif
#endif // ADDNEWTORRENTDIALOG_H

274
src/addnewtorrentdialog.ui Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -59,7 +59,7 @@ class DeletionConfirmationDlg : public QDialog, private Ui::confirmDeletionDlg {
static bool askForDeletionConfirmation(bool *delete_local_files) {
DeletionConfirmationDlg dlg;
if(dlg.exec() == QDialog::Accepted) {
if (dlg.exec() == QDialog::Accepted) {
*delete_local_files = dlg.shouldDeleteLocalFiles();
return true;
}

View File

@@ -50,7 +50,7 @@ DNSUpdater::DNSUpdater(QObject *parent) :
m_ipCheckTimer.start();
// Check lastUpdate to avoid flooding
if(!m_lastIPCheckTime.isValid() ||
if (!m_lastIPCheckTime.isValid() ||
m_lastIPCheckTime.secsTo(QDateTime::currentDateTime())*1000 > IP_CHECK_INTERVAL_MS) {
checkPublicIP();
}
@@ -79,19 +79,19 @@ void DNSUpdater::checkPublicIP()
void DNSUpdater::ipRequestFinished(QNetworkReply *reply)
{
qDebug() << Q_FUNC_INFO;
if(reply->error()) {
if (reply->error()) {
// Error
qWarning() << Q_FUNC_INFO << "Error:" << reply->errorString();
} else {
// Parse response
QRegExp ipregex("Current IP Address:\\s+([^<]+)</body>");
QString ret = reply->readAll();
if(ipregex.indexIn(ret) >= 0) {
if (ipregex.indexIn(ret) >= 0) {
QString ip_str = ipregex.cap(1);
qDebug() << Q_FUNC_INFO << "Regular expression captured the following IP:" << ip_str;
QHostAddress new_ip(ip_str);
if(!new_ip.isNull()) {
if(m_lastIP != new_ip) {
if (!new_ip.isNull()) {
if (m_lastIP != new_ip) {
qDebug() << Q_FUNC_INFO << "The IP address changed, report the change to DynDNS...";
qDebug() << m_lastIP.toString() << "->" << new_ip.toString();
m_lastIP = new_ip;
@@ -157,7 +157,7 @@ QUrl DNSUpdater::getUpdateUrl() const
void DNSUpdater::ipUpdateFinished(QNetworkReply *reply)
{
if(reply->error()) {
if (reply->error()) {
// Error
qWarning() << Q_FUNC_INFO << "Error:" << reply->errorString();
} else {
@@ -174,11 +174,11 @@ void DNSUpdater::processIPUpdateReply(const QString &reply)
qDebug() << Q_FUNC_INFO << reply;
QString code = reply.split(" ").first();
qDebug() << Q_FUNC_INFO << "Code:" << code;
if(code == "good" || code == "nochg") {
QBtSession::instance()->addConsoleMessage(tr("Your dynamic DNS was successfuly updated."), "green");
if (code == "good" || code == "nochg") {
QBtSession::instance()->addConsoleMessage(tr("Your dynamic DNS was successfully updated."), "green");
return;
}
if(code == "911" || code == "dnserr") {
if (code == "911" || code == "dnserr") {
QBtSession::instance()->addConsoleMessage(tr("Dynamic DNS error: The service is temporarily unavailable, it will be retried in 30 minutes."),
"red");
m_lastIP.clear();
@@ -188,30 +188,30 @@ void DNSUpdater::processIPUpdateReply(const QString &reply)
// Everything bellow is an error, stop updating until the user updates something
m_ipCheckTimer.stop();
m_lastIP.clear();
if(code == "nohost") {
if (code == "nohost") {
QBtSession::instance()->addConsoleMessage(tr("Dynamic DNS error: hostname supplied does not exist under specified account."),
"red");
m_state = INVALID_CREDS;
return;
}
if(code == "badauth") {
if (code == "badauth") {
QBtSession::instance()->addConsoleMessage(tr("Dynamic DNS error: Invalid username/password."), "red");
m_state = INVALID_CREDS;
return;
}
if(code == "badagent") {
if (code == "badagent") {
QBtSession::instance()->addConsoleMessage(tr("Dynamic DNS error: qBittorrent was blacklisted by the service, please report a bug at http://bugs.qbittorrent.org."),
"red");
m_state = FATAL;
return;
}
if(code == "!donator") {
if (code == "!donator") {
QBtSession::instance()->addConsoleMessage(tr("Dynamic DNS error: %1 was returned by the service, please report a bug at http://bugs.qbittorrent.org.").arg("!donator"),
"red");
m_state = FATAL;
return;
}
if(code == "abuse") {
if (code == "abuse") {
QBtSession::instance()->addConsoleMessage(tr("Dynamic DNS error: Your username was blocked due to abuse."),
"red");
m_state = FATAL;
@@ -221,18 +221,18 @@ void DNSUpdater::processIPUpdateReply(const QString &reply)
void DNSUpdater::updateCredentials()
{
if(m_state == FATAL) return;
if (m_state == FATAL) return;
Preferences pref;
bool change = false;
// Get DNS service information
if(m_service != pref.getDynDNSService()) {
if (m_service != pref.getDynDNSService()) {
m_service = pref.getDynDNSService();
change = true;
}
if(m_domain != pref.getDynDomainName()) {
if (m_domain != pref.getDynDomainName()) {
m_domain = pref.getDynDomainName();
QRegExp domain_regex("^(?:(?!\\d|-)[a-zA-Z0-9\\-]{1,63}\\.)+[a-zA-Z]{2,}$");
if(domain_regex.indexIn(m_domain) < 0) {
if (domain_regex.indexIn(m_domain) < 0) {
QBtSession::instance()->addConsoleMessage(tr("Dynamic DNS error: supplied domain name is invalid."),
"red");
m_lastIP.clear();
@@ -242,9 +242,9 @@ void DNSUpdater::updateCredentials()
}
change = true;
}
if(m_username != pref.getDynDNSUsername()) {
if (m_username != pref.getDynDNSUsername()) {
m_username = pref.getDynDNSUsername();
if(m_username.length() < 4) {
if (m_username.length() < 4) {
QBtSession::instance()->addConsoleMessage(tr("Dynamic DNS error: supplied username is too short."),
"red");
m_lastIP.clear();
@@ -254,9 +254,9 @@ void DNSUpdater::updateCredentials()
}
change = true;
}
if(m_password != pref.getDynDNSPassword()) {
if (m_password != pref.getDynDNSPassword()) {
m_password = pref.getDynDNSPassword();
if(m_password.length() < 4) {
if (m_password.length() < 4) {
QBtSession::instance()->addConsoleMessage(tr("Dynamic DNS error: supplied password is too short."),
"red");
m_lastIP.clear();
@@ -267,7 +267,7 @@ void DNSUpdater::updateCredentials()
change = true;
}
if(m_state == INVALID_CREDS && change) {
if (m_state == INVALID_CREDS && change) {
m_state = OK; // Try again
m_ipCheckTimer.start();
checkPublicIP();

View File

@@ -43,38 +43,38 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
Q_OBJECT
public:
downloadFromURL(QWidget *parent): QDialog(parent){
downloadFromURL(QWidget *parent): QDialog(parent) {
setupUi(this);
setAttribute(Qt::WA_DeleteOnClose);
setModal(true);
show();
// Paste clipboard if there is an URL in it
QString clip_txt = qApp->clipboard()->text();
if(clip_txt.startsWith("http://", Qt::CaseInsensitive) || clip_txt.startsWith("https://", Qt::CaseInsensitive) || clip_txt.startsWith("ftp://", Qt::CaseInsensitive) || clip_txt.startsWith("magnet:", Qt::CaseInsensitive) || clip_txt.startsWith("bc://bt/", Qt::CaseInsensitive)) {
if (clip_txt.startsWith("http://", Qt::CaseInsensitive) || clip_txt.startsWith("https://", Qt::CaseInsensitive) || clip_txt.startsWith("ftp://", Qt::CaseInsensitive) || clip_txt.startsWith("magnet:", Qt::CaseInsensitive) || clip_txt.startsWith("bc://bt/", Qt::CaseInsensitive)) {
textUrls->setText(clip_txt);
}
}
~downloadFromURL(){}
~downloadFromURL() {}
signals:
void urlsReadyToBeDownloaded(const QStringList& torrent_urls);
public slots:
void on_downloadButton_clicked(){
void on_downloadButton_clicked() {
QString urls = textUrls->toPlainText();
QStringList url_list = urls.split(QString::fromUtf8("\n"));
QString url;
QStringList url_list_cleaned;
foreach(url, url_list){
foreach (url, url_list) {
url = url.trimmed();
if(!url.isEmpty()){
if(url_list_cleaned.indexOf(QRegExp(url, Qt::CaseInsensitive, QRegExp::FixedString)) < 0){
if (!url.isEmpty()) {
if (url_list_cleaned.indexOf(QRegExp(url, Qt::CaseInsensitive, QRegExp::FixedString)) < 0) {
url_list_cleaned << url;
}
}
}
if(!url_list_cleaned.size()){
if (!url_list_cleaned.size()) {
QMessageBox::critical(0, tr("No URL entered"), tr("Please type at least one URL."));
return;
}
@@ -83,7 +83,7 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
close();
}
void on_cancelButton_clicked(){
void on_cancelButton_clicked() {
close();
}
};

View File

@@ -14,31 +14,14 @@
<string>Download from urls</string>
</property>
<layout class="QVBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>9</number>
</property>
<item>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<widget class="QLabel" name="downloadURL_lbl">
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>12</pointsize>
<weight>75</weight>
<italic>false</italic>
<bold>true</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text">
@@ -65,13 +48,7 @@
</property>
<property name="font">
<font>
<family>Sans Serif</family>
<pointsize>9</pointsize>
<weight>50</weight>
<italic>true</italic>
<bold>false</bold>
<underline>false</underline>
<strikeout>false</strikeout>
</font>
</property>
<property name="text">
@@ -81,12 +58,6 @@
</item>
<item>
<layout class="QHBoxLayout">
<property name="spacing">
<number>6</number>
</property>
<property name="margin">
<number>0</number>
</property>
<item>
<spacer>
<property name="orientation">

View File

@@ -32,7 +32,6 @@
#include <QNetworkAccessManager>
#include <QNetworkRequest>
#include <QNetworkProxy>
#include <QNetworkCookie>
#include <QNetworkCookieJar>
#include "downloadthread.h"
@@ -55,7 +54,7 @@ void DownloadThread::processDlFinished(QNetworkReply* reply) {
QString url = reply->url().toString();
qDebug("Download finished: %s", qPrintable(url));
// Check if the request was successful
if(reply->error() != QNetworkReply::NoError) {
if (reply->error() != QNetworkReply::NoError) {
// Failure
qDebug("Download failure (%s), reason: %s", qPrintable(url), qPrintable(errorCodeToString(reply->error())));
emit downloadFailure(url, errorCodeToString(reply->error()));
@@ -64,16 +63,21 @@ void DownloadThread::processDlFinished(QNetworkReply* reply) {
}
// Check if the server ask us to redirect somewhere lese
const QVariant redirection = reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
if(redirection.isValid()) {
if (redirection.isValid()) {
// We should redirect
qDebug("Redirecting from %s to %s", qPrintable(url), qPrintable(redirection.toUrl().toString()));
m_redirectMapping.insert(redirection.toUrl().toString(), url);
downloadUrl(redirection.toUrl().toString());
QUrl newUrl = redirection.toUrl();
// Resolve relative urls
if (newUrl.isRelative())
newUrl = reply->url().resolved(newUrl);
const QString newUrlString = newUrl.toString();
qDebug("Redirecting from %s to %s", qPrintable(url), qPrintable(newUrlString));
m_redirectMapping.insert(newUrlString, url);
downloadUrl(newUrlString);
reply->deleteLater();
return;
}
// Checking if it was redirected, restoring initial URL
if(m_redirectMapping.contains(url)) {
if (m_redirectMapping.contains(url)) {
url = m_redirectMapping.take(url);
}
// Success
@@ -82,7 +86,7 @@ void DownloadThread::processDlFinished(QNetworkReply* reply) {
if (tmpfile->open()) {
QString filePath = tmpfile->fileName();
qDebug("Temporary filename is: %s", qPrintable(filePath));
if(reply->isOpen() || reply->open(QIODevice::ReadOnly)) {
if (reply->isOpen() || reply->open(QIODevice::ReadOnly)) {
// TODO: Support GZIP compression
tmpfile->write(reply->readAll());
tmpfile->close();
@@ -104,39 +108,21 @@ void DownloadThread::processDlFinished(QNetworkReply* reply) {
reply->deleteLater();
}
#ifndef DISABLE_GUI
void DownloadThread::loadCookies(const QString &host_name, QString url) {
const QList<QByteArray> raw_cookies = RssSettings().getHostNameCookies(host_name);
QNetworkCookieJar *cookie_jar = m_networkManager.cookieJar();
QList<QNetworkCookie> cookies;
qDebug("Loading cookies for host name: %s", qPrintable(host_name));
foreach(const QByteArray& raw_cookie, raw_cookies) {
QList<QByteArray> cookie_parts = raw_cookie.split('=');
if(cookie_parts.size() == 2) {
qDebug("Loading cookie: %s", raw_cookie.constData());
cookies << QNetworkCookie(cookie_parts.first(), cookie_parts.last());
}
}
cookie_jar->setCookiesFromUrl(cookies, url);
m_networkManager.setCookieJar(cookie_jar);
}
#endif
void DownloadThread::downloadTorrentUrl(const QString &url) {
void DownloadThread::downloadTorrentUrl(const QString &url, const QList<QNetworkCookie>& cookies)
{
// Process request
QNetworkReply *reply = downloadUrl(url);
QNetworkReply *reply = downloadUrl(url, cookies);
connect(reply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(checkDownloadSize(qint64,qint64)));
}
QNetworkReply* DownloadThread::downloadUrl(const QString &url){
QNetworkReply* DownloadThread::downloadUrl(const QString &url, const QList<QNetworkCookie>& cookies) {
// Update proxy settings
applyProxySettings();
#ifndef DISABLE_GUI
// Load cookies
QString host_name = QUrl::fromEncoded(url.toUtf8()).host();
if(!host_name.isEmpty())
loadCookies(host_name, url);
#endif
// Set cookies
if (!cookies.empty()) {
qDebug("Setting %d cookies for url: %s", cookies.size(), qPrintable(url));
m_networkManager.cookieJar()->setCookiesFromUrl(cookies, url);
}
// Process download request
qDebug("url is %s", qPrintable(url));
const QUrl qurl = QUrl::fromEncoded(url.toUtf8());
@@ -146,7 +132,7 @@ QNetworkReply* DownloadThread::downloadUrl(const QString &url){
request.setRawHeader("User-Agent", "Mozilla/5.0 (X11; U; Linux i686 (x86_64); en-US; rv:1.9.1.5) Gecko/20091102 Firefox/3.5.5");
qDebug("Downloading %s...", request.url().toEncoded().data());
qDebug("%d cookies for this URL", m_networkManager.cookieJar()->cookiesForUrl(url).size());
for(int i=0; i<m_networkManager.cookieJar()->cookiesForUrl(url).size(); ++i) {
for (int i=0; i<m_networkManager.cookieJar()->cookiesForUrl(url).size(); ++i) {
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()));
}
@@ -155,10 +141,10 @@ QNetworkReply* DownloadThread::downloadUrl(const QString &url){
void DownloadThread::checkDownloadSize(qint64 bytesReceived, qint64 bytesTotal) {
QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender());
if(!reply) return;
if(bytesTotal > 0) {
if (!reply) return;
if (bytesTotal > 0) {
// Total number of bytes is available
if(bytesTotal > 1048576) {
if (bytesTotal > 1048576) {
// More than 1MB, this is probably not a torrent file, aborting...
reply->abort();
reply->deleteLater();
@@ -166,7 +152,7 @@ void DownloadThread::checkDownloadSize(qint64 bytesReceived, qint64 bytesTotal)
disconnect(reply, SIGNAL(downloadProgress(qint64,qint64)), this, SLOT(checkDownloadSize(qint64,qint64)));
}
} else {
if(bytesReceived > 1048576) {
if (bytesReceived > 1048576) {
// More than 1MB, this is probably not a torrent file, aborting...
reply->abort();
reply->deleteLater();
@@ -177,13 +163,13 @@ void DownloadThread::checkDownloadSize(qint64 bytesReceived, qint64 bytesTotal)
void DownloadThread::applyProxySettings() {
QNetworkProxy proxy;
const Preferences pref;
if(pref.isProxyEnabled()) {
if (pref.isProxyEnabled()) {
// Proxy enabled
proxy.setHostName(pref.getProxyIp());
proxy.setPort(pref.getProxyPort());
// Default proxy type is HTTP, we must change if it is SOCKS5
const int proxy_type = pref.getProxyType();
if(proxy_type == Proxy::SOCKS5 || proxy_type == Proxy::SOCKS5_PW) {
if (proxy_type == Proxy::SOCKS5 || proxy_type == Proxy::SOCKS5_PW) {
qDebug() << Q_FUNC_INFO << "using SOCKS proxy";
proxy.setType(QNetworkProxy::Socks5Proxy);
} else {
@@ -191,7 +177,7 @@ void DownloadThread::applyProxySettings() {
proxy.setType(QNetworkProxy::HttpProxy);
}
// Authentication?
if(pref.isProxyAuthEnabled()) {
if (pref.isProxyAuthEnabled()) {
qDebug("Proxy requires authentication, authenticating");
proxy.setUser(pref.getProxyUsername());
proxy.setPassword(pref.getProxyPassword());
@@ -203,7 +189,7 @@ void DownloadThread::applyProxySettings() {
}
QString DownloadThread::errorCodeToString(QNetworkReply::NetworkError status) {
switch(status){
switch(status) {
case QNetworkReply::HostNotFoundError:
return tr("The remote host name was not found (invalid hostname)");
case QNetworkReply::OperationCanceledError:

View File

@@ -32,6 +32,7 @@
#define DOWNLOADTHREAD_H
#include <QNetworkReply>
#include <QNetworkCookie>
#include <QObject>
#include <QHash>
#include <QSslError>
@@ -45,8 +46,8 @@ class DownloadThread : public QObject {
public:
DownloadThread(QObject* parent = 0);
QNetworkReply* downloadUrl(const QString &url);
void downloadTorrentUrl(const QString &url);
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:
@@ -63,9 +64,6 @@ private slots:
private:
QString errorCodeToString(QNetworkReply::NetworkError status);
void applyProxySettings();
#ifndef DISABLE_GUI
void loadCookies(const QString &host_name, QString url);
#endif
private:
QNetworkAccessManager m_networkManager;

View File

@@ -50,10 +50,10 @@ ExecutionLog::ExecutionLog(QWidget *parent) :
ui->tabBan->layout()->addWidget(m_banList);
const QStringList log_msgs = QBtSession::instance()->getConsoleMessages();
foreach(const QString& msg, log_msgs)
foreach (const QString& msg, log_msgs)
addLogMessage(msg);
const QStringList ban_msgs = QBtSession::instance()->getPeerBanMessages();
foreach(const QString& msg, ban_msgs)
foreach (const QString& msg, ban_msgs)
addBanMessage(msg);
connect(QBtSession::instance(), SIGNAL(newConsoleMessage(QString)), SLOT(addLogMessage(QString)));
connect(QBtSession::instance(), SIGNAL(newBanMessage(QString)), SLOT(addBanMessage(QString)));

View File

@@ -37,8 +37,8 @@ QT_BEGIN_NAMESPACE
namespace Ui {
class ExecutionLog;
}
class LogListWidget;
QT_END_NAMESPACE
class LogListWidget;
class ExecutionLog : public QWidget
{

View File

@@ -21,6 +21,7 @@
#endif
#endif
#include "fs_utils.h"
#include "misc.h"
#ifndef CIFS_MAGIC_NUMBER
@@ -59,11 +60,11 @@ private:
private:
static bool isNetworkFileSystem(QString path) {
QString file = path;
if(!file.endsWith(QDir::separator()))
if (!file.endsWith(QDir::separator()))
file += QDir::separator();
file += ".";
struct statfs buf;
if(!statfs(file.toLocal8Bit().constData(), &buf)) {
if (!statfs(file.toLocal8Bit().constData(), &buf)) {
#ifdef Q_WS_MAC
// XXX: should we make sure HAVE_STRUCT_FSSTAT_F_FSTYPENAME is defined?
return (strcmp(buf.f_fstypename, "nfs") == 0 || strcmp(buf.f_fstypename, "cifs") == 0 || strcmp(buf.f_fstypename, "smbfs") == 0);
@@ -118,23 +119,23 @@ private:
public:
FileSystemWatcher(QObject *parent): QFileSystemWatcher(parent) {
m_filters << "*.torrent";
m_filters << "*.torrent" << "*.magnet";
connect(this, SIGNAL(directoryChanged(QString)), this, SLOT(scanLocalFolder(QString)));
}
~FileSystemWatcher() {
#ifndef Q_WS_WIN
if(watch_timer)
if (watch_timer)
delete watch_timer;
#endif
if(m_partialTorrentTimer)
if (m_partialTorrentTimer)
delete m_partialTorrentTimer;
}
QStringList directories() const {
QStringList dirs;
#ifndef Q_WS_WIN
if(watch_timer) {
if (watch_timer) {
foreach (const QDir &dir, watched_folders)
dirs << dir.canonicalPath();
}
@@ -149,7 +150,7 @@ public:
if (!dir.exists())
return;
// Check if the path points to a network file system or not
if(isNetworkFileSystem(path)) {
if (isNetworkFileSystem(path)) {
// Network mode
qDebug("Network folder detected: %s", qPrintable(path));
qDebug("Using file polling mode instead of inotify...");
@@ -194,7 +195,7 @@ protected slots:
// Local folders scan
addTorrentsFromDir(QDir(path), torrents);
// Report detected torrent files
if(!torrents.empty()) {
if (!torrents.empty()) {
qDebug("The following files are being reported: %s", qPrintable(torrents.join("\n")));
emit torrentsAdded(torrents);
}
@@ -210,7 +211,7 @@ protected slots:
addTorrentsFromDir(dir, torrents);
}
// Report detected torrent files
if(!torrents.empty()) {
if (!torrents.empty()) {
qDebug("The following files are being reported: %s", qPrintable(torrents.join("\n")));
emit torrentsAdded(torrents);
}
@@ -221,16 +222,16 @@ protected slots:
QStringList no_longer_partial;
// Check which torrents are still partial
foreach(const QString& torrent_path, m_partialTorrents.keys()) {
if(!QFile::exists(torrent_path)) {
foreach (const QString& torrent_path, m_partialTorrents.keys()) {
if (!QFile::exists(torrent_path)) {
m_partialTorrents.remove(torrent_path);
continue;
}
if(misc::isValidTorrentFile(torrent_path)) {
if (fsutils::isValidTorrentFile(torrent_path)) {
no_longer_partial << torrent_path;
m_partialTorrents.remove(torrent_path);
} else {
if(m_partialTorrents[torrent_path] >= MAX_PARTIAL_RETRIES) {
if (m_partialTorrents[torrent_path] >= MAX_PARTIAL_RETRIES) {
m_partialTorrents.remove(torrent_path);
QFile::rename(torrent_path, torrent_path+".invalid");
} else {
@@ -240,7 +241,7 @@ protected slots:
}
// Stop the partial timer if necessary
if(m_partialTorrents.empty()) {
if (m_partialTorrents.empty()) {
m_partialTorrentTimer->stop();
m_partialTorrentTimer->deleteLater();
qDebug("No longer any partial torrent.");
@@ -249,7 +250,7 @@ protected slots:
m_partialTorrentTimer->start(WATCH_INTERVAL);
}
// Notify of new torrents
if(!no_longer_partial.isEmpty())
if (!no_longer_partial.isEmpty())
emit torrentsAdded(no_longer_partial);
}
@@ -259,7 +260,7 @@ signals:
private:
void startPartialTorrentTimer() {
Q_ASSERT(!m_partialTorrents.isEmpty());
if(!m_partialTorrentTimer) {
if (!m_partialTorrentTimer) {
m_partialTorrentTimer = new QTimer();
connect(m_partialTorrentTimer, SIGNAL(timeout()), SLOT(processPartialTorrents()));
m_partialTorrentTimer->setSingleShot(true);
@@ -269,19 +270,25 @@ private:
void addTorrentsFromDir(const QDir &dir, QStringList &torrents) {
const QStringList files = dir.entryList(m_filters, QDir::Files, QDir::Unsorted);
foreach(const QString &file, files) {
foreach (const QString &file, files) {
const QString file_abspath = dir.absoluteFilePath(file);
if(misc::isValidTorrentFile(file_abspath)) {
if (file_abspath.endsWith(".magnet")) {
QFile f(file_abspath);
if (f.open(QIODevice::ReadOnly)
&& !misc::magnetUriToHash(QString::fromLocal8Bit(f.readAll())).isEmpty()) {
torrents << file_abspath;
}
} else if (fsutils::isValidTorrentFile(file_abspath)) {
torrents << file_abspath;
} else {
if(!m_partialTorrents.contains(file_abspath)) {
if (!m_partialTorrents.contains(file_abspath)) {
qDebug("Partial torrent detected at: %s", qPrintable(file_abspath));
qDebug("Delay the file's processing...");
m_partialTorrents.insert(file_abspath, 0);
}
}
}
if(!m_partialTorrents.empty())
if (!m_partialTorrents.empty())
startPartialTorrentTimer();
}

503
src/fs_utils.cpp Normal file

File diff suppressed because it is too large Load Diff

73
src/fs_utils.h Normal file
View File

@@ -0,0 +1,73 @@
/*
* Bittorrent Client using Qt4 and libtorrent.
* Copyright (C) 2012 Christophe Dumez
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* In addition, as a special exception, the copyright holders give permission to
* link this program with the OpenSSL project's "OpenSSL" library (or with
* modified versions of it that use the same license as the "OpenSSL" library),
* and distribute the linked executables. You must obey the GNU General Public
* License in all respects for all of the code used other than "OpenSSL". If you
* modify file(s), you may extend this exception to your version of the file(s),
* but you are not obligated to do so. If you do not wish to do so, delete this
* exception statement from your version.
*
* Contact : chris@qbittorrent.org
*/
#ifndef FS_UTILS_H
#define FS_UTILS_H
#include <QString>
#include <QCoreApplication>
/**
* Utility functions related to file system.
*/
class fsutils
{
Q_DECLARE_TR_FUNCTIONS(fsutils)
public:
static QString toDisplayPath(const QString& path);
static QString fileExtension(const QString& filename);
static QString fileName(const QString& file_path);
static qint64 computePathSize(const QString& path);
static bool sameFiles(const QString& path1, const QString& path2);
static QString updateLabelInSavePath(QString defaultSavePath, QString save_path, const QString& old_label, const QString& new_label);
static QString toValidFileSystemName(QString filename);
static bool isValidFileSystemName(const QString& filename);
static long long freeDiskSpaceOnPath(QString path);
static QString branchPath(const QString& file_path, QString* removed = 0);
static bool sameFileNames(const QString& first, const QString& second);
static QString expandPath(const QString& path);
static bool isValidTorrentFile(const QString& path);
static bool smartRemoveEmptyFolderTree(const QString& dir_path);
static bool forceRemove(const QString& file_path);
/* Ported from Qt4 to drop dependency on QtGui */
static QString QDesktopServicesDataLocation();
static QString QDesktopServicesCacheLocation();
static QString QDesktopServicesDownloadLocation();
/* End of Qt4 code */
static QString searchEngineLocation();
static QString BTBackupLocation();
static QString cacheLocation();
};
#endif // FS_UTILS_H

View File

@@ -64,20 +64,20 @@
#include <QFile>
#include <QChar>
#include "misc.h"
#include "fs_utils.h"
using namespace libtorrent;
QString GeoIPManager::geoipFolder(bool embedded) {
#ifdef WITH_GEOIP_EMBEDDED
if(embedded)
if (embedded)
return ":/geoip/";
return misc::QDesktopServicesDataLocation()+"geoip"+QDir::separator();
return fsutils::QDesktopServicesDataLocation()+"geoip"+QDir::separator();
#else
Q_UNUSED(embedded);
if(QFile::exists("/usr/local/share/GeoIP/GeoIP.dat"))
if (QFile::exists("/usr/local/share/GeoIP/GeoIP.dat"))
return "/usr/local/share/GeoIP/";
if(QFile::exists("/var/lib/GeoIP/GeoIP.dat"))
if (QFile::exists("/var/lib/GeoIP/GeoIP.dat"))
return "/var/lib/GeoIP/";
return "/usr/share/GeoIP/";
#endif
@@ -89,22 +89,22 @@ QString GeoIPManager::geoipDBpath(bool embedded) {
#ifdef WITH_GEOIP_EMBEDDED
void GeoIPManager::exportEmbeddedDb() {
if(!QFile::exists(geoipDBpath(false)) || QFile(geoipDBpath(false)).size() != QFile(geoipDBpath(true)).size()) { // Export is required
if (!QFile::exists(geoipDBpath(false)) || QFile(geoipDBpath(false)).size() != QFile(geoipDBpath(true)).size()) { // Export is required
qDebug("A local Geoip database update is required, proceeding...");
// Create geoip folder is necessary
QDir gfolder(geoipFolder(false));
if(!gfolder.exists()) {
if(!gfolder.mkpath(geoipFolder(false))) {
if (!gfolder.exists()) {
if (!gfolder.mkpath(geoipFolder(false))) {
std::cerr << "Failed to create geoip folder at " << qPrintable(geoipFolder(false)) << std::endl;
return;
}
}
// Remove destination files
if(QFile::exists(geoipDBpath(false)))
misc::safeRemove(geoipDBpath(false));
if (QFile::exists(geoipDBpath(false)))
fsutils::forceRemove(geoipDBpath(false));
// Copy from executable to hard disk
qDebug("%s -> %s", qPrintable(geoipDBpath(true)), qPrintable(geoipDBpath(false)));
if(!QFile::copy(geoipDBpath(true), geoipDBpath(false))) {
if (!QFile::copy(geoipDBpath(true), geoipDBpath(false))) {
std::cerr << "ERROR: Failed to copy geoip.dat from executable to hard disk" << std::endl;
}
qDebug("Local Geoip database was updated");
@@ -116,7 +116,7 @@ void GeoIPManager::loadDatabase(session *s) {
#ifdef WITH_GEOIP_EMBEDDED
exportEmbeddedDb();
#endif
if(QFile::exists(geoipDBpath(false))) {
if (QFile::exists(geoipDBpath(false))) {
qDebug("Loading GeoIP database from %s...", qPrintable(geoipDBpath(false)));
s->load_country_db(geoipDBpath(false).toLocal8Bit().constData());
} else {
@@ -183,9 +183,9 @@ const char * country_name[253] =
"Saint Barthelemy","Saint Martin"};
QString GeoIPManager::CountryISOCodeToName(const char* iso) {
if(iso[0] == 0) return "N/A";
for(uint i = 0; i < num_countries; ++i) {
if(iso[0] == country_code[i][0] && iso[1] == country_code[i][1]) {
if (iso[0] == 0) return "N/A";
for (uint i = 0; i < num_countries; ++i) {
if (iso[0] == country_code[i][0] && iso[1] == country_code[i][1]) {
return QLatin1String(country_name[i]);
}
}
@@ -195,7 +195,7 @@ QString GeoIPManager::CountryISOCodeToName(const char* iso) {
// http://www.iso.org/iso/country_codes/iso_3166_code_lists/english_country_names_and_code_elements.htm
QIcon GeoIPManager::CountryISOCodeToIcon(const char* iso) {
if(iso[0] == 0 || iso[0] == '!') return QIcon();
if (iso[0] == 0 || iso[0] == '!') return QIcon();
const QString isoStr = QString(QByteArray(iso, 2)).toLower();
return QIcon(":/Icons/flags/"+isoStr+".png");
}

View File

@@ -55,7 +55,7 @@ public:
std::cout << qPrintable(tr("To control qBittorrent, access the Web UI at http://localhost:%1").arg(QString::number(pref.getWebUiPort()))) << std::endl;
std::cout << qPrintable(tr("The Web UI administrator user name is: %1").arg(pref.getWebUiUsername())) << std::endl;
qDebug() << "Password:" << pref.getWebUiPassword();
if(pref.getWebUiPassword() == "32fe0bd2bb001911bb8bcfe23fc92b63") {
if (pref.getWebUiPassword() == "32fe0bd2bb001911bb8bcfe23fc92b63") {
std::cout << qPrintable(tr("The Web UI administrator password is still the default one: %1").arg("adminadmin")) << std::endl;
std::cout << qPrintable(tr("This is a security risk, please consider changing your password from program preferences.")) << std::endl;
}
@@ -85,16 +85,16 @@ public slots:
// the right addTorrent function, considering
// the parameter type.
void processParams(const QStringList& params) {
foreach(QString param, params) {
foreach (QString param, params) {
param = param.trimmed();
if(param.startsWith(QString::fromUtf8("http://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("ftp://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("https://"), Qt::CaseInsensitive)) {
if (param.startsWith(QString::fromUtf8("http://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("ftp://"), Qt::CaseInsensitive) || param.startsWith(QString::fromUtf8("https://"), Qt::CaseInsensitive)) {
QBtSession::instance()->downloadFromUrl(param);
}else{
if(param.startsWith("bc://bt/", Qt::CaseInsensitive)) {
if (param.startsWith("bc://bt/", Qt::CaseInsensitive)) {
qDebug("Converting bc link to magnet link");
param = misc::bcLinkToMagnet(param);
}
if(param.startsWith("magnet:", Qt::CaseInsensitive)) {
if (param.startsWith("magnet:", Qt::CaseInsensitive)) {
QBtSession::instance()->addMagnetUri(param);
} else {
QBtSession::instance()->addTorrent(param);

View File

@@ -44,7 +44,7 @@ public:
protected:
void tabInserted(int index) {
QTabWidget::tabInserted(index);
if(count() == 1) {
if (count() == 1) {
showTabBar(false);
} else {
showTabBar(true);
@@ -53,7 +53,7 @@ protected:
void tabRemoved(int index) {
QTabWidget::tabInserted(index);
if(count() == 1) {
if (count() == 1) {
showTabBar(false);
} else {
showTabBar(true);

View File

@@ -35,21 +35,21 @@ IconProvider* IconProvider::m_instance = 0;
IconProvider::IconProvider()
{
#if defined(Q_WS_X11) && (QT_VERSION >= QT_VERSION_CHECK(4,6,0))
#if defined(Q_WS_X11)
m_useSystemTheme = Preferences().useSystemIconTheme();
#endif
}
IconProvider * IconProvider::instance()
{
if(!m_instance)
if (!m_instance)
m_instance = new IconProvider;
return m_instance;
}
void IconProvider::drop()
{
if(m_instance) {
if (m_instance) {
delete m_instance;
m_instance = 0;
}
@@ -57,8 +57,8 @@ void IconProvider::drop()
QIcon IconProvider::getIcon(const QString &iconId)
{
#if defined(Q_WS_X11) && (QT_VERSION >= QT_VERSION_CHECK(4,6,0))
if(m_useSystemTheme) {
#if defined(Q_WS_X11)
if (m_useSystemTheme) {
QIcon icon = QIcon::fromTheme(iconId, QIcon(":/Icons/oxygen/"+iconId+".png"));
icon = generateDifferentSizes(icon);
return icon;
@@ -67,7 +67,7 @@ QIcon IconProvider::getIcon(const QString &iconId)
return QIcon(":/Icons/oxygen/"+iconId+".png");
}
#if defined(Q_WS_X11) && (QT_VERSION >= QT_VERSION_CHECK(4,6,0))
#if defined(Q_WS_X11)
void IconProvider::useSystemIconTheme(bool enable)
{
m_useSystemTheme = enable;
@@ -77,21 +77,21 @@ void IconProvider::useSystemIconTheme(bool enable)
// It scales the icon from the theme if necessary
// Otherwise, the UI looks broken if the icon is not available
// in the correct size.
QIcon IconProvider::generateDifferentSizes(const QIcon &icon)
QIcon IconProvider::generateDifferentSizes(const QIcon& icon)
{
QIcon new_icon;
QList<QSize> required_sizes;
required_sizes << QSize(16, 16) << QSize(24, 24);
QList<QIcon::Mode> modes;
modes << QIcon::Normal << QIcon::Active << QIcon::Selected << QIcon::Disabled;
foreach(const QSize& size, required_sizes) {
foreach(QIcon::Mode mode, modes) {
foreach (const QSize& size, required_sizes) {
foreach (QIcon::Mode mode, modes) {
QPixmap pixoff = icon.pixmap(size, mode, QIcon::Off);
if(pixoff.height() > size.height())
if (pixoff.height() > size.height())
pixoff = pixoff.scaled(size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
new_icon.addPixmap(pixoff, mode, QIcon::Off);
QPixmap pixon = icon.pixmap(size, mode, QIcon::On);
if(pixon.height() > size.height())
if (pixon.height() > size.height())
pixon = pixoff.scaled(size, Qt::KeepAspectRatio, Qt::SmoothTransformation);
new_icon.addPixmap(pixon, mode, QIcon::On);
}
@@ -100,14 +100,14 @@ QIcon IconProvider::generateDifferentSizes(const QIcon &icon)
}
#endif
QString IconProvider::getIconPath(const QString &iconId)
QString IconProvider::getIconPath(const QString& iconId)
{
#if defined(Q_WS_X11) && (QT_VERSION >= QT_VERSION_CHECK(4,6,0))
if(m_useSystemTheme) {
#if defined(Q_WS_X11)
if (m_useSystemTheme) {
QString path = QDir::temp().absoluteFilePath(iconId+".png");
if(!QFile::exists(path)) {
if (!QFile::exists(path)) {
const QIcon icon = QIcon::fromTheme(iconId);
if(icon.isNull()) return ":/Icons/oxygen/"+iconId+".png";
if (icon.isNull()) return ":/Icons/oxygen/"+iconId+".png";
QPixmap px = icon.pixmap(32);
px.save(path);
}

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