Commit graph

10123 commits

Author SHA1 Message Date
Nowshed H. Imran
199d770e15
Implement new icon/color theme
Co-authored-by: xavier2k6 <42386382+xavier2k6@users.noreply.github.com>
2022-06-09 18:18:14 +06:00
Prince Gupta
c47e29c7c8
Do RSS serializing on worker thread
PR #16357.
2022-06-09 15:16:37 +03:00
Chocobo1
fed969ed64
Avoid string encoding conversion
Use UTF-16 string literals to match QTextStream internal buffer
encoding.
2022-06-09 12:24:31 +08:00
Chocobo1
9cb686a6b7
Fix wrong file names displayed in tooltip
Also rename variable.
Closes #17179.
2022-06-09 12:24:31 +08:00
Chocobo1
eddeda7bab
Remove usage of QTextStream
Other classes already provide rich methods so avoid another
layer of QTextStream which slow things down (slightly).

PR #17180.
2022-06-09 11:18:41 +08:00
Vladimir Golovnev
ca07540675
Fix rate calculation when interval is too low
PR #17155.
2022-06-08 08:51:48 +03:00
Chocobo1
fb5f563537
Merge pull request #17148 from Chocobo1/gui
Fix wrong dialog sizes on first start up
2022-06-05 13:36:41 +08:00
thalieht
2f9c5cdb22
Add "Filter files" field in new torrent dialog
PR #16344.
2022-06-04 12:57:50 +08:00
Chocobo1
fcf50820e8
Don't resize dialog with invalid sizes
This fixes wrong dialog sizes on first startup.
2022-06-03 16:07:36 +08:00
Chocobo1
3fd0241abb
Set dialog properties at the caller site
Redundant `setModal(true)` are removed since the dialog is already opened via `open()`.
2022-06-02 23:53:30 +08:00
Vladimir Golovnev
ab0c82965c
Avoid redundant checks of category names
PR #17130.
2022-05-31 10:42:40 +03:00
Kacper Michajłow
5173a56ebd
Fix DHT/PeX/LSD status when it is globally disabled
Global status takes precedence over specific torrent private status.

PR #17126.
2022-05-31 12:45:28 +08:00
Chocobo1
9cd993d1da
Merge pull request #17116 from Chocobo1/cleanup
Clean up usage of `static` keyword
2022-05-31 12:39:30 +08:00
Chocobo1
73faf67084
Clean up usage of static keyword
They are either misused or redundant, so remove it.
2022-05-30 13:25:34 +08:00
brvphoenix
fd51362545
Don't decompress the reply data for Qt 6.3
PR #17120.
2022-05-30 13:10:29 +08:00
sledgehammer999
56b99f4e19
Merge pull request #17125 from sledgehammer999/cmake_lupdate
Use CMake to update translation files
2022-05-29 20:46:15 +03:00
sledgehammer999
242874e705
Use CMake to update translation files
It uses lupdate directly.
Qt's `qt_add_lupdate()` cmake function doesn't help much.
First of all it is Qt6 only.
Secondly, our project is split into multiple targets but we need all
strings into a single .ts file per language.
Thirdly, it looks like it will skip source files that are added conditionally into the build
via cmake condition checking (eg DBUS source files). We need to gather all strings present
in the source files regardless of the build configuration.

On another note, this is a step towards reducing dependency on qmake/autoconf.
2022-05-29 02:49:57 +03:00
Vladimir Golovnev
a5caa807f5
Initialize torrent status using libtorrent extension
PR #17096.
2022-05-28 09:30:50 +03:00
Chocobo1
c2c17fd053
Revise icon cache look up
Find in `m_iconCache` first because it is cheaper than calling
`QIcon::fromTheme()`.
2022-05-27 16:23:19 +08:00
Chocobo1
f54cc5796e
Move function into anonymous namespace 2022-05-27 16:23:19 +08:00
Chocobo1
a9f99aed48
Revise code 2022-05-27 16:23:18 +08:00
Chocobo1
7eaaa8f92a
Turn static variable into class member 2022-05-27 04:01:37 +08:00
Chocobo1
ca9f5a18d4
Suppress type narrowing warnings 2022-05-27 04:01:34 +08:00
Vladimir Golovnev
4f62900cd3
Update torrent status filter counters consistently
PR #17097.
Closes #15981.
Closes #16490.
2022-05-26 19:55:00 +03:00
sledgehammer999
2c9e1d942b
Merge pull request #17091 from sledgehammer999/ts_newlines_fix
Sync translations from Transifex and run lupdate
2022-05-25 20:44:11 +03:00
Vladimir Golovnev
4032393c0e
Pause torrent in all "fastresume rejected" cases
PR #17087.
Addition to #17064.
2022-05-25 08:24:53 +03:00
xavier2k6
8e854062e8
Sync flag icons with upstream
Upstream commit 1f861ac27d8a3b46e78eaa8ac30d7de35279ab01
Upstream release v6.4.2

PR #17077.
2022-05-25 12:41:16 +08:00
sledgehammer999
cbf9c8ec1a
Sync translations from Transifex and run lupdate 2022-05-25 00:16:57 +03:00
Priit Uring
494593c745
Update clipboard.js to v2.0.11
https://github.com/zenorocha/clipboard.js/releases

PR #17073.
2022-05-24 12:55:30 +08:00
sledgehammer999
3af832ec18
Sync translations from Transifex and run lupdate 2022-05-22 19:14:00 +03:00
Vladimir Golovnev
7e0cd223fd
Revamp tracker entries handling
PR #17017.
2022-05-22 09:09:11 +03:00
Vladimir Golovnev
8c0cd09823
Handle all "fastresume rejected" cases consistently
PR #17064.
2022-05-22 07:23:52 +03:00
Chocobo1
c8b4611d8d
Disable copy, move constructors when inheriting from QObject 2022-05-19 19:07:23 +08:00
Chocobo1
7764169aa3
Disallow narrowing conversions in signal connection 2022-05-19 12:55:07 +08:00
Chocobo1
8d3c19c599
Merge pull request #17031 from Chocobo1/net
Fix wrong GUI behavior in "Optional IP address to bind to" setting
2022-05-19 12:52:35 +08:00
vlakoff
b84333f8a1
Consider brackets within wildcard as regular characters
In glob patterns, square brackets have a special meaning, that may be unexpected by the users.

Thus we escape these brackets, so that the only remaining special characters are the * and ? wildcards.

PR #16965.
2022-05-18 08:33:14 +03:00
thalieht
acdd08e9a2
Consistently emit signal when file "ignored" state is changed
PR #17042.
Closes #17037.
2022-05-18 07:47:48 +03:00
Chocobo1
dbfd6a2368
WebUI: enforce coding style
Actually, not all of them but some that can be enforced by eslint.
The changes are made by eslint with minor manual tweaking.

PR #17046.
2022-05-18 11:37:05 +08:00
Chocobo1
9d858d5cd7
Fix compilation with qmake
Fix up 7c35904062.
2022-05-16 01:15:19 +08:00
Chocobo1
e82c50ed73
Clean up code 2022-05-16 01:15:08 +08:00
Chocobo1
4ce98d57dd
Fix wrong GUI behavior in "Optional IP address to bind to" setting
Previously the address field got erroneously reset to "All addresses"
when the network interface is down.
2022-05-14 18:42:13 +08:00
Chocobo1
114c6d36d1
Clean up code
Add const.
Move template implementation to .cpp file.
2022-05-14 18:30:10 +08:00
Chocobo1
538c88ced4
Improve logic when interfacing settings with combobox
PR #17023.
2022-05-13 12:13:04 +08:00
Chocobo1
7c35904062
Use stacktrace dialog when GUI is enabled
PR #17022.
2022-05-13 12:12:36 +08:00
Chocobo1
5c3c6b63ba
Migrate to Boost.Stacktrace
PR #17014.
2022-05-12 11:06:05 +08:00
Coda
e698c09298
Allow to use POSIX-compliant disk IO type
This patch allows user to switch disk IO type between memory mapped files based type (default in libtorrent 2, and seems causing memory issues) and POSIX-compliant type which is more conservative on memory usage.

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
Co-authored-by: Vladimir Golovnev (Glassez) <glassez@yandex.ru>

PR #16895.
2022-05-11 21:28:06 +03:00
Vladimir Golovnev
a048ea668f
Use uniform way to export .torrent files
PR #17013.
2022-05-10 15:36:05 +03:00
Vladimir Golovnev
5af78ad2cd
Preserve "skip hash check" when there is no metadata
When torrent is added without metadata libtorrent doesn't honor "seed mode" and doesn't save it in resume data so when metadata is available torrent will still check file hashes. This patch will add a logic that preserves originally enabled "seed mode" until the metadata is received.
PR #17009.
2022-05-10 15:34:38 +03:00
Vladimir Golovnev
338e89176d
Mark all files as complete if torrent is in "seed mode"
Fixes regression of bcfa486.
Closes #16999.
PR #17008.
2022-05-10 15:29:46 +03:00
itlezy
a266599118
Add keyboard navigation keys
* Added keyboard navigation keys for context menu with `&`
* Added `CTRL+M` for force resume.

PR #16988.

Co-authored-by: itLezy <itLezy@users.noreply.github.com>
Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
2022-05-10 11:34:43 +08:00
Chocobo1
002d56d8b3
Fix type mismatch
msys2 was reporting the following error:
```
D:/a/qbittorent_msys2/qbittorent_msys2/src/qBittorrent/src/app/application.cpp: In member function 'void Application::applyMemoryWorkingSetLimit()':
D:/a/qbittorent_msys2/qbittorent_msys2/src/qBittorrent/src/app/application.cpp:777:36: error: no matching function for call to 'min(unsigned int, long unsigned int)'
  777 |     const SIZE_T minSize = std::min((64 * MiB), (maxSize / 2));
      |                            ~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
```
2022-05-08 16:48:29 +08:00
Chocobo1
be4a1e7fd7
Suppress wrong print specifier
By removing unimportant debug message.
2022-05-08 16:46:36 +08:00
Chocobo1
a0a45333f1
Don't use old style casts 2022-05-08 14:53:27 +08:00
Chocobo1
dba998fea0
Don't use hardcoded path for temp folder 2022-05-08 14:00:59 +08:00
Tom Piccirello
fb7f7d0c75
Add support for exporting .torrent from WebUI
PR #16968.
2022-05-04 12:13:24 +08:00
Chocobo1
e9d3928fe0
Store WebUI port setting in human readable number
Previously it was wrapped in QVariant type.

PR #16977.
2022-05-04 12:11:17 +08:00
Chocobo1
2a6f02fa29
Fix empty selection in WebUI language combobox
This mostly happens with a clean install.

PR #16978.
2022-05-04 12:10:06 +08:00
summer
ce0e5be7ce
Increase limit of maximum number of articles per feed
Closes #16690.
PR #16698.

Co-authored-by: An0n <79678786+an0n666@users.noreply.github.com>
2022-05-03 10:59:47 +08:00
Chocobo1
88a91e0769
Merge pull request #16971 from Chocobo1/dialog
Move stacktrace dialog to gui folder
2022-05-03 10:56:41 +08:00
Chocobo1
21f4676b16
Rename method 2022-05-02 12:35:53 +08:00
Chocobo1
bb2a874fd5
Reset widget property to default
This property wasn't been customized.
2022-05-02 12:35:38 +08:00
summer
56667e717b
Prevent the new update box from blocking input on other dialogues
PR #16678.
2022-05-01 16:18:22 +03:00
Chocobo1
caaaa05710
Move conditionals to the bottom 2022-05-01 14:24:56 +08:00
Chocobo1
d69e6bb7aa
Move stacktrace dialog to gui folder 2022-05-01 14:24:39 +08:00
Chocobo1
a1903e5d67
Delete unreachable code 2022-05-01 13:55:26 +08:00
Chocobo1
64d8db0c93
Move system signal related functions to its own file
And revise "signal safe print" function.
PR #16953.
2022-05-01 12:32:51 +08:00
summer
7b608fd0c9
Reduce the number of hashing threads by default
This seems to be the culprit responsible for slower hash rate in RC2_0 releases.
https://github.com/qbittorrent/qBittorrent/issues/16043#issuecomment-1113774868

PR #16951.
2022-05-01 12:30:25 +08:00
Chocobo1
19cbffb5e2
Remove artificial max limits from "Torrent Queueing" related options
Closes #16936.

PR #16942.
2022-04-30 12:26:18 +08:00
Chocobo1
639ed40314
Disable Linux-specific function when compiling for Windows 2022-04-29 13:49:31 +08:00
Chocobo1
c5cbda0bbe
Avoid splitting code over ifdef boundary
By removing unimportant debug message.
2022-04-29 13:49:31 +08:00
Chocobo1
59e37210f3
Use correct type for comparisons
`_write()` actually returns `int` type.

And fix wrong function parameters.

Closes #16938.
Closes #16944.
2022-04-29 13:49:31 +08:00
Chocobo1
9351f66c26
Add support for exporting .torrent data to buffer
Related: https://github.com/qbittorrent/qBittorrent/pull/16886#discussion_r855882018
PR #16931.
2022-04-27 12:29:00 +08:00
Vladimir Golovnev (Glassez)
1069bea273
Cache native torrent info to avoid extra blocking calls 2022-04-25 09:25:45 +03:00
Vladimir Golovnev (Glassez)
c740d105c9
Don't force update torrent status 2022-04-25 08:32:49 +03:00
Vladimir Golovnev (Glassez)
66a5a9863f
Fill torrent status with initial values when reload 2022-04-25 08:32:44 +03:00
Vladimir Golovnev (Glassez)
7ca47b8916
Delay event processing until status updated 2022-04-25 08:31:50 +03:00
Vladimir Golovnev (Glassez)
bcfa4866fe
Cache indexes of completed files
This avoids extra blocking calls to libtorrent.
2022-04-25 08:31:39 +03:00
xavier2k6
b85b1e8834
Update grunt dependency
Use `*` so we don't need to care about its version anymore.
PR #16917.
2022-04-25 11:38:12 +08:00
Chocobo1
eba5a48abd
Merge pull request #16886 from Chocobo1/export
Add "Export .torrent" action
2022-04-24 12:43:13 +08:00
Chocobo1
a90ade0446
Add "Export .torrent" action 2022-04-23 15:11:09 +08:00
xavier2k6
0b86eb9b4c
Update clipboard.js to v2.0.10
PR #16918.
2022-04-23 12:39:06 +08:00
Vladimir Golovnev
359c4fef9d
Avoid dereferencing null pointers
PR #16896.
Closes #16884 and similar issues.
2022-04-19 13:52:56 +03:00
Chocobo1
71b1cb3b9c
Remove unused header 2022-04-19 11:35:51 +08:00
Vladimir Golovnev
613e9866aa
Merge pull request #16876 from glassez/blocking
Avoid some blocking calls to libtorrent

Under some conditions (when libtorrent is doing heavy work), blocking calls can wait quite a long time, thereby suspending the main application thread. In some cases, we can avoid this, since we have enough data to make the job without call to libtorrent. Although in some cases it may require a little more work to be done in the main thread, but overall responsiveness still benefits greatly in the end, especially when the libtorrent working thread is heavily loaded.
2022-04-16 19:27:41 +03:00
Chocobo1
bc937d38a2
Allow to set "working set limit" on non-Windows OS
PR #16874.
2022-04-16 11:36:58 +08:00
Vladimir Golovnev (Glassez)
35fcf39fc8
Add additional trackers without extra blocking call 2022-04-15 11:45:10 +03:00
Vladimir Golovnev (Glassez)
bd45dc5d0f Avoid some blocking calls to libtorrent 2022-04-14 15:22:32 +03:00
Vladimir Golovnev
7377974731
Improve path extension handling
PR #16867.
2022-04-14 09:43:07 +03:00
Requi
669b67e666
WebAPI: return correct status
Fix web API returning Not Found instead of Forbidden.

When not having a session the API would return "Not Found" instead of "Forbidden" when trying to access a non-public endpoint.

PR #16866.
2022-04-14 08:26:19 +03:00
Chocobo1
a2b85ba1fd
Provide interface for Application class
PR #16864.
2022-04-14 12:04:58 +08:00
Chocobo1
dc22109fa7
Merge pull request #16863 from Chocobo1/run
Remove redundant function
2022-04-13 12:05:58 +08:00
Vladimir Golovnev
4471a6377e
Have separate API controller instances per session
PR #16848.
2022-04-12 13:39:35 +03:00
Chocobo1
3f762a416d
Use proper method for deferred calls 2022-04-12 16:23:39 +08:00
Chocobo1
a59a6ce8e4
Remove redundant function
This helper function is useless after using `Path` class.
2022-04-11 13:07:53 +08:00
Chocobo1
189514c6de
Fix wrong v2 hash string displayed in WebUI
Previously `0000...` was erroneously displayed when v2 hash is absent,
now it correctly shows the `N/A`.

PR #16846.
2022-04-10 12:46:24 +08:00
Vladimir Golovnev
dded874350
Correctly apply content layout when "Skip hash check" is enabled
PR #16825.
2022-04-06 14:01:41 +03:00
Chocobo1
e42fa0e027
Merge pull request #16820 from Chocobo1/comparisons
Move comparison operator out of class
2022-04-06 13:35:34 +08:00
Vladimir Golovnev
33ffe95294
Correctly populate trackers filter list
PR #16814.
2022-04-05 07:28:00 +03:00
Vladimir Golovnev
0657238ad1
Don't forget to create 'download_path' field
PR #16468.
2022-04-05 07:27:11 +03:00
Vladimir Golovnev
4efece4ab8
Use an appropriate method to show modal dialog
PR #16809.
2022-04-05 07:26:17 +03:00