Commit graph

9959 commits

Author SHA1 Message Date
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
thalieht
756bc3da54
Show any multiple connections from the same IP in peer list
The uniqueness of peers is now determined by their
IP, port and connection type (uTP etc.) instead of just their IP
2020-03-24 16:14:24 +02:00
Chocobo1
fbb01a36e6
Use systematic approach to generate hash
The basic idea is to hash each class member and then mix them with xor
operation.
However the `seed` must be handled with care, it should only be
introduced once when mixing the hashes of each class member, otherwise
under some circumstances the `seed` might xor with itself and thus break
the intended effect.
2020-03-24 16:14:24 +02:00
Chocobo1
21922ed3b4
Revise qHash function
Instead of xor and narrowing the integers ourselves, now we let qHash()
from Qt do the job properly.
2020-03-24 16:14:23 +02:00
Chocobo1
43fe5214d2
Use faster hash function
qHash(QString) will need to hash/loop through all the data while the new
code will only need one memcpy() and a few bit manipulations.
2020-03-24 16:14:22 +02:00
Vladimir Golovnev (Glassez)
ab6079e0d5
Track settings changed event in TransferListModel 2020-03-24 16:14:22 +02:00
Vladimir Golovnev (Glassez)
dc0b1ce227
Fix hide zero values 2020-03-24 16:14:21 +02:00
Sakib-Abrar
1db12e4421
Show "∞" instead of " -1" in Preferences 2020-03-24 16:14:20 +02:00
Vladimir Golovnev (Glassez)
b160b56306
Redesign torrent startup handling 2020-03-24 16:14:20 +02:00
NotTsunami
0e6627b0f6
CMake: Fix WebUI checks
When the CMake system was last revamped, the configure variable was
changed from WEBUI to DISABLE_WEBUI, but we are still checking
against WEBUI. This behavior was changed in fa770871e9
2020-03-24 16:14:19 +02:00
NotTsunami
33390bf463
CMake: Remove glibc version detection
If we were conditionally enabling _BSD_SOURCE or _SVID_SOURCE, I can
understand trying to play nice with the compiler and only pass as
needed, however this is not the case and glibc <= 2.19 will not care
that we are passing _DEFAULT_SOURCE. This removes an unnecessary
build step and gives us less to maintain from a build system
perspective.

Small cosmetic changes to MacroQbtCompilerSettings are included.
2020-03-24 16:14:18 +02:00
NotTsunami
2a6ddffb22
CMake: Remove duplicate MSVC check
As of this commit, L98 of winconf.cmake already checks for MSVC
before winconf-msvc calls this macro, so we are guaranteed to be
satisfy the check.
2020-03-24 16:14:17 +02:00
Prince Gupta
06c09f0113
Reorganize UI theme selection 2020-03-24 16:14:17 +02:00
Chocobo1
db258f7461
Migrate away from deprecated settings
Libtorrent has deprecated `upnp_ignore_nonrouters` in
https://github.com/arvidn/libtorrent/pull/4251
2020-03-24 16:14:16 +02:00
NotTsunami
81cec1930b
CMake: Remove additional debugging compiler flags
Our previous setup lead to two unintended consequences:

* Debug flags were included in both release and debug builds instead
of just debug builds
* Clang doesn't support -gX (where X is the level of debugging
optimization), but we checked for -Og support instead

This commit avoids both of these scenarios by removing the additional
flags altogether. Partial resolution to #11856.
2020-03-24 16:14:15 +02:00
NotTsunami
7444227c9a
WebUI: Use correct operators in logical expressions
As suggested in https://github.com/qbittorrent/qBittorrent/pull/11825#discussion_r365557626
2020-03-24 16:14:15 +02:00
FranciscoPombal
07196571e8
Add piece_extent_affinity to AdvancedSettings
Expose option in WebUI settings and WebAPI.

Requires WebAPI version bump.

Closes #11436.
2020-03-24 16:14:14 +02:00
Denis
b083bd78e7
WebUI: Fix first row renaming in files tab
Ids started from zero and first row converts to false.
Closes #11826.
2020-03-24 16:14:13 +02:00
Vladimir Golovnev (Glassez)
e75a65d798
Fix Transfer list sorting 2020-03-24 16:14:13 +02:00
Chocobo1
e1a10a0375
Fix missing string 2020-03-24 16:14:12 +02:00
Chocobo1
080c542953
Bump python version for new installation 2020-03-24 16:14:11 +02:00