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

Compare commits

...

141 Commits

Author SHA1 Message Date
sledgehammer999
20f4b95180 Bump to v3.2.1 2015-07-11 17:37:47 +03:00
sledgehammer999
8ac4cccc25 Update Changelog. 2015-07-11 17:31:39 +03:00
sledgehammer999
d990af4a79 Sync translations from Transifex and run lupdate. 2015-07-11 17:26:32 +03:00
sledgehammer999
8e73c262f9 Merge pull request #3378 from ngosang/webuialter320
[Web UI] Fix alternative global rate limits. Closes #3359
2015-07-09 01:38:23 +03:00
ngosang
7804faa34d [Web UI] Additional checks in Options dialog 2015-07-09 00:18:47 +02:00
ngosang
0bb0a5ea13 [Web UI] Reorder Options dialog code 2015-07-09 00:07:56 +02:00
ngosang
d5b9e3449b [Web UI] Fix alternative global rate limits. 2015-07-08 23:51:42 +02:00
sledgehammer999
753b33b8a3 Update Changelog. 2015-07-08 19:09:59 +03:00
ngosang
eb12d63d2d [search engine] Fix Python 2 implementation of Torrentz 2015-07-08 18:29:44 +03:00
sledgehammer999
b21ab50221 Merge pull request #3350 from ngosang/torrent_creator320
Add 16 KiB, 8 MiB and 16 MiB piece sizes in Torrent Creator
2015-07-04 03:22:51 +03:00
ngosang
34f89d3174 Add 16 KiB, 8 MiB and 16 MiB piece sizes in Torrent Creator 2015-07-04 01:53:19 +02:00
sledgehammer999
54227c20ff Sync translations from Transifex and run lupdate. 2015-07-04 02:02:07 +03:00
sledgehammer999
515c578188 Add unicodestrings.h to core.pri
Conflicts:
	src/core/core.pri
2015-07-04 01:55:43 +03:00
sledgehammer999
74bba9ecfe Partially revert fec6c8af2 and split the Chinese locales into 3.
Chinese Simplified, Chinese Traditional(Taiwan), Chinese Traditional(Hong Kong).
Closes #3262.
2015-07-04 01:55:34 +03:00
sledgehammer999
41e052498b Fix Properties bar size when started minimized to tray. Closes #3206. 2015-07-04 01:55:24 +03:00
ngosang
3a51c5bf85 Fix column sort in search engine. Closes #2621 2015-07-04 01:55:15 +03:00
ngosang
cad542f3f4 [Web UI] Don't update the tabs if tab's panel is collapsed 2015-07-04 01:55:06 +03:00
ngosang
54a444d37f [Web UI] Add Web Seeds (HTTP Sources) tab 2015-07-04 01:54:57 +03:00
sledgehammer999
1c5e6980e8 Don't use a default upload limit. Closes #3275. 2015-07-04 01:20:59 +03:00
Chocobo1
8b7d995447 Mention github contributors in thanks.html 2015-07-04 01:19:58 +03:00
Chocobo1
0b83ea9fcf Move translators & thanks to its own file
Add HTML header & cleanup
2015-07-04 01:19:39 +03:00
Chocobo1
04e582793e Fix compilation on MSVC2013 by moving unicode strings to
"unicodestrings.h". Closes #3059.

Conflicts:
	src/core/misc.cpp
	src/gui/addnewtorrentdialog.cpp
	src/gui/options_imp.cpp
	src/gui/properties/propertieswidget.cpp
	src/gui/transferlistdelegate.cpp
2015-07-04 01:19:10 +03:00
ngosang
07e2e88e79 Cosmetics changes in search engine
Conflicts:
	src/searchengine/engineselectdlg.cpp
2015-07-04 01:02:51 +03:00
Chocobo1
e120a6764b Better message for users 2015-07-04 00:58:36 +03:00
Chocobo1
c4a311cc09 Capitalize menu item, missed in 98a4b8c. 2015-07-04 00:57:31 +03:00
ngosang
278872eb12 Increase API_VERSION due to changes in #3279, #3197, #3226 and #3040
Conflicts:
	src/webui/webapplication.cpp
2015-07-04 00:53:14 +03:00
ngosang
c3d9321865 [Web UI] Add new options
Conflicts:
	src/webui/prefjson.cpp
2015-07-04 00:50:24 +03:00
sledgehammer999
882f5e325a Follow project coding style. Issue #2192. - prefjson.cpp 2015-07-04 00:45:42 +03:00
ngosang
bf7bec61c2 [search engine] Update TorrentReactor 2015-07-04 00:42:07 +03:00
ngosang
72af954b65 [search engine] Update ExtraTorrent 2015-07-04 00:41:09 +03:00
Chocobo1
514abca0ea Add connectionsLimit() back
Conflicts:
	src/gui/properties/propertieswidget.cpp
2015-07-04 00:40:47 +03:00
Chocobo1
643224800f Preserve plain text formatting 2015-07-04 00:29:35 +03:00
Chocobo1
8e25ec7dbf Force set "plain text" format to reduce attack vector. 2015-07-04 00:29:20 +03:00
Chocobo1
07b36f313b Allow wordWrap for "Save Path" & "Comment" 2015-07-04 00:29:01 +03:00
Chocobo1
34d2bdadc0 Change Comment field from QTextBrowser to QLabel
Conflicts:
	src/gui/properties/propertieswidget.cpp
2015-07-04 00:28:40 +03:00
Chocobo1
92ef98080b Reorder layout in information box 2015-07-04 00:25:52 +03:00
ngosang
34bf09b539 [search engine] Update Torrentz 2015-07-04 00:21:31 +03:00
ngosang
06f46eae24 [search engine] Update BTDigg 2015-07-04 00:20:36 +03:00
ngosang
ae5b2fa4a4 [search engine] Update KickassTorrents 2015-07-04 00:20:09 +03:00
ngosang
9b7c2e669e [search engine] Fix novaprinter.py version number 2015-07-04 00:19:51 +03:00
Vladimir Golovnev (Glassez)
e6e087d391 Fix ugly 'C++' wrapping in About dialog. 2015-07-04 00:19:10 +03:00
sledgehammer999
bf6b723206 Merge pull request #3103 from heirecka/v3_2_x
Add missing QDataStream include
2015-06-30 22:01:49 +03:00
Chocobo1
0bce0fc6c1 Update disk space label after changing partition, closes #3309.
Conflicts:
	src/gui/addnewtorrentdialog.cpp
2015-06-28 15:23:51 +03:00
sledgehammer999
4d913d123c Partially revert 75979cc4d5.
Fixes Linux issue for when the theme doesn't have a corresponding icon.
2015-06-21 01:00:03 +03:00
sledgehammer999
a00bbf349a Minimize to tray only if the relevant option is enabled. 2015-06-20 23:35:11 +03:00
sledgehammer999
c61566d133 Merge pull request #2791 from pmzqla/file-priority
Increase priority value of "High"
2015-06-20 21:13:03 +03:00
ngosang
a675a13587 [Web UI] Tabs indentation replaced with spaces 2015-06-20 19:33:43 +03:00
ngosang
ebe0e7bb71 [Web UI] Reorder the tabs/groups in Options window 2015-06-20 19:33:31 +03:00
ngosang
e30df4ed70 [Web UI] Option to hide Top Toolbar 2015-06-20 19:33:19 +03:00
ngosang
9dcb9848ae [Web UI] Changes in menus to keep the client's style 2015-06-20 19:33:06 +03:00
Chocobo1
7034d14eba Use warning message box instead of critical 2015-06-20 18:59:08 +03:00
Chocobo1
08c8b6f77d Don't close downloadFromURL dialog when showing empty url warning 2015-06-20 18:59:02 +03:00
Mayank Asthana
be91f749ee Download-from-URL textbox changes focus on tab key 2015-06-20 18:45:00 +03:00
sledgehammer999
4ec2a37f5d Delete tempfile when downloading favicon.ico. Closes #3257. 2015-06-20 18:17:13 +03:00
ngosang
cc471dbd3c [Web UI] Remove DHT port setting. Closes #3225 2015-06-20 18:16:42 +03:00
sledgehammer999
ab62cbdf3f Merge pull request #3213 from Chocobo1/props_widget_v320
Revamp general tab info
2015-06-20 16:56:00 +03:00
Chocobo1
cd708bb665 Add functionality to new data fields, cleanups 2015-06-20 20:39:19 +08:00
sledgehammer999
c1a47279af Merge pull request #3229 from Chocobo1/dev6_v320
Fix potential out-of-bound access in misc::friendlyUnit()
2015-06-20 02:49:10 +03:00
sledgehammer999
fec6c8af27 Rename Chinese translation files. Closes #2936. 2015-06-17 23:08:14 +03:00
Chocobo1
fc605b119e Webui: add delay in shutdown command in order to send out response msg 2015-06-17 23:08:09 +03:00
Chocobo1
7892f37d3e Fix potential out-of-bound access of units[i] 2015-06-17 08:10:25 +08:00
Chocobo1
26cb71458d Simplify code 2015-06-17 08:09:47 +08:00
sledgehammer999
069bd05d37 Clear missing files flag when resuming or force rechecking. Fixes issues in #2750. 2015-06-15 00:53:34 +03:00
sledgehammer999
c4f043a14d New translation: Indonesian. 2015-06-14 23:51:14 +03:00
sledgehammer999
16b9a28531 Sync translations from Transifex and run lupdate. 2015-06-14 23:47:45 +03:00
sledgehammer999
1da29a450c Merge pull request #3212 from Chocobo1/opt_ip_filter_tracker_v32x
Add checkbox option for IpFilterTrackers.
2015-06-14 20:23:14 +03:00
sledgehammer999
9095545425 Merge pull request #3214 from Chocobo1/move_stats_v320
Revamp menu items
2015-06-14 20:22:19 +03:00
Chocobo1
01dbc01635 Improve ratio calculation formula. Closes #3096. 2015-06-14 20:12:19 +03:00
Chocobo1
bd7fd47d9f Resave in Qt Designer 2015-06-14 20:09:39 +08:00
Chocobo1
429dad3f70 Remove menu items: "Visit Website" and "Report a Bug".
Many issues opened on github should be asked on forum first, and the links are already present in "About" window.
2015-06-14 20:08:47 +08:00
Chocobo1
ca70f2ce5c Rename "Execution Log" to "Log".
Rename "When Downloads Done" to "On Downloads Done".
2015-06-14 20:08:05 +08:00
Chocobo1
98a4b8c199 Move statistics from Tools to View
Reorder & add separators in Help menu
Rename `Auto-Shutdown on downloads completion` to `When downloads done`
Capitalize menu items, modify accelerator
2015-06-14 20:07:58 +08:00
Chocobo1
6dd94ccc1d Add new data fields, capitialize labels, cleanups 2015-06-14 19:34:46 +08:00
Chocobo1
e83a8393a4 Add a parameter to QString(time_t t) 2015-06-14 19:33:54 +08:00
Chocobo1
8fa79a0690 Add checkbox option for IpFilterTrackers. 2015-06-14 19:05:26 +08:00
sledgehammer999
0423a28f30 Add translator to credits. 2015-06-14 12:29:30 +03:00
sledgehammer999
18f32fae90 Merge pull request #3182 from ngosang/typo_revision_32x
Changes in typography (v3_2_x)
2015-06-13 22:07:22 +03:00
sledgehammer999
057b998e0f Merge pull request #2966 from pmzqla/sort-eta
Fix sorting torrents by ETA
2015-06-13 22:01:24 +03:00
sledgehammer999
855ac43aca Merge pull request #3184 from ngosang/AnnounceToAllTrackers_32x
Change default preferences (v3_2_x)
2015-06-13 21:40:37 +03:00
ngosang
5a6302af59 changes in typography 2015-06-13 20:17:37 +02:00
sledgehammer999
174861274b Merge pull request #2958 from Chocobo1/neg_loop
Fix potential negative loop bound
2015-06-13 21:01:00 +03:00
sledgehammer999
718983a4d6 Merge pull request #3180 from ngosang/cppcheck_fixes_32x
Cppcheck: scope reduction & unused variables (v3_2_x)
2015-06-13 20:19:40 +03:00
sledgehammer999
a77e550bf9 Merge pull request #3202 from DoumanAsh/py3_remove_cache_3_2_x
3_2_x mapping: [search engine] Remove python3 cache during updateNova()
2015-06-13 09:26:49 +03:00
DoumanAsh
aac6a4526c 3_2_x mapping: [search engine] Remove python3 cache during updateNova() 2015-06-13 08:46:52 +03:00
who-me
23842a8ec3 Update qBittorrent.appdata.xml
Usage of the <updatecontact/> breaks validation. The correct tag is <update_contact/> as per info on this page:
http://www.freedesktop.org/software/appstream/docs/chap-Metadata.html#tag-update_contact
2015-06-13 02:28:49 +03:00
DoumanAsh
422db313de [search engine] Update Legit Torrent to remove sgmllib 2015-06-13 02:28:49 +03:00
sledgehammer999
07bbe70baf Merge pull request #3181 from ngosang/user-agent_32x
Changes in User-Agent (v3_2_x)
2015-06-13 02:26:10 +03:00
sledgehammer999
f46eafc9fd Merge pull request #3178 from ngosang/search_version_32x
[Search engine] Show the version of search engines (v3_2_x)
2015-06-13 02:23:53 +03:00
sledgehammer999
86df2520ad Fix python detection from reigstry when multiple versions are installed. Update fallback mechanism for newer versions. 2015-06-13 02:19:12 +03:00
Gabriele
640e0ea34d Update matching RSS articles while editing rules
Save the rules as soon as they are edited so that the matching
articles tree is immediately updated.

Closes #2829.
2015-06-13 02:19:12 +03:00
ngosang
cd03c511a5 Minor fixes in search engines 2015-06-13 02:19:11 +03:00
ngosang
98533ede13 [search engine] Add Demonoid search engine 2015-06-13 02:19:11 +03:00
DoumanAsh
09dedd0f22 [search engine] Final enhancements. 2015-06-13 02:19:10 +03:00
DoumanAsh
639f5b2d20 [search engine] Cosmetic update TorrentReactor 2015-06-13 02:19:09 +03:00
DoumanAsh
e758f4ec26 [search engine] re-factoring of code 2015-06-13 02:19:09 +03:00
DoumanAsh
aae1a3564d [search engine] engines update 2015-06-13 02:19:08 +03:00
DoumanAsh
68e29df2ae [search engine] Nova2 multiprocessing 2015-06-13 02:19:08 +03:00
DoumanAsh
183643d77b Exception free retrieve_url()
Set 2 second timeout and handle any possible connection error
Return empty string to engine in case of connection exception
2015-06-13 02:19:07 +03:00
DoumanAsh
d8838363b8 Aborting search engine process during closure. Close #2671 2015-06-13 02:19:07 +03:00
Chocobo1
a0877fd57c Use AllUppercase for label text 2015-06-13 02:19:07 +03:00
Gabriele
271b37885f Allow to Open files from the properties pane by pressing "Enter"
Allow to open only one file at a time and ignore keypresses when
multiple items are selected.
2015-06-13 02:18:08 +03:00
Chocobo1
00b32a0996 Add "Add link to torrent" menu in TrayIconMenu. Closes #2918. 2015-06-13 02:18:07 +03:00
Chocobo1
75979cc4d5 Enable to choose dark/light tray icons on all platforms. 2015-06-13 02:18:07 +03:00
LazyBui
cf41f41b16 Making alternate download/upload configuration behave like global download/upload configuration so as to allow boundless down/up 2015-06-13 02:18:06 +03:00
ngosang
12ad2c7368 Fix Start Minimized checkbox in Options 2015-06-13 02:18:06 +03:00
Chocobo1
86b21dacfd Set default focus to no button in exit confirm box 2015-06-13 02:18:06 +03:00
Chocobo1
7ce343c28f Set default focus to ok button in add new torrent dlg 2015-06-13 02:18:05 +03:00
Chocobo1
fc3e85f449 Set default focus to cancel button in delete confirm dlg, closes #3085 2015-06-13 02:18:05 +03:00
Chocobo1
fb32408ba1 Change option text "Confirmation on exit when torrents are active" 2015-06-13 02:18:04 +03:00
ngosang
32eec624a1 Make strings translatable in seach engine 2015-06-13 02:18:04 +03:00
ngosang
8122ae4739 Disable Auto piece size when creating a new torrent 2015-06-13 02:18:03 +03:00
ngosang
49cce9b2fc Change width of columns in search tab. Closes #764 2015-06-13 02:18:03 +03:00
ngosang
bded737c3c Web UI: Display wasted data with friendly units. Closes #2994 2015-06-13 02:18:02 +03:00
ngosang
a94b317150 Web UI: New config - Global maximum number of upload slots 2015-06-13 02:18:02 +03:00
ngosang
6d34f86c51 Web UI: Fix Max connections and Time active in transfer information 2015-06-13 02:18:01 +03:00
ngosang
6dfd962a13 Web UI: Minor changes in style 2015-06-13 02:18:01 +03:00
ngosang
89cfd41c5f Web UI: Complete translatable strings 2015-06-13 02:18:00 +03:00
ngosang
9fbd19b2ca Web UI: Changes in title bar 2015-06-13 02:18:00 +03:00
ngosang
1577a366e0 [search engine] Improve torrentz engine to return more results 2015-06-13 02:17:59 +03:00
ngosang
19506ea323 [search engine] Fix thepiratebay. Closes #3012 2015-06-13 02:17:59 +03:00
ngosang
b0d321d729 Web UI: Fix resumeAll and pauseAll. Closes #3016 2015-06-13 02:17:59 +03:00
ngosang
a63648b769 Web UI: Fix login and logout relative URLs 2015-06-13 02:16:06 +03:00
Chocobo1
cfe5f8e518 Fix wrong path for icons.qrc 2015-06-13 02:15:54 +03:00
ngosang
56f842dd6d Change default preferences 2015-06-12 01:58:51 +02:00
ngosang
95c8d078f1 Changes in User-Agent 2015-06-12 01:21:26 +02:00
ngosang
4b3d3f6ea6 Cppcheck: scope reduction & unused variables 2015-06-12 01:04:16 +02:00
ngosang
d783787ceb [Search engine] Show the version of search engines 2015-06-12 00:02:04 +02:00
Heiko Becker
1ef9a1151d Add missing QDataStream include
Fixes building with Qt 5.5.0-beta.
2015-05-26 13:36:30 +02:00
sledgehammer999
baa586a6f7 Update Copyright year. 2015-05-13 23:25:38 +03:00
sledgehammer999
c0454fbd02 Fix typo in configure script. 2015-05-13 23:04:46 +03:00
LazyBui
03fb897717 Removing the confusion caused by moving GeoIP code/.dat to a different directory 2015-05-13 23:00:33 +03:00
Gabriele
43cd295b0c configure: don't fail when $CPPFLAGS starts with a white space 2015-05-11 19:05:25 +03:00
sledgehammer999
80b2d00c7a Correctly detect FreeBSD when configuring.
Thanks to yurivict for helping.
Closes #2962.
2015-05-11 00:49:26 +03:00
sledgehammer999
83e4059cea Fix configure typo. 2015-05-11 00:49:16 +03:00
David Christenson
92a250cdb3 Fix variable names
Change undeclared identifiers `running_` and `paramsQueue_` to their
proper names.
2015-05-10 17:56:10 +03:00
Gabriele
1a52368f79 Fix sorting torrents by ETA
Closes #2965.
2015-05-10 14:34:41 +02:00
Chocobo1
cbc0e2527a Fix potential negative loop bound.
QTorrentHandle::num_files() could return -1 in these cases.
2015-05-10 15:16:37 +08:00
sledgehammer999
52f8f9beb4 Bump to 3.2.0 2015-05-10 04:20:19 +03:00
sledgehammer999
3f110dabed Update Transifex config file. 2015-05-10 04:20:06 +03:00
Gabriele
5af4dde3f3 Increase priority value of "High"
It was observed that setting the priority of a file to High has almost
no effect, so increase its value.
2015-03-27 17:55:50 +01:00
Gabriele
10880e10f1 Use enums instead of values when dealing with file priorities 2015-03-27 17:43:14 +01:00
178 changed files with 72581 additions and 49195 deletions

View File

@@ -1,7 +1,7 @@
[main]
host = https://www.transifex.com
[qbittorrent.qbittorrent_master]
[qbittorrent.qbittorrent_v3_2_x]
file_filter = src/lang/qbittorrent_<lang>.ts
source_file = src/lang/qbittorrent_en.ts
source_lang = en

View File

@@ -1,3 +1,76 @@
* Sat Jul 11 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.1
- FEATURE: Change default preferences (ngosang)
- FEATURE: Add "Add link to torrent" menu in TrayIconMenu. Closes #2918. (Chocobo1)
- FEATURE: Allow to Open files from the properties pane by pressing "Enter" (pmzqla)
- FEATURE: Add checkbox option for IpFilterTrackers. (Chocobo1)
- FEATURE: Download-from-URL textbox change focus on tab key (Mayank Asthana)
- FEATURE: Increase priority value of "High" (pmzqla)
- FEATURE: Add 16 KiB, 8 MiB and 16 MiB piece sizes in Torrent Creator (ngosang)
- BUGFIX: Disable Auto piece size when creating a new torrent (ngosang)
- BUGFIX: Set default focus to cancel button in delete confirm dlg, closes #3085 (Chocobo1)
- BUGFIX: Set default focus to ok button in add new torrent dlg (Chocobo1)
- BUGFIX: Set default focus to no button in exit confirm box (Chocobo1)
- BUGFIX: Fix Start Minimized checkbox in Options (ngosang)
- BUGFIX: Remove limits on alternative speeds setting (LazyBui)
- BUGFIX: Fix sorting torrents by ETA (pmzqla)
- BUGFIX: Improve ratio calculation formula. Closes #3096. (Chocobo1)
- BUGFIX: Clear missing files flag when resuming or force rechecking. Fixes issues in #2750. (sledgehammer999)
- BUGFIX: Delete tempfile when downloading favicon.ico. Closes #3257. (sledgehammer999)
- BUGFIX: Don't close downloadFromURL dialog when showing empty url warning (Chocobo1)
- BUGFIX: Minimize to tray only if the relevant option is enabled. (sledgehammer999)
- BUGFIX: Update disk space label after changing partition, closes #3309. (Chocobo1)
- BUGFIX: Don't use a default upload limit. Closes #3275. (sledgehammer999)
- BUGFIX: Fix Properties bar size when started minimized to tray. Closes #3206. (sledgehammer999)
- COSMETIC: Change option text "Confirmation on exit when torrents are active" (Chocobo1)
- COSMETIC: Enable to choose dark/light tray icons on all platforms. (Chocobo1)
- COSMETIC: Use AllUppercase for label text (Chocobo1)
- COSMETIC: changes in typography (ngosang)
- COSMETIC: Menu revamp (Chocobo1)
- COSMETIC: Revamp general tab info (Chocobo1)
- COSMETIC: Better update message for users (Chocobo1)
- COSMETIC: Fix ugly 'C++' wrapping in About dialog. (glassez)
- WEBUI: Fix login and logout relative URLs (ngosang)
- WEBUI: Fix resumeAll and pauseAll. Closes #3016 (ngosang)
- WEBUI: Changes in title bar (ngosang)
- WEBUI: Complete translatable strings (ngosang)
- WEBUI: Minor changes in style (ngosang)
- WEBUI: Fix Max connections and Time active in transfer information (ngosang)
- WEBUI: New config - Global maximum number of upload slots (ngosang)
- WEBUI: Display wasted data with friendly units. Closes #2994 (ngosang)
- WEBUI: add delay in shutdown command in order to send out response msg (Chocobo1)
- WEBUI: Option to hide Top Toolbar (ngosang)
- WEBUI: Reorder the tabs/groups in Options window (ngosang)
- WEBUI: Add new options (ngosang)
- WEBUI: Increase API_VERSION due to changes in #3279, #3197, #3226 and #3040 (ngosang)
- WEBUI: Add Web Seeds (HTTP Sources) tab (ngosang)
- WEBUI: Don't update the tabs if tab's panel is collapsed (ngosang)
- WEBUI: Fix alternative global rate limits. (ngosang)
- SEARCH: Fix thepiratebay. Closes #3012 (ngosang)
- SEARCH: Improve torrentz engine to return more results (ngosang)
- SEARCH: Change width of columns in search tab. Closes #764 (ngosang)
- SEARCH: Make strings translatable in seach engine (ngosang)
- SEARCH: Aborting search engine process during closure. Close #2671 (DoumanAsh)
- SEARCH: Perform searches in parallel (DoumanAsh)
- SEARCH: Add Demonoid search engine (ngosang)
- SEARCH: Minor fixes in search engines (ngosang)
- SEARCH: Show the version of search engines (ngosang)
- SEARCH: Update Legit Torrent to remove sgmllib (DoumanAsh)
- SEARCH: Update KickassTorrents (ngosang)
- SEARCH: Update BTDigg (ngosang)
- SEARCH: Update Torrentz (ngosang)
- SEARCH: Update ExtraTorrent (ngosang)
- SEARCH: Update TorrentReactor (ngosang)
- SEARCH: Fix Python 2 implementation of Torrentz (ngosang)
- SEARCH: Cosmetic changes in search engine (ngosang)
- SEARCH: Fix column sort in search engine. Closes #2621 (ngosang)
- RSS: Update matching RSS articles while editing rules (pmzqla)
- WINDOWS: Fix python detection from registry when multiple versions are installed (sledgehammer999)
- LINUX: Fixes Linux issue for when the theme doesn't have a corresponding icon. (sledgehammer999)
- OTHER: Correctly detect FreeBSD when configuring. (sledgehammer999, yurivict)
- OTHER: Add translator to credits.
- OTHER: New translation: Indonesian.
- OTHER: Split Chinese locales into Chinese Simplified, Chinese Traditional(Taiwan), Chinese Traditional(Hong Kong). (sledgehammer999)
* Sun May 10 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.0
- FEATURE: Show actual protocol for listen success/failure in the log. Needs libtorrent v1.0.0 (Gelmir)
- FEATURE: Support per tracker re-announce. Needs libtorrent v1.0.0 (Gelmir)

16
configure vendored
View File

@@ -1390,13 +1390,13 @@ Optional Packages:
--with-geoip-database-embedded
Embed the GeoIP database in the qBittorrent
executable (please follow instructions in
src/geoip/README) (default=no)
src/gui/geoip/README) (default=no)
--with-qtsingleapplication=[system|shipped]
Use the shipped qtsingleapplication library or the
system one (default=shipped)
--with-qjson=[system|shipped]
Use the shipped qjson library or the system one
(default=shipped) (Qt4 only
(default=shipped) (Qt4 only)
--with-boost[=ARG] use Boost library from a standard location
(ARG=yes), from the specified location (ARG=<path>),
or disable it (ARG=no) [ARG=yes]
@@ -4263,7 +4263,7 @@ fi
# Detect OS
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether OS is FreeBSD" >&5
$as_echo_n "checking whether OS is FreeBSD... " >&6; }
if test "x$host_os" = "x*FreeBSD*"; then :
if expr "$host_os" : ".*freebsd.*" > /dev/null; then :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
LIBS="-lexecinfo $LIBS"
@@ -5294,8 +5294,8 @@ $as_echo "$as_me: Boost.System LIB: $BOOST_SYSTEM_LIB" >&6;}
LIBS="$BOOST_SYSTEM_LIB $LIBS"
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compile using libtorrent-raser 0.16.x" >&5
$as_echo_n "checking whether to compile using libtorrent-raser 0.16.x... " >&6; }
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to compile using libtorrent-rasterbar 0.16.x" >&5
$as_echo_n "checking whether to compile using libtorrent-rasterbar 0.16.x... " >&6; }
case "x$with_libtorrent_rasterbar0_16" in #(
"xno") :
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
@@ -5801,15 +5801,15 @@ _ACEOF
# Original extract() function contributed by pmzqla
# $*: Strings to parse
# Set $DEFINES, $INCLUDES, $OTHER
# Set $QBT_CONF_DEFINES, $QBT_CONF_INCLUDES, $QBT_CONF_EXTRA_CFLAGS
extract() {
if [ -z "$*" ]; then
echo "Input string required"
return 1
fi
# Convert " -" to "\n" if not between quotes
string=$(echo " $*" | $SED -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g")
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces
string=$(echo " $*" | $SED -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[:space:]*//')
SAVEIFS=$IFS
IFS=$(printf "\n\b")
for i in $string; do

View File

@@ -26,7 +26,7 @@ AC_ARG_WITH(libtorrent-rasterbar0.16,
AC_ARG_WITH(geoip-database-embedded,
[AS_HELP_STRING([--with-geoip-database-embedded],
[Embed the GeoIP database in the qBittorrent executable (please follow instructions in src/geoip/README) (default=no)])],
[Embed the GeoIP database in the qBittorrent executable (please follow instructions in src/gui/geoip/README) (default=no)])],
[],
[with_geoip_database_embedded=no])
@@ -38,7 +38,7 @@ AC_ARG_WITH(qtsingleapplication,
AC_ARG_WITH(qjson,
[AS_HELP_STRING([--with-qjson=@<:@system|shipped@:>@],
[Use the shipped qjson library or the system one (default=shipped) (Qt4 only])],
[Use the shipped qjson library or the system one (default=shipped) (Qt4 only)])],
[],
[with_qjson=shipped])
@@ -74,7 +74,7 @@ AC_ARG_ENABLE(qt-dbus,
# Detect OS
AC_MSG_CHECKING([whether OS is FreeBSD])
AS_IF([test "x$host_os" = "x*FreeBSD*"],
AS_IF([expr "$host_os" : ".*freebsd.*" > /dev/null],
[AC_MSG_RESULT([yes])
LIBS="-lexecinfo $LIBS"],
[AC_MSG_RESULT([no])])
@@ -181,7 +181,7 @@ AS_IF([test "x$BOOST_SYSTEM_LIB" = "x"],
[AC_MSG_NOTICE([Boost.System LIB: $BOOST_SYSTEM_LIB])
LIBS="$BOOST_SYSTEM_LIB $LIBS"])
AC_MSG_CHECKING([whether to compile using libtorrent-raser 0.16.x])
AC_MSG_CHECKING([whether to compile using libtorrent-rasterbar 0.16.x])
AS_CASE(["x$with_libtorrent_rasterbar0_16"],
["xno"],
[AC_MSG_RESULT([no])
@@ -251,15 +251,15 @@ AX_DEFINE_DIR([EXPAND_MANDIR], [mandir])
# Original extract() function contributed by pmzqla
# $*: Strings to parse
# Set $DEFINES, $INCLUDES, $OTHER
# Set $QBT_CONF_DEFINES, $QBT_CONF_INCLUDES, $QBT_CONF_EXTRA_CFLAGS
extract() {
if [[ -z "$*" ]]; then
echo "Input string required"
return 1
fi
# Convert " -" to "\n" if not between quotes
string=$(echo " $*" | $SED -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g")
# Convert " -" to "\n" if not between quotes and remove possible leading white spaces
string=$(echo " $*" | $SED -e 's: -:\n:g' -e 's:"\(.*\)\n\(.*\)":\"\1 -\2":g' -e "s:'\(.*\)\n\(.*\)':\'\1 -\2':g" -e 's/^[[:space:]]*//')
SAVEIFS=$IFS
IFS=$(printf "\n\b")
for i in $string; do

4
dist/mac/Info.plist vendored
View File

@@ -45,7 +45,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>3.2.0</string>
<string>3.2.1</string>
<key>CFBundleSignature</key>
<string>qBit</string>
<key>CFBundleExecutable</key>
@@ -59,7 +59,7 @@
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2006-2013 The qBittorrent project</string>
<string>Copyright © 2006-2015 The qBittorrent project</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>

View File

@@ -57,5 +57,5 @@
</screenshot>
</screenshots>
<url type="homepage">http://www.qbittorrent.org/</url>
<updatecontact>sledgehammer999@qbittorrent.org</updatecontact>
<update_contact>sledgehammer999@qbittorrent.org</update_contact>
</component>

View File

@@ -19,7 +19,7 @@ XPStyle on
!define CSIDL_APPDATA '0x1A' ;Application Data path
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
!define PROG_VERSION "3.2.0"
!define PROG_VERSION "3.2.1"
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
!define MUI_FINISHPAGE_RUN_TEXT $(launch_qbt)
@@ -33,7 +33,7 @@ OutFile "qbittorrent_${PROG_VERSION}_setup.exe"
;Installer Version Information
VIAddVersionKey "ProductName" "qBittorrent"
VIAddVersionKey "CompanyName" "The qBittorrent project"
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2014 The qBittorrent project"
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2015 The qBittorrent project"
VIAddVersionKey "FileDescription" "qBittorrent - A Bittorrent Client"
VIAddVersionKey "FileVersion" "${PROG_VERSION}"

View File

@@ -222,10 +222,10 @@ bool Application::event(QEvent *ev)
// Get the url instead
path = static_cast<QFileOpenEvent *>(ev)->url().toString();
qDebug("Received a mac file open event: %s", qPrintable(path));
if (running_)
if (m_running)
processParams(QStringList(path));
else
paramsQueue_.append(path);
m_paramsQueue.append(path);
return true;
}
else {
@@ -253,6 +253,7 @@ void Application::initializeTranslation()
Preferences* const pref = Preferences::instance();
// Load translation
QString locale = pref->getLocale();
if (locale.isEmpty()) {
locale = QLocale::system().name();
pref->setLocale(locale);

View File

@@ -379,7 +379,7 @@ QString makeUsage(const QString &prg_name)
#endif
text += QLatin1String("\t-h | --help\t\t") + QObject::tr("Displays this help message") + QLatin1Char('\n');
text += QLatin1String("\t--webui-port=<port>\t")
+ QObject::tr("Changes the webui port (current: %1)").arg(QString::number(Preferences::instance()->getWebUiPort()))
+ QObject::tr("Changes the Web UI port (current: %1)").arg(QString::number(Preferences::instance()->getWebUiPort()))
+ QLatin1Char('\n');
#ifndef DISABLE_GUI
text += QLatin1String("\t--no-splash\t\t") + QObject::tr("Disable splash screen") + QLatin1Char('\n');

View File

@@ -41,6 +41,7 @@
#include "qtlocalpeer.h"
#include <QCoreApplication>
#include <QDataStream>
#include <QTime>
#if defined(Q_OS_WIN)

View File

@@ -23,7 +23,8 @@ HEADERS += \
$$PWD/http/responsegenerator.h \
$$PWD/http/server.h \
$$PWD/http/types.h \
$$PWD/http/responsebuilder.h
$$PWD/http/responsebuilder.h \
$$PWD/unicodestrings.h
SOURCES += \
$$PWD/downloadthread.cpp \

View File

@@ -76,7 +76,7 @@ void DNSUpdater::checkPublicIP()
m_lastIPCheckTime = QDateTime::currentDateTime();
QNetworkRequest request;
request.setUrl(QUrl("http://checkip.dyndns.org"));
request.setRawHeader("User-Agent", "qBittorrent/" VERSION" chris@qbittorrent.org");
request.setRawHeader("User-Agent", "qBittorrent/" VERSION);
manager->get(request);
}
@@ -123,7 +123,7 @@ void DNSUpdater::updateDNSService()
m_lastIPCheckTime = QDateTime::currentDateTime();
QNetworkRequest request;
request.setUrl(getUpdateUrl());
request.setRawHeader("User-Agent", "qBittorrent/" VERSION" chris@qbittorrent.org");
request.setRawHeader("User-Agent", "qBittorrent/" VERSION);
manager->get(request);
}

View File

@@ -191,9 +191,8 @@ QNetworkReply* DownloadThread::downloadUrl(const QString &url, const QList<QNetw
qDebug("url is %s", qPrintable(url));
const QUrl qurl = QUrl::fromEncoded(url.toUtf8());
QNetworkRequest request(qurl);
// Spoof Firefox 3.5 user agent to avoid
// Web server banning
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");
// Spoof Firefox 38 user agent to avoid web server banning
request.setRawHeader("User-Agent", "Mozilla/5.0 (X11; Linux i686; rv:38.0) Gecko/20100101 Firefox/38.0");
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) {

View File

@@ -187,6 +187,27 @@ bool fsutils::forceRemove(const QString& file_path) {
return f.remove();
}
/**
* Removes directory and its content recursively.
*
*/
void fsutils::removeDirRecursive(const QString& dirName) {
QDir dir(dirName);
if (!dir.exists()) return;
Q_FOREACH(QFileInfo info, dir.entryInfoList(QDir::NoDotAndDotDot |
QDir::System |
QDir::Hidden |
QDir::AllDirs |
QDir::Files, QDir::DirsFirst)) {
if (info.isDir()) removeDirRecursive(info.absoluteFilePath());
else forceRemove(info.absoluteFilePath());
}
dir.rmdir(dirName);
}
/**
* Returns the size of a file.
* If the file is a folder, it will compute its size based on its content.

View File

@@ -57,6 +57,7 @@ namespace fsutils
bool isValidTorrentFile(const QString& path);
bool smartRemoveEmptyFolderTree(const QString& dir_path);
bool forceRemove(const QString& file_path);
void removeDirRecursive(const QString& dirName);
/* Ported from Qt4 to drop dependency on QtGui */
QString QDesktopServicesDataLocation();

View File

@@ -79,9 +79,8 @@ RequestParser::ErrorCode RequestParser::parseHttpRequest(const QByteArray& data,
}
// Parse HTTP request message
int content_length = 0;
if (m_request.headers.contains("content-length")) {
content_length = m_request.headers["content-length"].toInt();
int content_length = m_request.headers["content-length"].toInt();
if (content_length > static_cast<int>(m_maxContentLength)) {
qWarning() << Q_FUNC_INFO << "bad request: message too long";
return BadRequest;

View File

@@ -1,4 +1,4 @@
/*
/*
* Bittorrent Client using Qt4 and libtorrent.
* Copyright (C) 2006 Christophe Dumez
*
@@ -28,6 +28,7 @@
* Contact : chris@qbittorrent.org
*/
#include "core/unicodestrings.h"
#include "misc.h"
#include <cmath>
@@ -183,9 +184,7 @@ void misc::shutdownComputer(shutDownAction action)
AppleEvent eventReply = {typeNull, NULL};
AppleEvent appleEventToSend = {typeNull, NULL};
OSStatus error = noErr;
error = AECreateDesc(typeProcessSerialNumber, &kPSNOfSystemProcess,
OSStatus error = AECreateDesc(typeProcessSerialNumber, &kPSNOfSystemProcess,
sizeof(kPSNOfSystemProcess), &targetDesc);
if (error != noErr)
@@ -298,8 +297,10 @@ QString misc::friendlyUnit(qreal val, bool is_speed)
if (val < 0)
return QCoreApplication::translate("misc", "Unknown", "Unknown (size)");
int i = 0;
while(val >= 1024. && i++<6)
while(val >= 1024. && i < 4) {
val /= 1024.;
++i;
}
QString ret;
if (i == 0)
ret = QString::number((long)val) + " " + QCoreApplication::translate("misc", units[0].source, units[0].comment);
@@ -405,7 +406,7 @@ QString misc::magnetUriToHash(const QString& magnet_uri)
QString misc::userFriendlyDuration(qlonglong seconds)
{
if (seconds < 0 || seconds >= MAX_ETA)
return QString::fromUtf8("∞");
return QString::fromUtf8(C_INFINITY);
if (seconds == 0)
return "0";
if (seconds < 60)
@@ -421,7 +422,7 @@ QString misc::userFriendlyDuration(qlonglong seconds)
hours = hours - days * 24;
if (days < 100)
return QCoreApplication::translate("misc", "%1d %2h", "e.g: 2days 10hours").arg(QString::number(days)).arg(QString::number(hours));
return QString::fromUtf8("∞");
return QString::fromUtf8(C_INFINITY);
}
QString misc::getUserIDString()
@@ -527,12 +528,14 @@ QString misc::parseHtmlLinks(const QString &raw_text)
static QRegExp reNoScheme("<a\\s+href=\"(?!http(s?))([a-zA-Z0-9\\?%=&/_\\.-:#]+)\\s*\">");
result.replace(reNoScheme, "<a href=\"http://\\1\">");
// to preserve plain text formatting
result = "<p style=\"white-space: pre-wrap;\">" + result + "</p>";
return result;
}
QString misc::toQString(time_t t)
QString misc::toQString(time_t t, Qt::DateFormat f)
{
return QDateTime::fromTime_t(t).toString(Qt::DefaultLocaleLongDate);
return QDateTime::fromTime_t(t).toString(f);
}
#ifndef DISABLE_GUI

View File

@@ -64,6 +64,7 @@ namespace misc
{
QString toQString(const std::string &str);
QString toQString(const char* str);
QString toQString(time_t t, Qt::DateFormat f = Qt::DefaultLocaleLongDate);
QString toQStringU(const std::string &str);
QString toQStringU(const char* str);
QString toQString(const libtorrent::sha1_hash &hash);
@@ -100,7 +101,6 @@ namespace misc
QList<int> intListfromStringList(const QStringList &l);
QList<bool> boolListfromStringList(const QStringList &l);
QString toQString(time_t t);
QString accurateDoubleToString(const double &n, const int &precision);
#ifndef DISABLE_GUI

View File

@@ -295,7 +295,7 @@ void Preferences::setMinimizeToTray(bool b)
bool Preferences::closeToTray() const
{
return value("Preferences/General/CloseToTray", false).toBool();
return value("Preferences/General/CloseToTray", true).toBool();
}
void Preferences::setCloseToTray(bool b)
@@ -627,7 +627,7 @@ int Preferences::getSessionPort() const
QReadLocker locker(&lock);
if (useRandomPort())
return m_randomPort;
return value("Preferences/Connection/PortRangeMin", 6881).toInt();
return value("Preferences/Connection/PortRangeMin", 8999).toInt();
}
void Preferences::setSessionPort(int port)
@@ -659,7 +659,7 @@ void Preferences::setGlobalDownloadLimit(int limit)
int Preferences::getGlobalUploadLimit() const
{
return value("Preferences/Connection/GlobalUPLimit", 50).toInt();
return value("Preferences/Connection/GlobalUPLimit", -1).toInt();
}
void Preferences::setGlobalUploadLimit(int limit)
@@ -858,7 +858,7 @@ void Preferences::setMaxConnecsPerTorrent(int val)
int Preferences::getMaxUploads() const
{
return value("Preferences/Bittorrent/MaxUploads", 8).toInt();
return value("Preferences/Bittorrent/MaxUploads", -1).toInt();
}
void Preferences::setMaxUploads(int val)
@@ -870,7 +870,7 @@ void Preferences::setMaxUploads(int val)
int Preferences::getMaxUploadsPerTorrent() const
{
return value("Preferences/Bittorrent/MaxUploadsPerTorrent", 4).toInt();
return value("Preferences/Bittorrent/MaxUploadsPerTorrent", -1).toInt();
}
void Preferences::setMaxUploadsPerTorrent(int val)
@@ -971,6 +971,16 @@ void Preferences::setFilteringEnabled(bool enabled)
setValue("Preferences/IPFilter/Enabled", enabled);
}
bool Preferences::isFilteringTrackerEnabled() const
{
return value("Preferences/IPFilter/FilterTracker", false).toBool();
}
void Preferences::setFilteringTrackerEnabled(bool enabled)
{
setValue("Preferences/IPFilter/FilterTracker", enabled);
}
QString Preferences::getFilter() const
{
return fsutils::fromNativePath(value("Preferences/IPFilter/File").toString());
@@ -1020,7 +1030,7 @@ void Preferences::setExecutionLogEnabled(bool b)
// Queueing system
bool Preferences::isQueueingSystemEnabled() const
{
return value("Preferences/Queueing/QueueingEnabled", false).toBool();
return value("Preferences/Queueing/QueueingEnabled", true).toBool();
}
void Preferences::setQueueingSystemEnabled(bool enabled)
@@ -1479,7 +1489,7 @@ void Preferences::resolvePeerHostNames(bool resolve)
int Preferences::getMaxHalfOpenConnections() const
{
const int val = value("Preferences/Connection/MaxHalfOpenConnec", 50).toInt();
const int val = value("Preferences/Connection/MaxHalfOpenConnec", 20).toInt();
if (val <= 0)
return -1;
return val;
@@ -1554,7 +1564,7 @@ void Preferences::enableSuperSeeding(bool enabled)
bool Preferences::announceToAllTrackers() const
{
return value("Preferences/Advanced/AnnounceToAllTrackers", false).toBool();
return value("Preferences/Advanced/AnnounceToAllTrackers", true).toBool();
}
void Preferences::setAnnounceToAllTrackers(bool enabled)
@@ -1636,7 +1646,7 @@ namespace {
for (DWORD i = 0; i < cSubKeys; ++i) {
cName = cMaxSubKeyLen;
res = ::RegEnumKeyExW(handle, 0, lpName, &cName, NULL, NULL, NULL, NULL);
res = ::RegEnumKeyExW(handle, i, lpName, &cName, NULL, NULL, NULL, NULL);
if (res == ERROR_SUCCESS)
keys.push_back(QString::fromWCharArray(lpName));
}
@@ -1751,7 +1761,7 @@ QString Preferences::getPythonPath()
// Fallback: Detect python from default locations
QStringList supported_versions;
supported_versions << "32" << "31" << "30" << "27" << "26" << "25";
supported_versions << "34" << "33" << "32" << "31" << "30" << "27" << "26" << "25";
foreach (const QString &v, supported_versions)
if (QFile::exists("C:/Python" + v + "/python.exe"))
return "C:/Python" + v;

View File

@@ -282,6 +282,8 @@ public:
// IP Filter
bool isFilteringEnabled() const;
void setFilteringEnabled(bool enabled);
bool isFilteringTrackerEnabled() const;
void setFilteringTrackerEnabled(bool enabled);
QString getFilter() const;
void setFilter(const QString &path);
QStringList bannedIPs() const;

View File

@@ -105,10 +105,7 @@ void QAlertDispatcher::dispatch(QSharedPointer<Tag> tag,
return;
bool was_empty = that->alerts.empty();
that->alerts.push_back(alert_ptr.get());
alert_ptr.release();
that->alerts.push_back(alert_ptr.release());
if (was_empty)
that->alerts_condvar.wakeAll();

View File

@@ -131,7 +131,7 @@ QBtSession::QBtSession()
// Construct session
s = new session(fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)), 0);
//std::cout << "Peer ID: " << fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)).to_string() << std::endl;
Logger::instance()->addMessage("Peer ID: "+misc::toQString(fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)).to_string()));
Logger::instance()->addMessage(tr("Peer ID: ")+misc::toQString(fingerprint(peer_id.toLocal8Bit().constData(), version.at(0), version.at(1), version.at(2), version.at(3)).to_string()));
// Set severity level of libtorrent session
s->set_alert_mask(alert::error_notification | alert::peer_notification | alert::port_mapping_notification | alert::storage_notification | alert::tracker_notification | alert::status_notification | alert::ip_block_notification | alert::progress_notification | alert::stats_notification);
@@ -414,9 +414,9 @@ void QBtSession::configureSession() {
// * Session settings
session_settings sessionSettings = s->settings();
sessionSettings.user_agent = "qBittorrent " VERSION;
//std::cout << "HTTP user agent is " << sessionSettings.user_agent << std::endl;
logger->addMessage(tr("HTTP user agent is %1").arg(misc::toQString(sessionSettings.user_agent)));
logger->addMessage(tr("HTTP User-Agent is %1").arg(misc::toQString(sessionSettings.user_agent)));
sessionSettings.apply_ip_filter_to_trackers = pref->isFilteringTrackerEnabled();
sessionSettings.upnp_ignore_nonrouters = true;
sessionSettings.use_dht_as_fallback = false;
// Disable support for SSL torrents for now
@@ -1253,9 +1253,9 @@ void QBtSession::loadTorrentTempData(QTorrentHandle &h, QString savePath, bool m
// Update file names
const QStringList files_path = TorrentTempData::getFilesPath(hash);
bool force_recheck = false;
QDir base_dir(h.save_path());
if (files_path.size() == h.num_files()) {
bool force_recheck = false;
for (int i=0; i<h.num_files(); ++i) {
const QString &path = files_path.at(i);
if (!force_recheck && base_dir.exists(path))
@@ -1552,36 +1552,21 @@ void QBtSession::enableDHT(bool b) {
}
qreal QBtSession::getRealRatio(const libtorrent::torrent_status &status) const {
libtorrent::size_type all_time_upload = status.all_time_upload;
libtorrent::size_type all_time_download = status.all_time_download;
libtorrent::size_type total_done = status.total_done;
libtorrent::size_type upload = status.all_time_upload;
// special case for a seeder who lost its stats, also assume nobody will import a 99% done torrent
libtorrent::size_type download = (status.all_time_download < status.total_done * 0.01) ? status.total_done : status.all_time_download;
if (all_time_download < total_done) {
// We have more data on disk than we downloaded
// either because the user imported the file
// or because of crash the download histroy was lost.
// Otherwise will get weird ratios
// eg when downloaded 1KB and uploaded 700MB of a
// 700MB torrent.
all_time_download = total_done;
}
if (download == 0)
return (upload == 0) ? 0.0 : MAX_RATIO;
if (all_time_download == 0) {
if (all_time_upload == 0)
return 0.0;
return MAX_RATIO+1;
}
qreal ratio = all_time_upload / (float) all_time_download;
Q_ASSERT(ratio >= 0.);
if (ratio > MAX_RATIO)
ratio = MAX_RATIO;
return ratio;
qreal ratio = upload / (qreal) download;
Q_ASSERT(ratio >= 0.0);
return (ratio > MAX_RATIO) ? MAX_RATIO : ratio;
}
// Called periodically
void QBtSession::saveTempFastResumeData() {
std::vector<torrent_handle> torrents = s->get_torrents();
std::vector<torrent_handle> torrents = s->get_torrents();
std::vector<torrent_handle>::iterator torrentIT = torrents.begin();
std::vector<torrent_handle>::iterator torrentITend = torrents.end();
@@ -2209,15 +2194,7 @@ void QBtSession::handleTorrentFinishedAlert(libtorrent::torrent_finished_alert*
qDebug("Emitting finishedTorrent() signal");
emit finishedTorrent(h);
qDebug("Received finished alert for %s", qPrintable(h.name()));
#ifndef DISABLE_GUI
bool will_shutdown = (pref->shutdownWhenDownloadsComplete() ||
pref->shutdownqBTWhenDownloadsComplete() ||
pref->suspendWhenDownloadsComplete() ||
pref->hibernateWhenDownloadsComplete())
&& !hasDownloadingTorrents();
#else
bool will_shutdown = false;
#endif
// AutoRun program
if (pref->isAutoRunEnabled())
autoRunExternalProgram(h);
@@ -2227,8 +2204,15 @@ void QBtSession::handleTorrentFinishedAlert(libtorrent::torrent_finished_alert*
// Mail notification
if (pref->isMailNotificationEnabled())
sendNotificationEmail(h);
#ifndef DISABLE_GUI
// Auto-Shutdown
bool will_shutdown = (pref->shutdownWhenDownloadsComplete() ||
pref->shutdownqBTWhenDownloadsComplete() ||
pref->suspendWhenDownloadsComplete() ||
pref->hibernateWhenDownloadsComplete())
&& !hasDownloadingTorrents();
if (will_shutdown) {
bool suspend = pref->suspendWhenDownloadsComplete();
bool hibernate = pref->hibernateWhenDownloadsComplete();
@@ -2622,7 +2606,7 @@ void QBtSession::handleFastResumeRejectedAlert(libtorrent::fastresume_rejected_a
}
void QBtSession::handleUrlSeedAlert(libtorrent::url_seed_alert* p) {
Logger::instance()->addMessage(tr("Url seed lookup failed for url: %1, message: %2").arg(misc::toQString(p->url)).arg(misc::toQStringU(p->message())), Log::CRITICAL);
Logger::instance()->addMessage(tr("URL seed lookup failed for url: %1, message: %2").arg(misc::toQString(p->url)).arg(misc::toQStringU(p->message())), Log::CRITICAL);
}
void QBtSession::handleListenSucceededAlert(libtorrent::listen_succeeded_alert *p) {

View File

@@ -533,6 +533,7 @@ void QTorrentHandle::resume(const bool force) const
bool has_persistant_error = TorPersistent->hasError(torrent_hash);
TorPersistent->setErrorState(torrent_hash, false);
bool temp_path_enabled = Preferences::instance()->isTempPathEnabled();
TorPersistent->setHasMissingFiles(torrent_hash, false);
if (has_persistant_error && temp_path_enabled) {
// Torrent was supposed to be seeding, checking again in final destination
qDebug("Resuming a torrent with error...");
@@ -732,8 +733,8 @@ void QTorrentHandle::prioritize_first_last_piece(bool b) const
{
if (!has_metadata()) return;
// Download first and last pieces first for all media files in the torrent
const uint nbfiles = num_files();
for (uint index = 0; index < nbfiles; ++index) {
const int nbfiles = num_files();
for (int index = 0; index < nbfiles; ++index) {
const QString path = filepath_at(index);
const QString ext = fsutils::fileExtension(path);
if (misc::isPreviewable(ext) && torrent_handle::file_priority(index) > 0) {

View File

@@ -418,8 +418,8 @@ QVariant TorrentModel::headerData(int section, Qt::Orientation orientation,
if (orientation == Qt::Horizontal) {
if (role == Qt::DisplayRole) {
switch(section) {
case TorrentModelItem::TR_NAME: return tr("Name", "i.e: torrent name");
case TorrentModelItem::TR_PRIORITY: return "#";
case TorrentModelItem::TR_NAME: return tr("Name", "i.e: torrent name");
case TorrentModelItem::TR_SIZE: return tr("Size", "i.e: torrent size");
case TorrentModelItem::TR_PROGRESS: return tr("Done", "% Done");
case TorrentModelItem::TR_STATUS: return tr("Status", "Torrent status (e.g. downloading, seeding, paused)");

View File

@@ -54,7 +54,7 @@ class TorrentModelItem : public QObject {
public:
enum State {STATE_DOWNLOADING, STATE_DOWNLOADING_META, STATE_ALLOCATING, STATE_STALLED_DL, STATE_SEEDING, STATE_STALLED_UP, STATE_QUEUED_DL, STATE_QUEUED_UP, STATE_CHECKING_UP, STATE_CHECKING_DL, STATE_QUEUED_CHECK, STATE_QUEUED_FASTCHECK, STATE_PAUSED_DL, STATE_PAUSED_UP, STATE_PAUSED_MISSING, STATE_FORCED_DL, STATE_FORCED_UP, STATE_INVALID};
enum Column {TR_NAME, TR_PRIORITY, TR_SIZE, TR_TOTAL_SIZE, TR_PROGRESS, TR_STATUS, TR_SEEDS, TR_PEERS, TR_DLSPEED, TR_UPSPEED, TR_ETA, TR_RATIO, TR_LABEL, TR_ADD_DATE, TR_SEED_DATE, TR_TRACKER, TR_DLLIMIT, TR_UPLIMIT, TR_AMOUNT_DOWNLOADED, TR_AMOUNT_UPLOADED, TR_AMOUNT_LEFT, TR_TIME_ELAPSED, TR_SAVE_PATH, TR_COMPLETED, TR_RATIO_LIMIT, TR_SEEN_COMPLETE_DATE, TR_LAST_ACTIVITY, TR_AMOUNT_DOWNLOADED_SESSION, TR_AMOUNT_UPLOADED_SESSION, NB_COLUMNS};
enum Column {TR_PRIORITY, TR_NAME, TR_SIZE, TR_TOTAL_SIZE, TR_PROGRESS, TR_STATUS, TR_SEEDS, TR_PEERS, TR_DLSPEED, TR_UPSPEED, TR_ETA, TR_RATIO, TR_LABEL, TR_ADD_DATE, TR_SEED_DATE, TR_TRACKER, TR_DLLIMIT, TR_UPLIMIT, TR_AMOUNT_DOWNLOADED, TR_AMOUNT_UPLOADED, TR_AMOUNT_DOWNLOADED_SESSION, TR_AMOUNT_UPLOADED_SESSION, TR_AMOUNT_LEFT, TR_TIME_ELAPSED, TR_SAVE_PATH, TR_COMPLETED, TR_RATIO_LIMIT, TR_SEEN_COMPLETE_DATE, TR_LAST_ACTIVITY, NB_COLUMNS};
public:
TorrentModelItem(const QTorrentHandle& h);

83
src/core/unicodestrings.h Normal file
View File

@@ -0,0 +1,83 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2015 Mike Tzou
*
* 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.
*/
// This file must be encoded in "UTF-8 with BOM"
#ifdef _MSC_VER
#pragma execution_character_set("utf-8")
#endif
// Because of the poor handling of UTF-8 characters in MSVC (emits warning C4819),
// we put all problematic UTF-8 chars/strings in this file.
// See issue #3059 for more details (https://github.com/qbittorrent/qBittorrent/issues/3059).
const char C_INFINITY[] = "∞";
const char C_UP[] = "▲";
const char C_DOWN[] = "▼";
const char C_COPYRIGHT[] = "©";
const char C_LOCALE_ENGLISH[] = "English";
const char C_LOCALE_ENGLISH_AUSTRALIA[] = "English(Australia)";
const char C_LOCALE_ENGLISH_UNITEDKINGDOM[] = "English(United Kingdom)";
const char C_LOCALE_FRENCH[] = "Français";
const char C_LOCALE_GERMAN[] = "Deutsch";
const char C_LOCALE_HUNGARIAN[] = "Magyar";
const char C_LOCALE_INDONESIAN[] = "Bahasa Indonesia";
const char C_LOCALE_ITALIAN[] = "Italiano";
const char C_LOCALE_DUTCH[] = "Nederlands";
const char C_LOCALE_SPANISH[] = "Español";
const char C_LOCALE_CATALAN[] = "Català";
const char C_LOCALE_GALICIAN[] = "Galego";
const char C_LOCALE_PORTUGUESE[] = "Português";
const char C_LOCALE_PORTUGUESE_BRAZIL[] = "Português brasileiro";
const char C_LOCALE_POLISH[] = "Polski";
const char C_LOCALE_LITHUANIAN[] = "Lietuvių";
const char C_LOCALE_CZECH[] = "Čeština";
const char C_LOCALE_SLOVAK[] = "Slovenčina";
const char C_LOCALE_SERBIAN[] = "Српски";
const char C_LOCALE_CROATIAN[] = "Hrvatski";
const char C_LOCALE_ARMENIAN[] = "Հայերեն";
const char C_LOCALE_ROMANIAN[] = "Română";
const char C_LOCALE_TURKISH[] = "Türkçe";
const char C_LOCALE_GREEK[] = "Ελληνικά";
const char C_LOCALE_SWEDISH[] = "Svenska";
const char C_LOCALE_FINNISH[] = "Suomi";
const char C_LOCALE_NORWEGIAN[] = "Norsk";
const char C_LOCALE_DANISH[] = "Dansk";
const char C_LOCALE_BULGARIAN[] = "Български";
const char C_LOCALE_UKRAINIAN[] = "Українська";
const char C_LOCALE_RUSSIAN[] = "Русский";
const char C_LOCALE_JAPANESE[] = "日本語";
const char C_LOCALE_HEBREW[] = "עברית";
const char C_LOCALE_HINDI[] = "हिन्दी, हिंदी";
const char C_LOCALE_ARABIC[] = "عربي";
const char C_LOCALE_GEORGIAN[] = "ქართული";
const char C_LOCALE_BYELORUSSIAN[] = "Беларуская";
const char C_LOCALE_BASQUE[] = "Euskara";
const char C_LOCALE_VIETNAMESE[] = "tiếng Việt";
const char C_LOCALE_CHINESE_TRADITIONAL_TW[] = "正體中文 (臺灣)";
const char C_LOCALE_CHINESE_TRADITIONAL_HK[] = "繁體中文 (香港)";
const char C_LOCALE_CHINESE_SIMPLIFIED[] = "简体中文";
const char C_LOCALE_KOREAN[] = "한글";

View File

@@ -1,6 +1,8 @@
<!DOCTYPE RCC><RCC version="1.0">
<qresource>
<file>gpl.html</file>
<file>thanks.html</file>
<file>translators.html</file>
</qresource>
</RCC>

View File

@@ -89,7 +89,7 @@
<string/>
</property>
<property name="pixmap">
<pixmap resource="icons.qrc">:/icons/skin/mascot.png</pixmap>
<pixmap resource="../icons.qrc">:/icons/skin/mascot.png</pixmap>
</property>
</widget>
</item>
@@ -369,7 +369,11 @@
<number>6</number>
</property>
<item>
<widget class="QTextBrowser" name="te_thanks"/>
<widget class="QTextBrowser" name="te_thanks">
<property name="openExternalLinks">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
@@ -517,7 +521,7 @@
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
<include location="icons.qrc"/>
<include location="../icons.qrc"/>
</resources>
<connections/>
</ui>

View File

@@ -36,6 +36,7 @@
#include <QtGlobal>
#include <libtorrent/version.hpp>
#include <boost/version.hpp>
#include "core/unicodestrings.h"
class about : public QDialog, private Ui::AboutDlg{
Q_OBJECT
@@ -51,9 +52,9 @@ class about : public QDialog, private Ui::AboutDlg{
// About
QString aboutText =
QString::fromUtf8("<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0//EN\" \"http://www.w3.org/TR/REC-html40/strict.dtd\"><html><head><meta name=\"qrichtext\" content=\"1\" /><style type=\"text/css\">p, li { white-space: pre-wrap; }</style></head><body style=\" font-size:11pt; font-weight:400; font-style:normal;\"><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">") +
tr("An advanced BitTorrent client programmed in C++, based on Qt toolkit and libtorrent-rasterbar.") +
tr("An advanced BitTorrent client programmed in <nobr>C++</nobr>, based on Qt toolkit and libtorrent-rasterbar.") +
QString::fromUtf8(" <br /><br />") +
trUtf8("Copyright ©2006-2013 The qBittorrent project") +
trUtf8("Copyright %1 2006-2015 The qBittorrent project").arg(C_COPYRIGHT) +
QString::fromUtf8("<br /><br />") +
tr("Home Page: ") +
QString::fromUtf8("<a href=\"http://www.qbittorrent.org\"><span style=\" text-decoration: underline; color:#0000ff;\">http://www.qbittorrent.org</span></a></p><p style=\" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;\">") +
@@ -71,60 +72,21 @@ class about : public QDialog, private Ui::AboutDlg{
//Title
lb_name->setText(QString::fromUtf8("<b><h1>qBittorrent")+QString::fromUtf8(" " VERSION"</h1></b>"));
// Thanks
QString thanks_txt;
thanks_txt += QString::fromUtf8("<p>I would first like to thank sourceforge.net for hosting qBittorrent project and for their support.</p>");
thanks_txt += QString::fromUtf8("<p>I am pleased that people from all over the world are contributing to qBittorrent: Ishan Arora (India), Arnaud Demaizière (France) and Stephanos Antaris (Greece). Their help is greatly appreciated</p>");
thanks_txt += QString::fromUtf8("<p>I also want to thank Στέφανος Αντάρης (santaris@csd.auth.gr) and Mirco Chinelli (infinity89@fastwebmail.it) for working on Mac OS X packaging.</p>");
thanks_txt += QString::fromUtf8("<p>I am grateful to Peter Koeleman (peter@qbittorrent.org) and Mohammad Dib (mdib@qbittorrent.org) for working on qBittorrent port to Windows.</p>");
thanks_txt += QString::fromUtf8("<p>Thanks a lot to our graphist Mateusz Toboła (tobejodok@qbittorrent.org) for his great work.</p>");
te_thanks->setHtml(thanks_txt);
QFile thanksfile(":/thanks.html");
if (thanksfile.open(QIODevice::ReadOnly | QIODevice::Text)) {
te_thanks->setHtml(QString::fromUtf8(thanksfile.readAll().constData()));
thanksfile.close();
}
// Translation
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), sn51234 (nesseyan@gmail.com) and Ibrahim Saed ibraheem_alex(Transifex)</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>Bulgarian:</u> Tsvetan & Boyko Bankoff (emerge_life@users.sourceforge.net)</li>\
<li><u>Catalan:</u> Francisco Luque Contreras (frannoe@ya.com)</li>\
<li><u>Chinese (Simplified):</u> Guo Yue (yue.guo0418@gmail.com)</li>\
<li><u>Chinese (Traditional):</u> Yi-Shun Wang (dnextstep@gmail.com) and 冥王歐西里斯 s8321414(Transifex)</li>\
<li><u>Croatian:</u> Oliver Mucafir (oliver.untwist@gmail.com)</li>\
<li><u>Czech:</u> Jirka Vilim (web@tets.cz) and Petr Cernobila abr(Transifex)</li>\
<li><u>Danish:</u> Mathias Nielsen (comoneo@gmail.com)</li>\
<li><u>Dutch:</u> Pieter Heyvaert (pieter_heyvaert@hotmail.com)</li>\
<li><u>English(Australia):</u> Robert Readman readmanr(Transifex)</li>\
<li><u>English(United Kingdom):</u> Robert Readman readmanr(Transifex)</li>\
<li><u>Finnish:</u> Niklas Laxström (nikerabbit@users.sourceforge.net), Pekka Niemi (pekka.niemi@iki.fi) and Jiri Grönroos artnay(Transifex)</li>\
<li><u>Galician:</u> Marcos Lans (marcoslansgarza@gmail.com) and antiparvos(Transifex)</li>\
<li><u>Georgian:</u> Beqa Arabuli (arabulibeqa@yahoo.com)</li>\
<li><u>German:</u> Niels Hoffmann (zentralmaschine@users.sourceforge.net), schnurlos (schnurlos@gmail.com)</li>\
<li><u>Greek:</u> Tsvetan Bankov (emerge_life@users.sourceforge.net), Stephanos Antaris (santaris@csd.auth.gr), sledgehammer999(hammered999@gmail.com) and Γιάννης Ανθυμίδης Evropi(Transifex)</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> 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>\
<li><u>Norwegian:</u> Tomaso</li>\
<li><u>Polish:</u> Mariusz Fik (fisiu@opensuse.org)</li>\
<li><u>Portuguese:</u> Sérgio Marques smarquespt(Transifex)</li>\
<li><u>Portuguese(Brazil):</u> Nick Marinho (nickmarinho@gmail.com)</li>\
<li><u>Romanian:</u> Obada Denis (obadadenis@users.sourceforge.net), Adrian Gabor Adriannho(Transifex) and Mihai Coman z0id(Transifex)</li>\
<li><u>Russian:</u> Nick Khazov (m2k3d0n at users.sourceforge.net), Alexey Morsov (samurai@ricom.ru), Nick Tiskov Dayman(daymansmail (at) gmail (dot) com), Dmitry DmitryKX(Transifex) and kraleksandr kraleksandr(Transifex)</li>\
<li><u>Serbian:</u> Anaximandar Milet (anaximandar@operamail.com)</li>\
<li><u>Slovak:</u> helix84</li>\
<li><u>Spanish:</u> Alfredo Monclús (alfrix), Francisco Luque Contreras (frannoe@ya.com), José Antonio Moray moray33(Transifex) and Diego de las Heras(Transifex)</li>\
<li><u>Swedish:</u> Daniel Nylander (po@danielnylander.se) and Emil Hammarberg Ooglogput(Transifex)</li>\
<li><u>Turkish:</u> Hasan YILMAZ (iletisim@hedefturkce.com) and Erdem Bingöl (erdem84@gmail.com)</li>\
<li><u>Ukrainian:</u> Oleh Prypin (blaxpirit@gmail.com)</li>\
<li><u>Vietnamese:</u> Anh Phan ppanhh(Transifex)</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);
QFile translatorsfile(":/translators.html");
if (translatorsfile.open(QIODevice::ReadOnly | QIODevice::Text)) {
te_translation->setHtml(QString::fromUtf8(translatorsfile.readAll().constData()));
translatorsfile.close();
}
// License
te_license->append(QString::fromUtf8("<a name='top'></a>"));
QFile licensefile(":/gpl.html");
if (licensefile.open(QIODevice::ReadOnly|QIODevice::Text)) {
te_license->setHtml(licensefile.readAll());
if (licensefile.open(QIODevice::ReadOnly | QIODevice::Text)) {
te_license->setHtml(QString::fromUtf8(licensefile.readAll().constData()));
licensefile.close();
}
// Libraries

View File

@@ -40,6 +40,7 @@
#include "fs_utils.h"
#include "autoexpandabledialog.h"
#include "messageboxraised.h"
#include "core/unicodestrings.h"
#include <QDebug>
#include <QString>
@@ -87,6 +88,8 @@ AddNewTorrentDialog::AddNewTorrentDialog(QWidget *parent)
editHotkey = new QShortcut(QKeySequence("F2"), ui->content_tree, 0, 0, Qt::WidgetShortcut);
connect(editHotkey, SIGNAL(activated()), SLOT(renameSelectedFile()));
connect(ui->content_tree, SIGNAL(doubleClicked(QModelIndex)), SLOT(renameSelectedFile()));
ui->buttonBox->button(QDialogButtonBox::Ok)->setFocus();
}
AddNewTorrentDialog::~AddNewTorrentDialog()
@@ -153,7 +156,7 @@ void AddNewTorrentDialog::showEvent(QShowEvent *event)
void AddNewTorrentDialog::showAdvancedSettings(bool show)
{
if (show) {
ui->adv_button->setText(QString::fromUtf8("▲"));
ui->adv_button->setText(QString::fromUtf8(C_UP));
ui->settings_group->setVisible(true);
ui->info_group->setVisible(true);
if (m_hasMetadata && (m_torrentInfo->num_files() > 1)) {
@@ -167,7 +170,7 @@ void AddNewTorrentDialog::showAdvancedSettings(bool show)
static_cast<QVBoxLayout*>(layout())->insertWidget(layout()->indexOf(ui->never_show_cb) + 1, ui->adv_button);
}
else {
ui->adv_button->setText(QString::fromUtf8("▼"));
ui->adv_button->setText(QString::fromUtf8(C_DOWN));
ui->settings_group->setVisible(false);
ui->info_group->setVisible(false);
ui->buttonsHLayout->insertWidget(0, layout()->takeAt(layout()->indexOf(ui->never_show_cb) + 1)->widget());
@@ -311,7 +314,7 @@ void AddNewTorrentDialog::updateDiskSpaceLabel()
QString size_string = torrent_size ? misc::friendlyUnit(torrent_size) : QString(tr("Not Available", "This size is unavailable."));
size_string += " (";
size_string += tr("Disk space: %1").arg(misc::friendlyUnit(fsutils::freeDiskSpaceOnPath(
size_string += tr("Free disk space: %1").arg(misc::friendlyUnit(fsutils::freeDiskSpaceOnPath(
ui->save_path_combo->itemData(
ui->save_path_combo->currentIndex()).toString())));
size_string += ")";
@@ -327,6 +330,8 @@ void AddNewTorrentDialog::onSavePathChanged(int index)
// Remember index
m_oldIndex = index;
updateDiskSpaceLabel();
}
void AddNewTorrentDialog::browseButton_clicked()
@@ -377,8 +382,6 @@ void AddNewTorrentDialog::browseButton_clicked()
ui->save_path_combo->setCurrentIndex(m_oldIndex);
}
connect(ui->save_path_combo, SIGNAL(currentIndexChanged(int)), SLOT(onSavePathChanged(int)));
updateDiskSpaceLabel();
}
void AddNewTorrentDialog::relayout()

View File

@@ -32,6 +32,7 @@
#define DELETIONCONFIRMATIONDLG_H
#include <QDialog>
#include <QPushButton>
#include "ui_confirmdeletiondlg.h"
#include "preferences.h"
#include "iconprovider.h"
@@ -55,7 +56,7 @@ class DeletionConfirmationDlg : public QDialog, private Ui::confirmDeletionDlg {
move(misc::screenCenter(this));
checkPermDelete->setChecked(Preferences::instance()->deleteTorrentFilesAsDefault());
connect(checkPermDelete, SIGNAL(clicked()), this, SLOT(updateRememberButtonState()));
buttonBox->setFocus();
buttonBox->button(QDialogButtonBox::Cancel)->setFocus();
}
bool shouldDeleteLocalFiles() const {

View File

@@ -80,7 +80,6 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
public slots:
void on_downloadButton_clicked() {
close();
QString urls = textUrls->toPlainText();
QStringList url_list = urls.split(QString::fromUtf8("\n"));
QString url;
@@ -94,9 +93,10 @@ class downloadFromURL : public QDialog, private Ui::downloadFromURL{
}
}
if (!url_list_cleaned.size()) {
QMessageBox::critical(0, tr("No URL entered"), tr("Please type at least one URL."));
QMessageBox::warning(0, tr("No URL entered"), tr("Please type at least one URL."));
return;
}
close();
emit urlsReadyToBeDownloaded(url_list_cleaned);
qDebug("Emitted urlsReadytobedownloaded signal");
}

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