Commit graph

9979 commits

Author SHA1 Message Date
Chocobo1
055d752c50
Fix crash when renaming torrent contents
Closes #10328.
2020-03-24 16:15:01 +02:00
Chocobo1
3e4c2193fb
Drop python2 support
Closes #11811.
2020-03-24 16:15:00 +02:00
Nick Korotysh
5c2b8d3e10
Delegate GUI scaling work to Qt
Set Qt::AA_EnableHighDpiScaling application attribute when Qt 5.14.x or
newer is used. This fixes a lot of scaling issues on HiDPI displays.

Unfortunately, this flag must be set only before QApllication object
creation, so the only one place where it can be done is main().
2020-03-24 16:14:59 +02:00
Chocobo1
ae9b8720af
Use helper functions to construct smart pointers 2020-03-24 16:14:59 +02:00
Chocobo1
30f2d11203
Use proper type for piece index 2020-03-24 16:14:58 +02:00
Chocobo1
9a69afb34a
Avoid unnecessary memory writes
Before this change, qbt spent ~1% in these two functions, now it
only spends about ~0.5% in my naive testing.
2020-03-24 16:14:57 +02:00
an0n666
923395b5c7
Check if file exists in seed mode 2020-03-24 16:14:56 +02:00
NotTsunami
9de819ea4a
Improve the options tooltips
* Fix wrong fields for translation comments
* Improve torrent management tooltip to cover both modes
* Add new tooltips for potentially confusing settings

Decent progress towards #6346, closes #9994, closes #11528
2020-03-24 16:14:56 +02:00
Vladimir Golovnev (Glassez)
21c8acd55c
Let libtorrent decide whether to resume a torrent 2020-03-24 16:14:54 +02:00
FranciscoPombal
709198d2f1
Fix response to event=stopped
BEP-3 says all tracker responses to valid announce requests should be bencoded dictionaries with at least the "peers" and "interval" keys; the "peers" key can be empty.

Also clarify support for BEP-21.
2020-03-24 16:14:54 +02:00
FranciscoPombal
87542b4f75
Don't use IPv4-mapped IPv6
Always register peers with either IPv4 or IPv6.
Fixes potential connection issues.

Also clarify related BEP-24 support.
2020-03-24 16:14:53 +02:00
FranciscoPombal
566ecefbcf
Fix BEP-23 support
The embedded tracker was returning a non-compliant response.
The peer lists should be packed strings instead of lists.

Also clarify level of compliance with BEP-7.
2020-03-24 16:14:53 +02:00
FranciscoPombal
41061f3c39
Fix IPv6 endianness 2020-03-24 16:14:52 +02:00
Vladimir Golovnev (Glassez)
703330c40d
Allow to save downloaded metadata as torrent file 2020-03-24 16:14:51 +02:00
maboroshin
5fdd069f66
NSIS: Update Japanese translation 2020-03-24 16:14:51 +02:00
Chocobo1
0ba8111c37
Fix wrong field for translation comment
The `comment` field is used for disambiguation between identical
strings. Our case here should use the `extracomment` field which
meant as comment for translators.
2020-03-24 16:14:50 +02:00
Chocobo1
5d206acb21
Remove misleading translation comment
Also it was using the wrong field for translation comment.
2020-03-24 16:14:49 +02:00
djt3
7f1218a7c7
Change placeholder text in torrent list's filter 2020-03-24 16:14:48 +02:00
schnurlos
c4ed7daf67
NSIS: Update German translation
German translation of "inst_requires_win7" added.
2020-03-24 16:14:47 +02:00
FranciscoPombal
5a09f996ed
Revert using random port by default
Revert change introduced in https://github.com/qbittorrent/qBittorrent/pull/11637 and also revert the associated follow-up https://github.com/qbittorrent/qBittorrent/pull/12000.

Reason: https://github.com/arvidn/libtorrent/pull/4335
2020-03-24 16:14:47 +02:00
zywo
dbde206ed4
NSIS: Update French translation 2020-03-24 16:14:46 +02:00
slrslr
0947f93ad3
NSIS: Improve Czech translation 2020-03-24 16:14:45 +02:00
Francisco Pombal
f338d267bc
Git: Ignore "build" directory 2020-03-24 16:14:44 +02:00
sledgehammer999
84aa63a3c5
Use IP geolocation database by DB-IP instead of MaxMind
Closes #11792
2020-03-24 16:14:44 +02:00
Chocobo1
c2afc50c02
Simplify TrackerEntry::status() logic 2020-03-24 16:14:43 +02:00
FranciscoPombal
f72e7c0a8f
Bump Web API version 2020-03-24 16:14:42 +02:00
FranciscoPombal
575bde1d1d
Add stalled filters to GUI and Web API/UI
`/api/v2/torrents/info` can now take the following new values for the`filter` parameter: `stalled`, `stalled_uploading` and `stalled_downloading`.

Requires Web API version bump.

Closes #11787
2020-03-24 16:14:42 +02:00
an0n666
d15fdf2dde
Do not list not contacted trackers as error 2020-03-24 16:14:41 +02:00
An0n
868fd53551
Start qBittorrent on Windows start up 2020-03-24 16:14:40 +02:00
Chocobo1
66c2e70016
Include resume folder path in exception message
The message in RuntimeError exception will be displayed to the users and
users would be clueless if we don't show the path.
2020-03-24 16:14:39 +02:00
Vladimir Golovnev (Glassez)
89ee24fb3e
Don't access download handler after it's finished 2020-03-24 16:14:39 +02:00
Chocobo1
b02eb32806
Expose WebUI ban duration to users 2020-03-24 16:14:38 +02:00
Chocobo1
e162aef5be
Fix coding inconsistencies in preferences.html
1. Format table tags properly
2. Add a proper label tag
3. Don't use abbreviation for seconds, we use full name everywhere else
2020-03-24 16:14:37 +02:00
Chocobo1
837528c206
Use QDeadlineTimer for tracking WebUI banned duration
It simplifies our code and the new timer is monotonic.
2020-03-24 16:14:36 +02:00
Chocobo1
b19153287b
Expose WebUI ban counter to users 2020-03-24 16:14:36 +02:00
Chocobo1
544d3f9025
Close document properly after writing
Closing document explicitly is recommended by MDN:
https://developer.mozilla.org/en-US/docs/Web/API/Document/write
2020-03-24 16:14:35 +02:00
Nick Korotysh
7a463299ea
Inherit text color for filter list elements
Filter list (left side panel) in WebUI is implemented using <a> tags,
CSS defines default style for all <a> elements, and specific style for
filter list elements. Default style for <a> elements sets color, and
this color also used in list. This is looks not so well. So lets just
inherit text color from parent element, and as so as it is not set, so
default text color will be used.
This makes filter list looks like other UI elemets, making all UI more
consistent (like in desktop app).
2020-03-24 16:14:34 +02:00
Tester798
bbaa3a94c5
Fix portable mode
Try to fix portable mode bug. Closes #11706, #11178, #7765.
2020-03-24 16:14:33 +02:00
an0n666
d2834bd7fd
Keep legacy default for random port 2020-03-24 16:14:33 +02:00
Chocobo1
534549142e
Unify singleton pattern in Profile class
1. Use unified function names `initInstance()` and `freeInstance()` and
make them public.
2. Add `freeInstance()` to avoid noise from memory leak detectors.
3. Let `instance()`return a pointer directly to avoid unnecessary
indirections when invoking functions.
2020-03-24 16:14:32 +02:00
Vladimir Golovnev (Glassez)
5e73afa04e
Handle HTTP redirections manually
Qt doesn't support Magnet protocol so we need to handle all redirections
manually to allow redirections to Magnet URIs.
2020-03-24 16:14:31 +02:00
Vladimir Golovnev (Glassez)
6ad1ba1d35
Keep legacy defaults for existing users 2020-03-24 16:14:31 +02:00
Vladimir Golovnev (Glassez)
f978b3a002
Perform settings upgrade for existing user only 2020-03-24 16:14:30 +02:00
Nick Korotysh
2f70d273b4
Use SVG image for WebUI favicon
This will allow browsers to get high quality icon with required
resolution instead of resizing some small raster image.
Browsers can have even more benefit from it. For example, Firefox uses
high resolution icon to display it in "Top Sites" instead of page
preview.

Nothing changes for browsers which doesn't support SVG favicons, older
PNG icon will be used in such case.
2020-03-24 16:14:29 +02:00
Chocobo1
2289bf4005
Fix singleton class ownership
We shouldn't allow Qt parent ownership in here.
2020-03-24 16:14:28 +02:00
NotTsunami
0cd4900e92
Remove redundant null checks
Attempting to delete a null pointer is a noop in C++.

Closes #2864.

[1] https://isocpp.org/wiki/faq/freestore-mgmt#delete-handles-null
2020-03-24 16:14:28 +02:00
Chocobo1
0ad8dc39e5
Let ReverseResolution always return/emit a result 2020-03-24 16:14:27 +02:00
Chocobo1
60d133ca6d
Speed up lookup time
By adding another variable we can get O(1) lookup time instead of O(n).
Fix up 5f415c292d.
2020-03-24 16:14:26 +02:00
Chocobo1
000a726e20
Manually abort lookup on class destruction
Some lookup might take longer so instead of waiting them, we abort them
manually.
2020-03-24 16:14:26 +02:00
Chocobo1
4006818520
Improve ReverseResolution class
* Use QHostAddress type for IP
* Avoid double lookup
* Use larger cache size
2020-03-24 16:14:25 +02:00