Commit graph

10172 commits

Author SHA1 Message Date
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
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
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
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
f5239ffb0b
CMake: Use installed Qt's translations for packaging 2022-03-29 01:52:23 +03: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
bbd936fdfa
Don't use explicit memory management
And avoid dangling pointers.
2022-03-24 14:44:38 +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
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 (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
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
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
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
An0n
aa189a7fc6
Disable force reannounce when it is not possible
Closes #12080.
PR #16551.
2022-03-06 12:59:31 +08: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
Aleksandr Cupacenko
2c8447853b
Focus save path when Manual mode is selected initially
Closes #15972.
PR #16536.
2022-03-02 13:27:22 +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
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
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
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
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
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
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
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
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
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
thalieht
d3bdeaab3f
Replace "seeding_duration" with "finished_duration" everywhere
Closes #10223.
PR #13601.
2022-01-07 15:22:51 +08:00
sledgehammer999
d6fc020ba7
Bump to 4.5.0alpha1 2022-01-06 20:47:06 +02:00
sledgehammer999
74dc000ac1
Sync translations from Transifex and run lupdate 2022-01-06 20:35:45 +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
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
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
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
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
1fa940876f
Remove redundant UI cleanups
Just exiting the application will handle all of them automatically.
2021-12-13 15:08:25 +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
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
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
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
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
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
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
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
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
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
sledgehammer999
40f2718265
Sync translations from Transifex and run lupdate 2021-10-31 12:29:34 +02:00
Vladimir Golovnev
cc61ad01b6
Explicitly set "added time" when adding new torrent
Don't overwrite "added time" with possibly incorrect value.
Explicitly set "added time" when adding new torrent.

PR #15644.
2021-10-31 12:08:19 +03:00
sledgehammer999
8a44c1f6d5
Bump to 4.4.0rc1 2021-10-31 02:56:25 +03:00
sledgehammer999
e370cbb06b
Sync translations from Transifex and run lupdate 2021-10-31 02:52:52 +03:00
Likol Tung
cb0c2e3b9c
Fix WebUI reverse proxy section doesn't work
As title. because load with incorrect key.
Also moving proxy list label to left, screenshot: https://imgur.com/Rz038uW
PR #15634.
2021-10-29 11:50:09 +08:00
Chocobo1
8b60baea99
Remove unused CSS properties 2021-10-22 14:45:37 +08:00
Chocobo1
ac61c33d1c
Use modern color notation in CSS 2021-10-22 14:43:13 +08:00
Chocobo1
3088f04e6f
Use standard CSS properties instead of vendor specifics 2021-10-22 14:43:13 +08:00
Chocobo1
864dca1b67
Use percentage notation for alpha-values in CSS 2021-10-22 14:43:12 +08:00
Chocobo1
15320018f0
Use shorthand for CSS properties 2021-10-22 14:43:05 +08:00
Chocobo1
6226dd5b80
Add quotes to URL in CSS files
Better add quotes: https://stackoverflow.com/a/34383157
2021-10-22 14:43:05 +08:00
Chocobo1
aafc1064d9
Disable CSS selector naming rule 2021-10-22 14:42:12 +08:00
Vladimir Golovnev
4f20769a6c
Use respective subcategory for "watched" torrents
Assign respective Subcategory of configured Category to torrents
if Automatic Torrent Management Mode is set for Watched folder.

PR #15603.
2021-10-22 05:51:11 +03:00
Chocobo1
8a7179195f
Suppress remove null widget warning
And improve text format for translation work.
2021-10-14 00:25:30 +08:00
Chocobo1
e45e29b431
Avoid type specifier mismatch
Qt5 uses `int` and Qt6 uses `qsizetype`, so use the stream version of
`qDebug()` to avoid specifying types.
2021-10-14 00:24:41 +08:00
Chocobo1
ca28fc27dc
Disable deprecated Qt functions
Also Qt6 by default set these attributes to our preferred value.
2021-10-13 12:00:21 +08:00
Chocobo1
08b2cde8e8
Let infohash v2 text be mouse selectable
And drop unused property.
2021-10-13 11:59:44 +08:00
Chocobo1
489d88e02a
Suppress conversion warning
This fixes MSVC warning C4305: 'argument': truncation from 'double' to 'float'.
`QColor::setAlphaF()` parameter has been changed to `float` in Qt6.
2021-10-12 15:37:45 +08:00
Chocobo1
dff39ffd20
Fix typo
https://doc.qt.io/qt-6/qmake-variable-reference.html#qt-major-version
2021-10-12 14:16:53 +08:00
Chocobo1
7087565d92
Fix typo 2021-10-11 22:17:17 +08:00
Chocobo1
45a1c25a29
Merge pull request #15467 from xavier2k6/Python_URL
Update python installer URL for Windows
2021-10-11 12:47:00 +08:00