Commit graph

9938 commits

Author SHA1 Message Date
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
Chocobo1
70a11a12b3
Merge pull request #15549 from Chocobo1/api
WebAPI: Use specific number to represent non-existing values
2021-10-11 12:38:38 +08:00
Vladimir Golovnev
5d5b0d572e
Merge pull request #15536 from glassez/expected
Don't use output parameters for error handling
2021-10-10 15:04:55 +03:00
Chocobo1
7c8eadfddf
Revert "WebUI: group trackers by hostname"
This functionality wasn't ever correctly implemented and couldn't be
done without considerable effort, so revert it for now.
This reverts commit 4ac25a50ed.
PR #15542.
2021-10-10 11:00:21 +08:00
xavier2k6
a92a6404cb
Make Python minimum version requirement an argument 2021-10-09 10:45:26 +01:00
Vladimir Golovnev (Glassez)
78459fcb31
Don't throw exception in TorrentInfo::saveToFile() 2021-10-09 08:54:20 +03:00
Vladimir Golovnev (Glassez)
41fc0fd084
Don't use output parameters for error handling 2021-10-09 08:54:03 +03:00
Chocobo1
5c9655abc3
WebAPI: Use specific number to represent non-existing values
Closes #15545.
2021-10-09 12:31:15 +08:00
Chocobo1
3301797491
Merge pull request #15530 from Chocobo1/errmsg
Log error message in DownloadHandlerImpl class
2021-10-09 12:09:56 +08:00
Daniel Aleksandersen
eb5e1d34df
WebUI: Add meta application name
Used for installable/pinned app installs.
PR #15539.
2021-10-09 12:06:44 +08:00
Daniel Aleksandersen
9e92e5995f
WebUI: Set icon sizes attribute
Gives browsers more information to pick the best icon.
PR #15540.
2021-10-09 11:59:37 +08:00
Chocobo1
e96f2d7be0
Simplify comparison
From https://doc.qt.io/qt-5/qdatetime.html#operator-eq-eq:
>Since 5.14, all invalid datetimes are equal to one another and differ from all other datetimes.
2021-10-09 02:20:22 +08:00
Chocobo1
03cb51844b
Remove redundant define
NOMINMAX is already defined in build scripts.
2021-10-08 11:11:02 +08:00
Chocobo1
6b06cc9216
Log error message in DownloadHandlerImpl class 2021-10-08 11:07:35 +08:00
Chocobo1
6b49323f05
Improve error message reporting 2021-10-08 11:01:48 +08:00
Chocobo1
4a11fab2b1
Add constexpr to Sample class functions 2021-10-08 01:04:58 +08:00
Vladimir Golovnev
c382191e75
Correctly iterate through the files of torrent
PR #15535.
2021-10-07 10:48:00 +03:00
luzpaz
4d480b8761
Fix various typos
Found via `codespell -q 3 -S *.ts`.
PR #15520.
2021-10-05 12:58:25 +08:00
Vladimir Golovnev
bc71827c01
Improve torrent content handling
Hide .pad files.

PR #15468.
2021-10-02 21:42:58 +03:00
Vladimir Golovnev
a8ade3a04b
Merge pull request #14465 from glassez/qt6
Allow to build with Qt6
2021-10-02 21:29:10 +03:00
Vladimir Golovnev (glassez)
add75fbc77
Make complete type declarations available where needed 2021-10-02 09:23:50 +03:00
Vladimir Golovnev (Glassez)
86b1ac5d7c
CMake: Allow to build with Qt6 2021-10-02 09:23:49 +03:00
Vladimir Golovnev (glassez)
b51197936b
QMake: Don't use WinExtras module with Qt6 2021-10-02 09:23:15 +03:00
Jose M. Abuin
64609ce5cf
Add missing double-click action
Closes #15422.
PR #15509.
2021-10-01 12:16:58 +08:00
Chocobo1
5cf39a2970
Reuse code path
`buf.f_type` should be compatible across platforms.
https://developer.apple.com/library/archive/documentation/System/Conceptual/ManPages_iPhoneOS/man2/statfs.2.html
2021-09-27 22:40:25 +08:00
Chocobo1
1c9321d5a1
Add remote filesystem magic numbers 2021-09-27 22:22:36 +08:00
Chocobo1
97a8d865dc
WebUI: revise hash function
In benchmark, using `Math.imul()` is about ~20% faster than floating
point multiplication.

PR #15475.
2021-09-27 13:54:28 +08:00
Chocobo1
1c343a444b
Remove redundant const specifier 2021-09-21 17:19:38 +08:00
Chocobo1
1c9696b68e
Suppress function unused warning 2021-09-21 17:18:50 +08:00
Chocobo1
ecd23d0abd
Merge pull request #15459 from Chocobo1/i18n
Revise description wordings
2021-09-19 13:29:08 +08:00
Chocobo1
010d1b5ff8
Merge pull request #15419 from Chocobo1/file
Improve error detection when saving files
2021-09-19 13:28:47 +08:00
Chocobo1
46394a7c0f
Combine stream statements 2021-09-18 12:59:08 +08:00
Chocobo1
fc86034fab
WebUI: update authors page 2021-09-18 12:59:07 +08:00
Chocobo1
03012cc175
Revise description wordings 2021-09-18 12:59:07 +08:00
Vladimir Golovnev
b2e0e25f1c
Merge pull request #15451 from glassez/profile
Improve Profile handling
2021-09-15 19:11:22 +03:00
Chocobo1
9673be17cb
Improve handling when writing to temporary files
Let QTemporaryFile remove incomplete written file when error occurs.
"XXXXXX" template is not strictly required according to Qt doc.
2021-09-15 23:25:27 +08:00
Chocobo1
fa8786e230
Flush manually when saving a file
This is to work around https://bugreports.qt.io/browse/QTBUG-75077
2021-09-15 23:15:33 +08:00
Chocobo1
21f72baae2
Use QSaveFile wherever applicable
expected.hpp was fetched from:
b803e3c07b/include/nonstd/expected.hpp
2021-09-15 21:54:44 +08:00
xavier2k6
4b78af268f
Update python installer URL for Windows 2021-09-12 17:17:06 +01:00
jagannatharjun
a734199383
Fix startup with different profiles 2021-09-12 10:59:20 +03:00
Vladimir Golovnev (Glassez)
046b741700
Improve Profile handling
Add Profile::rootPath and Profile::configurationName properties.
2021-09-12 10:58:48 +03:00
Chocobo1
ce0b6f0d56
Merge pull request #15450 from Chocobo1/pr_15303
Fix code defects
2021-09-12 12:56:33 +08:00
Chocobo1
6de0622c1a
Merge pull request #15444 from Chocobo1/guard
Prevent self-assignment in assignment operator
2021-09-12 12:56:17 +08:00
Jesse Smick
6229b81730
WebUI: Add pieces progress bar to General tab
Closes #15292.
PR #15418.
2021-09-12 12:55:41 +08:00
Chocobo1
0783968121
Guard for null pointer 2021-09-11 11:54:01 +08:00
gxcreator
307f5e6e56
Initialize member fields 2021-09-11 11:53:41 +08:00
Chocobo1
cb29685a24
Use Qt macro to disable various constructors 2021-09-10 19:51:27 +08:00
Chocobo1
2efd4f2a77
Prevent self-assignment in assignment operator 2021-09-09 21:42:46 +08:00
Vladimir Golovnev
90296b3ef0
Add "Skip hash check" option for watched folders
Closes #15388.
PR #15433.
2021-09-09 07:00:51 +03:00
smigii
8f02fe0cc6
Elide text from the right for all columns' header
Minimizing columns no longer truncates text from the left, now elides
text from the right for better readability. Done by setting header's
textElideMode to Qt::TextElideRight.

Fix issue #14419.
PR #15366.
2021-09-08 11:47:55 +08:00
Chocobo1
7a6edcdddb
Fix broken behavior of "priority by shown file order"
Closes #15421.
PR #15423.
2021-09-07 11:47:13 +08:00
Chocobo1
81139c0098
Improve error detection when saving files 2021-09-05 12:20:22 +08:00
jagannatharjun
68133ec8e3 Correctly use fallback icons for RSS feed in GUI 2021-09-04 12:11:44 +05:30
jagannatharjun
314f92f2d8 Use DownloadRequest::destFileName for downloading RSS feed icons 2021-09-04 12:02:38 +05:30
jagannatharjun
8b5db328ec Add DownloadRequest::destFileName 2021-09-04 12:02:38 +05:30
Prince Gupta
f2912c14ea
Stick Unread row to top in RSS feed list
PR #15397.
2021-09-04 12:55:58 +08:00
Chocobo1
08f33d7e9e
Fix WebUI crash when tracker URL is invalid
Closes #15391.
PR #15395.
2021-08-31 11:53:42 +08:00
xavier2k6
c034cb5985
Remove Windows Vista support from manifest
PR #15394.
2021-08-30 08:07:15 +03:00
Chocobo1
e3cd15dced
Remove unnecessary UI properties in "Add new torrent" dialog (#15387)
Closes #15383.
2021-08-29 11:29:01 +08:00
sledgehammer999
2b501904cf
Bump to 4.4.0beta3 2021-08-29 01:53:02 +03:00
sledgehammer999
ea986a1f1b
Sync translations from Transifex and run lupdate 2021-08-29 01:51:47 +03:00
Chocobo1
b924357ea9
Specify Unicode for resource block (#15370)
The StringFileInfo block was using "1252 Multilingual", change it to
"1200 Unicode" for consistency.
https://docs.microsoft.com/en-us/windows/win32/menurc/stringfileinfo-block

Closes #15364.
2021-08-26 11:30:53 +08:00
Vladimir Golovnev
b823d74ac3
Use "old file path" provided by libtorrent
Until libtorrent provided an "old_name" field in `file_renamed_alert` we relied
on a workaround with storing old file names to remove empty leftover folders.
PR #15356.
2021-08-23 07:29:50 +03:00
Chocobo1
8d822f2cb4
Improve "last activity" calculation in WebAPI (#15339)
Co-authored-by: 秦风 <mayli.he@gmail.com>

Co-authored-by: Chocobo1 <Chocobo1@users.noreply.github.com>
2021-08-19 11:16:34 +08:00
Chocobo1
7dc7b95bfd
Merge pull request #15306 from Chocobo1/icon
Minor UI revise
2021-08-14 12:12:49 +08:00
Chocobo1
e006538514
Fix cmake script (#15309)
Fix up 138c911ef4.
2021-08-11 13:26:15 +08:00
Chocobo1
526ee9c9db
Add tooltip to listening port spinbox 2021-08-10 12:24:50 +08:00
Chocobo1
a93cf04aca
Use default values for inconsequential fields
Or when the default value is actually what we want.
2021-08-09 13:37:48 +08:00
Chocobo1
e93a67e644
Use default upper limits for ddns entries
The default is 32767 which is larger than the previous artificial limit.
2021-08-09 13:14:51 +08:00
Chocobo1
b29a52dfa8
Use the same icon for selecting folders/files
As stated in Qt doc, the `QStyle::SP_DialogOpenButton` is only for a
button within QDialogButtonBox which means it isn't suitable elsewhere.
2021-08-09 13:14:14 +08:00
sledgehammer999
3e92e716b2
Merge pull request #15294 from sledgehammer999/accept_v2_infohash
Accept v2 infohashes for download
2021-08-08 12:29:04 +03:00
Chocobo1
138c911ef4
Add compile definition to indicate using of libtorrent 2.0 (#15297)
The compile definition is temporary which will be removed when qbt
ditches libtorrent 1.x.
2021-08-08 13:27:22 +08:00
sledgehammer999
e5fe6401a0
Accept v2 infohashes for download
Partially fixes #15287
2021-08-07 17:25:13 +03:00
Vladimir Golovnev
bed643e627
Delay processing of watched folders (#15282)
Fixes regression of #14882.
Closes #15272.
2021-08-07 12:33:29 +03:00
Mengyang Li
4ac25a50ed
WebUI: group trackers by hostname (#15264)
Closes #13608.
2021-08-07 12:25:07 +08:00
Chocobo1
567848e94f
Work around missing function error
The fix comes from older version of MochaUI.
2021-08-05 16:03:18 +08:00
Chocobo1
221cbcc1ac
Update MochaUI to v0.9.7
Upstream: https://github.com/cdotyone/mochaui/blob/develop-0.9.8/Build/mocha.js
2021-08-05 16:03:07 +08:00
Chocobo1
dc2086dab4
Update clipboard.js to v2.0.8 2021-08-05 15:24:03 +08:00
Chocobo1
7be2a03c86
Update mootools to v1.6.0 2021-08-05 15:24:01 +08:00
Sylvain Finot
e87f8f5b93
Expose SSRF mitigation (#15247) 2021-08-04 11:28:36 +08:00
Chocobo1
11a063ea66
Merge pull request #15242 from Chocobo1/libt_version
Detect incompatible libtorrent v2 versions in build systems
2021-08-04 11:28:07 +08:00
sledgehammer999
1d26f4c5f7
Bump to 4.4.0beta2 2021-08-03 23:15:27 +03:00
sledgehammer999
8a09558ed8
Sync translations from Transifex and run lupdate 2021-08-03 23:14:08 +03:00
Daniel Aleksandersen
60b1e692b9
Disconnect comment links fom the WebUI (#15251) 2021-08-03 16:26:04 +08:00
Chocobo1
0a1865d0dd
Don't use old style cast 2021-08-01 13:48:46 +08:00
Chocobo1
7d7f967d5e
Detect incompatible libtorrent v2 versions in build systems
Although the detection is working, the error message in autotools is not
perfect, i.e. it would only mention valid range for libtorrent v1 and it
shouldn't be a problem since v2 support isn't fully ready yet.
2021-07-31 16:59:37 +08:00
Chocobo1
ce554e6c77
Merge pull request #15229 from Chocobo1/port
Use spinbox special value to represent "Use any available port"
2021-07-30 15:19:08 +08:00
AbeniMatteo
e4730191db
Set default file priorities when not specified (#15190) 2021-07-29 12:20:03 +08:00
Chocobo1
49aab492e0
Use spinbox special value to represent "Use any available port"
WebAPI functionality is preserved (deprecated) for now and should be
removed in the future.
2021-07-29 11:50:52 +08:00
Chocobo1
2d4d246268
Remember last viewed page in Options dialog (#15230) 2021-07-28 11:11:00 +08:00
Chocobo1
09e558ae0b
Revise checkbox label for "Use any available ports" functionality
Also reorder the checkboxes a bit.
2021-07-27 13:35:18 +08:00
Chocobo1
a3fd6633c4
Use default property for widgets 2021-07-26 12:20:46 +08:00
Vladimir Golovnev
1eb246c98b
Merge pull request #15181 from glassez/qt5
Raise minimum Qt version to 5.15.2
2021-07-23 06:22:57 +03:00
Chocobo1
96e0c0df20
Improve handling for magnet URI (#15209)
This add support for magnets URI in v2 hash format.
2021-07-22 13:05:59 +08:00
thalieht
aa8f420681
Recognise v2 info-hashes in clipboard for "Add torrent link" dialog (#15206) 2021-07-20 14:30:37 +03:00
Tom Piccirello
7974b5a95c
Support sorting Web UI tables via touch (#15205) 2021-07-19 14:28:04 +08:00
Vladimir Golovnev
ed4570cb4d
Store minimal metadata for "restore torrent" purposes (#15191)
We can no longer save valid torrent files in the general case, because
for torrents of version 2, we need a full merkle tree to do it, but if
a torrent is added from magnet link, full merkle tree may not be available
even before the end of downloading all the data. Actually, we don't need
the full torrent file for the purposes of resuming the torrent, so we can
allow libtorrent to produce only a minimal part of the metadata as part
complete resume data, but we still want to store it in a separate file,
so we extract the resulting metadata from the complete resume data before
saving and merge it together before loading.
2021-07-19 07:59:06 +03:00
AbeniMatteo
01d851440b
Add "Forced metadata downloading" state (#15185) 2021-07-17 21:33:14 +03:00
AbeniMatteo
e5943b64c1
Add filter "Checking" to side panel (#15166) 2021-07-16 14:08:10 +03:00
Kristof Mattei
140e73be4e
Use the URI's setData to set query data (#15187)
This allows the system to properly encode the '|', instead of passing
the '|' on in the URL, which is not allowed and breaks proxies such as
Authelia.

Then, for the purpose of generalization, I pushed this pattern through
to all places where we join items with a '|'.

This comes with the caveat that when we have individual components which
contain a '|' or any other character that is not allowed per the
HTTP standard, we still like to encode the individual components,
for example in the case of 3 strings, separated by a '|'.
If we don't do this we run into the risk that upon decoding URI finds
'|' in our original strings, which is something we don't want.

For example:
Sender:
````javascript
const arr = ["foo|1", "bar|2"];
const uri = new URI("test.html").setData(arr.join("|"));
````
Then on the receiving window, when it receives the uri and splits it, it
looks like this:
````javascript
const arr = new URI().getData('hashes').split('|');
// arr is now ["foo", "1", "bar", "2"]
````

This is why when we want to send a literal "|" we need to do
`encodeURIComponent` and `decodeURIComponent` manually on each item,
and THEN we join.

For example:
Sender:
````javascript
const arr = ["foo|1", "bar|2"];
const uri = new URI("test.html").setData(arr.map(encodeURIComponent).join("|"));
````

Receiver:
````javascript
const arr = new URI().getData('hashes').split('|').map(decodeURIComponent);
// arr is now ["foo|1", "bar|2"]
````

We don't need to with hashes as they are HEX, so no risk of any weird
characters in there.
2021-07-16 12:53:47 +08:00
Vladimir Golovnev (glassez)
925bf7715c
Disable functions deprecated in Qt 5.15.2 and earlier 2021-07-15 10:56:49 +03:00
Vladimir Golovnev (Glassez)
399d3ad85a
Replace QStringRef with QStringView 2021-07-15 10:56:49 +03:00
Chocobo1
d923c03d52
Merge pull request #15186 from Piccirello/webui-table-keyboard-nav
Support navigating Web UI tables with arrow keys
2021-07-13 11:26:50 +08:00
Vladimir Golovnev
699b91ab8d
Properly create "clean path" for watched folder (#15179) 2021-07-12 11:44:52 +03:00
AbeniMatteo
abd6eb2ff3
Add context menu to toggle content tab columns (#15164) 2021-07-12 13:57:17 +08:00
Thomas Piccirello
32f29e72c6 Support expanding/collapsing Web UI folders with arrow keys 2021-07-11 03:01:31 -07:00
Thomas Piccirello
e76bac4131 Support navigating Web UI tables with arrow keys
This allows navigating rows via up/down arrow keys.
2021-07-11 03:01:31 -07:00
Thomas Piccirello
8b94642ab1 Always set Web UI row id as a string
This helps ensure consistent behavior when performing rowId comparisons against strings.
2021-07-10 11:50:48 -07:00
Vladimir Golovnev (glassez)
27baa55443
Raise minimum Qt version to 5.15.2 2021-07-09 07:41:13 +03:00
Chocobo1
fd3d4d479a
Suppress type narrowing warning on MSVC
Fix up 45e31a153c.
2021-07-08 14:25:39 +08:00
Chocobo1
4b0a2d050a
Display tooltip for all columns in torrent content widget
It is primary useful for showing long file names.
2021-07-08 14:23:30 +08:00
Chocobo1
d85c14864b
Add tooltip for "client ID" column
Sometimes the client ID could be quite long and this patch helps showing
it.
2021-07-08 14:22:59 +08:00
Chocobo1
ee696e6f36
Merge pull request #15170 from Chocobo1/tooltip
Add tooltip for various columns
2021-07-08 13:01:59 +08:00
Chocobo1
8ec26e9ea9
Don't use old style casts
Ref: https://github.com/qbittorrent/qBittorrent/runs/2996702005?check_suite_focus=true#step:8:298
2021-07-07 14:44:39 +08:00
Chocobo1
45e31a153c
Reserve space for vector 2021-07-07 14:20:27 +08:00
Chocobo1
7c23d800e6
Use underlying_type member directly
`LTUnderlyingType` served as a intermediate type for libtorrent 1.1 and
1.2 and is obsoleted now.
Also add helper to convert to underlying type.
2021-07-07 14:19:17 +08:00
Chocobo1
4dbf6af733
Simplify initialization statement 2021-07-07 13:20:13 +08:00
Chocobo1
bdc03b1c75
Add tooltip for various columns
Those strings sometimes are quite long and having a tooltip would
save the action of resizing the column width to see the full message.
The WebUI already has it done for all columns.
2021-07-07 13:19:29 +08:00
AbeniMatteo
9bfc74a1bc
Filter torrent info endpoint by tag (#15152) 2021-07-05 13:55:49 +08:00
Vladimir Golovnev
5d03917877
Use torrent info with hashes for creating .torrent file (#15138) 2021-07-04 09:29:34 +03:00
Vladimir Golovnev (Glassez)
d2f975a0f3 Don't forget to start "watch timer" 2021-07-02 08:34:31 +03:00
Chocobo1
eedd47860a
Merge pull request #15142 from Chocobo1/warning
Use proper signed number type
2021-07-01 11:35:04 +08:00
Chocobo1
365554d064
Use proper signed number type
This also suppress the compiler warning:
src/base/bittorrent/torrentimpl.cpp:228:36: warning: comparison of integer expressions of different signedness: ‘int’ and ‘const size_t’ {aka ‘const long unsigned int’} [-Wsign-compare]
2021-06-29 18:04:33 +08:00
Chocobo1
70d1cb86fd
Disable move constructor where it is sensible 2021-06-29 14:49:45 +08:00
FranciscoPombal
ccb7c0d579 Raise minimum libtorrent version to 1.2.14 (2.0.4)
- Also update vcpkg to latest commit: includes libtorrent 1.2.14,
Qt 5.15.2, and Qt 6.1.1
2021-06-28 23:04:47 +01:00
Andrei Stepanov
5157e4965a
Remove excess space 2021-06-27 13:01:03 +04:00
sledgehammer999
3ffd25f9e1
Bump to 4.4.0beta1 2021-06-26 21:05:44 +03:00
sledgehammer999
665ab34f25
Sync translations from Transifex and run lupdate 2021-06-26 21:03:43 +03:00
Vladimir Golovnev
37f227ae74
Provide v1 and v2 infohashes in UI (#15097) 2021-06-25 20:44:23 +03:00
HiFiPhile
f5315d9ba7
Add WebUI reverse proxy source IP resolution (#15047)
Co-authored-by: qix67
Co-authored-by: HiFiPhile <admin@hifiphile.com>
2021-06-23 09:01:36 +03:00
Vladimir Golovnev (Glassez)
124cc9621d Delete LoadTorrentParams when load torrent failed 2021-06-22 21:36:42 +03:00
Vladimir Golovnev (Glassez)
3faa7226e7 Handle exception when torrent file cannot be exported
Both `lt::create_torrent` constructor and `lt::create_torrent::generate()`
can throw an exception so we need to handle it to prevent the app from crashing.
2021-06-22 21:36:42 +03:00
Vladimir Golovnev (Glassez)
6070b41c9b Properly add torrent with new tags
First, an attempt is made to add new tags to the Session.
Closes #15105.
2021-06-18 06:29:15 +03:00
Vladimir Golovnev (Glassez)
50ddfea617 Remove lockfile only when last app instance is destroyed 2021-06-18 06:27:33 +03:00
tgregerson
e74ad86f14
Don't close tags menu when toggling items (#15098)
The issue was resolved by using QAction::toggled signal instead of
QAction::triggered. In QT 5.15+ the latter signal causes a QMenu
to close, whereas the former does not. Closes #13492.
2021-06-16 17:57:56 +03:00
Vladimir Golovnev (Glassez)
2bd2490539 Disable functions deprecated in Qt 5.14 and earlier 2021-06-16 17:56:40 +03:00
Vladimir Golovnev
5c0378a684
Merge pull request #15029 from glassez/qt-5.14
Raise minimum Qt version to 5.14
2021-06-14 16:48:15 +03:00
Dmitry Khlestkov
2bd5aca3a4
Keep sub-sorting order (#15074)
Fixes #15073
2021-06-14 11:57:50 +08:00
Kacper Michajłow
ccb59fbad3
Suppress C4267 conversion warnings (#13307)
- warning C4267: 'initializing': conversion from 'size_t' to 'int', possible loss of data

Caused by mismatch between size_type of std and Qt containers. It is safe to cast to int as all of those containers hold low number of objects.
2021-06-11 08:51:06 +03:00
Vladimir Golovnev (Glassez)
6c66d02aff Declare AbstractFileStorage destructor virtual 2021-06-10 09:19:04 +03:00
Vladimir Golovnev (Glassez)
97c7f3bc67
Raise minimum Qt version to 5.14 2021-06-03 08:56:41 +03:00
Chocobo1
2503271a45
Fix main window turns blank after restoring from tray (#15031)
When restoring from tray icon, although the window manager shows qbt
window but qbt itself didn't handle the event correctly, i.e. the
`show()` was missing and thus qbt did nothing and the window is blank.
Note that at this point the `visible` property is `false`.
After invoking `show()` qbt will start showing the contents and also
fire another showEvent where `visible` property is `true` and here is where
qbt should handle preparations for the window.

Fix #9510.
2021-05-31 12:19:22 +08:00
LoneDev
d335f263f3
Fix comment typo in algorithm.h (#15030) 2021-05-29 11:30:47 +08:00
Vladimir Golovnev
1c34635016
Merge pull request #14993 from glassez/file-error
Provide correct error description in "upload mode"
2021-05-28 08:55:53 +03:00
Vladimir Golovnev (Glassez)
b6a35e9477
Don't log any error when "queue" file doesn't exist 2021-05-27 18:27:41 +03:00
Vladimir Golovnev (Glassez)
6aa8251b98
Provide correct error description in "upload mode" 2021-05-27 18:27:40 +03:00
Chocobo1
3b4bf90a13
Merge pull request #15017 from Chocobo1/css_formatting
Format and lint CSS code
2021-05-27 14:36:57 +08:00
Chocobo1
42582e21f7
Merge pull request #15016 from Chocobo1/pr_13756
Update Mac icons for Big Sur
2021-05-26 11:46:06 +08:00
Chocobo1
af49a4dd5a
Sort CSS properties 2021-05-25 13:20:38 +08:00
Chocobo1
b2081faf87
Remove redundant empty line 2021-05-25 13:20:37 +08:00
Chocobo1
f960934eb9
Merge same selector 2021-05-25 13:20:37 +08:00
Chocobo1
5522725f5d
Remove duplicate property 2021-05-25 13:20:37 +08:00
Chocobo1
9f3d36bab0
Remove useless property
The `padding` will override the former `padding-top`.
2021-05-25 13:20:37 +08:00
Chocobo1
87e7085c22
Remove empty block 2021-05-25 13:20:37 +08:00
Chocobo1
d8eac56f5e
Use stylelint for CSS linting 2021-05-25 13:20:37 +08:00
Chocobo1
c20557f690
Use cleaned icons
By running svgcleaner over qbittorrent_mac.svg.
2021-05-25 12:09:24 +08:00
Chocobo1
65bdc4cf43
Format CSS code with prettier 2021-05-25 11:26:58 +08:00
Chocobo1
ee79c196df
Use prettier for formatting CSS code 2021-05-25 11:21:39 +08:00
17jiangz1
41682bfcbb
Update Mac icons for Big Sur
Add Mac icon vector source.
2021-05-25 10:42:42 +08:00
sledgehammer999
34be8c9213
Merge pull request #14934 from sledgehammer999/translations
Update Qt translations and add new qbt translations
2021-05-23 21:59:29 +03:00
brvphoenix
aebb9f89d1
Remove the lockfile on exit (#14997) 2021-05-23 14:29:41 +08:00
Chocobo1
40f6201509
Merge pull request #14976 from Chocobo1/options
Add `connection_speed` to advanced settings
2021-05-23 14:27:34 +08:00
zhuangzi926
2e8e2b04a1
Announce to all trackers if IP changed (#15001)
Closes #14545.
2021-05-23 14:26:54 +08:00
Chocobo1
c64e433a69
Remove unused parameter 2021-05-21 14:44:19 +08:00
Chocobo1
e21f46d824
Avoid data duplication 2021-05-21 14:38:06 +08:00
Chocobo1
ef79546508
Add connection_speed to advanced settings
Now we follow libtorrent current default value 30.
Closes #6973.

Also bump WebAPI version.
2021-05-21 14:37:57 +08:00
Vladimir Golovnev (Glassez)
2993fdb169
Improve "Watched folders" feature
Make "file system watcher" an application core component
and separate it from its presentation model.
2021-05-19 15:42:41 +03:00
Vladimir Golovnev (Glassez)
9565b695ef
Unify custom exceptions 2021-05-18 08:40:05 +03:00
Vladimir Golovnev (Glassez)
89cedd411e
Allow add torrents with relative save path
The relative save path will be resoloved against the default one.
2021-05-18 07:43:53 +03:00
Anton
a51742b47c
Add context menu for tabs in search widget (#14926)
In searchwidget you can close all opened tabs or selected tab using menu. Closes #5628.
2021-05-17 11:56:21 +08:00
An0n
ea3b897d5d
Bump file pool size (#14966) 2021-05-14 08:57:01 +08:00
PriitUring
e432d67b3b
Fix typo "Highlited" (#14956) 2021-05-12 05:00:19 +03:00
Chocobo1
ff87958188
Merge pull request #14928 from Chocobo1/atomic
Fix potential data race
2021-05-09 11:48:18 +08:00
sledgehammer999
f308cd392b
Merge pull request #14936 from sledgehammer999/bump_grunt_dependency
Update grunt dependency
2021-05-08 14:16:46 +03:00
sledgehammer999
e4bea17fb8
Update grunt dependency
This fixes CVE-2020-7729
2021-05-07 23:34:57 +03:00
sledgehammer999
2c47cfbe25
Add new languages
* Mongolian
* Persian
* Thai
2021-05-07 22:53:13 +03:00
Vladimir Golovnev
511fa37c84
Merge pull request #14927 from thalieht/webui_translate
Make some strings in WebUI translatable
2021-05-07 21:10:27 +03:00
Chocobo1
a82ca6adb2
Fix potential data race
This case could be considered benign however it could still be an
undefined behavior to the compiler, so remove it.

Ref:
https://hacks.mozilla.org/2021/04/eliminating-data-races-in-firefox-a-technical-report/
2021-05-07 15:50:33 +08:00
Chocobo1
05e3e46f5a
Throw the exact (same) exception 2021-05-07 15:49:19 +08:00
Chocobo1
6d399f0303
Fix typo 2021-05-07 15:49:19 +08:00
Chocobo1
ecebfc34fa
Move initial values to header 2021-05-07 14:51:39 +08:00
thalieht
e86916a7f9 Make some strings in WebUI translatable
Closes #14920
2021-05-06 20:49:35 +03:00
Vladimir Golovnev
2f1ec09aef
Merge pull request #14714 from FozzeY/no-parent-priority-menu-on-add
Show priority menu at top level if there is no other
2021-05-03 18:11:24 +03:00
sledgehammer999
94195d5339
Sync translations from Transifex and run lupdate 2021-05-02 18:32:42 +03:00
Chocobo1
c9a552c89c
Merge pull request #14861 from Chocobo1/warnings
Initialize struct members by default
2021-05-02 11:26:30 +08:00
Vladimir Golovnev (Glassez)
383eaf44ac
Implement DBResumeDataStorage class 2021-05-01 12:30:53 +03:00
Chocobo1
bdf2f6c3e1
Initialize struct members by default
This is to suppress the following compilation warnings:
base/bittorrent/magneturi.cpp: In constructor ‘BitTorrent::MagnetUri::MagnetUri(const QString&)’:
base/bittorrent/magneturi.cpp:87:60: warning: missing initializer for member ‘BitTorrent::TrackerEntry::message’ [-Wmissing-field-initializers]
   87 |         m_trackers.append({QString::fromStdString(tracker)});
2021-04-27 11:48:13 +08:00
Chocobo1
fdc186c92f
Revise tag related implementations
Fix #12690.
2021-04-27 11:47:52 +08:00
Chocobo1
ab6141edb7
Merge pull request #14813 from Kolcha/cmake_mac
Set correct minimum macOS version with CMake
2021-04-26 10:02:56 +08:00
Chocobo1
d0dcf53575
Merge pull request #14840 from jagannatharjun/pfix
Correctly draw progress background with stylesheet
2021-04-26 10:02:25 +08:00
jagannatharjun
ab906f17de Correctly draw progress background with stylesheet
fixes #14731
2021-04-24 18:04:34 +05:30
Nick Korotysh
28ef33b0a0
Improve Info.plist generation with CMake
- drop configure_file() and file(GENERATE) calls
- fill missed MACOSX_DEPLOYMENT_TARGET variable
2021-04-23 20:59:09 +03:00
Vladimir Golovnev
376dedebb1
Merge pull request #14816 from glassez/tracker-entry
Improve "tracker entries" handling
2021-04-22 19:03:49 +03:00
Vladimir Golovnev
137c6458f7
Merge pull request #14825 from glassez/upload-mode
Correctly handle "no enough disk space" error
2021-04-22 18:43:43 +03:00
Vladimir Golovnev (Glassez)
75e0990eb3
Provide tracker peers count via TrackerEntry
Don't expose additional accessor in Torrent interface.
2021-04-21 08:46:05 +03:00
Vladimir Golovnev (Glassez)
62a6c725d6
Don't overwrite tracker message
Use one of the tracker endpoint messages.
2021-04-21 08:45:09 +03:00
Vladimir Golovnev (Glassez)
d4554c2e5c
Correctly handle "no enough disk space" error
If torrent failed to write, it stops downloading and goes to
"upload mode" instead of errored state so it just keeps seeding.
Now qBittorrent indicates this state as "errored" and allows
the user to manually bring the torrent out of this state.
2021-04-21 08:27:56 +03:00
Chocobo1
d6a398cf2c
Merge pull request #14811 from Kolcha/bundle_name
Don't use executable name as CFBundleName value
2021-04-21 11:46:43 +08:00
Chocobo1
6864e13e6f
Show "last activity" value under all circumstances 2021-04-20 10:03:25 +08:00
Nick Korotysh
29e6b229ac
Don't use executable name as CFBundleName value 2021-04-20 01:49:32 +03:00
Chocobo1
cb8d6a0939
Reorder peer flags
Now we group related flags nearby.
2021-04-18 12:46:07 +08:00
Chocobo1
e38128119c
Capitalize "peer flags" descriptions
And use a helper function to build the descriptions.
2021-04-18 12:45:18 +08:00
Chocobo1
b5a24fd877
Merge pull request #14794 from zhuangzi926/pr-dyndns-register-url
Update dyndns register url
2021-04-17 11:44:51 +08:00
Vladimir Golovnev
e1ed5b73d0
Merge pull request #14795 from glassez/file-action
Allow to specify file indexes in `torrents/files` API
2021-04-17 06:17:38 +03:00
FozzeY
3e47d26e44 Show priority menu at top level if there is no other 2021-04-17 00:14:18 +03:00
Vladimir Golovnev
e0d17e496a
Merge pull request #14783 from glassez/macutils
Don't use "Qt Mac Extras" module
2021-04-16 18:40:40 +03:00
Vladimir Golovnev (Glassez)
6cf99cd0f2
Allow to specify file indexes in torrents/files API 2021-04-16 09:30:07 +03:00
zhuangzi926
c9e2da5f53 Update dyndns register url 2021-04-15 21:41:42 +08:00
Chocobo1
53b7956968
Clean up code
and remove unused parameters/variables.
2021-04-15 11:29:22 +08:00
Chocobo1
d13be829c3
Fix D-Bus Notification desktop-entry field 2021-04-15 11:24:28 +08:00
Chocobo1
e18b2ab437
Regenerate D-Bus notifications related code 2021-04-15 11:24:25 +08:00
Vladimir Golovnev (Glassez)
35032d7eed
Don't use "Qt Mac Extras" module
"Qt Mac Extras" module is removed in Qt6.
2021-04-14 15:41:46 +03:00
kevtechxx
7722916fad Add "Notification timeout" option 2021-04-13 16:22:48 +02:00
Chocobo1
d82a1d7198
Merge pull request #14717 from Chocobo1/ncmp
Simplify natural sort classes interface
2021-04-13 14:22:25 +08:00
Chocobo1
a64bb1a990
Simplify natural sort classes interface
Now the comparison function/class should be constructed before usage.
This change also make it easier to plug in into various containers which
will require a compare function type (such as std::set).
2021-04-10 14:18:18 +08:00
Chocobo1
2b8e50b296
Merge pull request #14737 from jagannatharjun/revert
Revert "Change clamping of update interval of SpeedPlotView::Averager"
2021-04-09 11:34:03 +08:00
Vladimir Golovnev
f97aa05bdb
Merge pull request #14736 from glassez/string-compare
Enclose strings in QLatin1String
2021-04-08 10:32:51 +03:00
Vladimir Golovnev (Glassez)
4a68df084e
Enclose strings in QLatin1String 2021-04-08 06:56:40 +03:00
jagannatharjun
3f32b040dc Revert "Change clamping of update interval of SpeedPlotView::Averager"
This reverts commit 435bb34435.

To achieve what the reverted commit wants, the timing
would need to be taken iteratively rather that cumulatively

fixes #14735
2021-04-07 22:43:36 +05:30
sledgehammer999
21b3c61162
Merge pull request #14575 from sledgehammer999/license_clarification
Clarify that the license is GPLv2+
2021-04-07 14:02:59 +03:00
Chocobo1
5045fa6dcd
Merge pull request #14652 from jagannatharjun/speed-plot-view-minor
Minor updates to Speed plot view
2021-04-06 11:40:01 +08:00
jagannatharjun
435bb34435 Change clamping of update interval of SpeedPlotView::Averager
Don't clamp elapsed time of SpeedPlotView::Averager on resolution. Since
it may cause minor discrepencies across different Averagers with
different resolution for same speed update.
2021-04-04 21:49:57 +05:30
brvphoenix
bb9ca7f418 WebUI: Fix magnet url from the browser 2021-04-03 19:26:17 +08:00
Chocobo1
0b3d088782
Merge pull request #14676 from Chocobo1/watcher
Revise folder monitoring functions in WebUI
2021-04-03 13:19:29 +08:00
Vladimir Golovnev
6514eaf565
Merge pull request #14688 from glassez/file-prio
Correctly forward declare file_prio_alert
2021-04-02 11:45:50 +03:00
Vladimir Golovnev (Glassez)
f8e7602d96
Correctly forward declare file_prio_alert 2021-04-02 08:29:23 +03:00
Vladimir Golovnev
565aef9637
Merge pull request #14630 from glassez/save-resume
Improve ResumeDataStorage
2021-04-02 06:48:32 +03:00
Vladimir Golovnev
825bf8d61e
Merge pull request #14657 from glassez/file-prio
Save "resume data" once file priority is changed
2021-04-01 06:32:17 +03:00
Vladimir Golovnev (Glassez)
1344b31535
Improve ResumeDataStorage 2021-03-31 11:56:36 +03:00
Chocobo1
9b8bddf7b2
Revise folder monitoring functions in WebUI
Closes #14241.
2021-03-31 12:04:22 +08:00
Chocobo1
8a087a876e
Clean up code 2021-03-31 11:27:57 +08:00
Chocobo1
f8067aa592
Merge pull request #14645 from Chocobo1/links
Remove unnecessary URL encoding
2021-03-31 11:16:45 +08:00
skvenders
2b837381f3
Remove contributor
Remove contributor as requested: https://github.com/qbittorrent/qBittorrent/pull/14637#issuecomment-808894421
2021-03-31 11:07:01 +08:00
Vladimir Golovnev (Glassez)
cd6959b712
Save "resume data" once file priority is changed 2021-03-30 19:59:05 +03:00
Vladimir Golovnev
2d1c34d8e0
Merge pull request #14593 from glassez/qt6-compat
Make current codebase more compatible with Qt6
2021-03-29 14:00:23 +03:00