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

Compare commits

...

967 Commits

Author SHA1 Message Date
Chocobo1
fbe93f0c47 Improve "apply memory working set" routine
Now it will try to raise the hard limit.
And also the log shows a more specific message when the new limit is not
applicable.

PR #19022.
2023-05-28 13:41:44 +08:00
sledgehammer999
11945eef3f Sync translations from Transifex and run lupdate 2023-05-28 01:40:37 +03:00
Raymond Ha
a35dbc6df7 WebUI: Fix category save path
PR #19008.
2023-05-26 11:52:37 +03:00
Chocobo1
3fb4e4d293 GHA CI: build libtorrent as a static library
Since appimage is bundling the libraries it make sense to embed libtorrent statically into qbt binary.
Another side effect is now qbt binary includes debug symbols from libtorrent too (which I consider a good thing for debugging). Previously appimage seems to (unnecessarily) strip the libtorrent debug symbols.

PR #19014.
2023-05-25 13:08:53 +08:00
Vladimir Golovnev
f5a4065101 Raise minimum libtorrent versions
PR #19011.
2023-05-25 06:31:28 +03:00
xavier2k6
ba93d55a6d GHA CI: Bump libtorrent version(s)
PR #19006.
2023-05-24 05:10:57 +03:00
Vladimir Golovnev
a59301712e Avoid race condition when waking worker thread
PR #19005.
2023-05-23 02:22:16 +03:00
Chocobo1
b406d669b3 Bump python version minimum requirement
PR #18996.
2023-05-22 12:37:02 +08:00
Chocobo1
4ef8f39f23 Use python isolate mode
This (more or less) avoids user's environment variables tampering the
search process.
And also remove usages of `eval()` and `exec()`.

PR #18995.
2023-05-21 14:04:44 +08:00
Vladimir Golovnev
34802362ad Fix inconsistent background of filters widget
PR #18956.
Fixes regression of #18918.
2023-05-11 09:11:11 +03:00
Vladimir Golovnev
c10f1f0ad2 Consider explicitly specified parameters when resolving optional ones
PR #18955.
Closes #18951.
2023-05-11 09:09:57 +03:00
Vladimir Golovnev
58ae98026b Try to detect system wake-up event
PR #18934.
Closes #17898.
2023-05-10 15:02:15 +03:00
Chocobo1
32a55551fe Merge pull request #18936 from Chocobo1/tidy
Code clean up
2023-05-08 13:11:11 +08:00
Vladimir Golovnev
7880fe8440 Merge pull request #18824 from glassez/atp-edit
Unify/improve "add torrent parameters" template editing UI
2023-05-07 19:38:35 +03:00
Vladimir Golovnev (Glassez)
bb959bda8c Add helpers for suggesting torrent paths 2023-05-07 16:34:56 +03:00
Vladimir Golovnev (Glassez)
d629c77184 Improve FlowLayout to support vertical alignment 2023-05-07 16:34:56 +03:00
Vladimir Golovnev (Glassez)
b953d223e4 Use check box to represent "Skip checking" 2023-05-07 16:34:56 +03:00
Vladimir Golovnev (Glassez)
6fa53b5ed8 Override add torrent params in a more comprehensible way 2023-05-07 16:34:56 +03:00
Vladimir Golovnev (Glassez)
c777ed3299 Correctly use fallback value for "Add to top of queue" option 2023-05-07 16:34:56 +03:00
Vladimir Golovnev (Glassez)
341b2f345a Use FlowLayout in AddTorrentParamsWidget 2023-05-07 16:34:55 +03:00
Vladimir Golovnev (Glassez)
905f141657 Revamp "Automated RSS downloader" dialog 2023-05-07 16:34:52 +03:00
Vladimir Golovnev (Glassez)
0a87bb368f Extract "add torrent params" serialization code 2023-05-07 16:33:32 +03:00
Vladimir Golovnev (Glassez)
93a1e58554 Revamp "Watched folder options" dialog 2023-05-07 16:33:32 +03:00
Vladimir Golovnev (Glassez)
0cc29f1851 Implement "Add torrent params" editing widget 2023-05-07 16:33:20 +03:00
Chocobo1
81daad92ec Combine identical branches 2023-05-07 19:41:55 +08:00
Chocobo1
41be7e9bbe Make function const 2023-05-07 19:41:55 +08:00
Chocobo1
179a61d75e Add curly braces 2023-05-07 19:41:55 +08:00
Chocobo1
73134d5f4d Initialize member variables 2023-05-07 16:30:56 +08:00
Chocobo1
29c05ed3e8 Use std::make_unique 2023-05-07 14:38:03 +08:00
Chocobo1
e375f3ee0b Use reference 2023-05-07 14:38:02 +08:00
Chocobo1
b185153254 Merge pull request #18931 from Chocobo1/tidy
Clean up code
2023-05-07 14:20:47 +08:00
Chocobo1
e7e5c38384 Remove superfluous header include 2023-05-06 16:48:49 +08:00
Chocobo1
9a00839a75 Simplify code 2023-05-06 16:35:13 +08:00
Chocobo1
79e85d01fa Mark move functions as noexcept 2023-05-06 16:35:13 +08:00
Chocobo1
e408973ee6 Add pointer qualifications to auto-typed variables 2023-05-06 16:35:13 +08:00
Chocobo1
8c9b6e2f2d Use reference whenever possible 2023-05-06 16:35:13 +08:00
Chocobo1
5b43782f58 Remove redundant virtual specifier 2023-05-06 16:35:12 +08:00
Chocobo1
2059825597 Don't use instance for accessing static functions 2023-05-06 16:35:12 +08:00
Chocobo1
e1be46820b Remove redundant initialization 2023-05-06 16:35:12 +08:00
Chocobo1
8219b1f695 Use default constructor, destructor 2023-05-06 16:35:12 +08:00
Chocobo1
3fbe380582 Remove redundant function declaration 2023-05-05 14:51:02 +08:00
Chocobo1
5f00d42a49 Drop superfluous const 2023-05-05 14:51:02 +08:00
Chocobo1
15de7aed9a Use perfect forwarding 2023-05-05 14:51:02 +08:00
Chocobo1
5c38cc00d9 Add support for clang-tidy 2023-05-05 14:51:02 +08:00
Vladimir Golovnev
5a1dcbae9c Don't make assertion about 3rd party logic
PR #18913.
2023-05-03 07:24:52 +03:00
Vladimir Golovnev
7c6a852f85 Revamp TransferListFiltersWidget implementation
Avoid using style sheets to better support color mode switching.

PR #18918.
2023-05-03 07:24:03 +03:00
Vladimir Golovnev
147b22ddd3 Revamp LineEdit implementation
PR #18917.
2023-05-03 07:23:19 +03:00
Vladimir Golovnev
d83b2a6131 Make sure ResumeSessionContext is destroyed before start processing
PR #18912.
2023-05-02 09:48:49 +03:00
Vladimir Golovnev
821e946bbe Remove outdated code
PR #18908.
2023-05-01 08:29:35 +03:00
Deltadroid
634eb4a183 Replace status_t with disk_status
libtorrent 2.1 has made the following change:
"make status_t a proper flag type, to clean up oversized_file indication
from disk subsystem"

PR #18879.
2023-04-30 10:12:15 +03:00
Vladimir Golovnev
758ea7edca Improve logging of running external program
PR #18901.
2023-04-30 10:10:03 +03:00
Vladimir Golovnev
1bd499565e Completely initialize native status on torrent creation
PR #18900.
2023-04-30 10:09:09 +03:00
Chocobo1
be9ec5a329 Merge pull request #18877 from Chocobo1/ci
Clean up CI scripts
2023-04-29 13:36:41 +08:00
Chocobo1
df895cb2a7 Improve script compatibility
Now the script is conforms to POSIX shell script which is universal on
all linux.
Also make it executable.
2023-04-24 13:31:19 +08:00
Chocobo1
3b72859980 Bump various action versions 2023-04-24 13:18:17 +08:00
Chocobo1
69df85f564 Move script into its own subfolder 2023-04-24 13:18:10 +08:00
Chocobo1
1f1da32371 Rename CI script
See: https://stackoverflow.com/questions/22268952/what-is-the-difference-between-yaml-and-yml-extension
2023-04-24 13:18:08 +08:00
xavier2k6
cddf8c199c GHA CI: Update some dependencies
PR #18870.
2023-04-24 13:15:46 +08:00
Chocobo1
bbd5ed1142 Switch URLs to https
PR #18876.
2023-04-23 15:09:58 +08:00
sledgehammer999
0f033ec9c8 Regenerate translation files 2023-04-20 03:34:29 +03:00
Chocobo1
7397c80837 WebUI: improve 'exporting torrent' behavior
Don't stop the whole operation when a torrent doesn't exists and try to export the remaining
existing ones.

PR #18858.
2023-04-18 13:59:55 +08:00
Vladimir Golovnev
51132c817b Improve move storage handling
PR #18857.
Closes #18795.
2023-04-18 08:06:18 +03:00
Chocobo1
1fe006d16f Merge pull request #18853 from Chocobo1/exportTorrent
Work around Chrome download limit
2023-04-17 00:12:30 +08:00
Sentox6
bd31eddb94 Inhibit system sleep while torrents are moving
PR #18783.
2023-04-16 18:09:34 +03:00
DivineHawk
0defb7d79d WebUI: Use workaround for IOS file picker
PR #18837.
Fixes #18683.
2023-04-16 14:30:30 +03:00
七海千秋
1e400df324 Set "SameSite=None" if CSRF Protection is disabled
PR #18843.
2023-04-16 14:27:49 +03:00
Chocobo1
9ea48539b4 Inline variable declared in header 2023-04-15 14:53:13 +08:00
Chocobo1
d63e0ad78f Work around Chrome download limit
Closes #18775.
2023-04-15 14:51:27 +08:00
Vladimir Golovnev
eaee38a19e Disable UPnP for web UI by default
PR #18832.
2023-04-13 06:22:18 +03:00
Vladimir Golovnev
b3e9c46eff Don't miss saving "download path" in SQLite storage
PR #18844.
Closes #18842.
2023-04-13 06:18:09 +03:00
Chocobo1
5dcc14153f Move feature macro declaration to build scripts
PR #18825.
2023-04-10 13:38:00 +08:00
Chocobo1
4a66d705b8 Merge pull request #18812 from Chocobo1/buf
Use KiB unit for socket buffer sizes
2023-04-09 22:17:39 +08:00
Chocobo1
9d7fcea5d6 Describe special values in label
https://github.com/qbittorrent/qBittorrent/pull/18806#discussion_r1158346210
https://github.com/qbittorrent/qBittorrent/pull/18812#issuecomment-1500303976
2023-04-08 15:46:02 +08:00
Vladimir Golovnev
b8cd614775 Allow to edit RSS feed URL
PR #18807.
Closes #5489.
2023-04-07 14:22:50 +03:00
Chocobo1
a9ab2d9b9e Use KiB unit for socket buffer sizes
https://github.com/qbittorrent/qBittorrent/pull/18806#issuecomment-1499894871
2023-04-07 18:33:24 +08:00
Chocobo1
cecf2d28e6 Merge pull request #18806 from Chocobo1/buf
Expose 'socket send/receive buffer size' options
2023-04-07 18:19:46 +08:00
Chocobo1
a01f1014b9 Inline variable defined in header 2023-04-05 18:32:18 +08:00
Chocobo1
77411760a0 Expose 'socket send/receive buffer size' options
Closes #18794.
2023-04-05 18:11:13 +08:00
Vladimir Golovnev
0dcb65bb7c Add option to auto hide zero status filters
* Extract transfer list filter classes into separate files
* Add option to auto hide zero status filters

PR #18801.
Closes #13996.
2023-04-03 10:38:08 +03:00
Vladimir Golovnev
d40be79c69 Implement torrent tags editing dialog
PR #18797.
2023-04-03 10:36:28 +03:00
Bartu Özen
b55d4b1733 WebUI: Implement subcategories
PR #18740.
2023-04-02 11:02:22 +03:00
Chocobo1
40e28930a4 GHA CI: add missing dll
Closes #18383.
PR #18792.
2023-04-02 13:30:26 +08:00
Chocobo1
5a3579a3f9 Merge pull request #18779 from Chocobo1/webui
WebUI: Add checker for html
2023-03-30 13:24:21 +08:00
Chocobo1
9de8abadb6 Fix wrong end tag 2023-03-28 22:26:11 +08:00
Chocobo1
05c5cdab96 Add alternative text for images 2023-03-28 22:20:37 +08:00
Chocobo1
1e1c1725ab Always use quotes for attributes
This is to unify coding style.
2023-03-28 22:20:37 +08:00
Chocobo1
b5c57af869 Escape special characters properly 2023-03-28 22:20:37 +08:00
Chocobo1
eb875ac8c1 Add attributes explicitly 2023-03-28 22:20:37 +08:00
Chocobo1
a36358d7d0 Remove deprecated rules 2023-03-28 22:20:37 +08:00
Chocobo1
679e592a5c Add checker for html 2023-03-28 22:20:33 +08:00
Vladimir Golovnev
b922441a7c Correctly handle redirections
PR #18771.
Fixes regression introduced by #18528.
Closes #18764.
2023-03-28 06:26:40 +03:00
Vladimir Golovnev
941c587c68 Don't forget to clear I2P peer items
PR #18753.
2023-03-24 14:06:46 +03:00
Vladimir Golovnev
77bd09bb8b Use tray icon from system theme only if option is set
PR #18733.
2023-03-22 13:51:39 +03:00
Vladimir Golovnev
8bcac1bed2 Reduce default file pool size
PR #18734.
2023-03-21 08:39:06 +03:00
Vladimir Golovnev
cdded6cef7 Add (experimental) I2P support
PR #18717.
Closes #16257.
2023-03-21 08:33:46 +03:00
thalieht
8cbe4a571c Initialize a few groupboxes' check state after their children
PR #18727.
2023-03-20 10:49:25 +03:00
Vladimir Golovnev
ee9d2173e0 Combine all the column filter related widgets
PR #18726.
2023-03-20 08:23:41 +03:00
Chocobo1
a450a7c6e1 Delegate string hashing to standard library
Since standard library could have platform dependent specialized hashing functions.
Also the main idea is to let `qHash` handle whatever integer type `std::hash` returns and mix it with `seed` accordingly.

PR #18715.
2023-03-18 14:09:35 +08:00
thalieht
d41a77841d Save UI Theme Dialog size
PR #18709.
2023-03-17 22:15:56 +03:00
thalieht
ae06daba6a Correctly initialize group box children as disabled
PR #18710.
2023-03-17 22:13:19 +03:00
Vladimir Golovnev
77aa85fbd3 Provide UI Theme editor
PR #18655.
2023-03-16 10:03:05 +03:00
Vladimir Golovnev
989b1e6c2c Improve finished torrent handling
PR #18704.
Closes #18694.
2023-03-16 09:45:49 +03:00
Vladimir Golovnev
9ef23d524d Prevent incorrect log message about torrent content deletion
PR #18692.
Closes #18689.
2023-03-16 09:40:21 +03:00
Chocobo1
f16e903623 Merge pull request #18687 from Chocobo1/codeql
GHA CI: add CodeQL scanning
2023-03-15 15:21:27 +08:00
Tom
0bb0829a9a Allow to filter torrent list by save path
PR #18600.
2023-03-15 09:46:22 +03:00
Chocobo1
fa30b70453 Fix code defects 2023-03-14 15:04:54 +08:00
Christian Danížek
e4f90730b2 NSIS: Add Slovak translation
PR #18676.
2023-03-13 12:04:47 +03:00
Chocobo1
6fd522472c GHA CI: drop needless syntax
https://docs.github.com/en/actions/learn-github-actions/expressions#about-expressions
>When you use expressions in an if conditional, you may omit the
>expression syntax (${{ }}) because GitHub automatically evaluates the if conditional as an expression.
2023-03-12 14:27:10 +08:00
Chocobo1
0f32de9d8c GHA CI: add CodeQL scanning
This enable codebase scanning for C++ and JavaScript languages.

https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/about-code-scanning-with-codeql
https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/customizing-code-scanning
2023-03-12 14:27:10 +08:00
thalieht
f630d84858 WebUI: Add "Add to top of queue" option
PR #18660.
2023-03-08 18:58:42 +03:00
Vladimir Golovnev
ee6f699b48 Apply adjacent changes within single transaction
PR #18635.
2023-03-04 08:46:19 +03:00
Vladimir Golovnev
ce9bdaef5c Correctly check for database needs to be updated
* Correctly check for database needs to be updated
* Create index only if not exists
* Double check whether database needs to be updated

PR #18638.
2023-03-02 20:31:38 +03:00
Vladimir Golovnev
37c04fdeed Prevent possible problem of using incomplete type
PR #18639.
2023-03-02 06:18:51 +03:00
Vladimir Golovnev
c51aa2d573 Index torrents table by queue position
PR #18623.
2023-02-28 08:57:51 +03:00
sledgehammer999
b922e1ae73 Sync translations from Transifex and run lupdate 2023-02-28 00:20:58 +02:00
sledgehammer999
dd48f62d66 Migrate transifex tool config to new version 2023-02-28 00:10:16 +02:00
Vladimir Golovnev
f5b5312cf0 Merge pull request #18528 from glassez/proxy
Allow to use proxy per subsystem
2023-02-27 20:34:51 +03:00
Vladimir Golovnev
58a654a70f Reject requests that contain backslash in path
PR #18626.
Closes #18618.
2023-02-27 16:50:50 +03:00
Vladimir Golovnev
ff0f3b4975 WebAPI: Allow to set read-only directory as torrent location
PR #18613.
Closes #18480.
2023-02-27 09:09:33 +03:00
Vladimir Golovnev
8df68ac878 Prevent RSS folder from being moved into itself
PR #18619.
Closes #18446.
2023-02-27 09:08:18 +03:00
Vladimir Golovnev
2f9b313287 Perform own tracking of files progress
PR #18597.
2023-02-26 14:44:58 +03:00
Vladimir Golovnev (Glassez)
cbf591a8b5 Improve SOCKS5 error messages 2023-02-26 14:27:59 +03:00
Vladimir Golovnev (Glassez)
96da685e5d Expand the scope of "Proxy hostname lookup" option 2023-02-26 14:27:59 +03:00
Vladimir Golovnev (Glassez)
6ac14d0c57 Allow to use proxy per subsystem 2023-02-26 14:27:41 +03:00
Vladimir Golovnev (Glassez)
4745a40f0b Allow to specify proxy option per request 2023-02-25 17:30:26 +03:00
Vladimir Golovnev (Glassez)
8993d87b32 Let Search Engine handle its proxy usage 2023-02-25 17:25:41 +03:00
brvphoenix
8df80b67f9 GHA CI: Add missing dependencies
PR #18596.
2023-02-19 17:02:59 +03:00
loligans
466314675c WebUI: Add multi-file renaming
PR #18287.
Closes #16239.
2023-02-19 14:07:55 +03:00
Hanabishi
d75fd3fcde Show filtered port numbers in logs
PR #18544.
2023-02-18 08:14:27 +03:00
Chocobo1
7ae83df5a5 GHA CI: compress debug symbols
The result binary is smaller.
2023-02-17 13:00:10 +08:00
Chocobo1
19f55512c1 GHA CI: don't overwrite system default compile flags
System might have some default compile flags which are crucial for security hardening so we
should append our flags instead of overwriting them.
2023-02-17 13:00:10 +08:00
Chocobo1
6e25db444e GHA CI: revert "[CI Ubuntu] Strip installed components"
For tester convenience, the binaries should ship with debug symbols.
This reverts commit b8aa9e5609.
2023-02-17 13:00:10 +08:00
Chocobo1
d2c4b69f47 GHA CI: use least permission level
`actions: write` is required by Chocobo1/setup-ccache-action.
`pull-requests: write` is required by actions/stale.
https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#permissions
2023-02-17 13:00:10 +08:00
Chocobo1
4170b4e21b GHA CI: speed up package installation on macOS
Setup time is shortened by cutting down unnecessary operations.

https://docs.brew.sh/Manpage#environment
2023-02-17 13:00:10 +08:00
Vladimir Golovnev
9fb9ca47f6 Update the cached state once recheck is started
We have to force update the cached state, otherwise someone will be able to get an incorrect one during the interval until the cached state is updated in a regular way.

PR #18579.
Closes #18559.
2023-02-17 07:12:56 +03:00
Luka Čelebić
917190d936 Add shortcut for "Ban peer permanently" function
PR #18576.
2023-02-17 07:09:23 +03:00
Vladimir Golovnev
1e913f46f0 Rename isSeed to isFinished to correctly represent its meaning
PR #18580.
2023-02-17 07:08:00 +03:00
Vladimir Golovnev
4c0ebc0e0f Access some more data in a non-blocking manner
* Cache URL seeds to access in a non-blocking manner
* Provide non-blocking way to create magnet URI for torrent

PR #18572.
2023-02-16 08:49:16 +03:00
shitcod3r
1b0f5b8567 NSIS: Add Uzbek translation
PR #18568.
2023-02-15 11:58:06 +03:00
Chocobo1
6a4bb5c1b7 Migrate away from unsafe function
MooTools More has CVE-2021-20088 and qbt is affected by it by using the
unsafe function call `String.parseQueryString()`, so migrate away from
it.

PR #18554.
2023-02-15 13:59:21 +08:00
Burak Yavuz
3fea9f5a33 NSIS: Update Turkish translation
PR #18552.
2023-02-14 08:30:46 +03:00
Vladimir Golovnev
7600f59f3a Prevent precise timers from being used when unnecessary
The implementation of QTimer::singleShot() uses Qt::PreciseTimer if interval is less than 2 seconds. This isn't mentioned in the docs.
Qt::PreciseTimer increases the system's timer resolution which negatively affects power consumption.

PR #18555.
Closes #18350.
2023-02-14 08:26:08 +03:00
sledgehammer999
915121a0dd Sync translations from Transifex and run lupdate 2023-02-12 01:09:18 +02:00
Vladimir Golovnev
1be5b3abd8 Revamp torrent content widget
PR #18162.
2023-02-11 15:22:01 +03:00
brvphoenix
e37661d53a WebUI: Add filelog settings
PR #18506.
Closes #17421.
2023-02-10 20:12:22 +03:00
Vladimir Golovnev
d06f78dbbd Improve sync API performance
PR #18394.
2023-02-10 17:16:46 +03:00
Vladimir Golovnev
5d4766edbe Allow to add new torrents to queue top
PR #18518.
Closes #11599.
2023-02-10 17:15:41 +03:00
Vladimir Golovnev
72ac92ec68 Allow to use another icons in dark mode
PR #18435.
2023-02-07 22:07:15 +03:00
sledgehammer999
22ea508ff6 Merge pull request #18500 from sledgehammer999/tls_webui
Harden the SSL/TLS web server
2023-02-06 22:40:44 +02:00
sledgehammer999
b2213ded6d Support TLS 1.2+ only in the server
Closes #18122
2023-02-06 10:32:01 +02:00
sledgehammer999
1ea2fe5b8d Blacklist bad ciphers for TLS in the server
Prevents the ROBOT attack.
Closes #18483
2023-02-06 10:32:01 +02:00
Vladimir Golovnev
7227d2b2b2 Revert changes of conflict resolution strategy on automatic move
PR #18516.
Closes #18297.
Closes #18495.
2023-02-05 09:29:43 +03:00
Vladimir Golovnev
0dcbf9f698 Improve command line parameters dispatching
Encapsulate parameters dispatching in Application class.
Avoid serializing parameters when it is not necessary.

PR #18469.
2023-02-02 10:02:51 +03:00
Vladimir Golovnev
09e58df03f Don't increase limits when prefetching metadata for added magnets
Adjusting limits was made based on the belief that "forced" torrents (internally used for prefetching metadata)
are still under limits, but ignore only the queue. This is not really the case. "Forced" torrents ignore the limits
like "maximum active torrents/downloads", so adjusting limits is not required, and what's more, it really causes the
problem of unexpectedly activated previously queued torrents when adding some magnet using "Add new torrent" dialog.

PR #18503.
Fixes #18490.
2023-02-02 06:16:32 +03:00
sledgehammer999
d256db5072 Merge pull request #18466 from sledgehammer999/icon_for_status_pause
Use previous color for pause icon for indicating status
2023-01-27 20:27:48 +02:00
sledgehammer999
10153f0063 Use previous color for pause icon for indicating status
Affects transfer list and status filters
Related to PR #18110
2023-01-27 18:45:07 +02:00
sledgehammer999
c6a1b977b3 Merge pull request #18456 from sledgehammer999/win_shorcut_cwd
Fix PDB loading for valid stacktraces
2023-01-27 17:52:39 +02:00
sledgehammer999
870bb42e4f [WebUI] Use new pause icon color for toolbar/menu
This the webui part of PR #18110
2023-01-27 17:42:48 +02:00
sledgehammer999
b61c7b7220 Adjust env variable for PDB discovery 2023-01-26 13:42:09 +02:00
Vladimir Golovnev
c58fb92365 Suppress warning when session cookie name isn't overridden
PR #18455.
2023-01-26 07:00:20 +03:00
sledgehammer999
5e952a561b NSIS: Set shortcut's workind dir to install path 2023-01-25 20:35:21 +02:00
sledgehammer999
ca72360b6f Merge pull request #18432 from sledgehammer999/chinese_fix
Migrate setting about Simplified Chinese locale
2023-01-25 01:17:54 +02:00
sledgehammer999
630b4ed3b9 Migrate settings much earlier 2023-01-24 10:23:12 +02:00
Deividas
cba9680ef9 NSIS: Update Lithuanian translation
PR #18434.
2023-01-23 14:34:36 +03:00
Vladimir Golovnev
2310dcd136 Reload system tray icon to replace menu
PR #18250.
Closes #18074.
2023-01-22 16:48:58 +03:00
Nick Korotysh
ee00a80796 Drop extra semicolon
Fixes build with -pedantic flag.

PR #18431.
2023-01-22 14:47:19 +03:00
sledgehammer999
051bac5e59 Migrate setting about Simplified Chinese locale
Related to PR #17978
2023-01-22 02:31:58 +02:00
Vladimir Golovnev
771c58d000 WebAPI: Allow to specify session cookie name
PR #18384.
Closes #18329.
2023-01-17 09:31:17 +03:00
Vladimir Golovnev
53cec6db09 Provide scaled pixmaps by UIThemeManager
Avoid leaking the paths of the theme resource files outside of the theme support implementation.

PR #18269.
2023-01-17 09:29:00 +03:00
Midhun V Nadh
43e059801e Remove suggestions while searching for torrents
Don't want torrent search history to pop up next time you try to search for torrents, right?
There are people who would search for 18+ content and what they searched would load up next time they are about to search.

PR #18285.
2023-01-16 15:12:35 +03:00
Nowshed H. Imran
ce35a06ec3 Fix Pause icon
PR #18110.
2023-01-16 15:01:20 +03:00
Vladimir Golovnev
32e4371208 Improve startup window state handling
Replace current "Start qBittorrent minimized" option with "Initial window state" that allows to start qBittorrent as "hidden in system tray" while retaining regular "minimize to panel" functionality.

PR #18252.
Closes #487.
2023-01-16 14:57:56 +03:00
brvphoenix
0d376e7fd6 WebUI: Add log viewer
The javascript implementation of multi-select menu is from the source
https://github.com/PhilippeMarcMeyer/vanillaSelectBox. It is licensed
under the MIT License. Some minor fixes is made to pass the lint.

Co-authored-by: brvphoenix <30111323+brvphoenix@users.noreply.github.com>
Co-authored-by: ttyS3 <ttys3.rust@gmail.com>

PR #18290.
2023-01-16 14:55:44 +03:00
Vladimir Golovnev
2b20d5b260 Fix startup performance on Qt5
Use more appropriate container (QList) for resume data queue buffer.
QVector in Qt5 has poor performance of the first element taking operation,
which is used to process the resume data queue. In Qt6, QVector is just an
alias for QList, so there was no problem there.

PR #18387.
Fixes #18341.
2023-01-16 14:45:12 +03:00
Vladimir Golovnev
719e4afd8c Remove confusing helpers from Session interface
Such helpers do not make practical sense, since they can be trivially implemented on top of the base interface, but at the same time they can lead to undesirable consequences when some calling code requires slightly different behavior than another.

PR #18367.
Fixes #18338.
2023-01-16 14:43:36 +03:00
Vladimir Golovnev
9cdf660ddb Use QThreadPool to invoke free disk space checking jobs
Prevent the creation of an excessive number of threads.
PR #18347.
Closes #18202.
2023-01-16 14:31:49 +03:00
Vladimir Golovnev
5dbccf3473 Add all torrents passed via the command line
PR #18296.
Closes #18289.
2023-01-16 06:54:02 +03:00
Vladimir Golovnev
8db2d04dbb Allow to modify default UI theme
PR #18214.
2023-01-14 14:02:20 +03:00
thalieht
209850064a WebUI: Add "Resume data storage type" option
PR #18357.
2023-01-13 10:58:46 +03:00
brvphoenix
e628b7d527 WebUI: Add missing icons
PR #18380.
2023-01-13 10:52:53 +03:00
Fidel Selva
61dbb211c0 WebUI: Improve hotkeys
PR #18326.
Fixes #18325.
Fixes #14033.
2023-01-06 22:17:15 +03:00
Jason Carr
71f4a5667c WebUI: change order of accepted types of file input
PR #18286.
2022-12-28 13:20:02 +03:00
brvphoenix
b33dc7d831 Unify the way to generate the language list in WebUI and GUI
PR #17994.
2022-12-25 16:44:37 +03:00
qbittorrentfan
c5a4a0db2c properties endpoint returns name/torrentID
PR #18218.
2022-12-25 16:41:55 +03:00
sotiris-bos
b9e045e80b WebAPI: Expose "IS PRIVATE" flag
PR #18227.
Closes #16052.
2022-12-25 16:41:00 +03:00
Vladimir Golovnev
cfd0c5433e Re-allow to use icons from system theme
PR #18195.
2022-12-25 16:25:56 +03:00
Vladimir Golovnev
ebad387c1a Apply correct tab order to Category options dialog
Also pre-select (sub)category name for editing when dialog is opened for creating new (sub)category.

PR #18270.
Closes #18265.
2022-12-25 16:14:59 +03:00
xavier2k6
3f39bd9f35 GHA CI: Bump Boost version to 1.81.0 on Windows/macOS
PR #18279.
2022-12-24 20:03:12 +03:00
Jonatan
f8236eb397 NSIS: Update Swedish translation
PR #18240.
2022-12-22 15:01:23 +03:00
David Xuang
23a56c95e3 Prevent incorrect line breaking
PR #18236.
2022-12-22 14:58:26 +03:00
Nowshed H. Imran
6f8aa07a10 Fix icon colors inconsistencies
PR #18226.
Fixes #18163.
Fixes #18222.
2022-12-22 14:14:29 +03:00
Vladimir Golovnev
594f9e8632 Use "additional trackers" when metadata retrieving
This can help when the DHT nodes are few.

PR #18251.
Closes #18244.
2022-12-22 08:21:29 +03:00
Vladimir Golovnev
aeae065007 Correctly count the number of torrents in subcategories
PR #18261.
Closes #18137.
2022-12-22 08:19:33 +03:00
Vladimir Golovnev
b12fdcf018 Correctly detect drive letter in path
PR #18258.
Closes #18224.
2022-12-20 07:14:31 +03:00
Vladimir Golovnev
84fabf14c8 Merge pull request #18034 from glassez/fetch-async
Fetch data asynchronously
2022-12-15 06:59:29 +03:00
Vladimir Golovnev
0ec47db9cd Don't drop !qB extension when rename incomplete file
PR #18186.
Closes #18181.
2022-12-15 06:57:07 +03:00
sledgehammer999
3cf0004665 Merge pull request #18200 from sledgehammer999/ci_appimage
CI: Build AppImage
2022-12-14 10:17:43 +02:00
Vladimir Golovnev (Glassez)
40258f6a2f Stop async worker at correct place 2022-12-14 10:42:40 +03:00
Vladimir Golovnev (Glassez)
b335114219 Use better method to set bit 2022-12-14 10:41:04 +03:00
Vladimir Golovnev (Glassez)
998b08f5d8 Set metadata asynchronously 2022-12-14 10:41:04 +03:00
Vladimir Golovnev (Glassez)
991c30943a Allow to fetch data asynchronously 2022-12-14 10:41:04 +03:00
sledgehammer999
ad2be39c33 [CI Ubuntu] Build AppImage
Upload an AppImage artifact on CI builds. This AppImage is a
simplified version of the official one. It is meant to help
with debugging PRs that fix issues.
2022-12-14 03:28:05 +02:00
BallsOfSpaghetti
c3936cd4b6 Add "Rename rule" button to RSS Downloader
PR #18141.
2022-12-11 11:18:40 +03:00
Chocobo1
d2e595aac3 Remove docker information
It has been moved to its own repo: https://github.com/qbittorrent/docker-qbittorrent-nox

PR #18199.
2022-12-11 11:24:13 +08:00
sledgehammer999
b8aa9e5609 [CI Ubuntu] Strip installed components 2022-12-10 16:53:42 +02:00
Torsten Schwarz
2109c4e1ae WebUI: Make rename file dialog resizable
PR #18154.
2022-12-10 10:17:21 +03:00
Vladimir Golovnev
ac3ad17a9e Ensure thread is stopped before deleting QThread
PR #18037.
2022-12-08 08:37:14 +03:00
Vladimir Golovnev
31c7306bd2 Correctly load folder based UI theme
PR #18173.
2022-12-08 08:33:55 +03:00
Chocobo1
4741aab7a3 Merge pull request #18094 from Chocobo1/color
Revise text color for completed status
2022-12-02 13:17:00 +08:00
Vladimir Golovnev
679e3b8bea WebAPI: return paths using platform-independent separator format
PR #18118.
Closes #18096.
2022-12-01 08:16:43 +03:00
Vladimir Golovnev
25ea0d274b Destroy desktop integration at correct place
Otherwise it is destructed in QObject destructor, i.e. after GUI application is already destructed.
This can be related to some problems with system tray icon.

PR #18108.
Closes #18093.
2022-11-30 20:09:51 +03:00
sledgehammer999
12b58be8c2 Merge pull request #18104 from sledgehammer999/remove_dead_code
Remove dead code
2022-11-30 15:19:54 +02:00
Chocobo1
e4f1485c82 Fix wrong color code
Must have been a copy-paste error...
2022-11-30 15:23:49 +08:00
Vladimir Golovnev
1b2ff0f6f8 Handle tracker status updates asynchronously
* Add a helper for performing jobs in Session context
* Handle tracker status updates asynchronously

PR #18010.
2022-11-30 09:54:30 +03:00
Vladimir Golovnev
a31755bbc8 Switch SQLite to use WAL journaling mode
PR #18048.
2022-11-30 09:50:26 +03:00
sledgehammer999
311e0f21eb Remove dead code
Leftover from the system tray code refactoring.
2022-11-29 21:30:26 +02:00
sledgehammer999
b86366f243 Merge pull request #18083 from now-im/patch-1
Fix Speed limit icon size
2022-11-29 17:27:16 +02:00
sledgehammer999
58d1c80b12 Merge pull request #18076 from thalieht/iconqueued
WebUI: Fix missing "queued" icon
2022-11-29 17:26:38 +02:00
Chocobo1
182915f801 Revise color for completed status
Now it uses the purple color which matches the completed status icon color.

Related: #18078.
2022-11-29 07:27:00 +08:00
sledgehammer999
50c08e55cd Merge pull request #18086 from sledgehammer999/translation_fix
Remove trailing newline from translation file
2022-11-28 21:05:09 +02:00
sledgehammer999
4307a09621 Remove trailing newline from translation file
I also fixed it on Transifex.
2022-11-28 18:41:26 +02:00
Nowshed H. Imran
d531d6d221 Fix Speed limit icon size
Fixes #18067.
2022-11-28 19:59:09 +06:00
thalieht
4cf94a6fa0 WebUI: Fix missing "queued" icon 2022-11-28 01:45:41 +02:00
sledgehammer999
4cb60f4870 Sync translations from Transifex and run lupdate 2022-11-23 21:22:54 +02:00
Vladimir Golovnev
d82edb2838 Bump to 4.6.0alpha1 2022-11-21 22:54:37 +03:00
sledgehammer999
c91eefe469 Update Changelog 2022-11-21 01:13:29 +02:00
sledgehammer999
327affa340 Merge pull request #18002 from sledgehammer999/v450_changelog
Update Changelog
2022-11-20 22:11:01 +02:00
sledgehammer999
4e7c2589e4 Update Changelog 2022-11-20 21:01:54 +02:00
sledgehammer999
17ce07230d Merge pull request #18038 from glassez/tree-update
Revert "Use another workaround to update files tree view"
2022-11-20 20:57:27 +02:00
Vladimir Golovnev
fda6c9a3d9 Prevent object from being used after destruction
PR #18031.
2022-11-20 15:03:36 +03:00
Vladimir Golovnev (glassez)
92af2922c7 Revert "Use another workaround to update files tree view"
This reverts commit 0f82c16936.
2022-11-19 21:44:15 +03:00
Vladimir Golovnev
1cee69da6c Don't miss to store metadata of new torrent
PR #18033.
2022-11-19 13:33:38 +03:00
Vladimir Golovnev
f54b66eb75 Merge pull request #17996 from glassez/non-blocking
Perform some unavoidable blocking calls asynchronously
2022-11-14 20:55:12 +03:00
Vladimir Golovnev (Glassez)
3563bad5fc Revamp implementation of port forwarder 2022-11-14 08:28:35 +03:00
Vladimir Golovnev (Glassez)
1f3f96f7aa Set metadata asynchronously 2022-11-14 08:27:01 +03:00
Vladimir Golovnev (Glassez)
7022adb89b Change current IP filter asynchronously 2022-11-14 08:26:49 +03:00
Vladimir Golovnev (Glassez)
bac57de5f5 Update listening status using native session extension 2022-11-14 08:22:12 +03:00
Vladimir Golovnev
bdd56a52d3 Destroy object within appropriate thread
PR #18008.
2022-11-13 08:28:33 +03:00
Vladimir Golovnev
dcdbd02102 Delete database file only after it is released
PR #18005.
2022-11-13 08:27:48 +03:00
Vladimir Golovnev
b68c4e2106 Save correct resume data when added new torrent
PR #18003.
2022-11-13 08:26:25 +03:00
Vladimir Golovnev
67cb75e9d3 Merge pull request #18001 from glassez/update-tree
Use another workaround to update files tree view

This is alternative approach to #17786. It uses the similar workaround as was used a long time with Qt5 and stoped working with Qt6 so it is adjusted in this PR.

Also this fixes content model resetting handling.
2022-11-12 14:00:25 +03:00
Vladimir Golovnev
f9eefe866c Merge pull request #17992 from glassez/preloading-magnet
Improve handling of preloading metadata.
This also allows to avoid blocking calls when performing some actions.
2022-11-10 19:22:20 +03:00
Vladimir Golovnev (Glassez)
c636618cf3 Correctly handle model resetting 2022-11-10 13:32:48 +03:00
Vladimir Golovnev (Glassez)
0f82c16936 Use another workaround to update files tree view 2022-11-10 13:31:08 +03:00
Chocobo1
d328eeb5be Merge pull request #17980 from Chocobo1/model
Reserve space before appending elements
2022-11-10 17:24:17 +08:00
Chocobo1
d90ea0d3be Move increment out of loop 2022-11-10 17:18:28 +08:00
Chocobo1
e7ece66717 Clean up code 2022-11-09 23:17:22 +08:00
Vladimir Golovnev
6c9c40fd7c Avoid blocking call when changing libtorrent session settings
We don't really need to get currently used settings pack in order to apply changes to session settings. It is enough to apply settings pack that contains only updated settings.

PR #17989.
2022-11-09 08:02:34 +03:00
Chocobo1
529c1ec9f4 Reserve space before appending elements 2022-11-08 13:50:03 +08:00
Chocobo1
93429840c8 Fix typos 2022-11-08 13:50:01 +08:00
Vladimir Golovnev (Glassez)
6aee7f95b7 Add torrent for preloading magnet asynchronously 2022-11-08 08:29:16 +03:00
Vladimir Golovnev (Glassez)
0b70ccf9e9 Cache torrent handles of preloading magnets 2022-11-08 08:29:15 +03:00
Vladimir Golovnev (Glassez)
da586828be Don't perform unnecessary actions with preloading magnets 2022-11-08 08:29:10 +03:00
Vladimir Golovnev
2e4431f0b8 Save torrents queue w/o blocking calls
PR #17988.
2022-11-08 07:00:40 +03:00
BallsOfSpaghetti
162273da47 Add confirmation to resume/pause all
This adds a confirmation dialog to Pause All and Resume All. First I wanted to only add it in Tray, but honestly, clicking around in the menu, using hotkeys might trigger it just as easy.

Closes #17683.
PR #17945.
2022-11-08 11:31:18 +08:00
sledgehammer999
22fb9797c4 Merge pull request #17978 from sledgehammer999/fix_chinese_locale
Fine tune translations loading for Chinese locales
2022-11-08 02:41:34 +02:00
Chocobo1
f6735401f4 Add port forwarding option for embedded tracker
Closes #17781.
PR #17981.
2022-11-07 11:32:11 +08:00
sledgehammer999
06c4c58613 Fine tune translations loading for Chinese locales
Closes #17506
2022-11-06 14:01:16 +02:00
Vladimir Golovnev
c80238d66f Don't use extra variable to distinguish restored torrents
PR #17984.
2022-11-06 14:24:49 +03:00
Hanabishi
6a560016dd Implement Peer ID Client column for Peers tab
PR #17940.
2022-11-06 12:21:31 +08:00
Chocobo1
99b7663fa9 Revise interface of port forwarder
This eases the usage of port forwarder as the caller code doesn't need
to store previous used port and now can rely on port forwarder doing
all the hard work.

PR #17967.
2022-11-05 11:33:21 +08:00
Chocobo1
be0f34a69e Merge pull request #17900 from Chocobo1/alerts
Handle all types of alerts on shutdown
2022-11-03 12:29:38 +08:00
Chocobo1
3a2e73cc94 Avoid out-of-bounds access
This happens when the `index` is a negative number.
Added `Q_ASSERT()` to catch coding errors at debug run time.

PR #17953.
2022-10-31 12:34:20 +08:00
xavier2k6
3ee0457cfa Raise minimum libtorrent versions to 1.2.18/2.0.8
PR #17954.
2022-10-30 08:30:31 +03:00
Vladimir Golovnev
e19173c1f3 Prevent new torrent from saving resume data twice
PR #17951.
2022-10-30 08:28:51 +03:00
Vladimir Golovnev
4a5d2e2558 Correctly initialize torrent stop condition
PR #17950.
2022-10-30 08:28:13 +03:00
Nowshed H. Imran
027d6be48f Fix checked-completed icon visibility in dark theme
PR #17946.
2022-10-29 12:14:46 +08:00
Faisal A. F. Rahman
0f2cc92ba2 NSIS: Update Indonesian translation
PR #17890.
2022-10-28 11:55:05 +08:00
Chocobo1
07bb1df74f Merge pull request #17942 from Chocobo1/icons
Update icon guidelines
2022-10-28 11:54:26 +08:00
Vladimir Golovnev
c29a6079bf Don't forget to create stop_condition column
PR #17935.
2022-10-26 18:25:52 +03:00
Chocobo1
dfb56ce31c Update icon guidelines 2022-10-26 11:42:39 +08:00
Chocobo1
5a8027ae1f Remove unused resources 2022-10-26 11:42:39 +08:00
Vladimir Golovnev
bb2caabd61 Correctly destroy startup resume data storage
PR #17930.
2022-10-25 11:37:51 +03:00
Chocobo1
14e4bc7eea WebUI: use proper comparison for numbers
Closes #17920.
PR #17926.
2022-10-25 12:46:02 +08:00
xavier2k6
9fb8f765e8 GHA CI: Bump libtorrent version(s)
* https://github.com/arvidn/libtorrent/releases/tag/v2.0.8
* https://github.com/arvidn/libtorrent/releases/tag/v1.2.18

PR #17924.
2022-10-25 12:44:57 +08:00
Chocobo1
fe0be98fde Merge pull request #17918 from Chocobo1/portForwarding
Avoid redundant lookups in port forwarder
2022-10-25 12:44:23 +08:00
BallsOfSpaghetti
fdba525e62 Introduce a 'change listen port' cmd option
Closes #17789.
PR #17862.
2022-10-25 12:43:38 +08:00
Chocobo1
dfdaa706bd Move code around 2022-10-24 00:34:25 +08:00
Chocobo1
1a782a9362 Avoid redundant lookups in port forwarder 2022-10-24 00:34:25 +08:00
Chocobo1
5f2d807861 Ensure ongoing storage moving job will be completed when shutting down
Discussion: https://github.com/qbittorrent/qBittorrent/pull/17885#issuecomment-1282467041
2022-10-23 17:55:58 +08:00
Nathan Lewis
f2dd1e6456 Add a "Use proxy for hostname lookup" option
Add a UI option for "Use proxy for hostname lookup" option and plumb
it into libtorrent's settings_pack.proxy_hostnames option.  This is
available for SOCKS5 and HTTP proxies, and defaults to true, which
is the previous functionality.  Hostname lookups can be forced to be
local by unchecking this option, which can aid compatibility with
certain non-compliant proxy servers.

Closes #17902.
PR #17904.

Co-authored-by: Nathan Lewis <saturn@saturn49.dyndns.org>
2022-10-23 15:31:02 +08:00
Chocobo1
155e73df16 WebUI: remove unused include
Closes #15761.
PR #17895.
2022-10-23 12:33:45 +08:00
Vladimir Golovnev
05b7194bf7 Correctly set "stop condition" on force recheck invoked
PR #17915.
Closes #17913.
2022-10-22 17:43:17 +03:00
Maksim Derbasov
597444c527 Make GeoIPDatabase interface safer
PR #17899.
2022-10-21 13:31:37 +08:00
Chocobo1
1c2dc79f51 Introduce color palettes for both dark, light themes
This commit introduce color palettes from Primer and make use of it in various widgets.
Primer system is chosen due to well designed and is highly rated on Github (in terms of
Github stars).
https://primer.style/

PR #17798.
2022-10-20 10:27:03 +08:00
Chocobo1
106adf135c Handle all types of alerts on shutdown
There might be alerts already queued in buffer waiting to be handled at
the time of pausing the session, so don't skip over them.
2022-10-18 14:31:57 +08:00
Chocobo1
dcfd367ff8 Merge pull request #17885 from Chocobo1/shutdown
Revise "save resume data" handling on shutdown
2022-10-18 14:27:07 +08:00
Chocobo1
67ee43fac1 Merge pull request #17878 from Chocobo1/webui
WebUI: handle drag and drop events
2022-10-18 14:26:35 +08:00
Chocobo1
a325ab8d6e Delay saving session statistics
Pausing the libtorrent session should be scheduled before this.
2022-10-17 13:53:55 +08:00
Chocobo1
c94152c47c Reuse alert dispatcher
Instead of using a specific alert handler in `SessionImpl::saveResumeData()`, reuse the generic
one.
2022-10-17 13:53:54 +08:00
Chocobo1
a44bca3f07 Revise "save resume data" handling on shutdown
When shutting down, instead of waiting for all types of alert from
libtorrent, now it only waits for specific alert types. This potentially
help shorten the shutdown waiting time.
2022-10-17 13:53:27 +08:00
thalieht
698284f00e Allow to set torrent stop condition in WebUI
PR #17876.
2022-10-15 11:06:56 +08:00
Chocobo1
3b9d68f344 WebUI: handle drag and drop events
This allows user to drag and drop .torrent files and URL links onto the
main window and will open the respective dialog.
Dropping folders are not supported due to technical reasons.

Closes #6038.
2022-10-14 14:30:26 +08:00
tristanleboss
e028d8085b Add a "Moving" status filter
Because sometime (when your save and download path are on different drives, when your disk drive is super busy, ...) move operations can stack up, I add this "Moving" status filter so you can see in a blink of the eye which torrents are in a move state.

PR #17810.
2022-10-14 13:12:51 +08:00
Chocobo1
af1c97e2ea WebUI: filter file selection to bittorrent files
Note that the user can still overwrite the selection filter and select
other files.
2022-10-13 14:32:00 +08:00
Chocobo1
b95d97d07b WebUI: simplify attribute usage
The `multiple` attribute is a boolean value and its presence equals to
`true`.
2022-10-13 14:31:58 +08:00
schnurlos
17a5bd03c5 NSIS: update German translation
Adding Windows 10 requirement.
PR #17860.
2022-10-12 13:49:19 +08:00
Ícaro
ada594faf3 NSIS: update Portuguese BR translation
PR #17857.
2022-10-12 13:48:27 +08:00
Vladimir Golovnev
4f0990dc29 Use 'fail if exist' strategy on automatic move
Prevent existing files overwriting when torrent is moved automatically (e.g. when moved from incomplete to final save path).

PR #17855.
2022-10-11 10:05:21 +03:00
Chocobo1
f66ec4430d Merge pull request #17858 from Chocobo1/infohash
Show N/A when there is no hash
2022-10-10 14:35:40 +08:00
Vladimir Golovnev
67357e9964 Allow to set torrent stop condition
PR #17814.

Closes #17792.
Closes #929.

(Actually it should close all issues about lack of ability to stop torrent after metadata downloaded or after files are initially checked.)

Also makes explicit the temporary start of the torrent in the case when recheck of the stopped torrent is performed.
2022-10-09 16:07:16 +03:00
Chocobo1
7eb97348de GHA CI: add missing Qt module 2022-10-09 15:24:30 +08:00
Chocobo1
0279b80b46 Don't use hardcoded URL scheme list
This is to avoid the list being outdated.
2022-10-09 14:12:02 +08:00
Chocobo1
d3936c07c7 Capitalize header title
This is the only one not properly capitalized.
2022-10-09 14:12:02 +08:00
Chocobo1
aa022400f7 Use Path internal representation for internal value in model
The internal value is used for sorting comparisons and not displayed
to the user, so make a shortcut.
2022-10-09 14:12:01 +08:00
Chocobo1
66795d533a Show 'N/A' when there is no hash
This is to follow 'General' tab which show 'N/A' when there is no hash.
2022-10-09 14:12:01 +08:00
Chocobo1
ce7d8dee28 Merge pull request #17829 from Chocobo1/focus
Set proper focus on widget
2022-10-09 13:48:13 +08:00
Chocobo1
1f799689ed Support 'file exists' situation
The lt::status_t::file_exist is returned when lt::move_flags_t::fail_if_exist is used, which means the whole move operation failed. So hanlde this condition correctly (even if the fail_if_exist isn't used in the code base currently).

PR #17853.
2022-10-09 13:47:52 +08:00
sledgehammer999
3463442631 Merge pull request #17835 from RockyTDR/patch-1
NSIS: Update Dutch translation
2022-10-08 20:06:02 +03:00
sledgehammer999
c35ca52b00 Merge pull request #17834 from maboroshin/master
NSIS: Update Japanese translation
2022-10-08 20:05:25 +03:00
sledgehammer999
6d501c2e6e Merge pull request #17828 from PriitUring/NSIS-Estonian
NSIS: Update Estonian translation
2022-10-08 20:04:27 +03:00
tristanleboss
a71d7e6557 Add infohash and download path columns
PR #17799.
2022-10-08 11:43:52 +08:00
Chocobo1
30c2f9d9f3 Merge pull request #17830 from Chocobo1/trackers
Fix wrong 'tracker error' count
2022-10-06 12:32:16 +08:00
Andrei Stepanov
544f9675c6 NSIS: Update Russian translation
PR #17827.
2022-10-06 06:36:55 +03:00
Thomas De Rocker
0c76321a6a Update dutch.nsi
Translate new strings and polish existing strings
2022-10-05 19:40:40 +02:00
maboroshin
10349b84d6 Update japanese.nsi 2022-10-06 01:45:07 +09:00
Chocobo1
6fa4305aba Fix wrong 'tracker error' count
This happens when a torrent contains some tracker URLs that share the same domain.
Closes #17808.
2022-10-05 14:43:52 +08:00
Chocobo1
d9af207a11 GHA CI: add missing cmake flag for Qt6 2022-10-05 13:17:54 +08:00
vlakoff
ad59eb4dfc Revert "Consider brackets within wildcard as regular characters"
The implementation appeared to be broken.

This reverts #16965.
PR #17820.
2022-10-05 12:43:43 +08:00
Priit Uring
874b015b20 NSIS: Update Estonian translation 2022-10-05 00:16:26 +03:00
Chocobo1
21aabfdcb5 Clean up code 2022-10-05 00:58:57 +08:00
Vladimir Golovnev
e7370d1a0f Don't pollute move queue by torrents w/o metadata
There's really nothing to move if the torrent still doesn't have metadata.
Additionally, such torrents in the queue can lead to unexpected behavior
when reloading the torrent after metadata is received.

PR #17823.
2022-10-04 19:41:36 +03:00
Chocobo1
855f727451 Set proper focus on widget
And also allow keyboard tabbing to the Browse button.
Fix up 6ab35512da.
2022-10-04 16:54:20 +08:00
Chocobo1
3b0ac0962e Merge pull request #17817 from Chocobo1/modules
GHA CI: only install required Qt components
2022-10-04 13:08:03 +08:00
sledgehammer999
617dedc464 Merge pull request #17812 from sledgehammer999/nsis_refactor
NSIS refactoring
2022-10-03 14:39:44 +03:00
Chocobo1
8b4a0da235 GHA CI: bump Qt version to 6.4.0 2022-10-03 13:04:28 +08:00
Chocobo1
dcc5206e3d GHA CI: only install required Qt components
So it won't waste time download/install unused Qt components.
2022-10-03 13:04:24 +08:00
Chocobo1
9a81cbf4c0 Improve column updates granularity
PR #17806.
2022-10-03 11:56:48 +08:00
xavier2k6
d96ed5f4a4 GHA CI: Bump Windows/macOS Qt6 version to 6.4.0
Suppressed gnu-zero-variadic-macro-arguments warning on macOS (Qt6 only).
PR #17801.
2022-10-03 11:56:08 +08:00
sledgehammer999
102b6c32eb NSIS: Refactor configuration to ease installer creation via scripting 2022-10-02 12:59:40 +03:00
sledgehammer999
2af1e1874e NSIS: Require Windows 10 1809 for Qt6 builds
Also refactor the config.nsi with more defines that control the build.
Closes #17783
2022-10-02 12:54:36 +03:00
sledgehammer999
680455a21b NSIS: Drop hardcoded qt's translation filenames 2022-10-02 12:54:35 +03:00
Vladimir Golovnev
b568cdb1aa Correctly load state of use download folder
PR #17807.
Closes #17793.
2022-10-02 08:46:27 +03:00
Chocobo1
bc0d906adc Merge pull request #17786 from Chocobo1/selection
Fix torrent content checkboxes not updated properly
2022-10-01 14:00:49 +08:00
Chocobo1
2b385e5f92 WebUI: don't disable combobox for file priority
Closes #17794.
PR #17797.
2022-10-01 12:49:02 +08:00
Vladimir Golovnev
616057a433 Improve session statistics handling
PR #17779.
2022-09-29 06:49:34 +03:00
Chocobo1
9a20aa51de Fix torrent content checkboxes not updated properly
And reduce emitting redundant 'data updated' signals.

Closes #17144, #17764.
2022-09-29 00:00:48 +08:00
Chocobo1
6c8b31420c Remove unused functions 2022-09-27 14:52:52 +08:00
Chocobo1
0514cb304d Fix coding style 2022-09-27 14:52:52 +08:00
Vladimir Golovnev
0a4ee60ea0 Avoid blocking call when save resume data
PR #17755.
2022-09-25 16:40:16 +03:00
Chocobo1
caa30e41d8 Merge pull request #17765 from Chocobo1/filterbar
Fix 'Filter Sidebar' size restored incorrectly
2022-09-25 12:37:50 +08:00
Chocobo1
dc76a175ad WebUI: allow string to be translated
Closes #17759.
2022-09-24 15:29:14 +08:00
Chocobo1
92768c36aa Fix 'Filter Sidebar' size restored incorrectly
And with a bit of code clean up.
Closes #17756.
2022-09-24 15:29:12 +08:00
Chocobo1
2a3a4bff70 Merge pull request #17737 from Chocobo1/logview
Use proper color for highlighted text in log widget
2022-09-23 13:31:04 +08:00
Andrew
cacfe4f3ca Fix "Open destination folder" delay on Windows
Replaced QDesktopServices by native Windows function
to open destination folder due to QDesktopServices issues on Windows.
The issues are described in #17482 and even more detailed in #17025.

Closes #17482.
PR #17723.
2022-09-23 13:30:31 +08:00
Chocobo1
37150520e1 Use proper color for highlighted text in log widget
The color is either from qbt theme pack or desktop environment.

Note that Windows default theme do not use highlighted text color.
Other themes (either OS default or qbt themes) are closer to native
look when highlighted text color is in action.
2022-09-21 01:04:11 +08:00
Chocobo1
3aadb63d80 Simplify code
Don't use replacement placeholder and use string append which is faster.
2022-09-21 00:42:15 +08:00
Chocobo1
0e0b8d1027 Revive dark theme detection
The code was removed in 199d770e15 and now revived.
2022-09-21 00:42:15 +08:00
sledgehammer999
5e4a94e6b6 Bump to 4.5.0beta1 2022-09-18 20:13:29 +03:00
sledgehammer999
db7850e218 Sync translations from Transifex and run lupdate 2022-09-18 20:13:29 +03:00
Chocobo1
1dcfd7bb59 Improve docker documentation
Clarify that some paths should be full paths.

Related #17729.
PR #17736.
2022-09-18 13:10:24 +08:00
Chocobo1
b28704a6ec Merge pull request #17725 from Chocobo1/downloadsDone
Clean up 'recursive download' related code
2022-09-16 12:07:36 +08:00
Chocobo1
0c6e56a150 Merge pull request #17713 from Chocobo1/trackers
Revise 'Add trackers' dialog
2022-09-16 12:06:22 +08:00
sledgehammer999
d71ff734a9 Merge pull request #17705 from sledgehammer999/gplv2_vs_gplv3
Copyright and license updates
2022-09-15 11:19:23 +03:00
Chocobo1
90652d3555 WebAPI: fix wrong behavior for shutdown action
Qt6 has changed implementation for `QCoreApplication::quit` and therefore it is not suitable
anymore.

Closes #17709.
PR #17720.
2022-09-15 11:56:00 +08:00
Chocobo1
f8a2fbc4c5 Clean up 'recursive download' related code
Don't load .torrent files too early, otherwise qbt might emit a dubious error log message if the
.torrent file is invalid.
2022-09-15 00:15:53 +08:00
Chocobo1
80759f9e69 Reorder operations in 'torrent finished' handler
Avoid redundant data fetch.
Remove debug messages.
2022-09-15 00:12:11 +08:00
Chocobo1
e692a191ed Revise 'Add trackers' dialog
* Now it allow user to add tracker to different tier.
* The downloaded trackers are now displayed as is (without modifying).
* Now the dialog remember dialog size and last used URL.

Closes #17692.
2022-09-14 01:20:30 +08:00
Chocobo1
4e06a9629a WebUI: alert when HTTPS settings are incomplete
Closes #17696.
PR #17701.
2022-09-13 13:00:11 +08:00
sledgehammer999
b3334e5fac Binary distributions are GPLv3+ licensed 2022-09-13 01:33:08 +03:00
Chocobo1
4e326229da Rename action 2022-09-12 23:25:36 +08:00
sledgehammer999
021222b407 Merge pull request #17654 from hugok79/patch-1
Update org.qbittorrent.qBittorrent.desktop
2022-09-12 16:39:46 +03:00
Chocobo1
6c60fa5161 Don't reorder URLs when copied from the clipboard
Also process URLs in the same order as from the text edit widget.
Closes #17693.
PR  #17700.
2022-09-12 12:22:45 +08:00
sledgehammer999
cd405ffc32 Remove duplicate information
This information exists in git's commit history and in the AUTHORS file.
2022-09-12 02:26:35 +03:00
sledgehammer999
537b1c1ea9 Update AUTHORS file 2022-09-12 02:26:34 +03:00
Chocobo1
257914b0d5 Merge pull request #17684 from Chocobo1/subnet
Allow to use subnet notation in reverse proxy list
2022-09-10 13:05:06 +08:00
Chocobo1
5cfaaa5d1a Add tooltips 2022-09-08 14:44:18 +08:00
Chocobo1
109c45bb95 Allow to use subnet notation in reverse proxy list
Closes #17475.
2022-09-08 14:44:18 +08:00
Chocobo1
851374e517 Rename function 2022-09-07 14:11:23 +08:00
Chocobo1
4094a4c448 Simplify functions 2022-09-07 14:11:02 +08:00
Tyler Dunn
987e1b544a Don't autofill background color on macOS
PR #17669.
2022-09-06 09:44:18 +08:00
Vladimir Golovnev
5cf6b1cbde Handle more torrent conflicts
PR #17668.
This is a continuation of #17576.
Handles the case when you add hybrid torrent by v1-only magnet link and this torrent is already known by its full hybrid info hash (i.e. by both v1 and v2 info hashes).
2022-09-05 06:22:42 +03:00
Vladimir Golovnev
4318de6dc5 Add ability to run external program on torrent added
PR #17646.
2022-09-04 07:51:50 +03:00
summer
459d1cf82c Allow to pause a checking torrent from context menu
PR #17611.
2022-09-04 12:03:10 +08:00
Chocobo1
48d52d9ab7 Merge pull request #17670 from Chocobo1/i18n
Make strings translatable
2022-09-04 12:00:36 +08:00
Hugo Carvalho
16a99e687f Update org.qbittorrent.qBittorrent.desktop 2022-09-03 14:47:22 +01:00
Chocobo1
fb37b0c147 Suppress warning
Seems `lupdate` tool cannot correctly recognize the class/context of `tr()` here, so specify the
class/context manually.
2022-09-03 15:26:40 +08:00
Chocobo1
9877ff330e Make strings translatable 2022-09-03 15:23:00 +08:00
Tyler Dunn
6f88609d60 Avoid string lookup when setting row color
PR #17665.
2022-09-03 14:58:53 +08:00
Tyler Dunn
6263c4786b Allow 'Export .torrent' tooltip to be translatable
Closes #17660.
PR #17664.
2022-09-03 14:58:23 +08:00
Chocobo1
3061f6cf5b GHA CI: treat compile warnings as errors
PR #17651.
2022-09-02 13:09:43 +08:00
Hugo Carvalho
cc8c1a5748 Update org.qbittorrent.qBittorrent.desktop
Sort language codes alphabetically
2022-09-01 13:31:48 +01:00
Vladimir Golovnev
ca897a8a35 Cache download/upload limit values
PR #17640.
2022-09-01 06:54:51 +03:00
Vladimir Golovnev
77dd8bd27b Parse torrent info separately from resume data
PR #17639.
2022-09-01 06:54:12 +03:00
Vladimir Golovnev
fe34749cfe Proactively append extension to incomplete files
PR #17631.
2022-09-01 06:53:29 +03:00
Vladimir Golovnev
646322b2a2 Let Qt handle system tray icon availability
PR #17519.
2022-08-31 08:02:44 +03:00
Chocobo1
670b381df7 Merge pull request #17616 from Chocobo1/webui
Make WebUI images self-contained
2022-08-29 13:09:21 +08:00
sledgehammer999
ddf4b94bc6 Sync translations from Transifex and run lupdate 2022-08-29 00:48:24 +03:00
Vladimir Golovnev
794a92f911 Make qBittorrent compatible with libtorrent master
PR #17604.
2022-08-28 11:38:28 +03:00
Chocobo1
f6e2715f4a Apply forward declaration
Follow up 525692759d.
PR #17621.
2022-08-28 13:25:38 +08:00
Chocobo1
082e6f8830 Apply i18n translation only to built-in WebUI 2022-08-27 13:55:05 +08:00
Chocobo1
ee38124db7 Optimize symbolic links checking 2022-08-27 13:55:04 +08:00
Chocobo1
e06e1d9911 Throw error exception properly 2022-08-27 13:55:04 +08:00
Chocobo1
3851e76179 Remove special handling of icons 2022-08-27 13:55:04 +08:00
Chocobo1
d693f97a46 Use natural sort in WebUI 2022-08-27 13:55:04 +08:00
Chocobo1
ca274635d5 Make WebUI images self-contained 2022-08-27 13:55:04 +08:00
Vladimir Golovnev
525692759d Split Session class into interface/implementation parts
PR #17579.
2022-08-27 08:01:24 +03:00
Chocobo1
e5491645e4 Merge pull request #17593 from Chocobo1/remove
Use proper verb when referring to torrent removal
2022-08-26 12:06:10 +08:00
Chocobo1
9f511a47e8 Adjust Edit menu of WebUI to follow GUI 2022-08-25 13:32:07 +08:00
Chocobo1
7b0644cdcd Use proper verb when referring to torrent removal 2022-08-25 13:32:07 +08:00
Vladimir Golovnev
7527343629 Handle some torrent conflicts
PR #17576.
2022-08-23 07:47:20 +03:00
Chocobo1
d173216941 Merge pull request #17578 from Chocobo1/webui
Fix icon in WebUI being trimmed
2022-08-23 10:54:02 +08:00
Chocobo1
d28b5f7834 Rephrase confirm deletion dialog
Closes #14309.
PR  #17586.

Co-authored-by: xavier2k6 <42386382+xavier2k6@users.noreply.github.com>
2022-08-22 11:36:13 +08:00
Chocobo1
04f6ee79c3 Improve icon readability at small size
https://github.com/qbittorrent/qBittorrent/pull/17578#pullrequestreview-1079562121

Co-authored-by: Nowshed H. Imran <nowshed.imran@gmail.com>
2022-08-21 20:47:07 +08:00
Chocobo1
b046b40668 Fix icon in WebUI being trimmed 2022-08-20 13:27:48 +08:00
Chocobo1
0a289e15b4 Merge pull request #17544 from Chocobo1/test
Add unit testing for Path class
2022-08-19 14:44:44 +08:00
Chocobo1
ce8b51e7ef Merge pull request #17568 from Chocobo1/ci
GHA CI: bump "Install Qt" action version
2022-08-19 14:42:29 +08:00
Chocobo1
df5ea9b675 GHA CI: bump setup-python to v4 2022-08-19 12:59:13 +08:00
Chocobo1
ff7fe7c107 GHA CI: bump "Install Qt" action version 2022-08-18 12:26:26 +08:00
Coool
ac6af55335 NSIS: update Latvian
PR 17529.
2022-08-18 11:39:53 +08:00
Chocobo1
001c3906b5 Merge pull request #17563 from Chocobo1/webapi
Restrict more WebAPI endpoints to POST method only
2022-08-18 11:37:59 +08:00
Minseo Lee
0d5d6db0ee NSIS: update Korean
PR #17547.
2022-08-17 12:48:22 +08:00
Chocobo1
72941b10bb Use proper request method 2022-08-16 11:26:47 +08:00
Chocobo1
d6c92704a1 Restrict more WebAPI endpoints to POST method only 2022-08-16 11:26:05 +08:00
Jesse Smick
ba511e07b4 WebUI: Improve pieces bar drawing algorithm
PR #17336.
2022-08-15 12:05:35 +08:00
Chocobo1
aa6b29fe7e Set HTTP method restriction on WebAPI actions
PR #17548.
2022-08-15 11:56:59 +08:00
Chocobo1
f5836c9fc9 Add unit testing for Path class 2022-08-14 13:31:22 +08:00
Chocobo1
d7d1a90de6 Fix wrong parent path 2022-08-14 13:31:21 +08:00
Chocobo1
16482c507b Fix drive letter validness check 2022-08-14 13:31:21 +08:00
Chocobo1
5abd72d42a Add comments about "UNC path" support 2022-08-12 12:56:58 +08:00
Chocobo1
2fa5ad982d Improve absolute/relative path detection 2022-08-12 12:56:57 +08:00
Chocobo1
43df7d0cd4 Improve path validness test 2022-08-12 12:56:56 +08:00
Chocobo1
17d40855d2 Merge pull request #17535 from Chocobo1/ci
GHA CI: switch to Ubuntu latest stable version
2022-08-12 12:27:57 +08:00
Chocobo1
c924fe7950 GHA CI: update boost to 1.80 2022-08-11 15:20:25 +08:00
Chocobo1
908f345e22 GHA CI: switch to Ubuntu latest stable version 2022-08-11 12:11:20 +08:00
bovirus
858eea1e9e NSIS: Update Italian language
PR #17098.
2022-08-11 12:03:05 +08:00
Chocobo1
06c704c740 Revise quote behavior
Now the behavior of double quotes aligns more as with issuing commands from shell/command line.
Related: https://github.com/qbittorrent/qBittorrent/pull/17453#issuecomment-1203372027

PR #17515.
2022-08-10 13:19:34 +08:00
Vladimir Golovnev
916e53c260 Show progress dialog on second instance run
PR #17516.
2022-08-09 19:12:12 +03:00
xavier2k6
3f94a68e62 Sync nonstd/expected with upstream
* Used commit: `95b9cb015fa17baa749c2b396b335906e1596a9e` (Release v0.6.2)
* Source: https://github.com/martinmoene/expected-lite/releases
PR #17508.
2022-08-09 11:22:45 +08:00
Vladimir Golovnev
5c96f16e3d Merge pull request #17498 from glassez/fix-windows-race 2022-08-07 13:23:03 +03:00
xavier2k6
8e33d99901 Update ax_boost_base.m4 to latest version
Upstream: https://github.com/autoconf-archive/autoconf-archive/blob/master/m4/ax_boost_base.m4
PR #17196.
2022-08-07 14:38:55 +08:00
Vladimir Golovnev (Glassez)
d27dd85dfd Correctly replace desktop integration menu 2022-08-06 19:40:04 +03:00
Vladimir Golovnev (Glassez)
15515200ee Avoid race conditions between dialogs on startup 2022-08-06 15:01:35 +03:00
Vladimir Golovnev
7f40602da9 Fill in initial data in add_torrent_alert handler
libtorrent < 2.0.7 has a bug that add_torrent_alert is posted too early
(before torrent is fully initialized and torrent extensions are created)
so we have to fill initial torrent data in add_torrent_alert handler.

PR #17491.
2022-08-06 06:09:35 +03:00
Chocobo1
33e6ca6778 Redesign Version class
PR #17484.
2022-08-06 11:06:16 +08:00
summer
54b50c3a8a Do not inhibit system sleep/auto shutdown for torrents stuck at downloading metadata
PR #17481.
2022-08-04 13:10:58 +08:00
Chocobo1
fa3d98aa37 Add keyboard shortcut to Download URL dialog
Closes #17436.
PR #17490.
2022-08-04 13:03:38 +08:00
Vladimir Golovnev
e24aaa4ce1 Show startup progress dialog
PR #17389.
2022-08-03 07:14:26 +03:00
Chocobo1
aed492b881 Merge pull request #17471 from Chocobo1/cmake
Improve constructor of Version class
2022-08-02 13:50:56 +08:00
Chocobo1
a4c2363f43 Improve constructor of Version class
Now we can write `Version<int, 3, 1>(1)` and provide only 1 parameter
instead of all 3 parameters at once at the constructor. Note that for
this instance of `Version` 3 numbers were specified but only 1 is truly
mandatory.

The added code are required to specify conditions of the template
instantiation for the compiler.
2022-08-01 14:53:55 +08:00
Vladimir Golovnev
0056a61db3 Clear RSS parsing error after use
PR #17465.
2022-08-01 08:15:16 +03:00
Vladimir Golovnev
6d1573f901 Prevent multiple session refreshes from being enqueued 2022-08-01 08:14:09 +03:00
清靈語
ef297dd8e6 Revise Docker document
Currently Docker Inc. recommends installing Docker Desktop instead of the CLI.
docker-compose has been deprecated, replaced by docker compose.

PR #17448.
2022-08-01 13:10:47 +08:00
Chocobo1
958929aa77 Improve command for running test
It enables `make check` command to build tests and run it
altogether.
2022-07-31 15:20:34 +08:00
Vladimir Golovnev
1c0479a795 When duplicate torrent is added set metadata to existing one
PR #17454. 
Closes #907.
2022-07-31 08:53:26 +03:00
Nowshed H. Imran
748226be29 Rename Icons according to the actions
Fixes #17357.
PR #17366.
2022-07-31 13:31:38 +08:00
Chocobo1
27e1a8ad80 Merge pull request #17453 from Chocobo1/i18n
Fix empty string parameter was omitted
2022-07-30 14:30:12 +08:00
Chocobo1
0802b6d506 Fix empty string parameter was omitted
`QProcess::splitCommand()` will omit empty strings like `""` so provide
our own replacement.

Closes #13124.
2022-07-30 00:17:31 +08:00
Vladimir Golovnev
29f8b4b786 Don't merge trackers by default
PR #17446.
2022-07-29 15:40:40 +03:00
Chocobo1
2ebdf6060d Translate app help text 2022-07-29 11:13:59 +08:00
brvphoenix
b98e7cb69f Fix reply data can't be decompressed correctly
If the "Accept-Encoding" is not manually specified, it will be
automatically set to the supported encodings by QT and the reply data
will also be automatically decompressed in this case. Setting
"Accept-Encoding" manually will disable the "autodecompress" feature
before QT 6.3.0. Although QT 6.3.x has different behaviors, let QT
specify the "Accept-Encoding" and we will always obtain the decompressed
data.

The macro "QT_NO_COMPRESS" defined when QT is compiled will disable
the zlib support. We can manually address this exceptions.

PR #17438.
2022-07-29 11:03:21 +08:00
summer
2071ec0c96 Fix peer count issue when tracker responds with zero figure
Sometimes tracker may respond with 0 for num_complete and num_incomplete and we should display that instead of deducing the peer count from peer list. We should only fallback to peer list if tracker does not respond with any information. In such cases num_incomplete and num_complete is set to -1 by libtorrent.

PR #17432.
2022-07-27 13:09:06 +08:00
Chocobo1
36bc77e2e2 Merge pull request #17416 from Chocobo1/icon
Split code to smaller functions
2022-07-26 12:47:21 +08:00
Chocobo1
88556078be Merge pull request #17412 from Chocobo1/stat
Improve free disk space reporting
2022-07-26 12:45:10 +08:00
Chocobo1
27a07e20f5 Split code to smaller functions 2022-07-25 01:22:33 +08:00
Chocobo1
5d1115f591 Remove compile-time conditional
This checking should be universally applied and not limited to certain OS.
2022-07-25 01:18:42 +08:00
Chocobo1
88d9e82fc9 Improve free disk space reporting
For non-existent directories (which will be created on demand) `Utils::Fs::freeDiskSpaceOnPath`
will return invalid value so instead query its parent path.
2022-07-25 01:18:42 +08:00
Chocobo1
50b01ed45d Revise function for checking "same file" 2022-07-25 01:18:37 +08:00
Chocobo1
243d130667 Clean up code 2022-07-24 18:07:52 +08:00
Chocobo1
e33f73d08e Avoid performance impact over network or removable drives 2022-07-24 12:58:24 +08:00
Chocobo1
f505d742d8 Merge pull request #17392 from Chocobo1/validatePath
Fix path validator
2022-07-24 09:54:30 +08:00
Chocobo1
727d20cc92 Simplify implementation
This also enable each platform to provide its own optimal implementation of it.
2022-07-23 22:41:26 +08:00
Chocobo1
3567ae3529 Merge pull request #17407 from Chocobo1/addtorrent
Fix "Add torrent dialog" spill-over on smaller screens
2022-07-23 12:20:55 +08:00
Chocobo1
a9906e5d2a Fix validation text doesn't update on mouse click selection 2022-07-22 21:27:00 +08:00
Chocobo1
6ab35512da Fix browse icon cannot be selected/focused via keyboard 2022-07-22 21:27:00 +08:00
Chocobo1
cfcbe3d6e1 Use less intimidating icon for intermediate state 2022-07-22 21:27:00 +08:00
Chocobo1
39c0c1a088 Simplify operations 2022-07-22 21:27:00 +08:00
Chocobo1
f7ae010274 Rename interface 2022-07-22 21:27:00 +08:00
Chocobo1
4fd5037c10 Avoid redundant operation
The default is the same as the one specified here.
2022-07-22 21:27:00 +08:00
Chocobo1
3fe09aa673 Fix path validator
And revise tooltip message.

Closes #11152.
2022-07-22 21:26:57 +08:00
Chocobo1
3a6858a277 Adjust height to hide scrollbar by default 2022-07-22 13:23:19 +08:00
Chocobo1
c287c7bb01 Revise action capitalization 2022-07-22 13:23:19 +08:00
Chocobo1
99061d92c1 Fix "Add torrent dialog" spill-over on smaller screens
Done by adding an QScrollArea to the layout.

Closes #17387.
2022-07-22 13:23:19 +08:00
Vladimir Golovnev
5b269a782a Prevent tray menu from being accessed after destruction
PR #17400.
2022-07-21 09:30:05 +03:00
xavier2k6
71e53a4628 Raise minimum libtorrent version to 2.0.7
PR #17396.
2022-07-21 12:21:48 +08:00
Chocobo1
275387a972 Don't show validation result dialog on every key input
Instead of showing dialog, now it relies on icon to show the validation
result.

PR #17391.
2022-07-21 12:19:58 +08:00
Chocobo1
e68e3b516e Improve performance of "filesystem line edit" widgets
Also prevent unnecessary querying on the filesystem by omitting
calling setRootPath().
2022-07-21 02:27:48 +08:00
summer
3f7376f26b Add transfer list refresh interval settings to WebUI
Specially useful for qbt-nox users
PR #16713.

Co-authored-by: An0n <79678786+an0n666@users.noreply.github.com>
2022-07-19 11:14:45 +08:00
summer
0e3ce019e4 Update libtorrent to 2.0.7 & 1.2.17 in GHA CI
PR #17385.
2022-07-19 11:13:47 +08:00
Dmitry Vodopyanov
f20f479a4b Improve sender field in mail notifications
Problem statement: user sees its email address in email notification,
while it is better to have sender field app-personalized, like it did
in Nextcloud: they send notifications from user's email address and
add alias 'Nextcloud' to it.

This patch adds alias 'qBittorrent' to qBittorrent email notifications,
so user sees more user-friendly email notification.

PR #17374.
2022-07-18 13:22:30 +08:00
Chocobo1
e95066a37c Merge pull request #17367 from Chocobo1/pr_17005
Split the OS cache settings into Disk IO read/write modes
2022-07-17 16:14:58 +08:00
Chocobo1
e281b667c6 Properly release settings class before further operations
Fix up d3e7e8a630.

PR #17376.
2022-07-17 12:41:18 +08:00
Chocobo1
ce0e92e12a Merge pull request #17363 from Chocobo1/pause
Add workaround for payload upload/download rate
2022-07-16 11:52:28 +08:00
Chocobo1
56bb379024 Add workaround for payload upload/download rate
The graphs are showing 0 for both payload upload & download rate but
torrent statistics aren't, so suppress it manually.
The workaround only applies to paused state for now.

Closes #17294.
2022-07-15 12:20:09 +08:00
Chocobo1
bafe4e909c Use switch() statement 2022-07-15 12:20:09 +08:00
Chocobo1
b6b0b54cdb Rename variable 2022-07-15 12:17:39 +08:00
xavier2k6
a9a45b9569 Sync flag icons with upstream
* Contains numerous flag fixes.
* Upstream commit: `494ace54e3c413dcebcb071f583b441b267c984f` - (Release v6.6.3)
* Update `AUTHORS` file with upstream `copyright/repo url change`

PR #17199.
2022-07-15 12:08:37 +08:00
Chocobo1
864d806ee8 Merge pull request #17359 from Chocobo1/testnaturalcmp
Add testing for various classes
2022-07-15 12:07:36 +08:00
summer
4cda5d89fb Clean up WebUI preferences
PR #17319.
2022-07-15 12:07:09 +08:00
summer
5b730ffb72 Split the OS cache settings into Disk IO read/write modes
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2022-07-14 18:37:38 +08:00
nmariusp
e2b140b8dd Remove meaningless checking for nullptr
Fix PVS-Studio issue "rss_autodownloader.cpp:111: warning: V668
There is no sense in testing the 'm_fileStorage' pointer against null,
as the memory was allocated using the 'new' operator.
The exception will be generated in the case of memory allocation error".

PR #17347.
2022-07-14 13:19:38 +08:00
Chocobo1
d2a29c2f87 Correctly remove incomplete settings file
PR #17362.
2022-07-14 13:05:08 +08:00
Chocobo1
60e62dc5ab Add testing for various classes 2022-07-13 18:05:14 +08:00
Chocobo1
4f1684c714 Bump libtorrent requirements to 2.0.6 2022-07-13 17:16:18 +08:00
Vladimir Golovnev
d3e7e8a630 Refactor SettingsStorage implementation
Remove redundant fragmentation of logic.

PR #17354.
2022-07-13 07:09:15 +03:00
Pino Toscano
437ddd3f76 Stop installing app icon in pixmaps location
Since the application icons are already installed in
the global XDG hicolor theme, simply stop installing the 128px one
in the pixmaps location.

PR #17342.
2022-07-12 13:14:55 +08:00
Chocobo1
0d715d879d Specify test files manually
So that cmake will detect file changes automatically and therefore we
don't need to re-invoke cmake manually.
2022-07-11 13:58:55 +08:00
Vladimir Golovnev
cfdf5cffac Show remote access info after it is available
PR #17329.
2022-07-11 08:38:45 +03:00
Chocobo1
d6314b30a2 Merge pull request #17341 from Chocobo1/tray
Revise behavior of initializing checkboxes
2022-07-11 12:39:05 +08:00
Chocobo1
03da68b1cf Add support for unit testing
* Downgraded macOS CI to Qt 6.2.0 due to a bug in Qt Test module
* Revised cmake build scripts
* For now, only building via cmake is supported

PR #17338.
2022-07-10 13:20:27 +08:00
Vladimir Golovnev
890630944d Extract desktop integration stuff into separate class
PR #17313.
2022-07-09 08:06:22 +03:00
Chocobo1
8d73ab65b2 Don't needlessly hide Options dialog
The dialog should only close after all operations are done, not before.
2022-07-09 11:34:47 +08:00
Chocobo1
e54124fdb8 Add tooltip message when system tray icon isn't available
Also don't hide the sub-options as they are already in disabled state.
2022-07-09 11:34:47 +08:00
Chocobo1
e4fafb911a Revise behavior of initializing checkboxes
The checkboxes initial value should not depend on parent state and
should be restored anyway.
2022-07-09 11:34:43 +08:00
Chocobo1
2ef059807a Merge pull request #17333 from Chocobo1/logger
Revise classes startup sequence
2022-07-08 12:50:02 +08:00
Chocobo1
dba711d099 Use helper function for logging messages 2022-07-07 12:17:52 +08:00
Chocobo1
ec13bba4da Revise classes startup sequence
1. Initialize Logger class earlier so that it can record messages from other classes (for
   debugging purpose).
2. Deprioritize WebUI port adjustment. It is not a high priority in here.
3. Slightly deprioritize file logger initialization.
2022-07-07 12:16:48 +08:00
luzpaz
8736c9ec4c Fix various typos
Found via `codespell -q 3 -S *.ts,*.desktop,./src/base/3rdparty,./dist/windows/installer-translations -L ba,doas,ist,ro,ths`

PR #17317.
2022-07-06 13:11:11 +08:00
Chocobo1
286df8f560 Merge pull request #17311 from Chocobo1/memPrio
Work around application stuttering on Windows
2022-07-05 14:18:02 +08:00
Nowshed H. Imran
92afbd45e8 Remove option of using icons from system theme
PR #17292.
Closes #17150.
2022-07-05 12:32:35 +08:00
Chocobo1
d293c22a52 Try to recover missing tags
Tags can go missing from config/resume data. Try to recover them to avoid inconsistent behavior.

PR #17290.
2022-07-05 12:29:01 +08:00
summer
c660c9df8e Try to recover missing tags
Tags can go missing from config/resume data. Try to recover them to avoid inconsistent behavior.
2022-07-04 18:18:56 +06:00
Chocobo1
ed2eadaf56 Work around application stuttering on Windows
This is observed by unusual high page faults when the stuttering occurs.
With this workaround, the high page faults still occurs but the GUI remains responsive.
2022-07-04 18:38:23 +08:00
Chocobo1
fa26333a5b Move "memory priority" settings to Application class 2022-07-04 18:38:20 +08:00
Vladimir Golovnev
be7cfb78de Restore BitTorrent session asynchronously
Reduce the total startup time of the application and maintain sufficient responsiveness of the UI during startup due to the following:
1. Load resume data from disk asynchronously in separate thread;
2. Split handling of loaded resume data in chunks;
3. Reduce the number of emitting signals.

PR #16840.
2022-07-04 12:48:21 +03:00
Chocobo1
ec1d2cba40 Merge pull request #17305 from Kolcha/fix/open-dest-dir
Fix "Open destination folder" on macOS
2022-07-04 08:38:10 +08:00
Nick Korotysh
a93cd20e4d Open destination folders on macOS in separate thread
In some unknown way, the one line in Objective-C affects Qt's main
loop causing the crash in QApplication::exec() on processing next
event after that call.

Even crash doesn't happen exactly after this call, it will happen
on application exit. Call stack and disassembly are the same in
all cases.

But running that code in another thread solves the issue.
2022-07-02 09:16:22 +02:00
Chocobo1
25b3f2d1a6 Raise priority of the main "event loop" thread
The goal is to improve responsiveness of qbt when CPU resources are scarce.

Instead of lowering libtorrent threads priority, it is chosen to raise main event loop thread
priority to avoid getting messy with libtorrent internals.

Also on Windows, threads doesn't inherit thread priority from the parent thread and it always
use the default (normal) priority.

PR #17278.
2022-07-02 14:57:47 +08:00
Chocobo1
b44bdd21cb Merge pull request #17281 from Chocobo1/creator
Fix filename not populated correctly
2022-07-02 14:41:50 +08:00
Nick Korotysh
53ea1843ab Pass Torrent::contentPath() to MacUtils::openFiles()
it already provides absolute path, no additional manipulations
are required.
2022-07-01 23:23:26 +02:00
Chocobo1
34091176d5 Fix wrong root path generated on Windows
Fix cannot create torrent when the source file is at the root of a
drive.
Fix created torrent cannot be seeded when the source file is at the root
of a drive.

Fix up dd1bd8ad10.
Closes #17279.
2022-07-01 13:34:14 +08:00
Vladimir Golovnev
ac8a6887b6 Improve D-Bus notifications handling
Make notifications clickable on Linux by assigning "default" action.
Don't react to unrelated notifications clicked by keeping track of qBittorrent notifications IDs and filter out unrelated ones.
Make D-Bus Notifications interface proxy class to be maintained manually and fix coding style in it.
Closes #9084.
PR #17282.
2022-06-30 08:01:17 +03:00
summer
cc0a0b56ed Make working set limit available only on libtorrent 2.0.x builds
You can already control the cache size in libtorrent 1.2.x so it doesn't make sense to implement this limit for all use cases. Also there are some downsides to using working set size to limit memory usage such as unresponsive GUI when limit gets hit.

PR #17275.
2022-06-30 11:23:48 +08:00
sledgehammer999
0e989185ce Merge pull request #15769 from now-im/flow
Implement new icon/color theme
2022-06-28 23:23:25 +03:00
Chocobo1
aadf961184 Fix filename not populated correctly
Fix up dd1bd8ad10.
Related #17279.
2022-06-26 19:30:17 +08:00
summer
1abeac8811 Remove unnecessary force reannounce on interface alerts
This isn't necessary since it can cause issues by doing unnecessary reannounce during startup and network address refresh. This impact of this can be great if it happens on a regular basis and if someone has a lot of torrents.

PR #17261.
2022-06-26 07:26:21 +03:00
Vladimir Golovnev
f8a304abdc Implement base classes for application components
PR #17219.
2022-06-25 15:46:55 +03:00
Chocobo1
41a38428fc Merge pull request #17259 from Chocobo1/cleanup
Make use of chrono literals from std library
2022-06-25 13:23:27 +08:00
Mike Lei
d3850cf98f Improve WebUI progress bar rendering
PR #17258.
2022-06-24 13:18:33 +08:00
Chocobo1
02d906d3ae Initialize pointer to a default value 2022-06-23 21:31:16 +08:00
Chocobo1
6de72ecc77 Make use of chrono literals from std library 2022-06-23 21:31:16 +08:00
Chocobo1
2a5dbe840c Clean up coding style 2022-06-23 13:40:42 +08:00
Li Z
86b6bcc1d9 Fix incorrect "max outgoing port" setting
PR #17252.
2022-06-23 11:49:45 +08:00
Blackspirits
3023cff2b5 NSIS: Update Portuguese translations
PR #17222.
2022-06-20 13:09:17 +08:00
Chocobo1
f3a4764a1d Merge pull request #17233 from Chocobo1/log
Add shutdown logging
2022-06-20 13:08:46 +08:00
Chocobo1
0d46a108b8 Revise Statistics class 2022-06-19 15:51:19 +08:00
Chocobo1
8114c11d58 Add shutdown logging 2022-06-18 17:14:54 +08:00
Chocobo1
e3425cfa9e Defer closing logger instance
So that logger can still be used in shutdown stage.
2022-06-18 17:14:54 +08:00
Chocobo1
af78344e5d Use coarse timestamp format
Since format in milliseconds doesn't add additional value and is
slower than just seconds.
2022-06-18 17:14:42 +08:00
Vladimir Golovnev
a2121f2483 Improve RSS subsystem initialization
PR #17227.
2022-06-18 09:56:49 +03:00
Vladimir Golovnev
7d97905716 WebAPI: Add endpoint to set speed limit mode 2022-06-18 06:12:43 +03:00
Chocobo1
61adfea196 Fix garbage text appeared in log file
Fix up fed969ed64.
2022-06-18 04:18:27 +08:00
Chocobo1
3dd616f6ff Use proper method for manipulating text
`innerText` is too powerful for the job here, use a more
restricted/secure way to manipulate text.

Related: #17211.
PR #17212.
2022-06-17 13:00:32 +08:00
Prince Gupta
d5e6d161f2 Cache last traverse result while parsing file tree
PR #16376.
2022-06-15 20:14:53 +03:00
thalieht
d1515456bc Add checkbox for "Excluded file names"
PR #17206.
2022-06-15 13:16:01 +08:00
brvphoenix
7faa8b7a02 Don't use QCollator when it works on posix mode
PR #17204.
2022-06-14 13:22:30 +08:00
Chocobo1
5b0cbf9eb1 Merge pull request #17187 from Chocobo1/names
Fix wrong file names displayed in tooltip
2022-06-11 12:27:41 +08:00
xavier2k6
74db0576af Sync nonstd/expected with upstream
* Used  `commit: b78dd92cc92b0cfe4eedad823cfd411c13afeb66` (Release v0.6.0)
* Source https://github.com/martinmoene/expected-lite/releases/tag/v0.6.0

PR #17192.
2022-06-11 12:27:13 +08:00
xavier2k6
d0b13f0eb0 GHA CI: "file health" update pre-commit action to v3.0.0
* Update `pre-commit` action to `v3.0.0`
  https://github.com/pre-commit/action/releases
* Bump pre-commit-hooks to `v4.3.0`
  https://github.com/pre-commit/pre-commit-hooks.git

PR #17195.
2022-06-11 12:25:12 +08:00
Emil M George
29a964d5b7 Add support for custom SMTP ports
The port can be optionally specified by appending `:<port>` to the existing SMTP Server field in settings. If no port is specified, then the default port (25 for insecure or 465 for SSL) is used.

Closes #12212.
PR #17157.
2022-06-10 14:02:51 +08:00
mxtsdev
5e6174c087 Add file name filter/blacklist
Blacklist filtered file names from being downloaded from torrent(s).
Files matching any of the filters in this list will have their priority automatically set to "Do not download".
See Options > Downloads >Do not download.

Closes #3369.
PR #17106.
2022-06-10 13:37:46 +08:00
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
63cdfa2d85 Update CIs to correctly regenerate translations files 2022-05-29 02:49:57 +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
f931fc5a85 Merge pull request #17057 from Chocobo1/build
Disable copy, move constructors when inheriting from QObject
2022-05-21 13:12:30 +08: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
567dd3fabb Disable compiler specific extensions
The property is set to ON by default, now turn it off.
2022-05-19 12:55:05 +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
5af96943e3 Merge pull request #17045 from Chocobo1/cleanup
Fix compilation with qmake
2022-05-17 13:14:29 +08:00
Hampton Ford
05325b135d Fix and improve the docs
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>

PR #17034.
2022-05-16 08:40:06 +03: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
80f624e4cc Merge pull request #17004 from Chocobo1/fixes
Improve compatiability with various platforms
2022-05-09 12:14:09 +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
Chocobo1
fe2b49cf81 Merge pull request #16992 from Chocobo1/compose
Add script for docker-compose
2022-05-07 11:26:03 +08:00
Chocobo1
c90f1511dc Merge pull request #16987 from Chocobo1/hardening
Improve docker script
2022-05-06 11:23:15 +08:00
Chocobo1
763d17281f Bump boost requirement to 1.71
This is a prerequisite for using boost stacktrace.
Note that this is not the first version that introduces boost stacktrace but the version that
should be stable enough.

PR #16986.
2022-05-06 11:20:34 +08:00
Chocobo1
1ae5339c33 Add script for docker-compose 2022-05-05 22:01:49 +08:00
Chocobo1
7562e0e870 Add support for search engine
Also mount /tmp as writable, this is required by qbt and not just for
the search engine functionality.
2022-05-05 19:52:10 +08:00
Chocobo1
0e456f33c1 Run qbt-nox as non-root
This is mainly to avoid downloaded files being owned by root which
requires another one or two commands to change the file ownership.
2022-05-05 13:39:52 +08:00
Chocobo1
6778d36454 Make the container filesystem read-only
It is not expected to modify the filesystem of the container.
Mounted volumes (-v) are not affected.
2022-05-05 13:39:27 +08:00
Chocobo1
bc54860ad6 Avoid using valid path for illustrative purpose
Otherwise docker will really create this example path on host machine
which is bad.
2022-05-05 11:51:21 +08:00
Chocobo1
4894578b72 Improve Docker build
* Improves code readability.
* Improve documentation.
* Fix "docker stop" doesn't terminate qbt gracefully which could lead to
  data corruption.
* Provide correct/working bittorrent listening port by default.
* Make use of qbt profile option instead of hacking environment
  variables.
* Simplify build steps.

PR #16976.
2022-05-05 11:02:57 +08:00
Tom Piccirello
fb7f7d0c75 Add support for exporting .torrent from WebUI
PR #16968.
2022-05-04 12:13:24 +08:00
Tom Piccirello
48fa4e116c Fix Docker legal notice when using existing config
If the user is using a pre-existing config, don't update the legal notice.

PR #16974.
2022-05-04 12:12:15 +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
Tom Piccirello
a8b6a40f13 Separate docker image data and config dirs
PR #16972.
2022-05-03 10:58:37 +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
c5ea6b0502 Merge pull request #16941 from Chocobo1/msvc
Fix nogui compilation for Windows
2022-04-30 12:25:24 +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
7432c4dbfe Merge pull request #16922 from glassez/avoid-blocking
Avoid some blocking calls to libtorrent
2022-04-27 07:06:23 +03: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
Amanuense-del-diavolo
de8377ab53 added Dockefile and entrypoint.sh
It uses the latest available version for libtorrent and builds both libtorrent and qBittorrent with Cmake + ninja

The legal notice must be accepted trought an environment variable called LEGAL and passed to docker when the container is run, to set it true one must set "LEGAL=accept"

PR #16828.
2022-04-25 11:39:25 +08: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
xavier2k6
b740cc23d3 GHA CI: Update dependencies
Update `libtorrent` version(s) to `2.0.6` & `1.2.16` in `GHA CI`
- https://github.com/arvidn/libtorrent/releases/tag/v2.0.6
- https://github.com/arvidn/libtorrent/releases/tag/v1.2.16

Update `Boost` version to `1.79.0`
- https://www.boost.org/users/history/version_1_79_0.html

Bump `pre-commit-hooks` version to `4.2.0`
- https://github.com/pre-commit/pre-commit-hooks/releases/tag/v4.2.0

Update `Qt6` version to `6.3.0`
- https://www.qt.io/blog/qt-6.3-released
- https://code.qt.io/cgit/qt/qtreleasenotes.git/about/qt/6.3.0/release-note.md

Note: used `aqtinstall 2.1.0` with `jurplel/install-qt-action` for support of `Qt 6.2.1+`
(this requirement can be removed on official release of `jurplel/install-qt-action v3`)

PR #16888.
2022-04-19 10:32:56 +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
Chocobo1
b9b2ed64f9 Assign temporary data to a variable
This is mainly to avoid dangerous code pattern: getting an iterator on a
temporary object. Previously `data()` returns a const reference so the
code wasn't doing any harm.
2022-04-05 11:49:32 +08:00
Chocobo1
16bc0531f4 Simplify code 2022-04-05 10:39:23 +08:00
Chocobo1
39c34078d6 Move comparison operator out of class 2022-04-04 16:32:14 +08:00
Chocobo1
9318f05e2b Merge pull request #16801 from Chocobo1/int
Migrate away from unsigned integer types
2022-04-04 13:13:36 +08:00
sledgehammer999
95f3073e6f Merge pull request #16745 from sledgehammer999/drop_qt_translations_folder
Drop qt translations folder
2022-04-04 01:56:56 +03:00
Chocobo1
6f4a9390ba Fix wrong conversion to QVariant
It was converted to bool-like type which is wrong.
2022-04-03 13:34:29 +08:00
Chocobo1
0eb6967bb2 Migrate away from unsigned integer types
Signed integers should be preferred in these cases.
2022-04-03 13:34:29 +08:00
Chocobo1
2854630b1c Use signed integer type for counters 2022-04-03 13:33:55 +08:00
Chocobo1
bbd781c420 Omit redundant cast 2022-04-03 13:01:44 +08:00
Chocobo1
f7cfdfcf63 Merge pull request #16784 from Chocobo1/webui
WebUI: show correct location path
2022-04-03 12:54:38 +08:00
Chocobo1
af7c32d3aa WebUI: remove temporary element 2022-04-02 17:26:26 +08:00
Chocobo1
0d334369f0 WebUI: show correct location path
The `path` might contains '&' (delimit character) so it must be
encoded.
Closes #15976.
2022-04-02 17:26:26 +08:00
Chocobo1
08f3630f01 WebUI: make various dialog resizable
And enlarge dialog default width.
2022-04-02 17:26:24 +08:00
Yurii Kolesnykov
2b17838820 Remove outdated info about nightly builds
Closes #16790.
PR #16791.
2022-04-02 13:59:35 +08:00
Chocobo1
0b0338a9cb Merge pull request #16794 from Chocobo1/qmake
Use qmake built-in variable to specify C++ version
2022-04-02 12:33:29 +08:00
Chocobo1
a24f2ae884 GHA CI: bump "setup vcpkg" action version 2022-04-01 15:49:21 +08:00
Chocobo1
ec5b0b5403 Use qmake built-in variable to specify C++ version 2022-04-01 15:35:22 +08:00
Vladimir Golovnev
df2d449f9b Revamp content layout handling
Apply content layout only if desired file names aren't provided.
Remove helpers with confusing signatures.
Don't remove root folder twice.

PR #16724.
Closes #16259.
2022-04-01 09:35:45 +03:00
Chocobo1
eecd221d40 Merge pull request #16767 from Chocobo1/ci
GHA CI: work around error when installing Qt
2022-03-30 12:21:34 +08:00
Chocobo1
3951b891c1 GHA CI: work around error when installing Qt
This is to (temporarily) work around CI errors at jurplel/install-qt-action.
Upstream issue: https://github.com/jurplel/install-qt-action/issues/130
2022-03-29 11:26:57 +08:00
Chocobo1
eab455422f Add missing header
Fix up 75c93d72be.
2022-03-29 11:19:37 +08:00
Chocobo1
75c93d72be Revise string literal usage
This commit covers src/gui folder.
PR #16757.
2022-03-29 10:41:17 +08:00
sledgehammer999
6842e8263d qmake: Bump MACOSX deployment target to 10.15 2022-03-29 01:52:26 +03:00
sledgehammer999
f35d94d98e Update instructions about NSIS packaging
Include a helper a script to gather valid Qt translations for packaging.
2022-03-29 01:52:25 +03:00
sledgehammer999
01206a0e2e Delete Qt translations files 2022-03-29 01:52:24 +03:00
sledgehammer999
cf9e3193bc qmake: Use installed Qt's translations for packaging 2022-03-29 01:52:24 +03:00
sledgehammer999
f5239ffb0b CMake: Use installed Qt's translations for packaging 2022-03-29 01:52:23 +03:00
Chocobo1
746fe7ba09 Merge pull request #16738 from Chocobo1/qstring
Improve function interface
2022-03-28 12:28:28 +08:00
Chocobo1
7c1a986e61 Implement stringable interface for Version type 2022-03-26 13:58:25 +08:00
Chocobo1
c6b772da11 Improve function interface
`SettingsStorage` methods require `QString` so make `SettingValue` follow it.
`Path::operator+` can use `QStringView` to accept wider audience.
2022-03-26 12:41:02 +08:00
An0n
11cfe38d1c Fix WebUI crash due to missing tags from config
Tags can be missing from config but set inside .fastresume. May happen due to corrupted/deleted config.
Closes #11906.
PR #16711.
2022-03-26 11:56:18 +08:00
Chocobo1
4ca6de2b54 Revise string literal usage
PR #16703.
2022-03-26 11:53:50 +08:00
Chocobo1
e1abcc684a Merge pull request #16705 from Chocobo1/path
Use proper type to represent a path
2022-03-25 13:00:11 +08:00
Chocobo1
bbd936fdfa Don't use explicit memory management
And avoid dangling pointers.
2022-03-24 14:44:38 +08:00
Chocobo1
f58eed13d0 GHA CI: use Qt6 for Windows builds
PR #16696.
2022-03-24 12:19:07 +08:00
Chocobo1
8a708fd97e Use proper type to represent a path 2022-03-23 22:04:05 +08:00
An0n
bf8d993743 Change Downloaded to Times Downloaded in trackers tab
PR #16677.
2022-03-23 12:57:45 +08:00
Vladimir Golovnev
c029122a8e Avoid integer overflow when calculating working set size 2022-03-23 07:56:59 +03:00
Sam James
54327d579b CMake: fix systemd directory help text
The option is case sensitive.
PR #16695.

Signed-off-by: Sam James <sam@gentoo.org>
2022-03-23 12:56:14 +08:00
Chocobo1
6c10aa33e1 Provide interface for serialization to string type
PR #16685.
2022-03-23 12:55:41 +08:00
sledgehammer999
b7c098c5e6 Sync translations from Transifex and run lupdate 2022-03-22 15:47:05 +02:00
Vladimir Golovnev
c18c42e866 Merge pull request #16686 from glassez/set-location
Fix "Set location" to be really applied
2022-03-22 13:12:43 +03:00
Vladimir Golovnev (Glassez)
386f99cb1d Fix "Set location" to be really applied 2022-03-21 11:58:37 +03:00
Vladimir Golovnev (Glassez)
a4b606c6e9 Fix compilation issues due to inappropriate QString usage 2022-03-21 11:50:32 +03:00
AbeniMatteo
baa8d2c326 Add option to toggle filters sidebar
PR #15409.
2022-03-21 12:41:06 +08:00
Chocobo1
e1ca0f3ff9 Merge pull request #16669 from Chocobo1/literal
Use QString literals
2022-03-21 12:09:43 +08:00
Vladimir Golovnev
ca2be2f499 Prevent Digest32 shared data from being detached
Delayed hash string generation should not cause detaching of shared data.

PR #16664.
2022-03-20 12:26:13 +03:00
Vladimir Golovnev
5960e7dda6 Prevent crash when open torrent destination folder
Uses the same workaround as Qt does to call ShellExecute() when you use QDesktopServices::openUrl().
PR #16670.
Closes #16423.
2022-03-20 11:08:27 +03:00
Chocobo1
efc04645b7 Use QString literals
It covers src/webui and enables `QT_NO_CAST_FROM_ASCII`.
2022-03-20 13:33:40 +08:00
Chocobo1
f888fb4ac7 Remove unused code 2022-03-19 15:57:37 +08:00
Chocobo1
e71e97cb68 Merge pull request #16652 from Chocobo1/literal
Use QString literals
2022-03-18 14:09:29 +08:00
Chocobo1
1b4c5fd34d Remove unused variable 2022-03-18 12:48:37 +08:00
Chocobo1
802ec5a14e Use QString literals
This patch covers src/gui and some leftovers from previous commit.
2022-03-18 12:46:01 +08:00
Chocobo1
5341478036 Merge pull request #16647 from NotTsunami/hscroll
Add horizontal scrolling for tracker list and torrent content
2022-03-18 12:43:32 +08:00
Chocobo1
7694b21dff Enlarge "speed limits" icons
And make use of QStyle pixelMetric().
PR #16630.
2022-03-18 12:27:45 +08:00
Tyler Dunn
cf061b7d30 Allow buttons to be focusable
This improves accessibility.
PR #16648.
2022-03-17 12:51:47 +08:00
Chocobo1
7fffb6526c Remove redundant properties
And revise tooltip messages.
PR #16651.
2022-03-17 12:50:08 +08:00
NotTsunami
dd5b16831c Unify coding style 2022-03-16 21:45:24 -04:00
Vladimir Golovnev
b3ca2ea179 Merge pull request #16573 from glassez/resume-data
Prevent loading resume data with inconsistent ID
2022-03-16 20:30:04 +03:00
NotTsunami
b5d67f90e4 Add horizontal scrolling for tracker list and torrent content 2022-03-15 15:05:47 -04:00
Vladimir Golovnev (Glassez)
ce42f7c9f1 Properly handle metadata download for an existing torrent 2022-03-15 18:17:24 +03:00
Chocobo1
02869d7428 Avoid unnecessary lookups
Fix up 30319e51e5.
PR #16629.
2022-03-15 12:33:12 +08:00
Aleksandr Cupacenko
67b35b76ac Fix C++ word breaking
Fixes #13805.
PR #16636.
2022-03-14 12:27:44 +08:00
Chocobo1
baebabbfd8 Merge pull request #16639 from Chocobo1/hash
Avoid redundant hashing
2022-03-14 12:26:55 +08:00
Chocobo1
154ee1a73e Use hashing helpers provided by Qt6 2022-03-13 17:37:54 +08:00
Chocobo1
b3fb6bd990 Avoid redundant hashing
The return type of `std::hash()` is larger (or equal) than what
`qHash()` requires so we can omit hashing it again.
2022-03-13 17:37:54 +08:00
Chocobo1
926d51839f Update function signature for Qt6 qHash()
Since the `qhash()` signature has changed in Qt6.
2022-03-13 16:05:11 +08:00
Chocobo1
8de966ea88 Merge pull request #16585 from Chocobo1/qstring
Use QString literals
2022-03-12 12:49:08 +08:00
Chocobo1
85b0a40a0e Merge pull request #16587 from jagannatharjun/tracker-filter
Optimize torrent filters in GUI
2022-03-12 12:48:49 +08:00
Chocobo1
88fe94bd6a Remove obsoleted functions from Utils::Gui namespace
`widget` parameter is kept for now to avoid major disruption for other PR.
Also add comments for loading svg images.

PR #16613.
2022-03-11 13:40:58 +08:00
Aleksandr Cupacenko
1b53c590f2 Allow blank lines in multipart form-data input
Fixes #11298.
PR #16579.
2022-03-11 13:40:22 +08:00
Chocobo1
2ee5b35f48 Use proper image loading path for SVG icons 2022-03-11 00:11:30 +08:00
Chocobo1
f0dd7b7dae Use QString literals
This patch covers src/app and src/base folders.
Follow up of ab64ee872b.
2022-03-11 00:11:30 +08:00
Chocobo1
f08c0afbea Update NSIS French translation
PR #16562.

Co-authored-by: RqndomHax <paul.codepro@gmail.com>
2022-03-10 12:32:53 +08:00
Chocobo1
5a417c6a29 Merge pull request #16584 from Chocobo1/pr_16548
Allow setting the number of maximum active checking torrents
2022-03-09 10:10:15 +08:00
Chocobo1
9f32e6e50d Fix wrong parentheses
Fix up 294ea17222.
2022-03-08 13:58:02 +08:00
An0n
801cfdbc24 Allow setting the number of maximum active checking torrents
This is to allow re-checking of multiple torrents simultaneously. This will benefit users who
have multiple disks or SSD.
Closes #15296.

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2022-03-08 13:24:12 +08:00
xavier2k6
889d994dbc Remove unnecessary UI properties from "IP Filter Refresh" button
PR #16575.
2022-03-08 13:22:23 +08:00
Chocobo1
97c28e1e51 Merge pull request #16594 from Chocobo1/alert
Add option for enable/disable performance warnings from libtorrent
2022-03-08 13:19:54 +08:00
Prince Gupta
ad6e2b4b94 Create hash string of Digest on demand
most of the time hash string is not needed and InfoHash is often used as
temporaries for torrent searching in handling of torrent alerts. This
improves the creation time of Infohash
2022-03-08 01:14:36 +05:30
Prince Gupta
da12daffee Cache tracker item in TrackerFilterList 2022-03-08 01:12:06 +05:30
Prince Gupta
30319e51e5 Improve Status Filter
replaces quadratic update operation with linear
2022-03-08 01:12:06 +05:30
Chocobo1
294ea17222 Provide upstream documentation link for performance warning 2022-03-07 13:26:37 +08:00
Chocobo1
fad954df18 Add option for enable/disable performance warnings from libtorrent 2022-03-06 21:05:17 +08:00
Prince Gupta
25be00931a Optimize tracker insertion in TrackerFiltersList 2022-03-06 12:04:01 +05:30
Prince Gupta
cd9ed1706d Improve torrent event handling in TrackerFiltersList 2022-03-06 12:04:01 +05:30
Chocobo1
b034b86be8 Merge pull request #16574 from xavier2k6/update_actions
GHA CI: Update multiple workflow `actions`
2022-03-06 13:00:09 +08:00
An0n
aa189a7fc6 Disable force reannounce when it is not possible
Closes #12080.
PR #16551.
2022-03-06 12:59:31 +08:00
xavier2k6
074cbdad28 GHA CI: Update upload-artifact action to v3 2022-03-04 23:13:36 +00:00
Vladimir Golovnev (Glassez)
cbc0ef860b Prevent loading resume data with inconsistent ID 2022-03-04 09:22:56 +03:00
Chocobo1
ab64ee872b Use QString literals
The plan is to define `QT_NO_CAST_FROM_ASCII` eventually.
PR #16561.
2022-03-04 13:25:22 +08:00
xavier2k6
a63515b8f4 GHA CI: Update stale action to v5 2022-03-02 19:44:46 +00:00
xavier2k6
4dcd6df136 GHA CI: Update setup-python action to v3 2022-03-02 19:41:43 +00:00
xavier2k6
cea1bbde23 GHA CI: Update checkout action to v3 2022-03-02 19:39:35 +00:00
Aleksandr Cupacenko
2c8447853b Focus save path when Manual mode is selected initially
Closes #15972.
PR #16536.
2022-03-02 13:27:22 +08:00
Chocobo1
116664285d GHA CI: Don't cancel CI builds on non-pull-request branches
Fix up 2652c73a4f.
PR #16558.
2022-03-02 13:26:13 +08:00
Vladimir Golovnev
213b18e33b Merge pull request #16531 from glassez/save-path
Correctly handle changing of global save path
2022-03-01 19:59:35 +03:00
Vladimir Golovnev
299f981441 Allow to limit max memory working set size
PR #16485.
2022-03-01 16:42:25 +03:00
An0n
7ea827f8d3 Add right click menu for status filters
This will allow users to perform action on all torrents with a single click instead of having to select all with ctrl+A or other cumbersome ways. Basically it copies the function found in tracker/category filters.

Closes #13398.
PR #16547.
2022-03-01 13:18:48 +08:00
An0n
c2af5c6a3f Allow setting priority for partially downloaded multi-file torrent
Currently you can't directly change the priority of a partially completed multi file torrent. You'll have to start downloading those files and then change their priority.

Closes #10994.
Closes #8673.
PR #16546.
2022-03-01 12:53:39 +08:00
thalieht
63812ca951 Don't use hack to make the first column movable
PR #16545.
2022-03-01 12:50:10 +08:00
Aleksandr Cupacenko
98bdfcef65 Fix scrolling to the lowermost visible torrent
Fixes #3221.
PR #16543.
2022-03-01 12:49:40 +08:00
Chocobo1
ac97ed685f Add tuning options related to performance warnings
Related: #16462.
PR #16538.
2022-03-01 12:44:48 +08:00
Vladimir Golovnev (Glassez)
c5ff9b353c Allow to disable Automatic mode when "temp" path changed 2022-02-28 09:41:44 +03:00
Vladimir Golovnev (Glassez)
04c1988665 Correctly handle changing of global save path 2022-02-28 09:04:37 +03:00
Chocobo1
36c14ca587 Merge pull request #16539 from Chocobo1/ci
GHA CI: install boost library manually
2022-02-28 12:43:58 +08:00
Chocobo1
0c118bed61 GHA CI: disable uploading built artifacts for macOS
The binary aren't usable universally because users are required to
install related libraries.
2022-02-27 15:45:27 +08:00
Chocobo1
6c6474291e GHA CI: install boost library manually
libtorrent 2.0.5 has build issues with boost >= 1.78.
2022-02-27 15:45:26 +08:00
xavier2k6
7fa89c9ba4 GHA CI: Update "WebUI" setup-node action to v3
PR #16532.
2022-02-27 12:49:38 +08:00
Aleksandr Cupacenko
d2aad3a3ca Rename content tab "Size" column to "Total Size"
Closes #7348.
PR #16526.
2022-02-27 12:48:11 +08:00
Aleksandr Cupacenko
ca09b0491e Enable shortcut folders for the Open and Save directory dialogs
PR #16527.
2022-02-26 22:24:50 +03:00
Aleksandr Cupacenko
2e08ae82b1 Enable Combobox editor for the "Mixed" file download priority
Fixes #1544.
PR #16522.
2022-02-26 12:53:41 +08:00
Chocobo1
2652c73a4f GHA CI: cancel outdated in-progress workflow runs
This will only cancel outdated workflow runs on PR branches and won't affect other normal repo
branches.
PR #16511.
2022-02-25 13:34:28 +08:00
Chocobo1
a21bff1dbd Merge pull request #16483 from Chocobo1/preference1
Convert to QString literals
2022-02-22 14:15:49 +08:00
Chocobo1
14fc3dc9b3 Suppress conversion warning 2022-02-21 13:58:51 +08:00
Chocobo1
5cb295341c Convert to QString literals 2022-02-21 13:58:51 +08:00
Chocobo1
b854c3b00e Unify log messages format
This improves readability and may allow users to match log message with
better accuracy.
Now log message is consisted of 2 parts:
The first part is a short sentence describing the event. It should avoid
writing out the specifics of the event as it will be described in the
next part of the message. The sentence should use correct tense of the
event.
The second part consist of `Name: Value` pairs which will provide
sufficient info for the event.

Note that none of the message parts is mandatory, one of them can be
omitted when the resulting log message is clear enough.

PR #16437.
2022-02-21 13:07:04 +08:00
Vladimir Golovnev
2d3ff6a97c Use std::optional to represent "any value" filters
PR #16460.
2022-02-20 13:17:34 +03:00
Chocobo1
c627ed4b6f GHA CI: exclude checking for GUI i18n files
And bump hooks version along the way.
PR #16484.
2022-02-20 13:43:57 +08:00
Vladimir Golovnev
70ec183fca Merge pull request #16444 from glassez/path-has-ext
Improve performance of checking path extension
2022-02-19 07:08:54 +03:00
Vladimir Golovnev (Glassez)
1e45b7f50b Add fast way of removing suggested extension 2022-02-18 11:37:51 +03:00
Vladimir Golovnev (Glassez)
293479a1f2 Improve performance of checking path extension 2022-02-18 11:37:51 +03:00
Juanjo Jiménez
7b8962a796 Update NSIS translations for "Spanish" and "Spanish International"
PR #16455.
2022-02-18 11:28:43 +08:00
Chocobo1
852a14992c Add literal operator to efficiently construct QString in Qt5
PR #16448.
2022-02-18 11:28:04 +08:00
Kevin Cox
37e6a9ebc2 Fix UI crash when torrent is in non-existent category.
This checks that `category_list[categoryHash].torrents` is truthy before dereferencing it. In some cases the API response will have a torrent in a category that doesn't exist resulting in the check to return `undefined` which is not `null`. This broadens the check so that it will create the category even if null.
PR #16432.
2022-02-17 12:20:54 +08:00
Vladimir Golovnev
b3f5bf1583 Try to recover missing categories
PR #16430.
2022-02-16 10:27:36 +03:00
sledgehammer999
a3a8c19dc2 Sync translations from Transifex and run lupdate 2022-02-14 19:28:07 +02:00
Chocobo1
bc94de5626 Merge pull request #16428 from Chocobo1/path
Improve Path constructor
2022-02-14 14:02:50 +08:00
Vladimir Golovnev
c3a64b3d6c Cache file priorities
Speedup access to file priorities by avoiding extra blocking call to libtorrent thread.
Improve the Torrent interface by hiding the asynchrony of file priority changes behind the scenes.

PR #16425.
2022-02-13 08:07:30 +03:00
Chocobo1
70eed10a34 Fix wrong size
Fix up cf96e6c642.
2022-02-12 16:54:38 +08:00
Chocobo1
56c3983885 Improve Path constructor performance 2022-02-12 16:54:38 +08:00
Vladimir Golovnev
78eaa49cd6 Correctly register PathList alias
PR #16411.
2022-02-10 08:12:33 +03:00
Chocobo1
2668a42f0c Merge pull request #16408 from Chocobo1/vararray
Use QVarLengthArray whenever applicable
2022-02-10 12:44:41 +08:00
Vladimir Golovnev
4a7f1116ac Improve tracker status handling
PR #16383.
2022-02-09 18:23:41 +03:00
Chocobo1
f12ce78b5c Remove hack for outdated IE 6 browser
The `mask()` isn't valid in CSS.
2022-02-09 19:00:28 +08:00
Chocobo1
610009fb7f Make Path::operator== a free function 2022-02-09 19:00:27 +08:00
Chocobo1
4cb075b168 Use "table look-up" method for reversing byte
This method takes constant time and is less prone to (CPU) pipeline stalling due to less
computation. Also it is slightly faster than the previous method.
2022-02-09 19:00:27 +08:00
Chocobo1
cf96e6c642 Use QVarLengthArray whenever applicable 2022-02-09 19:00:24 +08:00
Vladimir Golovnev
dd1bd8ad10 Implement class for handling filesystem paths
PR #15915.
2022-02-08 06:03:48 +03:00
Vladimir Golovnev
facfa26eed Allow to use Category paths in "Manual" mode
If the option is enabled any relative save path will be resolved against an appropriate Category path instead of Global default one.

PR #16330.
2022-02-02 09:24:09 +03:00
Prince Gupta
0012a3ede7 Optimize completed files handling
PR #16329.

Co-authored-by: Vladimir Golovnev (Glassez) <glassez@yandex.ru>
2022-02-01 08:29:54 +03:00
Vladimir Golovnev
b61a818a3f Merge pull request #16333 from thalieht/newdlg
Add Select All/None buttons in new torrent dialog
2022-01-31 15:38:33 +03:00
Chocobo1
a2c44dedce Fix crash when shutting down and clicked on system tray icon
Disconnect all signals of system tray icon when shutting down.

Closes #16324.
PR #16328.
2022-01-31 11:54:44 +08:00
thalieht
a8ad4f784a Fix "Free space on disk" in new torrent dialog
Always initialize it.
2022-01-30 18:52:18 +02:00
thalieht
78d69bcbf0 Add Select All/None buttons in new torrent dialog 2022-01-30 18:52:18 +02:00
Prince Gupta
414361a3db Improve tracker error handling
* Improve tracker error handling
* Fix typo in function name

PR  #16298.
2022-01-30 08:56:31 +03:00
Prince Gupta
1d4071d6d8 Don't rename file because of difference in path separator
PR #16317.
2022-01-30 08:54:37 +03:00
Vladimir Golovnev
47daf1b358 Allow to open incomplete files from content view
Fixes regression from f44341a8e2.

PR #16318.
2022-01-30 08:52:16 +03:00
Chocobo1
7a910a8cc1 Merge pull request #16256 from Chocobo1/bitarray
Speed up bitfields conversion
2022-01-28 11:59:57 +08:00
Vladimir Golovnev
9818c7b6a4 Open correct directory when clicked on Browse button
PR #16252.
2022-01-27 07:41:30 +03:00
Vladimir Golovnev
ca9e5e8531 Change torrent moving state when it is cancelled
PR #16267.
2022-01-27 07:40:17 +03:00
Chocobo1
aafee60033 Allocate memory on stack whenever feasible
The fast path gives another 20% speed up than the slower path.
2022-01-27 03:36:06 +08:00
Vladimir Golovnev
adf7c4ffb6 Merge pull request #16268 from glassez/fix-15955
Store hybrid torrents using "torrent ID" as basename
2022-01-26 15:17:31 +03:00
Prince Gupta
96965ae347 CMake: Call UIC on the .ui files manually
Fixes unnecessary recompilation when editing GUI files.

PR #16151.
2022-01-26 14:44:44 +03:00
Vladimir Golovnev
bc2ef5d726 Add confirmation for enabling Auto TMM from context menu
* Add confirmation for enabling Auto TMM from context 
* Add tooltip to Automatic Torrent Management context menu action

PR #16241.
2022-01-26 06:56:46 +03:00
Vladimir Golovnev (Glassez)
7a539d9890 Store hybrid torrents using "torrent ID" as basename 2022-01-25 11:39:32 +03:00
Vladimir Golovnev (Glassez)
c40408b337 Make Digest32 implicitly shared class 2022-01-25 10:18:23 +03:00
Chocobo1
4e2daf117b Speed up bitfields conversion
The old code took 3~5 times longer than the newer version.
2022-01-25 12:19:50 +08:00
Chocobo1
9553afc3c2 Merge pull request #16247 from Chocobo1/count_bits
Speed up piece relevance calculation
2022-01-25 12:11:36 +08:00
Vladimir Golovnev
26352c9eb4 Cache pieces info
PR #16238.
2022-01-25 06:05:16 +03:00
thalieht
62c167fc77 Add tooltip to Automatic Torrent Management context menu action 2022-01-24 18:32:43 +02:00
thalieht
03c774eae7 Add confirmation for enabling Auto TMM from context menu
Closes #16046
2022-01-24 18:32:43 +02:00
Chocobo1
53992bf0d5 Initialize class variable in initializer list 2022-01-24 13:47:34 +08:00
Chocobo1
ff99e5ac9a Speed up piece relevance calculation
For ~800 pieces, this roughly cuts the run time (of this function) in
half.
2022-01-24 12:04:26 +08:00
Prince Gupta
0cc318664d Improve Torrent content tree structure creation
Use QHash to cache folder items.
PR #16183.
2022-01-24 10:55:06 +08:00
Chocobo1
43c427b253 Merge pull request #16167 from Chocobo1/auto-resize
Add "Auto resize columns" functionality
2022-01-24 10:54:26 +08:00
Chocobo1
44c8d60a70 Remove unused parameter 2022-01-23 15:03:26 +08:00
Chocobo1
54252184ab Make use of std algorithms
Since the result code is shorter.
2022-01-23 15:03:26 +08:00
Chocobo1
7ae68b20e7 Add "Auto resize columns" functionality 2022-01-23 15:03:05 +08:00
Chocobo1
208234b934 Clean up code related to show/hide columns 2022-01-21 22:59:21 +08:00
thalieht
1729b9f29c Fix wrong closing brace position
Regression from 0086bf8958.
PR #16172.
2022-01-20 12:30:46 +08:00
Vladimir Golovnev
5d69334287 Don't start separate event loop for QFileDialog
It conflicts with QMenu on Qt6 that causes the crash.

PR #16158.
2022-01-20 07:22:16 +03:00
Vladimir Golovnev
4d54fb675f Correctly handle received metadata
It did not work correctly, since it assumed that 'lt::torrent_plugin' is created at an earlier stage and is able to track all changes in the torrent state, but in reality it turned out that it was created after the torrent moved to the `downloading_metadata` state, so we had to additionally handle it in the constructor.

PR #16121.
2022-01-16 16:06:15 +03:00
Chocobo1
e93de54eb5 Merge pull request #16099 from Chocobo1/errormsg
Revise error message
2022-01-15 12:01:55 +08:00
Vladimir Golovnev
43441d8291 Handle missing torrent alerts
PR #16085.
2022-01-14 15:18:18 +03:00
Chocobo1
d6dce1efe9 Add comment for new libtorrent build flag
Upstream change:
66def89089
2022-01-14 14:48:47 +08:00
Chocobo1
dca69f053a Remove outdated build configuration 2022-01-14 14:48:47 +08:00
Chocobo1
5ebbed8160 Revise error message
Remove the period mark at the end of error message since
`errc.message()` already contains one.
2022-01-14 14:48:41 +08:00
thalieht
3fdb330bd9 Restore all settings to the torrent list's context menu
Set location
Category
Sequential download
Download first/Last pieces first
Automatic Torrent Management

PR #16016.
2022-01-14 14:45:03 +08:00
Chocobo1
c05dbc451a GHA CI: build libtorrent with /guard:cf flag
qbt cmake script enables that flag already, so it make sense to build
dependencies with it too.
PR #16083.
2022-01-14 14:43:22 +08:00
Vladimir Golovnev
5f623e32c4 Correctly handle XML parsing errors
PR #16071.
2022-01-13 09:36:08 +03:00
thalieht
7c37c5c06f Update the torrent's download path field when changing category
In torrent options dialog while in Automatic Management Mode.
PR #16026.
2022-01-13 12:44:50 +08:00
Chocobo1
4d541ca969 Add Qt6 version to INSTALL file
PR #16054.
2022-01-13 12:39:15 +08:00
Chocobo1
e4a67183bd Update default value of "Type of service for peers"
Upstream change:
3d701c7380
PR #16036.
2022-01-12 11:53:07 +08:00
sledgehammer999
d25be686ee Merge pull request #16030 from sledgehammer999/migrate_proxy_enum
Migrate proxy settings
2022-01-12 02:51:57 +02:00
Vladimir Golovnev
a3be239a60 Keep "torrent info" alive while generating .torrent file
PR #16018.
2022-01-11 07:29:42 +03:00
Vladimir Golovnev
709a053c7c Merge pull request #16009 from glassez/dont-move-into-itself
Don't try to move storage into its current location
2022-01-11 07:26:22 +03:00
Vladimir Golovnev
d39c6bef4b Correctly handle Auto TMM in Torrent Files Watcher
PR #13690.
2022-01-11 07:25:30 +03:00
Vladimir Golovnev
84a8158aa2 Correctly track the root folder name change
PR #16004.
2022-01-11 07:24:24 +03:00
sledgehammer999
a7c5826e05 Migrate proxy settings
Q_ENUM_NS(ProxyType) was introduced in 4.4.0.
Before that wrapping QMetaEnum used the int value itself for loading/storing.

Closes #15994
2022-01-11 02:50:03 +02:00
Nicolas Fella
2da39e2fbb Mark as single window app in .desktop file
qBittorrent is a single-window application.
By marking it as such desktop environments know to not offer to open
a new window for it.
This is a new standard key intruduced in
3ea3bc26e2
PR #15996.
2022-01-10 13:31:53 +08:00
Chocobo1
d6e0164766 WebAPI: fix wrong key used for categories
Regression from 1c0f8b4289.
Closes #15969.
PR #15988.
2022-01-10 13:31:15 +08:00
Vladimir Golovnev (Glassez)
fbc85bed64 Move torrent immediately when "save path" is changed 2022-01-10 08:18:34 +03:00
Vladimir Golovnev (Glassez)
52b54fe154 Don't try to move storage into its current location 2022-01-09 21:14:49 +03:00
Vladimir Golovnev
f44341a8e2 Handle .!qB extension behind the scenes
PR #15920.
2022-01-08 08:45:50 +03:00
Chocobo1
9f6130cbaa Move new line character out of translation string
PR #15948.
2022-01-08 12:24:49 +08:00
Chocobo1
24d73f5822 Merge pull request #15947 from Chocobo1/remove
Remove TODO and NEWS files
2022-01-08 12:24:10 +08:00
thalieht
d3bdeaab3f Replace "seeding_duration" with "finished_duration" everywhere
Closes #10223.
PR #13601.
2022-01-07 15:22:51 +08:00
Chocobo1
b66f4b9322 Remove TODO and NEWS files
The contents are outdated and the files are not in use.
`configure.ac` is adjusted to suppress automake errors.
https://www.gnu.org/software/automake/manual/html_node/Strictness.html#index-Strictness_002c-foreign
2022-01-07 12:19:01 +08:00
Chocobo1
9dfe5f5f07 Sort entires 2022-01-07 12:18:03 +08:00
sledgehammer999
d6fc020ba7 Bump to 4.5.0alpha1 2022-01-06 20:47:06 +02:00
sledgehammer999
8397b118b7 Update Changelog 2022-01-06 20:37:49 +02:00
sledgehammer999
74dc000ac1 Sync translations from Transifex and run lupdate 2022-01-06 20:35:45 +02:00
sledgehammer999
9b61991523 Merge pull request #15926 from sledgehammer999/fix_migration
Correct the order of the migrated settings' mappings
2022-01-06 14:46:48 +02:00
sledgehammer999
702c79a92f Don't delete old config keys yet
It will allow users to go back to previous versions without
losing their settings.
2022-01-05 01:01:10 +02:00
sledgehammer999
a27822b557 Correct the order of the migrated settings' mappings 2022-01-04 16:48:17 +02:00
sledgehammer999
bdcb00a3b2 Merge pull request #15923 from sledgehammer999/misc_fixes
Misc fixes before v4.4.0
2022-01-04 16:40:37 +02:00
sledgehammer999
ac5a485651 Disambiguate the data type 2022-01-04 01:39:01 +02:00
sledgehammer999
e8c65388eb Bump copyright year 2022-01-04 01:39:00 +02:00
sledgehammer999
f2cbb61d49 Sync translations from Transifex and run lupdate 2022-01-04 00:39:43 +02:00
sledgehammer999
0a1c61d9d3 Merge pull request #15922 from glassez/fix-paths
Correctly concatenate path components
2022-01-04 00:17:54 +02:00
Chocobo1
01a0fff4c2 Add missing field initial value
Suppresses the following warning:
qBittorrent/src/base/bittorrent/categoryoptions.cpp: In static member function ‘static BitTorrent::CategoryOptions BitTorrent::CategoryOptions::fromJSON(const QJsonObject&)’:
qBittorrent/src/base/bittorrent/categoryoptions.cpp:44:59: warning: missing initializer for member ‘BitTorrent::CategoryOptions::DownloadPathOption::path’ [-Wmissing-field-initializers]
   44 |         options.downloadPath = {downloadPathValue.toBool()};
2022-01-03 23:42:48 +02:00
Chocobo1
bf9516d164 Simplify code
This version saves an `if` conditional.
2022-01-03 23:42:48 +02:00
Vladimir Golovnev (Glassez)
fdbf8cb0ee Correctly concatenate path components 2022-01-03 19:44:47 +03:00
Prince Gupta
7e8a176751 Support folder based UI Themes
Support folder based Themes in UIThemeManager.
Add option to select config.json as them file.

PR #15888.
2022-01-03 09:11:12 +03:00
Vladimir Golovnev
61504ae3b1 Merge pull request #15793 from glassez/save-path
Redesign "Incomplete folder" feature
2022-01-02 22:25:00 +03:00
Chocobo1
dd76525372 Merge pull request #15911 from Chocobo1/pair
Replace Qt functions with std counterparts
2022-01-02 13:34:31 +08:00
Vladimir Golovnev (Glassez)
1c0f8b4289 Redesign "Incomplete folder" feature
Change "Incomplete/temp folder" term with "download folder".
Allow to set "download folder" per torrent (in manual mode) and per category (in automatic mode).
2022-01-01 20:58:49 +03:00
Chocobo1
63043b4927 Replace min, max, clamp functions with std counterparts 2022-01-01 15:22:07 +08:00
Chocobo1
3ea4c66d41 Replace QPair with std::pair 2022-01-01 15:22:07 +08:00
Chocobo1
781d7fbf1a Merge pull request #15884 from Chocobo1/migrate
Migrate "setting key mappings" to upgrade code
2021-12-25 14:05:52 +08:00
Chocobo1
e7ebbffbfd Set appropriate migration version number for new installations 2021-12-24 14:50:06 +08:00
Chocobo1
39f054eef6 Migrate "setting key mappings" to upgrade code 2021-12-24 14:50:06 +08:00
Chocobo1
7a620c794d Fix garbage message when reporting error
PR #15883.
2021-12-24 12:28:22 +08:00
Chocobo1
cc13f3e10d GHA CI: Don't upload built artifacts for dynamic linking builds
As those won't work on testers system unless they install *all* and
same version of the dependent libraries too.

PR #15870.
2021-12-21 12:26:50 +08:00
Vladimir Golovnev (Glassez)
b0e41abf5a Allow to set placeholder for FileSystemPathEdit 2021-12-20 08:56:33 +03:00
Vladimir Golovnev
5347897b7d Merge pull request #15852 from glassez/torrent-info
Improve torrent content handling
2021-12-20 08:54:46 +03:00
Vladimir Golovnev (Glassez)
6f8fae9a7b Apply selected layout to displayed torrent content 2021-12-19 16:16:16 +03:00
Vladimir Golovnev (Glassez)
62b50d1475 Make TorrentInfo immutable 2021-12-19 16:16:16 +03:00
Vladimir Golovnev
2fb0c86f1e Add "Show torrent options" double-click action
PR #15853.
Closes #15837.
2021-12-19 09:01:20 +03:00
Chocobo1
aedd997604 Don't expire connection when there are data in buffer
For writing, this ensures expire handler won't be executed in a small
time window, that is after `m_socket->write()` and before
`QIODevice::bytesWritten()` signal.
For reading, this let the socket to have the chance to process the
received data instead of dropping it.

PR #15849.
2021-12-18 12:28:30 +08:00
Chocobo1
aa3da942cb Use correct URL scheme when https is enabled
Closes #15844.
PR #15847.
2021-12-17 11:49:11 +08:00
Chocobo1
87e1a14a4b Merge pull request #15831 from Chocobo1/server
Improvements for WebAPI server
2021-12-16 13:38:05 +08:00
Chocobo1
00f6bb7c82 Merge pull request #15829 from Chocobo1/trayIcon
Simplify tray icon related code
2021-12-15 12:51:37 +08:00
Chocobo1
cca93c2be2 Show GUI lock icon after system tray icon is initialized 2021-12-14 14:41:17 +08:00
Chocobo1
ad9d0608d4 Avoid needless string-bytes conversion
This saves a few microseconds.
2021-12-14 13:52:34 +08:00
Chocobo1
3c5688c6f6 Reserve enough buffer space according to response content size 2021-12-14 13:52:34 +08:00
Chocobo1
ece92a886a Restart idle timer on sending network response 2021-12-14 13:52:33 +08:00
Chocobo1
85777ea491 Simplify tray icon related code 2021-12-13 15:56:20 +08:00
Chocobo1
b8a84dbd83 Disable system tray icon menu when app is exiting 2021-12-13 15:56:16 +08:00
Chocobo1
35c31906b7 GHA CI: don't let lupdate scan boost library
As it produces superflous warnings.
2021-12-13 15:08:36 +08:00
Chocobo1
1fa940876f Remove redundant UI cleanups
Just exiting the application will handle all of them automatically.
2021-12-13 15:08:25 +08:00
Chocobo1
c652123145 Merge pull request #15811 from Chocobo1/configVersioning
Introduce versioning on main configuration file
2021-12-12 12:53:28 +08:00
Chocobo1
1c52fff1cc Unify value loading paths
The idea is to try load every intermediate value from the base case and
then convert them to their respective type.
2021-12-11 01:45:49 +08:00
Chocobo1
261f08b90e Sort WebUI language selection values 2021-12-11 01:45:49 +08:00
Chocobo1
2d48581570 Move main window setting to its own section 2021-12-11 01:45:49 +08:00
Chocobo1
b8a7ecfe69 Introduce versioning on main configuration file 2021-12-11 01:45:49 +08:00
Chocobo1
cbc2de6b85 Use proper method for checking value existence 2021-12-09 15:57:01 +08:00
xavier2k6
9d2bb67834 GHA CI: Update libtorrent version(s)
PR #15819.
2021-12-09 12:32:52 +08:00
Vladimir Golovnev
3d7ff9765a Make meaning of "torrent root path" consistent
PR #15816.
2021-12-09 06:12:47 +03:00
Chocobo1
28f2def21f Remove redundant layer of QVariant in Preferences class
PR #15812.
2021-12-07 12:17:37 +08:00
Chocobo1
0ee303789a GHA CI: include translation file generation in test
PR #15814.
2021-12-07 12:17:15 +08:00
Chocobo1
6ccc92020c Disable "add peers" menu items instead of hiding it
Menu item in disabled state can show tool tip to help user understand
why it is unavailable.
Related issue: #15785.
PR #15787.
2021-12-06 13:54:38 +08:00
Chocobo1
e3fe66d3ec Store enum type in settings directly
Affected settings will be migrated to new keys so nothing should break.

PR #15800.
2021-12-06 13:53:52 +08:00
OctopusET
ab5605d54b Use proper string for Korean language
PR #15799.
2021-12-01 12:06:05 +08:00
Chocobo1
a7a90613c2 Merge pull request #15796 from Chocobo1/clazy
Fix defects found by clazy
2021-11-30 12:02:33 +08:00
Chocobo1
19d95ebd10 Add comment for qHash implementation requirements
As clazy report false-positive on this.
2021-11-29 01:28:49 +08:00
Chocobo1
0e1849346b Avoid iterating over a temporary variable 2021-11-29 00:31:03 +08:00
Chocobo1
0f34e3bed9 Don't use deprecated Q_ENUMS
See: https://doc.qt.io/qt-5/qobject-obsolete.html#Q_ENUMS
2021-11-29 00:31:03 +08:00
Chocobo1
c8b66b25e8 Avoid potential container detachment
Suppress clazy warning:
warning: Don't call QList::operator[]() on temporary [-Wclazy-detaching-temporary]
2021-11-29 00:31:03 +08:00
Chocobo1
e6f07a6fe4 Use implicit copy-constructor generated by compiler
This also suppresses the following clang warning:
warning: definition of implicit copy assignment operator for 'Version<unsigned short, 2>' is deprecated because it has a user-declared copy constructor [-Wdeprecated-copy]
2021-11-29 00:30:17 +08:00
Chocobo1
51469f8fa2 Store Qt6 table header states under a different key
Follow up 22abbc1d41.
PR #15774.
2021-11-23 11:02:07 +08:00
Chocobo1
d78b2a569f Fix handling when Content-Length field is absent
Closes #15754.
PR #15757.
2021-11-21 11:48:49 +08:00
Chocobo1
ec6c970775 Merge pull request #15762 from Chocobo1/artifact
GHA CI: Use prebuilt Qt library
2021-11-21 11:47:50 +08:00
Chocobo1
67c45efff7 GHA CI: Use prebuilt Qt library 2021-11-20 14:33:12 +08:00
Chocobo1
a54772bf35 Appveyor CI: Upload built artifacts 2021-11-20 14:33:12 +08:00
Chocobo1
166be2a94d Merge pull request #15749 from Chocobo1/ci
GHA CI: Simplify commands
2021-11-19 12:31:16 +08:00
Chocobo1
7150d05399 GHA CI: Simplify commands 2021-11-18 00:20:58 +08:00
Chocobo1
36a6e22f27 Appveyor CI: Setup build environment directly
vcvars64.bat is just a link to vcvarsall.bat with parameter `x64`.
2021-11-18 00:20:26 +08:00
Chocobo1
dc13eaed1f Revert "Use percentage notation for alpha-values in CSS"
This reverts commit 864dca1b67.
Upstream change: https://github.com/stylelint/stylelint-config-standard/pull/212
PR #15745.
2021-11-18 00:19:27 +08:00
xavier2k6
001bd60d36 CI: Update AppVeyor image to Visual Studio 2022
PR #15727.
2021-11-16 19:02:07 +03:00
Chocobo1
b063042988 Apply download priority immediately in torrent content view
Apply the new priority after picking it via drop-down menu.

Fixes #14667, #15238.
PR #15739.

Co-authored-by: a-sum-duma <68896601+a-sum-duma@users.noreply.github.com>
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2021-11-16 13:50:53 +08:00
a-sum-duma
fa1d49add5 Properly check if file priority changes
Current item priority is compared against new checkbox state. I believe the intention was to check if the priority changes before performing further actions. This PR fixes the issue - compare priority against new value that is about to be set rather then the checkbox state.

PR #15740.
2021-11-16 13:50:11 +08:00
Chocobo1
b45248bf99 Merge pull request #15452 from thalieht/autoTMM
Move some options from transfer list's context menu into "Torrent options" dialog
2021-11-10 12:39:59 +08:00
Chocobo1
dfe862dcd5 Merge pull request #15717 from Chocobo1/irc
WebUI: Remove IRC in about page
2021-11-10 12:28:53 +08:00
sledgehammer999
d4ddeaa917 Sync Changelog entries between branches 2021-11-09 19:07:23 +02:00
Chocobo1
13a49866a7 WebUI: Revise about page
Follow GUI more closely.
2021-11-09 13:17:55 +08:00
Chocobo1
7e2aea92b0 WebUI: Remove IRC in about page
This follows the GUI change in 65a30bab3f.
2021-11-09 13:17:41 +08:00
Chocobo1
7db51b2f8d Add IRC link
https://en.wikipedia.org/wiki/Internet_Relay_Chat#URI_scheme

And also show the angle brackets in rendered markdown.
2021-11-09 12:12:49 +08:00
Chocobo1
ae1b963e0f Merge pull request #15682 from Chocobo1/qt6
Store Qt6 table header states under a different key
2021-11-09 11:23:04 +08:00
a-sum-duma
b29b7e0185 Add more download options to torrent search result right-click menu
PR #15654.
2021-11-09 06:11:47 +03:00
Chocobo1
71270260bf Reformat code 2021-11-08 13:34:21 +08:00
Chocobo1
22abbc1d41 Store Qt6 table header states under a different key 2021-11-08 13:34:21 +08:00
Chocobo1
32698fe0be Migrate away from low-level SettingsStorage class
Also add `QFlags<T>` support to `SettingsStorage`.
PR #15693.
2021-11-08 13:23:33 +08:00
thalieht
16f8d6a936 Allow deselecting radio buttons in "Torrent options" for mixed torrents 2021-11-06 12:47:53 +02:00
thalieht
046d6f3bc1 Move a few torrent context menu actions into "Torrent options" dialog
Automatic torrent management
Save path
Category
Download in sequential order
Download first and last pieces first

closes #15447, closes #14064
2021-11-06 12:47:53 +02:00
Chocobo1
e33c4086b9 GHA CI: Revise artifact folder layout
Now qbittorrent binaries will be placed in its own folder and cmake
related artifacts will be in another.

PR #15683.
2021-11-06 11:11:47 +08:00
Andrei Stepanov
51d754a53e Optimize PNG images losslessly with FileOptimizer
PR #15662.
2021-11-05 12:59:25 +08:00
Chocobo1
49976bcd83 Merge pull request #15648 from Chocobo1/lockfile
Create lock file in config folder instead of temp folder
2021-11-03 12:15:22 +08:00
Losiki
f991d2bdb4 Update Update Simplified Chinese translation
PR #15653.
2021-11-02 17:54:18 +03:00
xavier2k6
e6ff23885e Sync flag icons with upstream
Upstream commit e0577caf317aa721b62c5a4788b13572cc163252 (Release v4.1.4)
PR #15657.
2021-11-02 11:10:50 +08:00
Chocobo1
7aa859a442 Don't use deprecated statfs64() on macOS (#15661)
Co-authored-by: Nick Korotysh <kolchaprogrammer@list.ru>
Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2021-11-02 10:41:09 +08:00
Chocobo1
180deb867a Use char array directly
This eliminates the possibility of reassigning the pointer to another
address.
2021-11-01 14:08:49 +08:00
Chocobo1
a5c531f0a4 Create lock file in config folder instead of temp folder
Some linux distros seem to alter TMPDIR environment variable and
therefore hamper qbt ability to find the lock files. So use config
folder instead of TMPDIR folder to create/locate the lock files.
Note that this change will also make qbt become one instance per-user
instead of one instance per-system.

Closes #15646.
2021-11-01 14:08:49 +08:00
a-sum-duma
5dd70b88d3 Fix torrent content sorting
Fix improper sorting of the list of files contained by a torrent.
Always load all torrent content data so that the files list can be sorted properly.
Load torrent content only when needed. Don't load the list of files contained by a torrent if the list widget is not visible.

PR #15604.
2021-11-01 11:45:48 +08:00
1529 changed files with 367219 additions and 216905 deletions

View File

@@ -3,7 +3,7 @@ version: '{branch}-{build}'
# Do not build on tags (GitHub only)
skip_tags: true
image: Visual Studio 2019
image: Visual Studio 2022
branches:
except: # blacklist
@@ -42,7 +42,7 @@ install:
before_build:
# setup env
- CALL "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat"
- CALL "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
- SET PATH=%PATH%;C:\Qt\5.15.2\msvc2019_64\bin;%CACHE_DIR%\jom
# setup project
- COPY /Y "%CACHE_DIR%\conf.pri" "%REPO_DIR%"
@@ -51,9 +51,49 @@ before_build:
build_script:
- cd "%REPO_DIR%"
# scan only as lupdate is prone to hang
- lupdate -extensions c,cpp,h,hpp,ui .
# lupdate chokes when it parses headers from system inludes, especially Boost
# it also chokes with the sources from src/app/qtlocalpeer (formerly qtsingleapplication)
# Workaround: temporarily rename them to run lupdate with the .pro file
- RENAME conf.pri conf.pri.temp
- RENAME src\app\qtlocalpeer qtlocalpeer.temp
- lupdate qbittorrent.pro
- RENAME conf.pri.temp conf.pri
- RENAME src\app\qtlocalpeer.temp qtlocalpeer
- qmake qbittorrent.pro && cd src && qmake src.pro
- jom -j2 -f Makefile.Release
after_build:
- cd "%REPO_DIR%"
- MKDIR upload
- COPY dist\windows\qt.conf upload
- COPY src\release\qbittorrent.exe upload
- COPY src\release\qbittorrent.pdb upload
- COPY "%CACHE_DIR%\base\bin\libcrypto-1_1-x64.dll" upload
- COPY "%CACHE_DIR%\base\bin\libssl-1_1-x64.dll" upload
- COPY "%CACHE_DIR%\base\lib\torrent-rasterbar.dll" upload
- COPY "%CACHE_DIR%\base\lib\zlib1.dll" upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Core.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Gui.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Network.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Sql.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Svg.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Widgets.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5WinExtras.dll upload
- COPY C:\Qt\5.15.2\msvc2019_64\bin\Qt5Xml.dll upload
- MKDIR upload\plugins\iconengines
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\iconengines\qsvgicon.dll upload\plugins\iconengines
- MKDIR upload\plugins\imageformats
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\imageformats\qico.dll upload\plugins\imageformats
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\imageformats\qsvg.dll upload\plugins\imageformats
- MKDIR upload\plugins\platforms
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\platforms\qwindows.dll upload\plugins\platforms
- MKDIR upload\plugins\sqldrivers
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\sqldrivers\qsqlite.dll upload\plugins\sqldrivers
- MKDIR upload\plugins\styles
- COPY C:\Qt\5.15.2\msvc2019_64\plugins\styles\qwindowsvistastyle.dll upload\plugins\styles
test: off
artifacts:
- path: upload
name: qBittorrent-Appveyor_Windows-x64

82
.clang-tidy Normal file
View File

@@ -0,0 +1,82 @@
Checks: >
bugprone-*,
cert-*,
concurrency-*,
cppcoreguidelines-*,
misc-*,
modernize-*,
performance-*,
portability-*,
readability-*,
-# not applicable at all,
-bugprone-easily-swappable-parameters,
-bugprone-implicit-widening-of-multiplication-result,
-bugprone-macro-parentheses,
-cppcoreguidelines-avoid-c-arrays,
-cppcoreguidelines-avoid-magic-numbers,
-cppcoreguidelines-avoid-non-const-global-variables,
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-owning-memory,
-cppcoreguidelines-pro-bounds-array-to-pointer-decay,
-cppcoreguidelines-pro-bounds-constant-array-index,
-cppcoreguidelines-pro-bounds-pointer-arithmetic,
-cppcoreguidelines-pro-type-const-cast,
-cppcoreguidelines-pro-type-reinterpret-cast,
-cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-pro-type-vararg,
-cppcoreguidelines-special-member-functions,
-cppcoreguidelines-virtual-class-destructor,
-misc-no-recursion,
-misc-non-private-member-variables-in-classes,
-misc-unused-parameters,
-modernize-avoid-c-arrays,
-modernize-pass-by-value,
-modernize-use-auto,
-modernize-use-nodiscard,
-modernize-use-trailing-return-type,
-modernize-use-using,
-readability-function-cognitive-complexity,
-readability-function-size,
-readability-identifier-length,
-readability-implicit-bool-conversion,
-readability-isolate-declaration,
-readability-magic-numbers,
-readability-named-parameter,
-readability-redundant-access-specifiers,
-readability-simplify-boolean-expr,
-readability-uppercase-literal-suffix,
-# only sometimes useful,
-bugprone-narrowing-conversions,
-cert-dcl58-cpp,
-cert-err33-c,
-cert-err58-cpp,
-clang-analyzer-core.CallAndMessage,
-clang-analyzer-cplusplus.NewDelete,
-clang-analyzer-cplusplus.NewDeleteLeaks,
-concurrency-mt-unsafe,
-cppcoreguidelines-init-variables,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-prefer-member-initializer,
-cppcoreguidelines-pro-type-static-cast-downcast,
-misc-definitions-in-headers,
-modernize-concat-nested-namespaces,
-modernize-loop-convert,
-modernize-raw-string-literal,
-modernize-unary-static-assert,
-performance-no-automatic-move,
-readability-convert-member-functions-to-static,
-readability-else-after-return,
-readability-redundant-declaration,
-# obsoleted,
-cert-dcl21-cpp
CheckOptions:
- { key: cppcoreguidelines-explicit-virtual-functions.IgnoreDestructors, value: true }
- { key: modernize-use-override.IgnoreDestructors, value: true }
- { key: performance-for-range-copy.AllowedTypes, value: "QJsonValue" }
- { key: performance-for-range-copy.WarnOnAllAutoCopies, value: true }
- { key: readability-braces-around-statements.ShortStatementLines, value: 3 }
HeaderFilterRegex: ".+/src/.*\\.h"
WarningsAsErrors: "*"

8
.gitattributes vendored
View File

@@ -1,7 +1,7 @@
core.eol=lf
* text eol=lf
*.zip binary
*.png binary
*.ico binary
*.qm binary
*.icns binary
*.ico binary
*.png binary
*.qm binary
*.zip binary

View File

@@ -14,7 +14,7 @@ body:
#### Prerequisites before submitting an issue!
- Read the issue reporting section in the **[contributing guidelines](https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md)**, to know how to submit a good bug report with the required information.
- Verify that the issue is not fixed and is reproducible in the **[latest official qBittorrent version](https://www.qbittorrent.org/download.php).**
- (Optional, but recommended) Verify that the issue is not fixed and is reproducible in the latest CI (**[macOS](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_macos.yaml?query=branch%3Amaster+event%3Apush)** / **[Ubuntu](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_ubuntu.yaml?query=branch%3Amaster+event%3Apush)** / **[Windows](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_windows.yaml?query=branch%3Amaster+event%3Apush)**) builds.
- (Optional, but recommended) Verify that the issue is not fixed and is reproducible in the latest CI (currently only on **[Windows](https://github.com/qbittorrent/qBittorrent/actions/workflows/ci_windows.yaml?query=branch%3Amaster+event%3Apush)**) builds.
- Check the **[frequent/common issues list](https://github.com/qbittorrent/qBittorrent/projects/2)** and perform a **[search of the issue tracker (including closed ones)](https://github.com/qbittorrent/qBittorrent/issues)** to avoid posting a duplicate.
- Make sure this is not a support request or question, both of which are better suited for either the **[discussions section](https://github.com/qbittorrent/qBittorrent/discussions)**, **[forum](https://qbforums.shiki.hu/)**, or **[subreddit](https://www.reddit.com/r/qBittorrent/)**.
- Verify that the **[wiki](https://github.com/qbittorrent/qBittorrent/wiki)** did not contain a suitable solution either.

View File

@@ -2,16 +2,24 @@ name: CI - File health
on: [pull_request, push]
permissions: {}
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install tools
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "*"
- name: Check files
uses: pre-commit/action@v2.0.3
uses: pre-commit/action@v3.0.0

View File

@@ -1,6 +1,14 @@
name: CI - macOS
on: [pull_request, push]
permissions:
actions: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Build
@@ -9,83 +17,121 @@ jobs:
strategy:
fail-fast: false
matrix:
libt_version: ["2.0.4", "1.2.14"]
libt_version: ["2.0.9", "1.2.19"]
qbt_gui: ["GUI=ON", "GUI=OFF"]
qt_version: ["5.15.2", "6.2.0"]
qt_version: ["5.15.2", "6.5.0"]
exclude:
- libt_version: "1.2.14"
qt_version: "6.2.0"
- libt_version: "1.2.19"
qt_version: "6.5.0"
env:
boost_path: "${{ github.workspace }}/../boost"
openssl_root: /usr/local/opt/openssl@1.1
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dependencies
run: |
export \
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 \
HOMEBREW_NO_INSTALL_CLEANUP=1
brew update > /dev/null
brew install \
cmake ninja \
boost openssl@1.1 zlib
openssl@1.1 zlib
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
update_packager_index: false
- name: Install boost
run: |
curl \
-L \
-o "${{ runner.temp }}/boost.tar.bz2" \
"https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.tar.bz2"
tar -xf "${{ runner.temp }}/boost.tar.bz2" -C "${{ github.workspace }}/.."
mv "${{ github.workspace }}/.."/boost_* "${{ env.boost_path }}"
- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
archives: qtbase qtdeclarative qtsvg qttools
# Not sure why Qt made a hard dependency on qtdeclarative, try removing it when Qt > 6.4.0
- name: Install libtorrent
run: |
git clone --branch v${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git
git clone \
--branch v${{ matrix.libt_version }} \
--depth 1 \
--recurse-submodules \
https://github.com/arvidn/libtorrent.git
cd libtorrent
git submodule update --init --recursive
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-Ddeprecated-functions=OFF \
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}"
cmake --build build
sudo cmake --install build
- name: Build qBittorrent (Qt5)
if: ${{ startsWith(matrix.qt_version, 5) }}
if: startsWith(matrix.qt_version, 5)
run: |
CXXFLAGS="$CXXFLAGS -Werror -Wno-error=deprecated-declarations" \
LDFLAGS="$LDFLAGS -gz" \
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \
-DQt5_DIR="$Qt5_DIR" \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
cmake --build build --target qbt_update_translations
cmake --build build
cmake --build build --target check
- name: Build qBittorrent (Qt6)
if: ${{ startsWith(matrix.qt_version, 6) }}
if: startsWith(matrix.qt_version, 6)
run: |
CXXFLAGS="$CXXFLAGS -Wno-gnu-zero-variadic-macro-arguments -Werror -Wno-error=deprecated-declarations" \
LDFLAGS="$LDFLAGS -gz" \
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DBOOST_ROOT="${{ env.boost_path }}" \
-DOPENSSL_ROOT_DIR="${{ env.openssl_root }}" \
-DQT6=ON \
-DQt6_DIR="$Qt6_DIR" \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
-D${{ matrix.qbt_gui }}
cmake --build build --target qbt_update_translations
cmake --build build
cmake --build build --target check
- name: Prepare build artifacts
run: |
mkdir upload
mkdir upload/cmake
cp build/compile_commands.json upload/cmake
mkdir upload/cmake/libtorrent
cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
- name: Upload build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
path: |
build/qbittorrent.app
build/qbittorrent-nox.app
name: build-info_macOS_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
path: upload

View File

@@ -1,31 +1,40 @@
name: CI - Ubuntu
on: [pull_request, push]
permissions:
actions: write
security-events: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
libt_version: ["2.0.4", "1.2.14"]
libt_version: ["2.0.9", "1.2.19"]
qbt_gui: ["GUI=ON", "GUI=OFF"]
qt_version: ["5.15.2", "6.2.0"]
exclude:
- libt_version: "1.2.14"
- libt_version: "1.2.19"
qt_version: "6.2.0"
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt update
sudo apt install \
build-essential cmake ninja-build pkg-config \
libboost-dev libssl-dev zlib1g-dev
libboost-dev libssl-dev libxkbcommon-x11-dev zlib1g-dev
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
@@ -35,65 +44,117 @@ jobs:
max_size=2G
- name: Install Qt
uses: jurplel/install-qt-action@v2
uses: jurplel/install-qt-action@v3
with:
version: ${{ matrix.qt_version }}
archives: icu qtbase qtsvg qttools
- name: Install libtorrent
run: |
git clone --branch v${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git
git clone \
--branch v${{ matrix.libt_version }} \
--depth 1 \
--recurse-submodules \
https://github.com/arvidn/libtorrent.git
cd libtorrent
git submodule update --init --recursive
cmake \
-B build \
-G "Ninja" \
-DBUILD_SHARED_LIBS=OFF \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-Ddeprecated-functions=OFF \
--graphviz=cmake-build-dir/target_graph.dot
-Ddeprecated-functions=OFF
cmake --build build
sudo cmake --install build
# to avoid scanning 3rdparty codebases, initialize it just before building qbt
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON') && startsWith(matrix.qt_version, 6)
with:
config-file: ./.github/workflows/helper/codeql/cpp.yaml
languages: cpp
- name: Build qBittorrent (Qt5)
if: ${{ startsWith(matrix.qt_version, 5) }}
if: startsWith(matrix.qt_version, 5)
run: |
CXXFLAGS="$CXXFLAGS -Werror -Wno-error=deprecated-declarations" \
LDFLAGS="$LDFLAGS -gz" \
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DQt5_DIR="$Qt5_DIR" \
-D${{ matrix.qbt_gui }} \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
--graphviz=build/target_graph.dot
-D${{ matrix.qbt_gui }}
cmake --build build --target qbt_update_translations
cmake --build build
sudo cmake --install build
cmake --build build --target check
DESTDIR="qbittorrent" cmake --install build
- name: Build qBittorrent (Qt6)
if: ${{ startsWith(matrix.qt_version, 6) }}
if: startsWith(matrix.qt_version, 6)
run: |
CXXFLAGS="$CXXFLAGS -Werror" \
LDFLAGS="$LDFLAGS -gz" \
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON \
-DQt6_DIR="$Qt6_DIR" \
-DCMAKE_INSTALL_PREFIX="/usr" \
-DQT6=ON \
-D${{ matrix.qbt_gui }} \
-DTESTING=ON \
-DVERBOSE_CONFIGURE=ON \
--graphviz=build/target_graph.dot
-D${{ matrix.qbt_gui }}
cmake --build build --target qbt_update_translations
cmake --build build
sudo cmake --install build
cmake --build build --target check
DESTDIR="qbittorrent" cmake --install build
- name: Run CodeQL analysis
uses: github/codeql-action/analyze@v2
if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON') && startsWith(matrix.qt_version, 6)
- name: Prepare build artifacts
run: |
mkdir upload
mkdir upload/cmake
cp build/compile_commands.json upload/cmake
mkdir upload/cmake/libtorrent
cp libtorrent/build/compile_commands.json upload/cmake/libtorrent
- name: 'AppImage: Prepare env'
run: |
sudo apt install libfuse2
wget https://github.com/linuxdeploy/linuxdeploy/releases/download/continuous/linuxdeploy-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-qt/releases/download/continuous/linuxdeploy-plugin-qt-x86_64.AppImage
wget https://github.com/linuxdeploy/linuxdeploy-plugin-appimage/releases/download/continuous/linuxdeploy-plugin-appimage-x86_64.AppImage
chmod +x linuxdeploy-x86_64.AppImage
chmod +x linuxdeploy-plugin-qt-x86_64.AppImage
chmod +x linuxdeploy-plugin-appimage-x86_64.AppImage
- name: 'AppImage: Prepare nox'
if: matrix.qbt_gui == 'GUI=OFF'
run: |
mkdir -p qbittorrent/usr/share/icons/hicolor/scalable/apps/
mkdir -p qbittorrent/usr/share/applications/
cp dist/unix/menuicons/scalable/apps/qbittorrent.svg qbittorrent/usr/share/icons/hicolor/scalable/apps/qbittorrent.svg
cp .github/workflows/helper/appimage/org.qbittorrent.qBittorrent.desktop qbittorrent/usr/share/applications/org.qbittorrent.qBittorrent.desktop
- name: 'AppImage: Package'
run: |
./linuxdeploy-x86_64.AppImage --appdir=qbittorrent --plugin qt
rm qbittorrent/apprun-hooks/*
cp .github/workflows/helper/appimage/export_vars.sh qbittorrent/apprun-hooks/export_vars.sh
NO_APPSTREAM=1 \
OUTPUT=upload/qbittorrent-CI_Ubuntu_x86_64.AppImage \
./linuxdeploy-x86_64.AppImage --appdir=qbittorrent --output appimage
- name: Upload build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: qBittorrent-CI_ubuntu-20.04-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
path: |
build/compile_commands.json
build/install_manifest.txt
build/target_graph.dot
build/qbittorrent
build/qbittorrent-nox
libtorrent/cmake-build-dir/compile_commands.json
libtorrent/cmake-build-dir/target_graph.dot
name: qBittorrent-CI_Ubuntu-x64_${{ matrix.qbt_gui }}_libtorrent-${{ matrix.libt_version }}_Qt-${{ matrix.qt_version }}
path: upload

View File

@@ -2,6 +2,13 @@ name: CI - WebUI
on: [pull_request, push]
permissions:
security-events: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Check
@@ -13,10 +20,10 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup nodejs
uses: actions/setup-node@v2
uses: actions/setup-node@v3
with:
node-version: 'lts/*'
@@ -30,3 +37,12 @@ jobs:
run: |
npm run format
git diff --exit-code
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
config-file: ./.github/workflows/helper/codeql/js.yaml
languages: javascript
- name: Run CodeQL analysis
uses: github/codeql-action/analyze@v2

View File

@@ -1,23 +1,31 @@
name: CI - Windows
on: [pull_request, push]
permissions:
actions: write
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: ${{ github.head_ref != '' }}
jobs:
ci:
name: Build
runs-on: windows-latest
strategy:
matrix:
libt_version: ["v2.0.4", "v1.2.14"]
fail-fast: false
matrix:
libt_version: ["2.0.9", "1.2.19"]
env:
boost_path: "${{ github.workspace }}/boost"
boost_path: "${{ github.workspace }}/../boost"
libtorrent_path: "${{ github.workspace }}/libtorrent"
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Setup devcmd
uses: ilammy/msvc-dev-cmd@v1
@@ -29,15 +37,14 @@ jobs:
# use the preinstalled vcpkg from image
# https://github.com/actions/virtual-environments/blob/main/images/win/Windows2019-Readme.md#package-management
- name: Setup vcpkg
uses: lukka/run-vcpkg@v7
uses: lukka/run-vcpkg@v10
with:
vcpkgDirectory: C:/vcpkg
doNotUpdateVcpkg: true # the preinstalled vcpkg is updated regularly
setupOnly: true
# tell vcpkg to only build Release variants of the dependencies
- name: Configure vcpkg triplet overlay
- name: Install dependencies from vcpkg
run: |
# tell vcpkg to only build Release variants of the dependencies
New-Item `
-Path "${{ github.workspace }}" `
-Name "triplets_overlay" `
@@ -48,16 +55,9 @@ jobs:
Add-Content `
"${{ github.workspace }}/triplets_overlay/x64-windows-static-release.cmake" `
-Value "set(VCPKG_BUILD_TYPE release)"
# clear buildtrees after each package installation to reduce disk space requirements
- name: Install dependencies
run: |
# clear buildtrees after each package installation to reduce disk space requirements
$packages = `
"openssl:x64-windows-static-release",
"qt5-base:x64-windows-static-release",
"qt5-svg:x64-windows-static-release",
"qt5-tools:x64-windows-static-release",
"qt5-winextras:x64-windows-static-release",
"zlib:x64-windows-static-release"
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe upgrade `
--overlay-triplets="${{ github.workspace }}/triplets_overlay" `
@@ -70,21 +70,32 @@ jobs:
- name: Install boost
run: |
aria2c `
"https://boostorg.jfrog.io/artifactory/main/release/1.76.0/source/boost_1_76_0.7z" `
"https://boostorg.jfrog.io/artifactory/main/release/1.82.0/source/boost_1_82_0.7z" `
-d "${{ runner.temp }}" `
-o "boost.7z"
7z x "${{ runner.temp }}/boost.7z" -o"${{ github.workspace }}/.."
move "${{ github.workspace }}/../boost_*" "${{ env.boost_path }}"
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: "6.5.0"
archives: qtbase qtsvg qttools
- name: Install libtorrent
run: |
git clone --branch ${{ matrix.libt_version }} --depth 1 https://github.com/arvidn/libtorrent.git
git clone `
--branch v${{ matrix.libt_version }} `
--depth 1 `
--recurse-submodules `
https://github.com/arvidn/libtorrent.git
cd libtorrent
git submodule update --init --recursive
cmake `
-B build `
-G "Ninja" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_CXX_FLAGS=/guard:cf `
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
-DCMAKE_INSTALL_PREFIX="${{ env.libtorrent_path }}" `
-DCMAKE_TOOLCHAIN_FILE="${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" `
-DBOOST_ROOT="${{ env.boost_path }}" `
@@ -101,15 +112,20 @@ jobs:
-B build `
-G "Ninja" `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_CXX_FLAGS="/WX" `
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON `
-DCMAKE_TOOLCHAIN_FILE="${{ env.RUNVCPKG_VCPKG_ROOT }}/scripts/buildsystems/vcpkg.cmake" `
-DBOOST_ROOT="${{ env.boost_path }}" `
-DLibtorrentRasterbar_DIR="${{ env.libtorrent_path }}/lib/cmake/LibtorrentRasterbar" `
-DMSVC_RUNTIME_DYNAMIC=OFF `
-DQT6=ON `
-DTESTING=ON `
-DVCPKG_TARGET_TRIPLET=x64-windows-static-release `
-DVERBOSE_CONFIGURE=ON `
--graphviz=build/target_graph.dot
cmake --build build --target qbt_update_translations
cmake --build build
cmake --build build --target check
- name: Prepare build artifacts
run: |
@@ -117,12 +133,36 @@ jobs:
copy build/qbittorrent.exe upload
copy build/qbittorrent.pdb upload
copy dist/windows/qt.conf upload
# runtimes
copy "${{ env.Qt6_DIR }}/bin/Qt6Core.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Gui.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Network.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Sql.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Svg.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Widgets.dll" upload
copy "${{ env.Qt6_DIR }}/bin/Qt6Xml.dll" upload
mkdir upload/plugins/iconengines
copy "${{ env.Qt6_DIR }}/plugins/iconengines/qsvgicon.dll" upload/plugins/iconengines
mkdir upload/plugins/imageformats
copy "${{ env.Qt6_DIR }}/plugins/imageformats/qico.dll" upload/plugins/imageformats
copy "${{ env.Qt6_DIR }}/plugins/imageformats/qsvg.dll" upload/plugins/imageformats
mkdir upload/plugins/platforms
copy "${{ env.Qt6_DIR }}/plugins/platforms/qwindows.dll" upload/plugins/platforms
mkdir upload/plugins/sqldrivers
copy "${{ env.Qt6_DIR }}/plugins/sqldrivers/qsqlite.dll" upload/plugins/sqldrivers
mkdir upload/plugins/styles
copy "${{ env.Qt6_DIR }}/plugins/styles/qwindowsvistastyle.dll" upload/plugins/styles
mkdir upload/plugins/tls
copy "${{ env.Qt6_DIR }}/plugins/tls/qschannelbackend.dll" upload/plugins/tls
# cmake additionals
mkdir upload/cmake
copy build/compile_commands.json upload/cmake
copy build/target_graph.dot upload/cmake
mkdir upload/cmake/libtorrent
copy libtorrent/build/compile_commands.json upload/cmake/libtorrent
- name: Upload build artifacts
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: qBittorrent-CI_Windows-x64_libtorrent-${{ matrix.libt_version }}
path: upload

View File

@@ -5,31 +5,42 @@ on:
- cron: '0 0 1 * *' # Monthly (1st day of month at midnight)
workflow_dispatch: # Mainly for testing. Don't forget the Coverity usage limits.
permissions: {}
jobs:
coverity_scan:
name: Scan
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo add-apt-repository ppa:beineri/opt-qt-5.15.2-focal
sudo apt update
sudo apt install \
build-essential cmake ninja-build pkg-config \
libboost-dev libssl-dev qt515base qt515svg qt515tools zlib1g-dev
libboost-dev libssl-dev zlib1g-dev
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: "6.5.0"
archives: icu qtbase qtsvg qttools
- name: Install libtorrent
run: |
git clone --branch v2.0.4 --depth 1 https://github.com/arvidn/libtorrent.git
git clone \
--branch "v2.0.9" \
--depth 1 \
--recurse-submodules \
https://github.com/arvidn/libtorrent.git
cd libtorrent
git submodule update --init --recursive
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-Ddeprecated-functions=OFF
cmake --build build
sudo cmake --install build
@@ -49,8 +60,9 @@ jobs:
cmake \
-B build \
-G "Ninja" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DGUI=ON \
-DQT6=ON \
-DVERBOSE_CONFIGURE=ON
export PATH="$(pwd)/coverity_tool/bin:$PATH"
cov-build --dir cov-int cmake --build build

View File

@@ -0,0 +1,13 @@
#!/bin/sh
# this file is called from AppRun so 'root_dir' will point to where AppRun is
root_dir="$(readlink -f "$(dirname "$0")")"
# Insert the default values because after the test we prepend our path
# and it will create problems with DEs (eg KDE) that don't set the variable
# and rely on the default paths
if [ -z "${XDG_DATA_DIRS}" ]; then
XDG_DATA_DIRS="/usr/local/share/:/usr/share/"
fi
export XDG_DATA_DIRS="${root_dir}/usr/share:${XDG_DATA_DIRS}"

View File

@@ -0,0 +1,6 @@
[Desktop Entry]
Name=qBittorrent
Exec=qbittorrent-nox %U
Icon=qbittorrent
Type=Application
Categories=Network

View File

@@ -0,0 +1,14 @@
name: "CodeQL config for C++"
queries:
- uses: security-and-quality
query-filters:
- exclude:
id: cpp/commented-out-code
- exclude:
id: cpp/include-non-header
- exclude:
id: cpp/loop-variable-changed
- exclude:
id: cpp/useless-expression

11
.github/workflows/helper/codeql/js.yaml vendored Normal file
View File

@@ -0,0 +1,11 @@
name: "CodeQL config for Javascript"
paths-ignore:
- "**/lib/*"
queries:
- uses: security-and-quality
query-filters:
- exclude:
id: js/superfluous-trailing-arguments

View File

@@ -4,12 +4,15 @@ on:
schedule:
- cron: '0 0 * * *'
permissions:
pull-requests: write
jobs:
stale:
runs-on: ubuntu-latest
steps:
- name: Mark and close stale PRs
uses: actions/stale@v4
uses: actions/stale@v8
with:
stale-pr-message: "This PR is stale because it has been 60 days with no activity. This PR will be automatically closed within 7 days if there is no further activity."
close-pr-message: "This PR was closed because it has been stalled for some time with no activity."

View File

@@ -3,13 +3,17 @@ repos:
hooks:
- id: check-translation-tag
name: Check newline characters in <translation> tag
entry: .github/workflows/check_translation_tag.py
entry: .github/workflows/helper/pre-commit/check_translation_tag.py
language: script
exclude: |
(?x)^(
src/lang/.*
)$
types_or:
- ts
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.0.1
rev: v4.4.0
hooks:
- id: check-json
name: Check JSON files
@@ -30,6 +34,7 @@ repos:
exclude: |
(?x)^(
compile_commands.json |
src/webui/www/private/css/lib/.* |
src/webui/www/private/scripts/lib/.*
)$
@@ -39,6 +44,7 @@ repos:
(?x)^(
compile_commands.json |
configure |
src/webui/www/private/css/lib/.* |
src/webui/www/private/scripts/lib/.*
)$
exclude_types:
@@ -49,6 +55,7 @@ repos:
name: Check trailing whitespaces
exclude: |
(?x)^(
src/webui/www/private/css/lib/.* |
src/webui/www/private/scripts/lib/.*
)$
exclude_types:

View File

@@ -1,27 +1,24 @@
[main]
host = https://www.transifex.com
[qbittorrent.qbittorrent_master]
file_filter = src/lang/qbittorrent_<lang>.ts
lang_map = pt: pt_PT
source_file = src/lang/qbittorrent_en.ts
source_lang = en
type = QT
[o:sledgehammer999:p:qbittorrent:r:qbittorrent_master]
file_filter = src/lang/qbittorrent_<lang>.ts
source_file = src/lang/qbittorrent_en.ts
source_lang = en
type = QT
minimum_perc = 23
mode = developer
lang_map = pt: pt_PT, zh: zh_CN
[qbittorrent.qbittorrentdesktop_master]
source_file = dist/unix/org.qbittorrent.qBittorrent.desktop
source_lang = en
type = DESKTOP
[o:sledgehammer999:p:qbittorrent:r:qbittorrent_webui]
file_filter = src/webui/www/translations/webui_<lang>.ts
source_file = src/webui/www/translations/webui_en.ts
source_lang = en
type = QT
minimum_perc = 23
mode = developer
lang_map = pt: pt_PT, zh: zh_CN
[qbittorrent.qbittorrent_webui]
file_filter = src/webui/www/translations/webui_<lang>.ts
lang_map = pt: pt_PT
source_file = src/webui/www/translations/webui_en.ts
source_lang = en
type = QT
[o:sledgehammer999:p:qbittorrent:r:qbittorrentdesktop_master]
source_file = dist/unix/org.qbittorrent.qBittorrent.desktop
source_lang = en
type = DESKTOP
minimum_perc = 23
mode = developer

85
AUTHORS
View File

@@ -29,16 +29,12 @@ Code from other projects:
copyright: Dan Haim <negativeiq@users.sourceforge.net>
license: BSD
* file src/app/stacktrace.h
copyright: Timo Bingmann from http://idlebox.net/
license: WTFPL v2.0
* file src/app/stacktrace_win.h
copyright: Quassel Project
license: GPLv2/3
* files src/webui/www/private/css/lib/vanillaSelectBox.css src/webui/www/private/scripts/lib/vanillaSelectBox.js
copyright: Philippe Meyer <pmg.meyer@gmail.com>
license: MIT
Images Authors:
* files: src/icons/skin/qbittorrent-tray.svg (and related pngs)
* files: src/icons/qbittorrent-tray.svg
copyright: Provided by HVS <hvs linuxmail org> (raster first proposal) and Atif Afzal(@atfzl github) <atif5801@gmail.com> (vectorized and modified)
license: GPLv2+
@@ -46,56 +42,53 @@ Images Authors:
copyright: 'uknown.svg' (LGPLv3+) from Oxygen Icon Theme was used as base which was slightly modified and 'qbittorrent-tray.svg' (GPLv2+) was overlayed above it.
license: GPLv3+
* files: src/icons/*.png
copyright: Gnome Icon Theme
license: GPLv2
url: http://ftp.acc.umu.se/pub/GNOME/sources/gnome-icon-theme
* files: src/oxygen/*.png
copyright: Oxygen Icon Theme (KDE)
license: LGPL
url: http://www.oxygen-icons.org
* files: src/icons/flags/*.svg
copyright: lipis/flag-icon-css
copyright: lipis/flag-icons
license: MIT
url: https://github.com/lipis/flag-icon-css/
url: https://github.com/lipis/flag-icons/
* files: src/icons/skin/*.png
files: src/menuicons/YYxYY/*.png
copyright: Mateusz Tobola <tobejodok@qbittorrent.org>
license: GPLv2
* file: src/icons/tabs.gif
* file: src/webui/www/private/images/tabs.gif
copyright: Greg Houston <gregory.houston@gmail.com>
license: MIT
* file: src/icons/skin/qbittorrent_mono*
* file: src/icons/qbittorrent-tray-dark.svg src/icons/qbittorrent-tray-light.svg
copyright: Daniel Eguren <deguren@gmail.com>
modified by: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im)
license: LGPL
* file: src/search_engine/engines/btjunkie.png
copyright: Downloaded from btjunkie.org
* folder: src/icons/
files: application-rss+xml.svg, application-x-mswinurl.svg, connected.svg, disconnected.svg, checked-completed.svg, configure.svg,
edit-copy.svg, edit-rename.svg, folder-documents.svg, folder-new.svg, folder-remote.svg, go-bottom.svg, go-down.svg, go-top.svg,
go-up.svg, hash.svg, inode-directory.svg, insert-link.svg, kt-magnet.svg, media-playback-pause.svg, media-playback-start.svg,
media-seek-forward.svg, network-connect.svg, object-locked.svg, queued.svg, ratio.svg, reannounce.svg, slow_off.svg, slow.svg,
speedometer.svg, system-log-out.svg, tags.svg, task-complete.svg, task-reject.svg, tracker-error.svg, tracker-warning.svg,
trackerless.svg, trackers.svg, view-categories.svg
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im) modified from La-Capitaine icon theme (https://github.com/keeferrourke/la-capitaine-icon-theme)
license: GPLv3+
* file: src/search_engine/engines/isohunt.png
copyright: Downloaded from isohunt.com
* folder: src/icons/
files: application-exit.svg, collapse.svg, dialog-warning.svg, edit-find-user.svg, edit-find.svg, filter-all.svg, firewalled.svg,
help-about.svg, help-contents.svg, ip-blocked.svg, list-remove.svg, loading.svg, mail-folder-inbox.svg, name.svg, network-server.svg,
office-chart-line.svg, plugins.svg, preferences-desktop.svg, preferences-other.svg, preferences-system-network.svg, security-high.svg,
security-low.svg, set-location.svg, torrent-creator.svg, user-group-delete.svg, user-group-new.svg, view-preview.svg, view-refresh.svg,
view-statistics.svg, wallet-open.svg, webuiapplication-exit.svg, collapse.svg, dialog-warning.svg, edit-find-user.svg, edit-find.svg,
filter-all.svg, firewalled.svg, help-about.svg, help-contents.svg, ip-blocked.svg, list-remove.svg, loading.svg, mail-folder-inbox.svg,
name.svg, network-server.svg, office-chart-line.svg, plugins.svg, preferences-desktop.svg, preferences-other.svg,
preferences-system-network.svg, security-high.svg, security-low.svg, set-location.svg, torrent-creator.svg, user-group-delete.svg,
user-group-new.svg, view-preview.svg, view-refresh.svg, view-statistics.svg, wallet-open.svg, webui.svg
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im) modified from Ionicons icon theme (https://github.com/ionic-team/ionicons)
license: MIT
* file: src/search_engine/engines/mininova.png
copyright: Downloaded from mininova.org
* folder: src/icons/
files: force-recheck.svg
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im) modified from Font-Awesome icon theme (https://github.com/FortAwesome/Font-Awesome)
license: CC BY 4.0 License
* file: src/search_engine/engines/piratebay.png
copyright: Downloaded from thepiratebay.org
* file: src/search_engine/engines/torrentreactor.png
copyright: Downloaded from torrentreactor.net
* file: src/icons/oxygen/checked.png
copyright: Victor Buinsky <allok.victor@gmail.com>
* file: src/icons/skin/ratio.png
copyright: Fatcow Web Hosting
license: Creative Commons Attribution 3.0 License
url: http://www.fatcow.com/free-icons
* folder: src/icons/
files: downloading.svg, edit-clear.svg, error.svg, filter-active.svg, filter-inactive.svg, filter-stalled.svg, kt-set-max-download-speed.svg,
kt-set-max-upload-speed.svg, list-add.svg, preferences-web-browser-cookies.svg, stalledDL.svg, stalledUP.svg
copyright: Nowshed H. Imran <nowshed.imran@gmail.com> (@now-im)
license: BSD 2-Clause License
Translations authors:
* files: src/lang/*.ts

View File

@@ -1,67 +1,65 @@
cmake_minimum_required(VERSION 3.16 FATAL_ERROR) # Policies <= CMP0097 default to NEW
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
project(qBittorrent
DESCRIPTION "The qBittorrent BitTorrent client"
HOMEPAGE_URL "https://www.qbittorrent.org/"
LANGUAGES CXX
)
# use CONFIG mode first in find_package
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
# version requirements - older versions may work, but you are on your own
set(minBoostVersion 1.65)
set(minBoostVersion 1.71)
set(minQt5Version 5.15.2)
set(minQt6Version 6.2)
set(minOpenSSLVersion 1.1.1)
set(minLibtorrent1Version 1.2.14)
set(minLibtorrentVersion 2.0.4)
set(minLibtorrent1Version 1.2.19)
set(minLibtorrentVersion 2.0.9)
set(minZlibVersion 1.2.11)
# features (some are platform-specific)
include(CheckCXXSourceCompiles) # TODO: migrate to CheckSourceCompiles in CMake >= 3.19
include(GNUInstallDirs)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
include(FeatureSummary)
include(FeatureOptionsSetup)
feature_option(QT6 "Use Qt6" OFF)
feature_option(STACKTRACE "Enable stacktraces" ON)
# features, list is loosely sorted by user's interests
feature_option(GUI "Build GUI application" ON)
feature_option(WEBUI "Enables built-in HTTP server for headless use" ON)
feature_option(WEBUI "Enable built-in HTTP server for remote control" ON)
feature_option(QT6 "Build with Qt 6 instead of Qt 5" OFF)
feature_option(STACKTRACE "Enable stacktrace support" ON)
feature_option(TESTING "Build internal testing suite" OFF)
feature_option(VERBOSE_CONFIGURE "Show information about PACKAGES_FOUND and PACKAGES_NOT_FOUND in the configure output (only useful for debugging the CMake build scripts)" OFF)
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
feature_option_dependent(DBUS
"Enables support for notifications and power-management features on Linux via D-Bus"
"Enable support for notifications and power-management features via D-Bus on Linux"
ON "GUI" OFF
)
feature_option_dependent(SYSTEMD
"Install systemd service file to a directory manually overridable with Systemd_SERVICES_INSTALL_DIR"
"Install systemd service file. Target directory is overridable with `SYSTEMD_SERVICES_INSTALL_DIR` variable"
OFF "NOT GUI" OFF
)
if (STACKTRACE)
check_cxx_source_compiles(
"#include <execinfo.h>
int main(){return 0;}"
QBITTORRENT_HAS_EXECINFO_H
)
if (NOT QBITTORRENT_HAS_EXECINFO_H)
message(FATAL_ERROR "execinfo.h header file not found.\n"
"Please either disable the STACKTRACE feature or use a libc that has this header file, such as glibc (GNU libc)."
)
endif()
endif()
elseif (MSVC)
feature_option(MSVC_RUNTIME_DYNAMIC "Use MSVC dynamic runtime library (-MD) instead of static (-MT)" ON)
endif()
include(GNUInstallDirs)
add_subdirectory(src)
add_subdirectory(dist)
if (VERBOSE_CONFIGURE)
feature_summary(WHAT ALL)
else()
feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES)
endif()
# go check the packages
include(CheckPackages)
# configure for specific platform
include(CommonConfig)
# Generate version header
configure_file("src/base/version.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/base/version.h" @ONLY)
add_subdirectory(src)
add_subdirectory(dist)
if (TESTING)
add_subdirectory(test)
endif()

View File

@@ -1,6 +1,7 @@
# Coding Guidelines
All new code **must** follow the following coding guidelines. \
All new code **must** follow the following coding guidelines.
If you make changes in a file that still uses another coding style, make sure that you follow these guidelines for your changes. \
For programming languages other than C++ (e.g. JavaScript) used in this repository and submodules, unless otherwise specified, coding guidelines listed here applies as much as possible.
@@ -456,8 +457,8 @@ class ExampleWidget : public QWidget
* Prefer pre-increment, pre-decrement operators
```c++
++i, --j; // Yes
i++, j--; // No
++i, --j; // yes
i++, j--; // no
```
* private/public/protected must not be indented

View File

@@ -23,7 +23,7 @@ Read the respective section to find out more.
* **Be patient.** The development team is small and resource limited. Developers and contributors take from their free time to analyze the problem and fix the issue. :clock3:
* Harsh words or threats won't help your situation. What's worse, your complain will (very likely) be **ignored.** :fearful:
* Harsh words or threats won't help your situation. Your complaint will (very likely) be **ignored.** :fearful:
# Submitting an issue/bug report
@@ -39,7 +39,7 @@ Developers and contributors are not supposed to deal with issues for which littl
Positive contributions are those which are reported with efforts to find the actual cause of an issue, or at the very least efforts were made to narrow it as much as possible.
Requiring people to investigate as much as possible before opening an issue will more than likely avoid burdening the project with invalid issues or issues unrelated to qBittorrent.
Requiring people to investigate as much as possible before opening an issue avoids burdening the project with invalid issues or issues unrelated to qBittorrent.
The following are _not_ bug reports. **Check the [wiki][wiki-url], [forum][forum-url] or other places for help and support for issues like these**:
@@ -200,7 +200,7 @@ Following these guidelines helps maintainers and the community understand your s
[coding-guidelines-url]: https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md
[coding-guidelines-git-commit-message-url]: https://github.com/qbittorrent/qBittorrent/blob/master/CODING_GUIDELINES.md#10-git-commit-message
[commit-message-fix-issue-example-url]: https://github.com/qbittorrent/qBittorrent/commit/c07cd440cd46345297debb47cb260f8688975f50
[forum-url]: http://forum.qbittorrent.org/
[forum-url]: https://forum.qbittorrent.org/
[howto-report-bugs-url]: https://www.chiark.greenend.org.uk/~sgtatham/bugs.html
[how-to-translate-url]: https://github.com/qbittorrent/qBittorrent/wiki/How-to-translate-qBittorrent
[merging-vs-rebasing-url]: https://www.atlassian.com/git/tutorials/merging-vs-rebasing

349
COPYING

File diff suppressed because it is too large Load Diff

339
COPYING.GPLv2 Normal file

File diff suppressed because it is too large Load Diff

674
COPYING.GPLv3 Normal file

File diff suppressed because it is too large Load Diff

425
Changelog

File diff suppressed because it is too large Load Diff

10
INSTALL
View File

@@ -3,22 +3,22 @@ qBittorrent - A BitTorrent client in C++ / Qt
1) Install these dependencies:
- Boost >= 1.65
- Boost >= 1.71
- libtorrent-rasterbar 1.2.14 - 1.2.x || 2.0.4 - 2.0.x
- libtorrent-rasterbar 1.2.19 - 1.2.x || 2.0.9 - 2.0.x
* By Arvid Norberg, https://www.libtorrent.org/
* Be careful: another library (the one used by rTorrent) uses a similar name
- OpenSSL >= 1.1.1
- Qt 5.15.2 - 5.x
- Qt 5.15.2 - 5.x || 6.2.0 - 6.x
- zlib >= 1.2.11
- pkg-config *
* Compile-time only on *nix systems
- Python >= 3.5.0
- Python >= 3.7.0
* Optional, run-time only
* Used by the bundled search engine
@@ -43,7 +43,7 @@ Please ensure you are building with an officially supported configuration when r
will install and execute qBittorrent.
DOCUMENTATION:
Please note that there is a "Compilation" section at http://wiki.qbittorrent.org.
Please note that there is a "Compilation" section at https://wiki.qbittorrent.org.
------------------------------------------
sledgehammer999 <sledgehammer999@qbittorrent.org>

4
NEWS
View File

@@ -1,4 +0,0 @@
See Changelog
*******************************************
Christophe dumez - chris@qbittorrent.org

View File

@@ -37,16 +37,16 @@ For more information please visit:
https://www.qbittorrent.org
or our wiki here:
http://wiki.qbittorrent.org
https://wiki.qbittorrent.org
Use the forum for troubleshooting before reporting bugs:
http://forum.qbittorrent.org
https://forum.qbittorrent.org
Please report any bug (or feature request) to:
http://bugs.qbittorrent.org
https://bugs.qbittorrent.org
Official IRC channel:
`#qbittorrent on irc.libera.chat`
[#qbittorrent on irc.libera.chat](ircs://irc.libera.chat:6697/qbittorrent)
------------------------------------------
sledgehammer999 <sledgehammer999@qbittorrent.org>
sledgehammer999 \<sledgehammer999@qbittorrent.org\>

1
TODO
View File

@@ -1 +0,0 @@
See https://blueprints.launchpad.net/qbittorrent/

View File

@@ -0,0 +1,67 @@
# use CONFIG mode first in find_package
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
macro(find_libtorrent version)
if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
find_package(LibtorrentRasterbar QUIET ${version} COMPONENTS torrent-rasterbar)
if (NOT LibtorrentRasterbar_FOUND)
include(FindPkgConfig)
pkg_check_modules(LibtorrentRasterbar IMPORTED_TARGET GLOBAL "libtorrent-rasterbar>=${version}")
if (NOT LibtorrentRasterbar_FOUND)
message(
FATAL_ERROR
"Package LibtorrentRasterbar >= ${version} not found"
" with CMake or pkg-config.\n- Set LibtorrentRasterbar_DIR to a directory containing"
" a LibtorrentRasterbarConfig.cmake file or add the installation prefix of LibtorrentRasterbar"
" to CMAKE_PREFIX_PATH.\n- Alternatively, make sure there is a valid libtorrent-rasterbar.pc"
" file in your system's pkg-config search paths (use the system environment variable PKG_CONFIG_PATH"
" to specify additional search paths if needed)."
)
endif()
add_library(LibtorrentRasterbar::torrent-rasterbar ALIAS PkgConfig::LibtorrentRasterbar)
# force a fake package to show up in the feature summary
set_property(GLOBAL APPEND PROPERTY
PACKAGES_FOUND
"LibtorrentRasterbar via pkg-config (version >= ${version})"
)
set_package_properties("LibtorrentRasterbar via pkg-config (version >= ${version})"
PROPERTIES
TYPE REQUIRED
)
else()
set_package_properties(LibtorrentRasterbar PROPERTIES TYPE REQUIRED)
endif()
else()
find_package(LibtorrentRasterbar ${version} REQUIRED COMPONENTS torrent-rasterbar)
endif()
endmacro()
find_libtorrent(${minLibtorrent1Version})
if (LibtorrentRasterbar_FOUND AND (LibtorrentRasterbar_VERSION VERSION_GREATER_EQUAL 2.0))
find_libtorrent(${minLibtorrentVersion})
endif()
# force variable type so that it always shows up in ccmake/cmake-gui frontends
set_property(CACHE LibtorrentRasterbar_DIR PROPERTY TYPE PATH)
find_package(Boost ${minBoostVersion} REQUIRED)
find_package(OpenSSL ${minOpenSSLVersion} REQUIRED)
find_package(ZLIB ${minZlibVersion} REQUIRED)
if (QT6)
find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS Core Network Sql Xml LinguistTools)
if (DBUS)
find_package(Qt6 ${minQt6Version} REQUIRED COMPONENTS DBus)
set_package_properties(Qt6DBus PROPERTIES
DESCRIPTION "Qt6 module for inter-process communication over the D-Bus protocol"
PURPOSE "Required by the DBUS feature"
)
endif()
else()
find_package(Qt5 ${minQt5Version} REQUIRED COMPONENTS Core Network Sql Xml LinguistTools)
if (DBUS)
find_package(Qt5 ${minQt5Version} REQUIRED COMPONENTS DBus)
set_package_properties(Qt5DBus PROPERTIES
DESCRIPTION "Qt5 module for inter-process communication over the D-Bus protocol"
PURPOSE "Required by the DBUS feature"
)
endif()
endif()

View File

@@ -0,0 +1,110 @@
# Set platform variables and create some interface-only library targets
# that some or all other targets will link to, either directly or transitively,
# to consume common compile options/definitions
# treat value specified by the CXX_STANDARD target property as a requirement by default
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTORCC_OPTIONS --compress 9 --threshold 5)
add_library(qbt_common_cfg INTERFACE)
# Full C++ 17 support is required
# See also https://cmake.org/cmake/help/latest/prop_gbl/CMAKE_CXX_KNOWN_FEATURES.html
# for a breakdown of the features that CMake recognizes for each C++ standard
target_compile_features(qbt_common_cfg INTERFACE
cxx_std_17
)
target_compile_definitions(qbt_common_cfg INTERFACE
QT_DISABLE_DEPRECATED_BEFORE=0x050f02
QT_NO_CAST_FROM_ASCII
QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_BYTEARRAY
QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
QT_USE_QSTRINGBUILDER
QT_STRICT_ITERATORS
$<$<NOT:$<CONFIG:Debug>>:QT_NO_DEBUG_OUTPUT>
)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_compile_definitions(qbt_common_cfg INTERFACE
_DARWIN_FEATURE_64_BIT_INODE
)
endif()
if (CMAKE_SYSTEM_NAME STREQUAL "Windows")
target_compile_definitions(qbt_common_cfg INTERFACE
NTDDI_VERSION=0x06010000
_WIN32_WINNT=0x0601
_WIN32_IE=0x0601
WIN32_LEAN_AND_MEAN
NOMINMAX
UNICODE
_UNICODE
)
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "GNU") OR (CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
target_compile_options(qbt_common_cfg INTERFACE
-Wall
-Wextra
-Wcast-qual
-Wcast-align
-Winvalid-pch
-Woverloaded-virtual
-Wold-style-cast
-Wnon-virtual-dtor
-pedantic
-pedantic-errors
)
# Clang 11 still doesn't support -Wstrict-null-sentinel
include(CheckCXXCompilerFlag)
check_cxx_compiler_flag(-Wstrict-null-sentinel SNS_SUPPORT)
if (SNS_SUPPORT)
target_compile_options(qbt_common_cfg INTERFACE -Wstrict-null-sentinel)
endif()
endif()
if ((CMAKE_CXX_COMPILER_ID STREQUAL "Clang") OR (CMAKE_CXX_COMPILER_ID STREQUAL "AppleClang"))
target_compile_options(qbt_common_cfg INTERFACE
-Wno-range-loop-analysis
)
endif()
if (MINGW)
target_link_options(qbt_common_cfg INTERFACE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:LINKER:--dynamicbase>)
endif()
if (MSVC)
target_compile_options(qbt_common_cfg INTERFACE
/guard:cf
/utf-8
# https://devblogs.microsoft.com/cppblog/msvc-now-correctly-reports-__cplusplus/
/Zc:__cplusplus
)
target_link_options(qbt_common_cfg INTERFACE
/guard:cf
$<$<NOT:$<CONFIG:Debug>>:/OPT:REF /OPT:ICF>
# suppress linking warning due to /INCREMENTAL and /OPT:ICF being both ON
$<$<CONFIG:RelWithDebInfo>:/INCREMENTAL:NO>
)
if (MSVC_RUNTIME_DYNAMIC)
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL")
else()
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
endif()
if (DBUS)
target_compile_definitions(qbt_common_cfg INTERFACE QBT_USES_DBUS)
endif()
if (LibtorrentRasterbar_VERSION VERSION_GREATER_EQUAL ${minLibtorrentVersion})
target_compile_definitions(qbt_common_cfg INTERFACE QBT_USES_LIBTORRENT2)
endif()

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