Compare commits

...

255 commits

Author SHA1 Message Date
sledgehammer999
f7e6b96493
Bump to 4.3.4 2021-03-23 23:14:15 +02:00
sledgehammer999
88bf6f11c7
Update Changelog 2021-03-23 23:04:12 +02:00
sledgehammer999
90e2236990
Sync translations from Transifex and run lupdate 2021-03-23 23:02:22 +02:00
treysis
6ad7cadc4b
Fix bad IPv6 address format for outgoingInterfaces
Fixes https://github.com/qbittorrent/qBittorrent/issues/12892#issuecomment-792292336
2021-03-23 22:26:59 +02:00
brvphoenix
0499111156
WebUI: Avoid decoding strings repeatedly
Fix #14553
2021-03-23 22:26:57 +02:00
Vladimir Golovnev (Glassez)
ae44e59c9a
Wrap "resume data" in LoadTorrentParams 2021-03-23 22:26:55 +02:00
Vladimir Golovnev (Glassez)
1de52f9bcf
Drop deprecated code 2021-03-23 22:26:54 +02:00
Vladimir Golovnev (Glassez)
448e55031e
Save resume data when torrent has done checking 2021-03-23 22:26:52 +02:00
Vladimir Golovnev (Glassez)
3b748178c2
Use QRegularExpression instead of deprecated QRegExp
Now it follows closely the definition of wildcard for glob patterns.
The backslash (\) character is not an escape char in this context.
In order to match one of the special characters, place it in square
brackets (for example, [?]).
2021-03-23 22:26:50 +02:00
thalieht
a4a54ce712
Allow >100 days in WebUI function "friendlyDuration"
Because it's not only used for ETA.
2021-03-23 22:26:48 +02:00
thalieht
d19b524d2d
Fix incorrect seeding time string in WebUI General tab 2021-03-23 22:26:47 +02:00
thalieht
1e2bf50e66
Add seeding time to the active time column in WebUI
Closes #14526
2021-03-23 22:26:46 +02:00
Vladimir Golovnev (Glassez)
e7f3409053
Don't use deprecated operators 2021-03-23 22:26:44 +02:00
Vladimir Golovnev (Glassez)
9758633eeb
Use correct return statement 2021-03-23 22:26:42 +02:00
Vladimir Golovnev (Glassez)
3def5e40c4
Include missing header 2021-03-23 22:26:41 +02:00
Vladimir Golovnev (Glassez)
ca923ed02c
Include QDesktopWidget header only when needed 2021-03-23 22:26:38 +02:00
Chocobo1
e4c3bad93a
Fix library requirements 2021-03-23 22:26:37 +02:00
Chocobo1
3b52c5ce97
Draw progress bar in disabled style 2021-03-23 22:26:36 +02:00
Vladimir Golovnev (Glassez)
44b94803a4
Improve "save resume data" handling 2021-03-23 22:26:35 +02:00
jagannatharjun
5d4644c4fc
Remember sub sort column of transfer list 2021-03-23 22:26:34 +02:00
Chocobo1
a2ef115c66
Simplify progress bar painting 2021-03-23 22:26:31 +02:00
Vladimir Golovnev (Glassez)
1356f200b8
Don't use deprecated QTextCodec 2021-03-23 22:26:30 +02:00
Vladimir Golovnev
3c68896b1d
CI: Don't compile on Ubuntu 18.04 2021-03-23 22:26:29 +02:00
Vladimir Golovnev (Glassez)
265da50791
Don't use deprecated features 2021-03-23 22:26:28 +02:00
Vladimir Golovnev (Glassez)
4037143f4e
Raise minimum supported Qt version to 5.12 2021-03-23 22:26:26 +02:00
Chocobo1
8cae8ad5c5
Replace parameters in one step
This would avoid the unwanted effect of replacing parameter coming from
another parameter.
2021-03-23 22:26:22 +02:00
Vladimir Golovnev (Glassez)
50bd845682
Initialize torrent status from add torrent params 2021-03-23 22:26:20 +02:00
Vladimir Golovnev (Glassez)
ed5aa07526
CI: Disable libtorrent2 deprecated functions on Travis 2021-03-23 22:26:19 +02:00
Vladimir Golovnev (Glassez)
437b51b3a5
Improve "info hash" handling
Define "torrent ID" concept, which is either a SHA1 hash for torrents of version 1,
or a SHA256 hash (truncated to SHA1 hash length) for torrents of version 2.
Add support for native libtorrent2 info hashes.
2021-03-23 22:26:18 +02:00
Vladimir Golovnev (Glassez)
c2ccc9dfa4
Properly show tracker status for "paused" torrents 2021-03-23 22:26:16 +02:00
Vladimir Golovnev (Glassez)
b2c7d8211f
Improve tracker entries handling 2021-03-23 22:26:14 +02:00
Vladimir Golovnev (Glassez)
726455ac3e
Don't allow speed plot buffer to overflow 2021-03-23 22:26:13 +02:00
Vladimir Golovnev (Glassez)
ae2bb4efeb
Accept "share limits" when adding torrent using WebAPI 2021-03-23 22:26:12 +02:00
Vladimir Golovnev (Glassez)
9971329121
Look for qbittorrent.pdb in installation directory
Pass application directory as PDB search path in SymInitialize.
Otherwise it searches in application working directory so when you
run qBittorrent with working directory other than its installation
one it can't find qbittorent.pdb file and produces broken stacktrace.
2021-03-23 22:26:10 +02:00
Chocobo1
d0ec1c4a86
Expose ToS setting from libtorrent
Closes #14420.
2021-03-23 22:26:08 +02:00
Chocobo1
9c55600d81
Add missing semicolon 2021-03-23 22:26:01 +02:00
Vladimir Golovnev (Glassez)
b45fb74e01
Define template for classes that represent SHA hashes 2021-03-23 21:05:41 +02:00
Vladimir Golovnev (Glassez)
f16c585a77
Drop implicit conversions between InfoHash and QString 2021-03-23 21:05:40 +02:00
Chocobo1
9c664d04ae
Remove unused lambda capture 2021-03-23 21:05:38 +02:00
Chocobo1
3d0ca83474
Specify Qt version in TravisCI build script
In homebrew `qt` package is referring to Qt6 instead of Qt5.
2021-03-23 21:05:37 +02:00
Chocobo1
e713ffb064
Properly stop torrent creation if aborted
Closes #11346.
2021-03-23 21:05:37 +02:00
Chocobo1
cf1e61bcf5
Correctly draw the background of progress bar
Closes #12271.
2021-03-23 21:05:36 +02:00
Vladimir Golovnev (Glassez)
42b22d6645
CI: Use custom vcpkg libtorrent port 2021-03-23 21:05:35 +02:00
Vladimir Golovnev (Glassez)
2d607f8c1a
Raise minimum libtorrent version to 1.2.12 2021-03-23 21:05:34 +02:00
jagannatharjun
69256905c2
Support sub-sorting in Transferlist 2021-03-23 21:05:32 +02:00
brvphoenix
305316b1fc
WebUI: Properly decode strings 2021-03-23 21:05:32 +02:00
Chocobo1
27e222455b
Improve detection of filename extension of audio/video files 2021-03-23 21:05:31 +02:00
Michał Kopeć
2b18318e0c
Add an option to disable icons in menus 2021-03-23 21:05:30 +02:00
Chocobo1
49cadce253
Enable sponsor button on Github 2021-03-23 21:05:29 +02:00
Juraj Oršulić
f1b908b95b
Systemd: wait for mounting of local filesystems 2021-03-23 21:05:28 +02:00
jagannatharjun
4acfcef8da
Add a 3-Hour graph 2021-03-23 21:05:27 +02:00
jagannatharjun
69f2196a22
Make SpeedPlotView averager time aware
Previously SpeedPlotView assumed speed is updated per second but the
default value was 1500ms and that can be further changed by the
user, this caused a lot of duplicate data in the calculation of the
graph points. Now Averager averages based on the target duration, resolution
and also takes into account when actually data has arrived.

Also improved resolution of 6-hour graph, previously it was same as 12-hour graph
2021-03-23 21:05:26 +02:00
Chocobo1
b20a3c5b8e
Use std::optional to return results 2021-03-23 21:05:25 +02:00
Chocobo1
2c5271b3b2
Fix potential out-of-bounds access 2021-03-23 21:05:24 +02:00
Si Yong Kim
7696895a88
Refactor apply button logics on options dialog 2021-03-23 21:05:23 +02:00
Si Yong Kim
c1ae5d2572
Add empty name error handling on new category dialog 2021-03-23 21:05:23 +02:00
Si Yong Kim
0e635c7fdd
Add category button on AutomatedRSSDownloader on GUI
Closes #7629
2021-03-23 21:05:22 +02:00
Chocobo1
58345e5bbf
Revise getter function for torrrent queue position
This addresses https://github.com/qbittorrent/qBittorrent/pull/14335#issuecomment-774667836

The WebAPI is not affected as a workaround is added.
2021-03-23 21:05:21 +02:00
Chocobo1
89382d4ec2
Apply "Hide infinity values" to ETA column 2021-03-23 21:05:20 +02:00
Chocobo1
372f5af36b
Apply "Hide infinity values" to "Down/Up Limit" columns 2021-03-23 21:05:19 +02:00
Chocobo1
f38736729d
Apply "Hide zero values" to "Time Active" column 2021-03-23 21:05:18 +02:00
Chocobo1
bf67ef21c6
Clean up coding style 2021-03-23 21:05:18 +02:00
Chocobo1
cfd40adcb5
Show proper string when torrent availability is not available 2021-03-23 21:05:16 +02:00
Vladimir Golovnev (Glassez)
8210f9841e
Restart "missing files" torrents after changing location 2021-03-23 21:05:16 +02:00
Vladimir Golovnev (Glassez)
ae3d17ec01
Allow "missing files" torrents to save more resume data 2021-03-23 21:05:15 +02:00
Vladimir Golovnev (Glassez)
349e958be3
Allow change-case-only file renaming on Windows 2021-03-23 21:05:14 +02:00
Chocobo1
42acc75394
Use stable sorting in transfer list 2021-03-23 21:05:12 +02:00
Chocobo1
8b91dcedb0
Use built-in function for configuring file contents 2021-03-23 21:05:11 +02:00
dyumin
a454a0303d
Treat errored torrents as finished 2021-03-23 21:05:11 +02:00
Chocobo1
789c6de2e8
Simplify CI script directives 2021-03-23 21:05:10 +02:00
Chocobo1
c2fb51159f
Don't trigger Github Actions CI builds after editing a PR's opening post
After dropping "edited" keyword, it is the same as the default.
2021-03-23 21:05:09 +02:00
PriitUring
bfb0afe3cf
NSIS: Add Estonian translation
This file was previously not translated.
PR #14331.
2021-03-23 21:05:08 +02:00
Chocobo1
26a2d4f24d
Reuse existing code for sorting
This makes the behavior of sorting by TR_SEED_DATE consistent.
2021-03-23 21:05:08 +02:00
Si Yong Kim
f6e88c8c55
Add hyperlink to Transifex on translator list
Closes #12609
2021-03-23 21:05:07 +02:00
Si Yong Kim
51033c212a
Remove Hungarian translator email 2021-03-23 21:05:06 +02:00
Chocobo1
16c858cf61
Prolong checking interval for program updates 2021-03-23 21:05:05 +02:00
Chocobo1
0496543fce
Improve behavior when using ProgramUpdater class
This is mainly to avoid involving of `sender()` function.
2021-03-23 21:05:04 +02:00
Chocobo1
746e8a7be1
Revise version comparison 2021-03-23 21:05:04 +02:00
Chocobo1
6d301ccf55
Clean up coding style 2021-03-23 21:05:03 +02:00
jagannatharjun
d441b18da0
Disable expand on double click in TorrentContentTreeView
We hook our own actions on double click. Fixes #14269
2021-03-23 21:05:01 +02:00
Vladimir Golovnev (Glassez)
13023ba70a
Bump WebAPI version 2021-03-23 21:05:01 +02:00
Alex
ecb7c02d4c
Update Portuguese BR NSIS translation (#12376) 2021-03-23 21:05:00 +02:00
slrslr
fd1ac43157
Translating new phrases (#12318)
* Update Czech NSIS translation

Co-authored-by: slrslr <czautohits@gmail.com>
2021-03-23 21:04:59 +02:00
Chocobo1
c6d4a1f7d4
Enlarge "speed limit" icon slightly 2021-03-23 21:04:58 +02:00
Chocobo1
01110690da
Don't let "program update" dialog steal focus
And also avoid creating an unnecessary event loop.
Closes #14250.
2021-03-23 21:04:57 +02:00
Chocobo1
c998c7d38d
Disable translation of program name 2021-03-23 21:04:56 +02:00
an0n666
230f98da4a
Validate HTTPS Tracker Certificate by default 2021-03-23 21:04:56 +02:00
xavier2k6
c86db0004f
Change qBittorrent Updater window title 2021-03-23 21:04:54 +02:00
Christoph Rackwitz
e645514c8f
Allow tab to escape the text box in "Edit trackers" dialog 2021-03-23 21:04:53 +02:00
Chocobo1
f3c9dbd512
Remove redundant variable declarations 2021-03-23 21:04:52 +02:00
Chocobo1
ef650293e3
Add ability to prioritize selected items by shown file order
Closes #2834.
2021-03-23 21:04:51 +02:00
Chocobo1
05e217537c
Move menu actions out of .ui files
This is to move related code together.
2021-03-23 21:04:50 +02:00
Vladimir Golovnev (Glassez)
13cb3b5ca1
Drop extension from generated content folder name
Try to detect whether generated content folder name contains extension
and drop it to avoid possible conflicts between file/folder names.
2021-03-23 21:04:38 +02:00
sledgehammer999
da0b276d5f
Bump to 4.3.3 2021-01-19 00:47:04 +02:00
sledgehammer999
2d73bc9e7d
Update Changelog 2021-01-19 00:46:29 +02:00
Chocobo1
fdd54fe568
Simplify code for checking free disk space
`QStorageInfo::bytesAvailable()` is guaranteed to return `-1` for an
invalid path.
https://doc.qt.io/qt-5/qstorageinfo.html#bytesAvailable
2021-01-19 00:45:13 +02:00
Chocobo1
e5ce24e55e
Improve detection of file extension string 2021-01-19 00:45:06 +02:00
sledgehammer999
d90349709b
Sync translations from Transifex and run lupdate 2021-01-17 23:24:02 +02:00
Vladimir Golovnev (Glassez)
adb0fe6582
WebUI: Correctly represent torrent content structure 2021-01-17 22:50:40 +02:00
Chocobo1
5ed81580c9
Add README.md to searchengine folder 2021-01-17 22:50:39 +02:00
Chocobo1
86d6fb86d7
Unify "github actions" artifacts naming scheme 2021-01-17 22:50:38 +02:00
Chocobo1
ddec247d4f
Migrate away from deprecated Qt functions
`QString QDateTime::toString(Qt::DateFormat format = Qt::TextDate)` will
be removed in Qt6.
2021-01-17 22:50:37 +02:00
Chocobo1
d431ecbe00
Disable clang "range loop analysis" compiler warning
See: https://github.com/qbittorrent/qBittorrent/pull/13915#issuecomment-739449084
2021-01-17 22:50:36 +02:00
Chocobo1
be929ed88c
Set source character sets to UTF-8
This suppress warning C4819.
https://docs.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8?view=msvc-160
2021-01-17 22:50:35 +02:00
Chocobo1
2e1f9bf8be
Add script for generating project tarball 2021-01-17 22:50:20 +02:00
lbilli
7fff393b0e
On Linux use legacy 'data' directory only as a fallback 2021-01-17 22:47:13 +02:00
sledgehammer999
a669ec49ad
Correct copyright attribution
These files were created and edited in their entirety in commit 8db4bde15d
As far as I can tell they were almost entirety rewritten from their original state.
The old copyright attribution is restored and the new author is added too.
2021-01-17 22:47:11 +02:00
Vladimir Golovnev (Glassez)
1880082017
Remove redundant suffix from TorrentHandle class
Originally, it was just a wrapper for libtorrent::torrent_handle class, so it mimicked its name.
It was then transformed into a more complex aggregate, but the name was retained (just by inertia).
Unlike libtorrent::torrent_handle class in whose name "handle" means the pattern used,
it does not matter for qBittorrent classes and just eats up space in the source code.
2021-01-17 22:47:00 +02:00
sledgehammer999
0cbd15890a
Merge pull request #14170 from sledgehammer999/use_cxx1z
Use c++1z to enable c++17
2021-01-07 13:40:05 +02:00
sledgehammer999
7fe7c6c277
Use c++1z to enable c++17
It increases compatibility with older qt versions.
2021-01-06 21:54:46 +02:00
jagannatharjun
e4c177fec7
Correctly set items flags in TorrentContentModel
Only set editable flag on item's where editing is handled in the delegate

closes #13515
2021-01-06 21:36:40 +02:00
Chocobo1
77f4e6c2cf
Generate version header when configuring project
The basic idea is we create a version header template at
"src/base/version.h.in" and the build systems are expected to replace
strings that are enclosed with @ symbols and generate
"src/base/version.h" for other source files to consume/include.
2021-01-06 21:36:39 +02:00
sledgehammer999
4563b11a2e
Bump copyright year 2021-01-06 21:36:37 +02:00
Vladimir Golovnev (Glassez)
cb477f9a29
QMake: Raise minimal macOS target version 2021-01-06 21:36:35 +02:00
Vladimir Golovnev (Glassez)
58ac07667e
Use single parameter to accept torrent source 2021-01-06 21:36:34 +02:00
Vladimir Golovnev (Glassez)
74bf3af41c
Use std::optional<bool> instead of custom TriStateBool 2021-01-06 21:36:33 +02:00
Vladimir Golovnev (Glassez)
9317071122
Change parseBool() to return optional bool value 2021-01-06 21:36:31 +02:00
Vladimir Golovnev (Glassez)
dab32f2090
Use std::optional instead of boost::optional 2021-01-06 21:36:29 +02:00
Vladimir Golovnev (Glassez)
dc464d4d41
Use nested namespaces definition syntax 2021-01-06 21:36:28 +02:00
Chocobo1
e7e3f6a9db
Don't use deprecated locale name 2021-01-06 21:36:27 +02:00
Chocobo1
5a1c4e79b3
Revise store/load state operations of Options Dialog 2021-01-06 21:36:26 +02:00
Chocobo1
c6d9ab6810
Remember dialog sizes
This applies to "About Dialog", "Ban List Options Dialog", "Download From URL Dialog", "IP Subnet
Whitelist Options Dialog", "Search Plugin Select Dialog", "Search Plugin Source Dialog",
"Statistics Dialog", "Speed Limit Dialog" and "Torrent Options Dialog".

Also unifies storing the dialog size under the key "Size".
2021-01-06 21:36:24 +02:00
Chocobo1
d7afad835e
Revise SettingsStorage store/load value interface 2021-01-06 21:36:22 +02:00
Chocobo1
8608d7b9da
Improve load data behavior of SettingsStorage class
Previously it only handle the case of failed lookup, now it discard
invalid values when deserializing the database from disk.
Also checks whether the data is convertible to the intended type.
2021-01-06 21:36:22 +02:00
Vladimir Golovnev (Glassez)
72970602af
Reload "missing files" torrent instead of re-checking 2021-01-06 21:36:20 +02:00
Vladimir Golovnev (Glassez)
86579ca87d
Extract torrent reloading logic into separate method 2021-01-06 21:36:19 +02:00
Vladimir Golovnev (Glassez)
e55582124c
Drop notification about move storage failed 2021-01-06 21:36:17 +02:00
Vladimir Golovnev (Glassez)
bd8b06c607
Drop notification about move storage finished 2021-01-06 21:36:16 +02:00
Chocobo1
230fedf069
Move parsing of TriStateBool to a static class function 2021-01-06 21:36:14 +02:00
thalieht
7bea10f507
Update "Keep top-level folder" in WebUI options 2021-01-06 21:36:13 +02:00
Chocobo1
7cde969b90
Exclude configure script for "trailing newlines" checking 2021-01-06 21:36:12 +02:00
Chocobo1
a3b8f6880b
Migrate away from deprecated AC_OUTPUT macro
The `AC_OUTPUT` has two versions, the deprecated one takes arguments and the other not. Check the
following link for equivalent replacement:
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/html_node/Obsolete-Macros.html#Obsolete-Macros

Also regenerate the configure script with the latest Autoconf 2.70.
2021-01-06 21:35:33 +02:00
Chocobo1
ad79fc8d43
Migrate away from deprecated std::iterator class 2021-01-06 21:31:51 +02:00
Chocobo1
fb4bf94a56
Use function-pointer based signal-slot connection 2021-01-06 21:31:50 +02:00
Chocobo1
1c184944fd
Remove unused define 2021-01-06 21:31:49 +02:00
Chocobo1
ec420f6617
Bump project requirement to C++17 2021-01-06 21:31:47 +02:00
Chocobo1
d908227619
Add a thin layer around SettingsStorage class
This new layer would be handy for saving GUI widget states as they don't
need the value cached and they store/load rarely.
2021-01-06 21:31:45 +02:00
sledgehammer999
ac8167410b
Add new languages
* Azerbaijani
* Estonian
2021-01-06 21:31:44 +02:00
Vladimir Golovnev (Glassez)
26ce187b30
Don't call non-existent elements
Fixed a regression where the script tries to access elements that no longer
exist on the page, because they were replaced with others by a previous change.
2021-01-06 21:31:43 +02:00
Vladimir Golovnev (Glassez)
2c4e04e537
Don't call non-existent elements
Fixed a regression where the script tries to access elements that no longer
exist on the page, because they were replaced with others by a previous change.
2021-01-06 21:31:42 +02:00
Vladimir Golovnev (Glassez)
b418f65c2f
Improve content file/folder names handling
Move files/folders renaming functions to core classes.
Query file/folder for renaming by its current path.
Add ability to rename content folders from WebAPI/WebUI.
2021-01-06 21:31:41 +02:00
Vladimir Golovnev (Glassez)
dd3a8d5d56
Fix folder name extraction functions
It should return empty string if there is no parent folder.
2021-01-06 21:31:39 +02:00
Chocobo1
49e54a55df
Capitalize locale names 2021-01-06 21:31:38 +02:00
thalieht
8cd0a7ae85
Group several torrent options into one dialog
Speed limits, share limits and the new options to disable DHT, PeX, LSD per torrent
2021-01-06 21:31:36 +02:00
thalieht
442f0df613
Save fastresume when setting torrent speed limits 2021-01-06 21:31:35 +02:00
thalieht
f9ee5bdb59
Increase maximum global speed limits from ~1 GiB/s to ~2 GiB/s
Closer to the INT_MAX limit of ~2 Billion when multiplied by 1024 for libtorrent
2021-01-06 21:31:33 +02:00
thalieht
b9602cc6ab
Convert existing speed dialog to global + alt global limits only 2021-01-06 21:31:25 +02:00
sledgehammer999
abb854a1e6
Bump to 4.3.2 2020-12-27 13:42:41 +02:00
sledgehammer999
4ee17a73d0
Update Changelog 2020-12-27 13:42:40 +02:00
sledgehammer999
faf6e82274
Sync translations from Transifex and run lupdate 2020-12-26 21:18:40 +02:00
Vladimir Golovnev (Glassez)
c08ec1ac5e
Allow to add root folder to torrent content 2020-12-26 20:27:34 +02:00
Vladimir Golovnev (Glassez)
cd0b6d9a43
Extract enum serialization/parsing functions 2020-12-26 20:27:33 +02:00
Vladimir Golovnev (Glassez)
b8f1142abe
Improve torrent name handling 2020-12-26 20:27:31 +02:00
Chocobo1
78859415d6
Use a helper function to look up stat indexes 2020-12-26 20:27:29 +02:00
Chocobo1
ef92c17192
Don't use removed stat metric in libtorrent 2.0
For now, the metric is not entirely removed due to WebAPI still needs to
access it.
2020-12-26 20:27:28 +02:00
Chocobo1
22f3abc4b5
Initialize stat indices to -1
When the index is initialized it will be set to a number >= 0, so we use
-1 to denote its uninitialized status.
2020-12-26 20:27:27 +02:00
Chocobo1
a56e6294c1
Fix wrong JSON type returned
Fix up 78638a15be.
Closes #14041.
2020-12-26 20:27:26 +02:00
Chocobo1
77909e0093
Don't use default CFLAGS, CXXFLAGS from autotools
Before this commit, autotools will inject `-g -O2` to debug build
(`--enable-debug=yes`) and rendering the result binary useless. This
commit fixes it.
https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.70/html_node/C_002b_002b-Compiler.html

Closes #14032.
2020-12-26 20:27:25 +02:00
Vladimir Golovnev (Glassez)
2c2bb14b2a
Fix bug of "move storage job" can be performed multiple times 2020-12-26 20:27:16 +02:00
Chocobo1
73c8b77464
Migrate away from deprecated QVariant comparison operators
Fortunately, serializing to JSON limits the data types to a very small
subset and thus we are able to implement the comparison without much
hassle.

Fix up cba8d83b21.
2020-12-26 20:27:14 +02:00
Alessandro Simonelli
042238db87
NSIS: Fixed italian.nsi after 4.3.0.1 update
Merged my previous fixes (discussed in #13607) with the suggestions by @glassez (#13615).
2020-12-26 20:27:13 +02:00
FranciscoPombal
6e267f8e81
Update coding guidelines policy for include guards 2020-12-26 20:27:11 +02:00
FranciscoPombal
fdc64d9b38
Use #pragma once instead of include guards 2020-12-26 20:27:10 +02:00
Chocobo1
0b42425db5
Add support for allow_idna option
Upstream PR: https://github.com/arvidn/libtorrent/pull/5316
2020-12-26 20:27:08 +02:00
Chocobo1
e5d7738127
Update "HTTPS tracker validation" enablement conditional
https://github.com/arvidn/libtorrent/pull/5313
2020-12-26 20:27:06 +02:00
Chocobo1
422489e2a1
Revise Utils::Version comparison operators 2020-12-26 20:27:04 +02:00
Chocobo1
7de983b4e5
Add operator< for InfoHash class 2020-12-26 20:27:03 +02:00
Chocobo1
e4e55d2a80
Migrate away from deprecated QVariant comparison operators
Another idea would be manually define a custom comparison function for
QVariant. However, having the function would be excessive due to its
limited usage count, also note that we are already casting
various QVariant to its underlying type in existing code.
2020-12-26 20:27:01 +02:00
Vladimir Golovnev (Glassez)
926012ce71
Fix bug of torrents don't save "stopped" state 2020-12-26 20:27:00 +02:00
Chocobo1
487eb554c9
Fix coding style 2020-12-26 20:26:59 +02:00
Chocobo1
5a96e1fc7a
Use Qt provided forward declaration header 2020-12-26 20:26:58 +02:00
FranciscoPombal
2fe698ee60
CMake: detect required header for STACKTRACE feature
musl does not provide execinfo.h, so our current stacktrace-related
code cannot be used with it.
2020-12-26 20:26:57 +02:00
Chocobo1
177ac32a5e
Use the correct type when referring to info hash 2020-12-26 20:26:55 +02:00
Vladimir Golovnev (Glassez)
5f34d1555b
Fix received metadata handling 2020-12-26 20:26:54 +02:00
FranciscoPombal
7cfe68f46c
Bump dependency versions in CI
- Bump vcpkg version in GitHub Actions CI
- Bump libtorrent version in Travis CI

Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
2020-12-26 20:26:53 +02:00
Vladimir Golovnev
f94f4d2391
Drop support for building with libtorrent < 1.2.11
Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
2020-12-26 20:26:52 +02:00
FranciscoPombal
73b18d7ef3
Update minimum depedency versions 2020-12-26 20:26:51 +02:00
FranciscoPombal
817e9c4747
Fix method invocation on Qt < 5.10
Fixup 0c3fe54b0b
2020-12-26 20:26:48 +02:00
Vladimir Golovnev (Glassez)
28844eff44
Search for existing files in separate thread 2020-12-26 20:26:47 +02:00
Vladimir Golovnev (Glassez)
389664213b
Don't rewrite TorrentInfo instance if it's valid 2020-12-26 20:26:46 +02:00
Vladimir Golovnev (Glassez)
953b6fd6f8
Properly handle "Append extension" option changing 2020-12-26 20:26:45 +02:00
Vladimir Golovnev (Glassez)
9b4f3fcbf8
Clean up metadata downloading code 2020-12-26 20:26:43 +02:00
Chocobo1
80743180be
Remove unnecessary restriction on input length
Closes #13884.
2020-12-26 20:26:42 +02:00
Chocobo1
b2847b2381
Update URL to libtorrent settings 2020-12-26 20:26:41 +02:00
Chocobo1
eb657ec032
Move "embedded tracker" options to qbt section 2020-12-26 20:26:39 +02:00
Chocobo1
fc2be601df
Add links to libtorrent documentation 2020-12-26 20:26:38 +02:00
Chocobo1
5786c7ff11
Lift upper limit of "Max concurrent HTTP announces" option
Closes #13800.
2020-12-26 20:26:37 +02:00
Jesse Chan
4a183dd968
WebAPI: bump version to 2.6.2 2020-12-26 20:26:36 +02:00
Jesse Chan
7c10dba10c
WebAPI: allow to attach tags while adding torrents 2020-12-26 20:26:35 +02:00
sledgehammer999
894446d308
Don't try to remove folders for a torrent without metadata 2020-12-26 20:26:34 +02:00
sledgehammer999
47e9c5ac08
Fix status of torrents without metadata 2020-12-26 20:26:33 +02:00
Chocobo1
7f47ac11f1
Add libtorrent 2.0 to TravisCI script
Also bumping to ubuntu focal as libtorrent requires boost >= 1.66.
2020-12-26 20:26:32 +02:00
Chocobo1
67b17891fa
Simplify the calculation of speed graph scale 2020-12-26 20:26:31 +02:00
Chocobo1
dd5b7ba05b
Avoid potential rounding to integer issues 2020-12-26 20:26:30 +02:00
Chocobo1
61aa4d9f1c
Fix coding style 2020-12-26 20:26:29 +02:00
Chocobo1
6e924b668e
Fix availability value
Closes #13869.
Fix up 02f19bfbee.
2020-12-26 20:26:27 +02:00
FranciscoPombal
618ce33fa0
Detect .ts file issues with file health workflow
Also adjust newlines to improve output
2020-12-26 20:26:26 +02:00
Chocobo1
ac413c76b9
Update to use latest macOS image for TravisCI
The default version is so outdated that it needs to rebuild many
dependencies. Now we bump it to the latest version so that it can use
prebuilt packages.
2020-12-26 20:26:25 +02:00
Chocobo1
f266184514
Add ability to use 'shift+delete' to delete torrents in WebUI
Closes #13827.
2020-12-26 20:26:24 +02:00
Chocobo1
8c48bf4a70
Fix wrong data used for comparison
In torrent transfer list we should use underlying data for sorting, not
displayed values.

Closes #13818.
2020-12-26 20:26:23 +02:00
Andrei Stepanov
8bee69c9fc
NSIS: Update Russian translation 2020-12-26 20:26:14 +02:00
sledgehammer999
5876886345
Bump to 4.3.1 2020-11-25 13:49:50 +02:00
sledgehammer999
0392bfce3c
Update Changelog 2020-11-25 13:49:48 +02:00
sledgehammer999
c66cf43d6a
Sync translations from Transifex and run lupdate 2020-11-24 17:04:07 +02:00
Chocobo1
7515afc058
Pin github actions scripts to major versions
> Using the specific major action version allows you to receive critical
> fixes and security patches while still maintaining compatibility. It
> also assures that your workflow should still work.
https://docs.github.com/en/free-pro-team@latest/actions/reference/workflow-syntax-for-github-actions#jobsjob_idstepsuses
2020-11-24 16:14:16 +02:00
Thomas De Rocker
5fcfcc901e
Fix confusion in date format description (#1)
* Update automatedrssdownloader.ui

* Update rssDownloader.html (#2)
2020-11-24 16:14:15 +02:00
Vladimir Golovnev (Glassez)
1728c16580
Improve coding style 2020-11-24 16:14:14 +02:00
Thomas De Rocker
d3f46452a9
Update dutch.nsi
As referenced in https://github.com/qbittorrent/qBittorrent/pull/13615
and suggested by @glassez 
- Use the word qBittorrent when it is mentioned for the first time within a string.
- If the string contains other references to qBittorrent, then use it (rather than repeating qBittorrent).

Line 24 is the updated Dutch translation for the recently updated English source string (may 2020)
2020-11-24 16:14:09 +02:00
sledgehammer999
7092a98c93
Add Latgalian translation
Closes #12415
2020-11-24 16:14:08 +02:00
sledgehammer999
8e19f66b4f
Update .desktop file translations 2020-11-24 16:14:06 +02:00
Chocobo1
b6ab2abf3f
Don't use deprecated torrent state "allocating"
Closes #13737.
2020-11-24 16:14:05 +02:00
Vladimir Golovnev (Glassez)
3edaaa30c9
Handle torrent "paused" state at application level 2020-11-24 16:14:04 +02:00
FranciscoPombal
38efff461e
Add GitHub Actions file health workflow 2020-11-24 16:14:03 +02:00
FranciscoPombal
2179148b8d
Make sure there are no empty files 2020-11-24 16:14:02 +02:00
FranciscoPombal
f92c4c0a40
Fix extra/missing trailing new lines in files 2020-11-24 16:14:00 +02:00
FranciscoPombal
1e7f792dbb
Fix trailing whitespace in multiple files
Also fix formatting of CODING_GUIDELINES.md
2020-11-24 16:13:59 +02:00
FranciscoPombal
1d4af505c2
Encode files in UTF-8 without BOM 2020-11-24 16:13:57 +02:00
Chocobo1
baa609b713
Remove unused function 2020-11-24 16:13:55 +02:00
Chocobo1
bc20cf9ad7
Remove redundant semicolon 2020-11-24 16:13:53 +02:00
Chocobo1
7d3ecfa9a6
Allow adding torrents using "Paste" key sequence
Closes #13685.
2020-11-24 16:13:52 +02:00
NotTsunami
88a90ed7d4
Fix mingw64 build error
mingw64 defines interface, so revert back to previous naming scheme

Fixes: 87864531ab
Closes #13649
2020-11-24 16:13:51 +02:00
jagannatharjun
3e540b3f51
Align integer data to right in torrent content view 2020-11-24 16:13:50 +02:00
jagannatharjun
87e1661bd5
Rename TR_PROGRESS header in TransferList
Closes #13665
2020-11-24 16:13:49 +02:00
Chocobo1
f82a4051af
Remove outdated information 2020-11-24 16:13:47 +02:00
Vladimir Golovnev (Glassez)
5730e917a1
Fix torrent state calculation 2020-11-24 16:13:46 +02:00
Vladimir Golovnev (Glassez)
5e7d7c2ef0
Don't resume "paused" torrents when checking by libtorrent 2020-11-24 16:13:45 +02:00
jagannatharjun
2b6e1953d7
Use ProgressbarDelegate for drawing progressbar in PropListDelegate
Also directly provide display data from model rather then generating it in delegate
2020-11-24 16:13:43 +02:00
jagannatharjun
6fc50f4169
Use ProgressBarDelegate for drawing progressbar in TransferListView 2020-11-24 16:13:42 +02:00
jagannatharjun
40d7a53695
Implement ProgressBarDelegate 2020-11-24 16:13:41 +02:00
Chocobo1
7e89893454
Add support for tracker scrape in libtorrent 2.0 2020-11-24 16:13:39 +02:00
Chocobo1
d83f09e731
Migrate away from deprecated functions in libtorrent 2.0 2020-11-24 16:13:38 +02:00
Chocobo1
36575b225d
Improve compatibility with libtorrent 2.0
In libtorrent 2.0, the `connection_type` was changed to a flag type and
hence it cannot be used in a switch statement directly. Also our use of
`connection_type` is limited so that a single equality comparison
would cover all of our use cases.
2020-11-24 16:13:36 +02:00
jagannatharjun
fe0ea843e0
Fix crash when clicked outside the table of torrent content view
Closes #13645
2020-11-24 16:13:35 +02:00
FranciscoPombal
a8911f8136
Clarify protocol choice label 2020-11-24 16:13:34 +02:00
FranciscoPombal
c5ef1a0207
Update "GitHub Actions" CI actions versions 2020-11-24 16:13:32 +02:00
brvphoenix
102d628c0a
Fix the issue that IPv6 address can't be banned
The ban action doesn't depend on ipfilter.
2020-11-24 16:13:31 +02:00
FranciscoPombal
6ea3acdaea
Expose contentPath in WebAPI torrents/info
Bump WebAPI version to 2.6.1
2020-11-24 16:13:30 +02:00
Chocobo1
621578353d
Remove redundant checking before remove 2020-11-24 16:13:29 +02:00
Chocobo1
ca776c3036
Fix class name 2020-11-24 16:13:28 +02:00
Chocobo1
9d27eb3b57
Move qHash helper for libtorrent types to its own file 2020-11-24 16:13:26 +02:00
Vladimir Golovnev (Glassez)
9171dffe97
Prevent resume data to be saved for removed torrent 2020-11-24 16:13:25 +02:00
thalieht
f919d4f5bf
Fix toggling advanced option in WebUI
option "Disallow connection to peers on privileged ports"
2020-11-24 16:13:24 +02:00
Chocobo1
59afc7c520
Avoid settings being reset via WebAPI
Closes #13585.
2020-11-24 16:13:23 +02:00
Chocobo1
f02b65b866
Fix typos 2020-11-24 16:13:19 +02:00
Andrei Stepanov
891c471160
Fix typo in connection.cpp
limiation -> limitation
2020-11-24 16:13:17 +02:00
Sepro
f49f5ba9a1
Place WebUI RSS description in sandboxed iframe 2020-11-24 16:10:40 +02:00
NotTsunami
539b3b7c3e
Remove branches block from Travis config
This block has no significance because these branches are stale and
builds will not be triggered on these branches.
2020-11-24 16:10:39 +02:00
NotTsunami
83ce285138
Disallow CMake build failures on Travis
Our CMake configuration has matured over time, thus require CMake
builds to require successful builds on Travis CI.
2020-11-24 16:10:30 +02:00
sledgehammer999
260e48b705
Correct the Changelog entry 2020-10-22 14:48:11 +03:00
sledgehammer999
f09ee1b398
Bump to 4.3.0.1 2020-10-22 09:29:00 +03:00
sledgehammer999
e3c2266611
Update Changelog 2020-10-22 09:22:54 +03:00
bovirus
53fb6220c5
NSIS: Update Italian translation 2020-10-22 09:21:00 +03:00
sledgehammer999
34e6b73374
Close parentheses in Changelog entry 2020-10-19 01:48:52 +03:00
sledgehammer999
b925cffddb
Bump to 4.3.0 2020-10-18 22:41:04 +03:00
sledgehammer999
3595626eff
Update Changelog 2020-10-18 22:41:03 +03:00
584 changed files with 177483 additions and 136259 deletions

1
.github/FUNDING.yml vendored Normal file
View file

@ -0,0 +1 @@
custom: "https://www.qbittorrent.org/donate.php"

View file

@ -17,4 +17,3 @@
### Extra info(if any)
(type here)

View file

@ -8,16 +8,13 @@ on:
push:
branches: [ master ]
pull_request:
types: [edited, opened, reopened, synchronize]
branches: [ master ]
env:
# Qt: 5.15.0
# libtorrent: RC_1_2 HEAD, 1.2.10
VCPKG_COMMIT: 32eccc18191fbb57b159784a1724d2d00613ae82
VCPKG_COMMIT: e4ce66eecfd3e5cca5eac06c971921bf8e37cf88
VCPKG_DEST_MACOS: /Users/runner/qbt_tools/vcpkg
VCPKG_DEST_WIN: C:\qbt_tools\vcpkg
UBUNTU_LIBTORRENT_VERSION: libtorrent-1.2.10
LIBTORRENT_VERSION_TAG: v1.2.12
jobs:
@ -26,7 +23,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-20.04, ubuntu-18.04]
os: [ubuntu-20.04]
qbt_gui: ["GUI=ON", "GUI=OFF"]
fail-fast: false
@ -38,7 +35,7 @@ jobs:
steps:
- name: checkout repository
uses: actions/checkout@v2.3.2
uses: actions/checkout@v2
- name: install all build dependencies except libtorrent from Ubuntu repos
run: |
@ -52,7 +49,7 @@ jobs:
- name: install libtorrent from source
run: |
git clone https://github.com/arvidn/libtorrent && cd libtorrent
git checkout ${{ env.UBUNTU_LIBTORRENT_VERSION }}
git checkout ${{ env.LIBTORRENT_VERSION_TAG }}
cmake -B cmake-build-dir -G "Ninja" \
-DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_BUILD_TYPE=RelWithDebInfo \
-Ddeprecated-functions=OFF \
@ -70,9 +67,9 @@ jobs:
cmake --build build
- name: upload artifact as zip
uses: actions/upload-artifact@v2.1.3
uses: actions/upload-artifact@v2
with:
name: qBittorrent-CI-Ubuntu_${{ matrix.os }}-${{ matrix.qbt_gui }}
name: qBittorrent-CI_${{ matrix.os }}-x64_${{ matrix.qbt_gui }}
path: |
build/compile_commands.json
build/target_graph.dot
@ -92,7 +89,7 @@ jobs:
steps:
- name: checkout repository
uses: actions/checkout@v2.3.2
uses: actions/checkout@v2
# - ninja is needed for building qBittorrent (because it's preferrable, not a hard requirement)
- name: install additional required packages with chocolatey
@ -100,7 +97,7 @@ jobs:
choco install ninja
- name: setup vcpkg (cached, if possible)
uses: lukka/run-vcpkg@v3.3
uses: lukka/run-vcpkg@v4
with:
vcpkgDirectory: ${{ env.VCPKG_DEST_WIN }}
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
@ -125,16 +122,21 @@ jobs:
"qt5-svg:x64-windows-static-release",
"qt5-tools:x64-windows-static-release",
"qt5-winextras:x64-windows-static-release"
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe upgrade `
--overlay-triplets=${{ github.workspace }}/triplets_overlay `
--overlay-ports=${{ github.workspace }}/vcpkg `
--no-dry-run
foreach($package in $packages)
{
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg.exe install $package `
--overlay-triplets=${{ github.workspace }}/triplets_overlay `
--overlay-ports=${{ github.workspace }}/vcpkg `
--clean-after-build
}
# NOTE: this is necessary to correctly find and use cl.exe with the Ninja generator for now
- name: setup devcmd
uses: ilammy/msvc-dev-cmd@v1.3.0
uses: ilammy/msvc-dev-cmd@v1
- name: build qBittorrent
shell: cmd
@ -149,9 +151,9 @@ jobs:
cmake --build build
- name: upload artifact as zip
uses: actions/upload-artifact@v2.1.3
uses: actions/upload-artifact@v2
with:
name: qBittorrent-CI-Windows_x64-static-release
name: qBittorrent-CI_Windows-x64
path: |
build/compile_commands.json
build/target_graph.dot
@ -175,17 +177,17 @@ jobs:
steps:
- name: checkout repository
uses: actions/checkout@v2.3.2
uses: actions/checkout@v2
# - ninja is needed for building qBittorrent (because it's preferrable, not a hard requirement)
# - pkg-config is needed for some vcpkg installations
# - automake is needed for the installation the vcpkg installation of fontconfig, a dependency of qt5-base
- name: install additional required packages with homebrew
shell: bash
run: |
brew install ninja pkg-config
brew install automake ninja
- name: setup vcpkg (cached, if possible)
uses: lukka/run-vcpkg@v3.3
uses: lukka/run-vcpkg@v4
with:
vcpkgDirectory: ${{ env.VCPKG_DEST_MACOS }}
vcpkgGitCommitId: ${{ env.VCPKG_COMMIT }}
@ -197,14 +199,7 @@ jobs:
Copy-Item ${{ env.RUNVCPKG_VCPKG_ROOT }}/triplets/x64-osx.cmake `
${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake
Add-Content ${{ github.workspace }}/triplets_overlay/x64-osx-release.cmake `
-Value "set(VCPKG_BUILD_TYPE release)"
# NOTE: Avoids a libtorrent ABI issue. See https://github.com/arvidn/libtorrent/issues/4965
- name: force AppleClang to compile libtorrent with C++14
run: |
(Get-Content -path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake).Replace( `
'${FEATURE_OPTIONS}', '${FEATURE_OPTIONS} -DCMAKE_CXX_STANDARD=14') `
| Set-Content -Path ${{ env.RUNVCPKG_VCPKG_ROOT }}/ports/libtorrent/portfile.cmake
-Value "set(VCPKG_BUILD_TYPE release)","set(VCPKG_OSX_DEPLOYMENT_TARGET 10.15)"
- name: install dependencies via vcpkg
run: |
@ -215,10 +210,15 @@ jobs:
"qt5-svg:x64-osx-release",
"qt5-tools:x64-osx-release",
"qt5-macextras:x64-osx-release"
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg upgrade `
--overlay-triplets=${{ github.workspace }}/triplets_overlay `
--overlay-ports=${{ github.workspace }}/vcpkg `
--no-dry-run
foreach($package in $packages)
{
${{ env.RUNVCPKG_VCPKG_ROOT }}/vcpkg install $package `
--overlay-triplets=${{ github.workspace }}/triplets_overlay `
--overlay-ports=${{ github.workspace }}/vcpkg `
--clean-after-build
}
@ -234,9 +234,9 @@ jobs:
cmake --build build
- name: upload artifact as zip
uses: actions/upload-artifact@v2.1.3
uses: actions/upload-artifact@v2
with:
name: qBittorrent-CI-macOS_x64-static-release_${{ matrix.qbt_gui }}
name: qBittorrent-CI_macOS_${{ matrix.qbt_gui }}
path: |
build/compile_commands.json
build/target_graph.dot

85
.github/workflows/file_health.sh vendored Executable file
View file

@ -0,0 +1,85 @@
#!/usr/bin/env zsh
set -o nounset
# Assumption: file names don't contain `:` (for the `cut` invocation).
# Safe to assume, as such a character in a filename would cause trouble on Windows, a platform we support
# any regression turn this non-zero
regressions=0
# exclusions (these are just grep extended regular expressions to match against paths relative to the root of the repository)
exclusions_nonutf8='(.*(7z|gif|ic(ns|o)|png|qm|zip))'
exclusions_bom='src/base/unicodestrings.h'
exclusions_tw='(*.ts)|src/webui/www/private/scripts/lib/mootools-1.2-more.js'
exclusions_trailing_newline='configure'
exclusions_no_lf='(*.ts)|(.*svg)|compile_commands.json|src/webui/www/private/scripts/lib/mootools-1.2-(core-yc.js|more.js)'
echo -e "\n*** Detect files not encoded in UTF-8 ***\n"
find . -path ./build -prune -false -o -path ./.git -prune -false -o -type f -exec file --mime {} \; | sort \
| grep -v -e "charset=us-ascii" -e "charset=utf-8" | cut -d ":" -f 1 \
| grep -E -v -e "${exclusions_nonutf8}" \
| tee >(echo -e "--> Files not encoded in UTF-8: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
regressions=$((regressions+$?))
echo -e "\n*** Detect files encoded in UTF-8 with BOM ***\n"
grep --exclude-dir={.git,build} -rIl $'\xEF\xBB\xBF' | sort \
| grep -E -v -e "${exclusions_bom}" \
| tee >(echo -e "--> Files encoded in UTF-8 with BOM: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
regressions=$((regressions+$?))
echo -e "\n*** Detect usage of CR byte ***\n"
grep --exclude-dir={.git,build} -rIlU $'\x0D' | sort \
| tee >(echo -e "--> Usage of CR byte: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
regressions=$((regressions+$?))
echo -e "\n*** Detect trailing whitespace in lines ***\n"
grep --exclude-dir={.git,build} -rIl "[[:blank:]]$" | sort \
| grep -E -v -e "${exclusions_tw}" \
| tee >(echo -e "--> Trailing whitespace in lines: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0';
regressions=$((regressions+$?))
echo -e "\n*** Detect too many trailing newlines ***\n"
find . -path ./build -prune -false -o -path ./.git -prune -false -o -type f -exec file --mime {} \; | sort \
| grep -e "charset=us-ascii" -e "charset=utf-8" | cut -d ":" -f 1 \
| grep -E -v -e "${exclusions_trailing_newline}" \
| xargs -L1 -I my_input bash -c 'test "$(tail -q -c2 "my_input" | hexdump -C | grep "0a 0a")" && echo "my_input"' \
| tee >(echo -e "--> Too many trailing newlines: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
regressions=$((regressions+$?))
echo -e "\n*** Detect no trailing newline ***\n"
find . -path ./build -prune -false -o -path ./.git -prune -false -o -type f -exec file --mime {} \; | sort \
| grep -e "charset=us-ascii" -e "charset=utf-8" | cut -d ":" -f 1 \
| grep -E -v -e "${exclusions_no_lf}" \
| xargs -L1 -I my_input bash -c 'test "$(tail -q -c1 "my_input" | hexdump -C | grep "0a")" || echo "my_input"' \
| tee >(echo -e "--> No trailing newline: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
regressions=$((regressions+$?))
echo -e "\n*** Detect translation closing tag in new line ***\n"
grep --exclude-dir={.git,build} -nri "^</translation>" | sort \
| cut -d ":" -f 1,2 \
| tee >(echo -e "--> Translation closing tag in new line: found" "$(wc -l < /dev/stdin)" "regression(s)\n") \
| xargs -I my_input -0 bash -c 'echo "my_input"; test "$(echo -n "my_input" | wc -l)" -eq 0'
regressions=$((regressions+$?))
if [ "$regressions" -ne 0 ]; then
regressions=1
echo "\nFile health regressions found. Please fix them (or add them as exclusions)."
else
echo "All OK, no file health regressions found."
fi
exit $regressions;

22
.github/workflows/file_health.yaml vendored Normal file
View file

@ -0,0 +1,22 @@
name: GitHub Actions file health check
on: [pull_request, push]
jobs:
check_file_health:
name: Check file health
runs-on: ubuntu-20.04
steps:
- name: checkout repository
uses: actions/checkout@v2
- name: install zsh
run: |
sudo apt update
sudo apt install zsh
- name: run check file health script
run: |
./.github/workflows/file_health.sh

1
.gitignore vendored
View file

@ -4,6 +4,7 @@ src/qbittorrent
src/qbittorrent-nox
src/release
src/debug
src/base/version.h
CMakeLists.txt.user*
qbittorrent.pro.user*
conf.pri

View file

@ -4,7 +4,8 @@ os:
- linux
- osx
dist: bionic
dist: focal
osx_image: xcode12.2
env:
matrix:
@ -16,15 +17,10 @@ env:
- secure: "OI9CUjj4lTb0HwwIZU5PbECU3hLlAL6KC8KsbwohG8/O3j5fLcnmDsK4Ad9us5cC39sS11Jcd1kDP2qRcCuST/glVNhLkcjKkiQerOfd5nQ/qL4JYfz/1mfP5mdpz9jHKzpLUIG+TXkbSTjP6VVmsb5KPT+3pKEdRFZB+Pu9+J8="
- coverity_branch: coverity_scan
matrix:
allow_failures:
- env: libt_branch=RC_1_2 gui=true build_system=cmake
- env: libt_branch=RC_1_2 gui=false build_system=cmake
branches:
except:
- search_encoding_windows
- v2_9_x
jobs:
include:
- env: libt_branch=RC_2_0 gui=true build_system=qmake
os: linux
notifications:
email:
@ -49,8 +45,7 @@ addons:
apt:
sources:
# sources list: https://github.com/travis-ci/apt-source-safelist/blob/master/ubuntu.json
- sourceline: 'ppa:qbittorrent-team/qbt-libtorrent-travisci'
- sourceline: 'deb https://apt.kitware.com/ubuntu/ bionic main'
- sourceline: 'deb https://apt.kitware.com/ubuntu/ focal main'
key_url: 'https://apt.kitware.com/keys/kitware-archive-latest.asc'
packages:
# packages list: https://github.com/travis-ci/apt-package-safelist/blob/master/ubuntu-trusty
@ -79,6 +74,8 @@ before_install:
# TravisCI installs its own cmake to another location which ovverides other installations
# if they don't call the new binary directly
alias cmake="/usr/bin/cmake"
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/usr/local/lib"
fi
- |
if [ "$TRAVIS_OS_NAME" = "osx" ]; then
@ -109,8 +106,8 @@ install:
brew update > /dev/null
brew upgrade cmake
brew install ccache colormake boost openssl qt zlib
brew link --force qt zlib
brew install ccache colormake boost openssl qt@5 zlib
brew link --force qt@5 zlib
if [ "$build_system" = "cmake" ]; then
sudo ln -s /usr/local/opt/qt/mkspecs /usr/local/mkspecs
@ -124,20 +121,34 @@ install:
ccache -V && ccache --show-stats && ccache --zero-stats
fi
- |
if [ "$libt_branch" = "RC_1_2" ] && [ "$TRAVIS_OS_NAME" = "linux" ]; then
# Will install latest 1.2.x daily build from the PPA
sudo apt-get -y install libtorrent-rasterbar-dev
fi
- |
if [ "$libt_branch" = "RC_1_2" ] && [ "$TRAVIS_OS_NAME" = "osx" ]; then
# building libtorrent manually should be faster than using the official bottle
# because the bottle will also pull in a lot of updated dependencies and prolong the overall time
if [ "$libt_branch" = "RC_1_2" ]; then
pushd "$HOME"
git clone --single-branch --branch RC_1_2 https://github.com/arvidn/libtorrent.git
cd libtorrent
git checkout tags/v1.2.10
git checkout tags/v1.2.12
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_STANDARD=14 -Ddeprecated-functions=OFF -DOPENSSL_ROOT_DIR="$openssl_root_path" ./
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-Ddeprecated-functions=OFF \
-DOPENSSL_ROOT_DIR="$openssl_root_path" \
./
make
sudo make install
popd
elif [ "$libt_branch" = "RC_2_0" ]; then
pushd "$HOME"
git clone --single-branch --branch RC_2_0 https://github.com/arvidn/libtorrent.git
cd libtorrent
git checkout tags/v2.0.2
git submodule update --init --recursive
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=17 \
-Ddeprecated-functions=OFF \
-DOPENSSL_ROOT_DIR="$openssl_root_path" \
./
make
sudo make install
popd

View file

@ -87,7 +87,7 @@ Images Authors:
* 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
@ -119,7 +119,7 @@ Translations authors:
- German: Niels Hoffmann (zentralmaschine@users.sourceforge.net)
- Greek: Tsvetan Bankov (emerge_life@users.sourceforge.net), Stephanos Antaris (santaris@csd.auth.gr), sledgehammer999(hammered999@gmail.com) and Γιάννης Ανθυμίδης Evropi(Transifex)
- Hebrew: David Deutsch (d.deffo@gmail.com)
- Hungarian: Majoros Péter (majoros.j.p@t-online.hu)
- Hungarian: Majoros Péter
- Italian: bovirus (bovirus@live.it) and Matteo Sechi (bu17714@gmail.com)
- Japanese: Masato Hashimoto (cabezon.hashimoto@gmail.com)
- Korean: Jin Woo Sin (jin828sin@users.sourceforge.net)

View file

@ -3,7 +3,6 @@ cmake_minimum_required(VERSION 3.16 FATAL_ERROR) # Policies <= CMP0097 default t
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules)
project(qBittorrent
VERSION 4.3.0.0
DESCRIPTION "The qBittorrent BitTorrent client"
HOMEPAGE_URL "https://www.qbittorrent.org/"
LANGUAGES CXX
@ -11,14 +10,15 @@ project(qBittorrent
# use CONFIG mode first in find_package
set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON)
# version requirements
set(requiredBoostVersion 1.40)
set(requiredQtVersion 5.9.0)
set(requiredOpenSSLVersion 1.0)
set(requiredLibtorrentVersion 1.2.0)
set(requiredZlibVersion 1.2.5.2)
# version requirements - older vesions may work, but you are on your own
set(minBoostVersion 1.65)
set(minQtVersion 5.12)
set(minOpenSSLVersion 1.1.1)
set(minLibtorrentVersion 1.2.12)
set(minZlibVersion 1.2.11)
# features (some are platform-specific)
include(CheckCXXSourceCompiles) # TODO: migrate to CheckSourceCompiles in CMake >= 3.19
include(FeatureSummary)
include(FeatureOptionsSetup)
feature_option(STACKTRACE "Enable stacktraces" ON)
@ -34,12 +34,22 @@ if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
"Install systemd service file to a directory manually overridable with Systemd_SERVICES_INSTALL_DIR"
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()
set(QBT_VER_STATUS "alpha1" CACHE STRING "Project status version. Should be empty for release builds.")
include(GNUInstallDirs)
add_subdirectory(src)
add_subdirectory(dist)
@ -49,3 +59,6 @@ if (VERBOSE_CONFIGURE)
else()
feature_summary(WHAT ENABLED_FEATURES DISABLED_FEATURES)
endif()
# Generate version header
configure_file("src/base/version.h.in" "${CMAKE_CURRENT_SOURCE_DIR}/src/base/version.h" @ONLY)

View file

@ -1,12 +1,14 @@
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.
# 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.
**Note 1:** I will not take your head if you forget and use another style. However, most probably the request will be delayed until you fix your coding style.
**Note 2:** You can use the `uncrustify` program/tool to clean up any source file. Use it with the `uncrustify.cfg` configuration file found in the root folder.
**Note 3:** There is also a style for QtCreator but it doesn't cover all cases. In QtCreator `Tools->Options...->C++->Code Style->Import...` and choose the `codingStyleQtCreator.xml` file found in the root folder.
**Note 1:** I will not take your head if you forget and use another style. However, most probably the request will be delayed until you fix your coding style. \
**Note 2:** You can use the `uncrustify` program/tool to clean up any source file. Use it with the `uncrustify.cfg` configuration file found in the root folder. \
**Note 3:** There is also a style for QtCreator but it doesn't cover all cases. In QtCreator `Tools->Options...->C++->Code Style->Import...` and choose the `codingStyleQtCreator.xml` file found in the root folder.
### Table Of Contents
## Table Of Contents
* [1. New lines &amp; curly braces](#1-new-lines--curly-braces)
* [a. Function blocks, class/struct definitions, namespaces](#a-function-blocks-classstruct-definitions-namespaces)
@ -29,11 +31,13 @@ For programming languages other than C++ (e.g. JavaScript) used in this reposito
* [9. Misc](#9-misc)
* [10. Git commit message](#10-git-commit-message)
* [11. Not covered above](#11-not-covered-above)
---
### 1. New lines & curly braces ###
## 1. New lines & curly braces
### a. Function blocks, class/struct definitions, namespaces
#### a. Function blocks, class/struct definitions, namespaces ####
```c++
int myFunction(int a)
{
@ -43,7 +47,7 @@ int myFunction(int a)
void myFunction() {} // empty body
MyClass::MyClass(int *parent)
: m_parent(parent)
: m_parent {parent}
{
// initialize
}
@ -79,17 +83,21 @@ namespace Name
}
```
#### b. Other code blocks ####
### b. Other code blocks
```c++
if (condition) {
if (condition)
{
// code
}
for (int a = 0; a < b; ++b) {
for (int a = 0; a < b; ++b)
{
// code
}
switch (a) {
switch (a)
{
case 1:
// blah
case 2:
@ -97,17 +105,25 @@ case 2:
default:
// blah
}
{
// code
}
```
#### c. Blocks in switch's case labels ####
### c. Blocks in switch's case labels
```c++
switch (var) {
case 1: {
switch (var)
{
case 1:
{
// declare local variables
// code
}
break;
case 2: {
case 2:
{
// declare local variables
// code
}
@ -117,22 +133,29 @@ default:
}
```
#### d. If-else statements ####
### d. If-else statements
The `else if`/`else` must be on their own lines:
```c++
if (condition) {
if (condition)
{
// code
}
else if (condition) {
else if (condition)
{
// code
}
else {
else
{
// code
}
```
#### e. Single statement if blocks ####
### e. Single statement if blocks
Most single statement if blocks should look like this:
```c++
if (condition)
a = a + b;
@ -141,19 +164,23 @@ if (condition)
One acceptable exception to this can be `return`, `break` or `continue` statements,
provided that the test condition isn't very long and its body statement occupies only one line.
However you can still choose to use the first rule.
```c++
if (a > 0) return;
while (p) {
while (p)
{
// ...
if (!b) continue;
}
```
#### f. Acceptable conditions to omit braces ####
### f. Acceptable conditions to omit braces
When the conditional statement in `if`/`else` has only one line and its body occupy only one line,
this also applies to loops statements.
this also applies to loops statements. \
Notice that for a series of `if - else` branches, if one branch needs braces then all branches must add braces.
```c++
if (a < b) // conditional statement
do(a); // body
@ -165,21 +192,27 @@ else if (a > b)
else
do(c);
if (a < b) {
if (a < b)
{
do(a);
}
else if (a > b) { // curly braces required here, then all branches should also add them
else if (a > b)
{
// curly braces required here, then all branches should also add them
do(b);
do(d);
}
else {
else
{
do(c);
}
```
#### g. Brace enclosed initializers ####
Unlike single-line functions, you must not insert spaces between the brackets and concluded expressions.<br/>
### g. Brace enclosed initializers
Unlike single-line functions, you must not insert spaces between the brackets and concluded expressions. \
But you must insert a space between the variable name and initializer.
```c++
Class obj {}; // empty
Class obj {expr};
@ -187,28 +220,33 @@ Class obj {expr1, /*...,*/ exprN};
QVariantMap map {{"key1", 5}, {"key2", 10}};
```
### 2. Indentation ###
## 2. Indentation
4 spaces.
### 3. File encoding and line endings ###
## 3. File encoding and line endings
UTF-8 and Unix-like line ending (LF). Unless some platform specific files need other encodings/line endings.
### 4. Initialization lists ###
## 4. Initialization lists
Initialization lists should be vertical. This will allow for more easily readable diffs. The initialization colon should be indented and in its own line along with first argument. The rest of the arguments should be indented too and have the comma prepended.
```c++
myClass::myClass(int a, int b, int c, int d)
: m_a(a)
, m_b(b)
, m_c(c)
, m_d(d)
: m_a {a}
, m_b {b}
, m_c {c}
, m_d {d}
{
// code
}
```
### 5. Enums ###
## 5. Enums
Enums should be vertical. This will allow for more easily readable diffs. The members should be indented.
```c++
enum Days
{
@ -222,11 +260,14 @@ enum Days
};
```
### 6. Names ###
## 6. Names
All names should be camelCased.
#### a. Type names and namespaces ####
### a. Type names and namespaces
Type names and namespaces start with Upper case letter (except POD types).
```c++
class ClassName {};
@ -241,14 +282,18 @@ namespace NamespaceName
}
```
#### b. Variable names ####
### b. Variable names
Variable names start with lower case letter.
```c++
int myVar;
```
#### c. Private member variable names ####
### c. Private member variable names
Private member variable names start with lower case letter and should have ```m_``` prefix.
```c++
class MyClass
{
@ -256,23 +301,26 @@ class MyClass
}
```
### 7. Header inclusion order ###
The headers should be placed in the following group order:
1. Module header (in .cpp)
2. C++ Standard Library headers
3. System headers
4. Boost library headers
5. Libtorrent headers
6. Qt headers
7. qBittorrent's own headers, starting from the *base* headers.
## 7. Header inclusion order
The headers should be ordered alphabetically within each group.
If there are conditionals for the same header group, then put them at the bottom of the respective group.
The headers should be placed in the following group order:
1. Module header (in .cpp)
2. C++ Standard Library headers
3. System headers
4. Boost library headers
5. Libtorrent headers
6. Qt headers
7. qBittorrent's own headers, starting from the *base* headers.
The headers should be ordered alphabetically within each group. \
If there are conditionals for the same header group, then put them at the bottom of the respective group. \
If there are conditionals that contain headers from several different header groups, then put them above the "qBittorrent's own headers" group.
One exception is the header containing the library version (for example, QtGlobal), this particular header isn't constrained by the aforementioned order.
Example:
```c++
// file: examplewidget.cpp
@ -322,8 +370,10 @@ Example:
#include "ui_examplewidget.h"
```
### 8. Include guard ###
`#pragma once` should be used instead of "include guard" in new code:
## 8. Include guard
`#pragma once` must be used instead of a "classic include guard":
```c++
// examplewidget.h
@ -338,75 +388,77 @@ class ExampleWidget : public QWidget
```
### 9. Misc ###
## 9. Misc
* Line breaks for long lines with operation:
```c++
a += "b"
+ "c"
+ "d";
```
```c++
a += "b"
+ "c"
+ "d";
```
* **auto** keyword
We allow the use of the **auto** keyword only where it is strictly necessary
(for example, to declare a lambda object, etc.), or where it **enhances** the readability of the code.
Declarations for which one can gather enough information about the object interface (type) from its name
or the usage pattern (an iterator or a loop variable are good examples of clear patterns)
or the right part of the expression nicely fit here.<br/>
<br/>
When weighing whether to use an auto-typed variable please think about potential reviewers of your code,
who will read it as a plain diff (on github.com, for instance). Please make sure that such reviewers can
understand the code completely and without excessive effort.<br/>
<br/>
Some valid use cases:
```c++
template <typename List>
void doSomethingWithList(const List &list)
{
foreach (const auto &item, list) {
// we don't know item type here so we use 'auto' keyword
// do something with item
We allow the use of the **auto** keyword only where it is strictly necessary (for example, to declare a lambda object, etc.), or where it **enhances** the readability of the code. \
Declarations for which one can gather enough information about the object interface (type) from its name or the usage pattern (an iterator or a loop variable are good examples of clear patterns) or the right part of the expression nicely fit here.
When weighing whether to use an auto-typed variable please think about potential reviewers of your code, who will read it as a plain diff (on github.com, for instance). \
Please make sure that such reviewers can understand the code completely and without excessive effort.
Some valid use cases:
* Container iteration and casts:
```c++
template <typename List>
void doSomethingWithList(const List &list)
{
foreach (const auto &item, list)
{
// we don't know item type here so we use 'auto' keyword
// do something with item
}
}
}
for (auto it = container.begin(), end = container.end(); it != end; ++it) {
// we don't need to know the exact iterator type,
// because all iterators have the same interface
}
for (auto it = container.begin(), end = container.end(); it != end; ++it)
{
// we don't need to know the exact iterator type,
// because all iterators have the same interface
}
auto spinBox = static_cast<QSpinBox*>(sender());
// we know the variable type based on the right-hand expression
```
auto spinBox = static_cast<QSpinBox*>(sender());
// we know the variable type based on the right-hand expression
```
* Notice the spaces in the following specific situations:
```c++
// Before and after the assignment and other binary (and ternary) operators there should be a space
// There should not be a space between increment/decrement and its operand
a += 20;
a = (b <= MAX_B ? b : MAX_B);
++a;
--b;
* Notice the spaces in the following specific situations:
for (int a = 0; a < b; ++b) {
}
// Range-based for loop, spaces before and after the colon
for (auto i : container) {
}
// Derived class, spaces before and after the colon
class Derived : public Base
{
};
```
```c++
// Before and after the assignment and other binary (and ternary) operators there should be a space
// There should not be a space between increment/decrement and its operand
a += 20;
a = (b <= MAX_B ? b : MAX_B);
++a;
--b;
for (int a = 0; a < b; ++b)
{
}
// Range-based for loop, spaces before and after the colon
for (auto i : container)
{
}
// Derived class, spaces before and after the colon
class Derived : public Base
{
};
```
* Prefer pre-increment, pre-decrement operators
```c++
++i, --j; // Yes
i++, j--; // No
```
```c++
++i, --j; // Yes
i++, j--; // No
```
* private/public/protected must not be indented
@ -414,7 +466,8 @@ i++, j--; // No
* Method definitions aren't allowed in header files
### 10. Git commit message ###
## 10. Git commit message
1. Limit the subject line to 50 characters. Subject should contain only the very essence of the changes (you should avoid extra details and internals)
2. Separate subject from body with a blank line
3. Capitalize the subject line
@ -424,6 +477,7 @@ i++, j--; // No
7. Use the body to explain what and why vs. how
8. If commit fixes a reported issue, mention it in the message body (e.g. `Closes #4134.`)
### 11. Not covered above ###
If something isn't covered above, just follow the same style the file you are editing has.
## 11. Not covered above
If something isn't covered above, just follow the same style the file you are editing has. \
*This guide is not exhaustive and the style for a particular piece of code not specified here will be determined by project members on code review.*

187
Changelog
View file

@ -1,4 +1,161 @@
Unreleased - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.0
Tue Mar 23 2021 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.4
- FEATURE: Add ability to prioritize selected items by shown file order (Chocobo1)
- FEATURE: Allow tab to escape the text box in "Edit trackers" dialog (Christoph Rackwitz)
- FEATURE: Support sub-sorting in Transferlist (jagannatharjun)
- FEATURE: Expose ToS setting from libtorrent (Chocobo1)
- FEATURE: Improve tracker entries handling (glassez)
- BUGFIX: Drop extension from generated content folder name (glassez)
- BUGFIX: Change qBittorrent Updater window title (xavier2k6)
- BUGFIX: Validate HTTPS Tracker Certificate by default (an0n666)
- BUGFIX: Don't let "program update" dialog steal focus (Chocobo1)
- BUGFIX: Disable expand on double click in TorrentContentTreeView (jagannatharjun)
- BUGFIX: Add hyperlink to Transifex on translator list (Si Yong Kim)
- BUGFIX: Enlarge "speed limit" icon slightly (Chocobo1)
- BUGFIX: Don't prevent system sleep due to errored torrents (dyumin)
- BUGFIX: Use stable sorting in transfer list (Chocobo1)
- BUGFIX: Allow "missing files" torrents to save more resume data (glassez)
- BUGFIX: Restart "missing files" torrents after changing location (glassez)
- BUGFIX: Show proper string when torrent availability is not available (Chocobo1)
- BUGFIX: Apply "Hide zero/infinity values" to "Time Active", "Down/Up Limit" and ETA columns (Chocobo1)
- BUGFIX: Fix potential out-of-bounds access (Chocobo1)
- BUGFIX: Make SpeedPlotView averager time aware (jagannatharjun)
- BUGFIX: Add a 3-Hour graph (jagannatharjun)
- BUGFIX: Add an option to disable icons in menus (always disabled on MacOS) (Michał Kopeć)
- BUGFIX: Improve detection of filename extension of audio/video files (Chocobo1)
- BUGFIX: Various drawing improvements of progress bar (Chocobo1)
- BUGFIX: Properly stop torrent creation if aborted (Chocobo1)
- BUGFIX: Replace external program parameters in one step (Chocobo1)
- BUGFIX: Improve "save resume data" handling (glassez)
- BUGFIX: Fix bad IPv6 address format for outgoingInterfaces (treysis)
- WEBUI: Properly decode strings (brvphoenix)
- WEBUI: Accept "share limits" when adding torrent using WebAPI (glassez)
- WEBUI: Add seeding time to the active time column (thalieht)
- WEBUI: Fix incorrect seeding time string in General tab (thalieht)
- WEBUI: Allow >100 days in WebUI function "friendlyDuration" (thalieht)
- WEBUI: Avoid decoding strings repeatedly (brvphoenix)
- RSS: Add category button on AutomatedRSSDownloader on GUI (Si Yong Kim)
- WINDOWS: NSIS: Update Czech translation (slrslr)
- WINDOWS: NSIS: Update Portuguese BR translation (Alex)
- WINDOWS: NSIS: Add Estonian translation (PriitUring)
- WINDOWS: Allow change-case-only file renaming (glassez)
- LINUX: Systemd: wait for mounting of local filesystems (Juraj Oršulić)
- OTHER: Raise minimum libtorrent version to 1.2.12 (glassez)
- OTHER: Raise minimum Qt version to 5.12 (glassez)
Tue Jan 19 2021 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.3
- FEATURE: New languages: Azerbaijani, Estonian
- BUGFIX: Unify global speed dialogs for normal/alternative speeds (thalieht)
- BUGFIX: Increase maximum global speed limits ~2 GiB/s (thalieht)
- BUGFIX: Save fastresume when setting torrent speed limits (thalieht)
- BUGFIX: Group several torrent options into one dialog (thalieht)
- BUGFIX: Capitalize locale names (Chocobo1)
- BUGFIX: Improve content file/folder names handling (glassez)
- BUGFIX: Drop notification about move storage finished or failed (glassez)
- BUGFIX: Reload "missing files" torrent instead of re-checking (glassez)
- BUGFIX: Remember dialog sizes (Chocobo1)
- BUGFIX: Improve detection of file extension string (Chocobo1)
- WEBUI: Don't call non-existent elements (glassez)
- WEBUI: Update "Keep top-level folder" in WebUI options (thalieht)
- MACOS: QMake: Raise minimal macOS target version to 10.14 (glassez)
- LINUX: Use legacy 'data' directory only as a fallback (lbilli)
- OTHER: Bump project requirement to C++17 (Chocobo1)
Sun Dec 27 2020 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.2
- FEATURE: Allow to add root folder to torrent content (glassez)
- FEATURE: "HTTPS tracker validation" option is available on all platforms with latest libtorrent (Chocobo1)
- FEATURE: Option for supporting internationalized domain names (IDNs) (Chocobo1)
- BUGFIX: Fix broken sorting on some columns (Chocobo1)
- BUGFIX: Fix availability per file value (Chocobo1)
- BUGFIX: Fix status of torrents without metadata (sledgehammer999)
- BUGFIX: Don't try to remove folders for a torrent without metadata (sledgehammer999)
- BUGFIX: Lift upper limit of "Max concurrent HTTP announces" option (Chocobo1)
- BUGFIX: Add links to libtorrent documentation (Chocobo1)
- BUGFIX: Move "embedded tracker" options to qbt section (Chocobo1)
- BUGFIX: Properly handle "Append extension" option changing (glassez)
- BUGFIX: Correctly save paused torrent state (glassez)
- BUGFIX: Fix bug of "move storage job" can be performed multiple times (glassez)
- WEBUI: Add ability to use 'shift+delete' to delete torrents (Chocobo1)
- WEBUI: Allow to attach tags while adding torrents (Jesse Chan)
- WEBUI: Bump version to 2.6.2 (Jesse Chan)
- WEBUI: Remove unnecessary restriction on input length (Chocobo1)
- WINDOWS: NSIS: Update Russian translation (Andrei Stepanov)
- WINDOWS: NSIS: Update Italian translation (Alessandro Simonelli)
- OTHER: Drop support for building with libtorrent < 1.2.11 (Vladimir Golovnev)
Wed Nov 25 2020 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.1
- FEATURE: Allow progress bar styling from custom themes (jagannatharjun)
- FEATURE: Allow adding torrents using "Paste" key sequence (Chocobo1)
- FEATURE: Add Latgalian translation (sledgehammer999)
- BUGFIX: Prevent resume data to be saved for removed torrent (glassez)
- BUGFIX: Clarify connection protocol choice label (FranciscoPombal)
- BUGFIX: Fix crash when clicked outside the table of torrent content view (jagannatharjun)
- BUGFIX: Don't resume "paused" torrents when put into "checking" state by libtorrent (glassez)
- BUGFIX: Fix torrent state calculation (glassez)
- BUGFIX: Align integer data to right in torrent content view (jagannatharjun)
- WEBUI: Place WebUI RSS description in sandboxed iframe (Sepro)
- WEBUI: Avoid settings being reset via WebAPI (Chocobo1)
- WEBUI: Fix toggling advanced option in WebUI (thalieht)
- WEBUI: Expose contentPath in WebAPI torrents/info (FranciscoPombal)
- WEBUI: Fix the issue that IPv6 address can't be banned (brvphoenix)
- RSS: Fix confusion in date format description (Thomas De Rocker)
- WINDOWS: Update dutch.nsi (Thomas De Rocker)
- LINUX: Update .desktop file translations (sledgehammer999)
Thu Oct 22 2020 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.0.1
- WINDOWS: NSIS: Update Italian translation (bovirus)
Sun Oct 18 2020 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.3.0
- FEATURE: Many UI elements colors are themeable now (jagannatharjun)
- FEATURE: Allow changing GUI icons from theme bundles (jagannatharjun)
- FEATURE: Notify user when torrent moving finished (glassez)
- FEATURE: Shortcut CTRL + I opens Statistics window (LoopsGod)
- FEATURE: Add RSS functionality in Web UI (Sepro)
- FEATURE: Drop ".unwanted folder" feature (glassez)
- FEATURE: Expose libtorrent peer_turnover, max_concurrent_http_announces, no_connect_privileged_ports settings (Sophist, an0n666, NotTsunami)
- BUGFIX: Fix typo in Options dialog (Andrei Stepanov)
- BUGFIX: Remove "requires restart" from network interface settings (an0n666)
- BUGFIX: Rename "Create subfolder" to "Keep top-level folder" (thalieht)
- BUGFIX: Show tooltip for some properties in transfer list (Nick Korotysh)
- BUGFIX: Fix calculation of torrent current state (glassez)
- BUGFIX: Improve detecting completed files when adding, rechecking or moving a torrent (glassez)
- BUGFIX: Fixed broken announce logic in embedded tracker causing failures in some cases (FranciscoPombal)
- BUGFIX: Disable checkbox if torrent doesn't have root folder (thalieht)
- BUGFIX: Update country flag icons with upstream (Chocobo1)
- BUGFIX: Private torrent: If tracker entry is edited clear old peer list. Also don't allow user to manually add peers. (an0n666)
- BUGFIX: Fix large strings not visible in log widget (jagannatharjun)
- BUGFIX: Disable edit action in Peer list widget (Chocobo1)
- BUGFIX: Add a scroll area to torrent creator dialog (Ernesto Castellotti)
- BUGFIX: Content tab: Open double-clicked folder regardless on which column the click happens (Chocobo1)
- BUGFIX: "Open containing folder" on a folder now opens it in its parent folder (Chocobo1)
- BUGFIX: Fix GeoDB download in systems with non-C locales (FranciscoPombal)
- BUGFIX: Fix peer blocked message (FranciscoPombal)
- BUGFIX: Make more robust the banning of selected peers from the list (NotTsunami)
- BUGFIX: Use toned green color for downloading pieces in Pieces bar (jagannatharjun)
- BUGFIX: Correctly fill whole width of speed graph (jagannatharjun)
- BUGFIX: Fix impossible speed in speed graph (jagannatharjun)
- WEBUI: Hide additional search filters on small screens (Thomas Piccirello)
- WEBUI: Shrink search bar on small screens (Thomas Piccirello)
- WEBUI: Fix search categories only working in English (Thomas Piccirello)
- WEBUI: Add Trackers section to sidebar (Thomas Piccirello)
- WEBUI: Fix Enter button behavior in textarea (Tom Piccirello)
- WEBUI: Fix wrong file renaming selection range (MR)
- WEBUI: Preselect "Default save path" in watched folders (thalieht)
- WEBUI: Fix banning peers (brvphoenix)
- WEBUI: Fix seeding time checkbox placement (Chocobo1)
- WEBUI: Bump Web API version (Thomas Piccirello)
- RSS: Fix renaming RSS autodownload rule (glassez)
- RSS: Fix RSS article is not marked as "read" when torrent is downloaded (glassez)
- SEARCH: Update minimum Python version to 3.5.0 (ngosang)
- SEARCH: Make middle-click close search tabs (Will Da Silva)
- WINDOWS: NSIS: Update Dutch translation (Thomas De Rocker)
- WINDOWS: NSIS: Change the installers uninstallation question to clear confusion (an0n666)
- LINUX: Fix typo in systemd service file (Shane Allgeier)
- LINUX: Don't use HTML in tray tooltip (thalieht)
- LINUX: Don't create 'data' subdirectory in XDG_DATA_HOME (lbilli)
- LINUX/MACOS: Add HTTPS tracker certificate validation option (NotTsunami)
- OTHER: Many CMake improvements (FranciscoPombal)
- OTHER: Support for libtorrent 1.1.x is dropped (Chocobo1)
- OTHER: Many code cleanups and improvements (FranciscoPombal, Chocobo1, glassez)
Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- FEATURE: Libtorrent 1.2.x series are supported now (glassez)
@ -31,7 +188,7 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- BUGFIX: Remove the max half-open connections option (thalieht)
- BUGFIX: Center align the section labels in advanced settings (thalieht)
- BUGFIX: Add documentation links to some advanced settings (thalieht)
- BUGFIX: Impove DownloadManager code (glassez)
- BUGFIX: Improve DownloadManager code (glassez)
- BUGFIX: Limit DownloadHandler max redirection to 20 (Chocobo1)
- BUGFIX: Log DownloadManager SSL errors (Chocobo1)
- BUGFIX: Force recheck multiple torrents one by one (glassez)
@ -262,10 +419,10 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- BUGFIX: Restore torrent in two steps (glassez)
- BUGFIX: Improve scaling of speed graphs (dzmat)
- BUGFIX: Add isNetworkFileSystem() detection on Windows. This allows network mounts to be monitored correctly by polling timer. (Chocobo1)
- BUGFIX: Reduce horizontal graphs resolution. Improves perfomance. (dzmat)
- BUGFIX: Reduce horizontal graphs resolution. Improves performance. (dzmat)
- BUGFIX: Don't recheck just checked torrent (mj-p, glassez)
- BUGFIX: Add SMB2 magic number (Chocobo1)
- BUGFIX: Restore startup perfomance to v4.1.2 times. Needs at least libtorrent 1.1.10 (sledgehammer999)
- BUGFIX: Restore startup performance to v4.1.2 times. Needs at least libtorrent 1.1.10 (sledgehammer999)
- BUGFIX: Make strings actually translatable (sledgehammer999)
- WEBUI: Handle downloading .torrent file as success (Tom Piccirello)
- WEBUI: Fix Alternative Web UI to be available (glassez)
@ -336,7 +493,7 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- BUGFIX: Improve torrent initialization (glassez)
- BUGFIX: Save resume data on torrent change events (glassez)
- BUGFIX: Increase default resume data save interval (Chocobo1)
- BUGFIX: Work around crash when procesing recursive download. Closes #9086 (Chocobo1)
- BUGFIX: Work around crash when processing recursive download. Closes #9086 (Chocobo1)
- BUGFIX: Reduce queries to python version (Chocobo1)
- BUGFIX: Disable certain mouse wheel events in Options dialog (Chocobo1)
- WEBUI: Send all rechecks in one request (Thomas Piccirello)
@ -823,7 +980,7 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- COSMETIC: Change RSS view layout to horizontal. Closes #5920. (Chocobo1)
- OSX: Fix crash on exit using Qt4. (Yez Ezey)
- OSX: Change QSettings to IniFormat on macOS. Closes #5770 #5808. (Yez Ezey)
- LINUX: Workaround a Qt5 bug which results in a flood of network interface change singals. (Eugene Shalygin)
- LINUX: Workaround a Qt5 bug which results in a flood of network interface change signals. (Eugene Shalygin)
- OTHER: Turkish translation for installer. (Burak Yavuz)
- OTHER: Update portugueseBR for installer. (DaRKSoM)
- OTHER: Update portuguese for installer. (EdwardLinux)
@ -840,7 +997,7 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- SEARCH: Remove KickassTorrents search engine (ngosang)
- SEARCH: Remove BTDigg search engine (ngosang)
- SEARCH: Update Torrentz search engine (ngosang)
* Wed Jul 20 2016 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.3.6
- BUGFIX: Do not create save folder in advance (glassez)
- BUGFIX: Fix upper-bound limit of command line for "Run External Program" in Windows. Closes #5399. (Chocobo1)
@ -1153,7 +1310,7 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
* Sun Aug 02 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.3
- BUGFIX: Fix crash when closing a search tab while search is running (pmzqla)
- SEARCH: Other minor search fixes and improvements (pmzqla)
* Sat Aug 01 2015 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.2.2
- FEATURE: Allow to force reannounce DHT too (Chocobo1)
- FEATURE: Implement an option to disable confirmation of torrent recheck (blaxspirit)
@ -1530,7 +1687,7 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- BUGFIX: Correctly update tracker tier number in the trackers tab. Closes #1075. (sledgehammer999)
- BUGFIX: Speed improvements.(sledgehammer999)
- OTHER: Updated translations.
* Tue Nov 05 2013 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v3.1.2
- BUGFIX: Fix WebUI gzip compression. Closes #1037. (sledgehammer999)
- BUGFIX: Fix compilation with qt < 4.8.0. Closes #1043. (sledgehammer999)
@ -1582,7 +1739,7 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- BUGFIX: Enable edit/rename via F2 or double click in various places(Gelmir)
- BUGFIX: Allow to edit trackers and copy their urls(Gelmir and Driim)
- BUGFIX: Add Uploaded column to main view(Gelmir)
- BUGFIX: Calculate ETA for seeding torrents(Gelmir)
- BUGFIX: Calculate ETA for seeding torrents(Gelmir)
- BUGFIX: Add option to ignore global share ratio limits for created torrents(Gelmir)
- OTHER: Many RSS bugfixes and improvements all over the place(Gelmir)
- OTHER: Generate translations at configure time to reduce tarball size
@ -1604,7 +1761,7 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- BUGFIX: Use system language as default language. Closes #780 (sledgehammer999)
- BUGFIX: Move completed files to .unwanted folder when they are unselected by the user (constantined)
- BUGFIX: Show delete action when multiple feeds are selected (Gelmir)
- BUGFIX: Use Unicode for libtorrent alert messages (Gelmir)
- BUGFIX: Use Unicode for libtorrent alert messages (Gelmir)
- OTHER: Update translations
- WINDOWS: Shave off ~4MB from the binary size (sledgehammer999)
- WINDOWS: Remove wrong dependency on msvc2008 runtime (sledgehammer999)
@ -1632,7 +1789,7 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- LIBTORRENT: Cache can now be returned to the OS (0.16.10)
- PERFORMANCE: Improve drawing speed of tranferlist when there are many torrents(>100) (sledgehammer999)
- PERFORMANCE: Improve drawing speed of peers list when there are many peers (sledgehammer999)
* Sat Mar 16 2013 - Christophe Dumez <chris@qbittorrent.org> - v3.0.9
- BUGFIX: Raise qBittorrent windows when another instance is launched
- BUGFIX: Show human readable names for network interfaces in preferences (Windows)
@ -1839,7 +1996,7 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- BUGFIX: Cleaner program exit on system log out
- BUGFIX: Fix possible magnet link parsing problems
- BUGFIX: Fix possible RSS URL parsing problems
- COSMETIC: Added monochrome icon for light themes
- COSMETIC: Added monochrome icon for light themes
* Sun Mar 20 2011 - Christophe Dumez <chris@qbittorrent.org> - v2.7.0
- FEATURE: Added search field for torrent content
@ -2170,7 +2327,7 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- FEATURE: Added "Unread" item to RSS feed list to display all unread news
- FEATURE: If a torrent contains a torrent file, process downloaded torrent file too
- FEATURE: A random listening port can be chosen automatically
- BUGFIX: torrent resume code rewrited
- BUGFIX: torrent resume code rewritten
- BUGFIX: Fixed uTorrent spoofing code
- BUGFIX: Greatly improved column sorting code
- BUGFIX: Possibility to create trackerless torrents
@ -2292,7 +2449,7 @@ Tue Dec 03 2019 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.2.0
- BUGFIX: Removed "disconnected" connection state, detection was far from perfect
- BUGFIX: Torrents are no longer starting from scratch when changing default save path (when torrent addition dialog is disabled)
- BUGFIX: Single instance code is now more reliable on Qt >= 4.4
- COSMETIC: Transfer speed, ratio, connection status and DHT nodes are displayed in status bar
- COSMETIC: Transfer speed, ratio, connection status and DHT nodes are displayed in status bar
- COSMETIC: RSS Tab is now hidden as a default
- COSMETIC: Allow to hide or display top toolbar
- COSMETIC: Log is now in a separate dialog

16
INSTALL
View file

@ -3,23 +3,27 @@ qBittorrent - A BitTorrent client in C++ / Qt
1) Install these dependencies:
- Boost >= 1.40
- Boost >= 1.65
- libtorrent-rasterbar >= 1.2 (by Arvid Norberg)
- libtorrent-rasterbar >= 1.2.12 (by Arvid Norberg)
* https://www.libtorrent.org/
* Be careful: another library (the one used by rTorrent) uses a similar name
- OpenSSL >= 1.0
- OpenSSL >= 1.1.1
- Qt >= 5.9.0
- Qt >= 5.12
- zlib >= 1.2.5.2
- zlib >= 1.2.11
- pkg-config (compile-time only)
- pkg-config (compile-time only on *nix systems)
- Python >= 3.5.0 (optional, runtime only)
* Required by the internal search engine
Dependency version numbers are bumped every once in a while to keep the range of properly tested configurations manageable, even if not strictly required to build.
You may be able to build with older versions of (some of) the dependencies other than the minimum versions specified in the build scripts, but support for such builds is not provided - you are on your own.
Please ensure you are building with an officially supported configuration when reporting bugs.
2a) Compile and install qBittorrent with Qt graphical interface
$ ./configure

1
TODO
View file

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

19
build_dist.sh Executable file
View file

@ -0,0 +1,19 @@
#!/bin/sh
# get version numbers
versionSrc="src/base/version.h.in"
versionMajor="$(grep -Po '(?<=QBT_VERSION_MAJOR )\d+' "$versionSrc")"
versionMinor="$(grep -Po '(?<=QBT_VERSION_MINOR )\d+' "$versionSrc")"
versionBugfix="$(grep -Po '(?<=QBT_VERSION_BUGFIX )\d+' "$versionSrc")"
versionBuild="$(grep -Po '(?<=QBT_VERSION_BUILD )\d+' "$versionSrc")"
versionStatus="$(grep -Po '(?<=QBT_VERSION_STATUS ")\w+' "$versionSrc")"
if [ "$versionBuild" != "0" ]; then
projectVersion="$versionMajor.$versionMinor.$versionBugfix.$versionBuild$versionStatus"
else
projectVersion="$versionMajor.$versionMinor.$versionBugfix$versionStatus"
fi
# pack archives
git archive --format=tar --prefix="qbittorrent-$projectVersion/" HEAD | gzip -9 > "qbittorrent-$projectVersion.tar.gz"
git archive --format=tar --prefix="qbittorrent-$projectVersion/" HEAD | xz -9 > "qbittorrent-$projectVersion.tar.xz"

View file

@ -7,47 +7,16 @@ macro(qbt_common_config)
# treat value specified by the CXX_STANDARD target property as a requirement by default
set(CMAKE_CXX_STANDARD_REQUIRED ON)
# these definitions are only needed for calls to
# lt::generate_fingerprint and for the qbittorrent.rc file on Windows
add_library(qbt_version_definitions INTERFACE)
target_compile_definitions(qbt_version_definitions INTERFACE
QBT_VERSION_MAJOR=${qBittorrent_VERSION_MAJOR}
QBT_VERSION_MINOR=${qBittorrent_VERSION_MINOR}
QBT_VERSION_BUGFIX=${qBittorrent_VERSION_PATCH}
QBT_VERSION_BUILD=${qBittorrent_VERSION_TWEAK}
)
add_library(qbt_common_cfg INTERFACE)
# Full C++ 14 support is required
# 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_14
cxx_aggregate_default_initializers
cxx_attribute_deprecated
cxx_binary_literals
cxx_contextual_conversions
cxx_decltype_auto
cxx_digit_separators
cxx_generic_lambdas
cxx_lambda_init_captures
cxx_relaxed_constexpr
cxx_return_type_deduction
cxx_variable_templates
cxx_std_17
)
set(QBT_PROJECT_VERSION "${qBittorrent_VERSION_MAJOR}.${qBittorrent_VERSION_MINOR}.${qBittorrent_VERSION_PATCH}")
if (NOT ${qBittorrent_VERSION_TWEAK} EQUAL 0)
set(QBT_PROJECT_VERSION "${QBT_PROJECT_VERSION}.${qBittorrent_VERSION_TWEAK}")
endif()
set(QBT_FULL_VERSION "${QBT_PROJECT_VERSION}${QBT_VER_STATUS}")
target_compile_definitions(qbt_common_cfg INTERFACE
QBT_VERSION="v${QBT_FULL_VERSION}"
QBT_VERSION_2="${QBT_FULL_VERSION}"
QT_DEPRECATED_WARNINGS
QT_NO_CAST_TO_ASCII
QT_NO_CAST_FROM_BYTEARRAY
@ -90,6 +59,12 @@ macro(qbt_common_config)
endif()
endif()
if ((CXX_COMPILER_ID STREQUAL "Clang") OR (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()
@ -101,8 +76,12 @@ macro(qbt_common_config)
endif()
if (MSVC)
target_compile_options(qbt_common_cfg INTERFACE /guard:cf)
target_link_options(qbt_common_cfg INTERFACE /guard:cf
target_compile_options(qbt_common_cfg INTERFACE
/guard:cf
/utf-8
)
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>

4972
configure vendored

File diff suppressed because it is too large Load diff

View file

@ -1,6 +1,8 @@
AC_INIT([qbittorrent], [v4.3.0alpha], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
AC_INIT([qbittorrent], [v4.3.4], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
: ${CFLAGS=""}
: ${CXXFLAGS=""}
AC_PROG_CC
AC_PROG_CXX
AC_PROG_SED
@ -139,7 +141,7 @@ AS_IF([test "x$QT_QMAKE" = "x"],
[AC_MSG_ERROR([Could not find qmake])
])
AS_IF([test "x$enable_gui" = "xyes"],
[PKG_CHECK_MODULES(Qt5Svg, [Qt5Svg >= 5.5.1])
[PKG_CHECK_MODULES(Qt5Svg, [Qt5Svg >= 5.12])
])
AC_MSG_CHECKING([whether QtDBus should be enabled])
AS_CASE(["x$enable_qt_dbus"],
@ -157,7 +159,7 @@ AS_CASE(["x$enable_qt_dbus"],
AC_MSG_ERROR([Unknown option "$enable_qt_dbus". Use either "yes" or "no".])])
AX_BOOST_BASE([1.40],
AX_BOOST_BASE([1.65],
[AC_MSG_NOTICE([Boost CXXFLAGS: "$BOOST_CPPFLAGS"])
AC_MSG_NOTICE([Boost LDFLAGS: "$BOOST_LDFLAGS"])],
[AC_MSG_ERROR([Could not find Boost])])
@ -178,48 +180,48 @@ AC_MSG_NOTICE([Boost.System LIB: "$BOOST_SYSTEM_LIB"])
LIBS="$BOOST_SYSTEM_LIB $LIBS"
PKG_CHECK_MODULES(libtorrent,
[libtorrent-rasterbar >= 1.2],
[libtorrent-rasterbar >= 1.2.12],
[CXXFLAGS="$libtorrent_CFLAGS $CXXFLAGS"
LIBS="$libtorrent_LIBS $LIBS"])
PKG_CHECK_MODULES(openssl,
[openssl >= 1.0],
[openssl >= 1.1.1],
[CXXFLAGS="$openssl_CFLAGS $CXXFLAGS"
LIBS="$openssl_LIBS $LIBS"])
PKG_CHECK_MODULES(zlib,
[zlib >= 1.2.5.2],
[zlib >= 1.2.11],
[CXXFLAGS="$zlib_CFLAGS $CXXFLAGS"
LIBS="$zlib_LIBS $LIBS"])
# Check if already in >= C++14 mode because of the flags returned by one of the above packages
# Check if already in >= C++17 mode because of the flags returned by one of the above packages
TMP_CXXFLAGS="$CXXFLAGS"
CXXFLAGS=""
AC_MSG_CHECKING([if compiler defaults to C++14 or later mode])
AC_COMPILE_IFELSE([DETECT_CPP14_PROGRAM()],
AC_MSG_CHECKING([if compiler defaults to C++17 or later mode])
AC_COMPILE_IFELSE([DETECT_CPP17_PROGRAM()],
[AC_MSG_RESULT([yes])
QBT_CXX14_FOUND="yes"],
QBT_CXX17_FOUND="yes"],
[AC_MSG_RESULT([no])
QBT_CXX14_FOUND="no"])
QBT_CXX17_FOUND="no"])
# In case of no, check if the compiler can support at least C++14
# In case of no, check if the compiler can support at least C++17
# and if yes, enable it leaving a warning to the user
AS_IF([test "x$QBT_CXX14_FOUND" = "xno"],
[AC_MSG_CHECKING([if compiler supports C++14])
CXXFLAGS="-std=c++14"
AC_COMPILE_IFELSE([DETECT_CPP14_PROGRAM()],
AS_IF([test "x$QBT_CXX17_FOUND" = "xno"],
[AC_MSG_CHECKING([if compiler supports C++17])
CXXFLAGS="-std=c++17"
AC_COMPILE_IFELSE([DETECT_CPP17_PROGRAM()],
[AC_MSG_RESULT([yes])
AC_MSG_CHECKING([if C++14 is disabled by the set compiler flags])
AC_MSG_CHECKING([if C++17 is disabled by the set compiler flags])
# prepend the flag so it won't override conflicting user defined flags
CXXFLAGS="-std=c++14 $TMP_CXXFLAGS"
AC_COMPILE_IFELSE([DETECT_CPP14_PROGRAM()],
CXXFLAGS="-std=c++17 $TMP_CXXFLAGS"
AC_COMPILE_IFELSE([DETECT_CPP17_PROGRAM()],
[AC_MSG_RESULT([no])
QBT_ADD_CONFIG="$QBT_ADD_CONFIG c++14"
AC_MSG_WARN([C++14 mode is now force enabled. The C++ mode should match the mode that other libraries were built with, otherwise you'll likely get linking errors.])],
QBT_ADD_CONFIG="$QBT_ADD_CONFIG c++1z"
AC_MSG_WARN([C++17 mode is now force enabled. The C++ mode should match the mode that other libraries were built with, otherwise you'll likely get linking errors.])],
[AC_MSG_RESULT([yes])
AC_MSG_ERROR([The compiler supports C++14 but the user or a dependency has explicitly enabled a lower mode.])])],
AC_MSG_ERROR([The compiler supports C++17 but the user or a dependency has explicitly enabled a lower mode.])])],
[AC_MSG_RESULT([no])
AC_MSG_ERROR([A compiler supporting C++14 is required.])])
AC_MSG_ERROR([A compiler supporting C++17 is required.])])
])
CXXFLAGS="$TMP_CXXFLAGS"
@ -270,9 +272,13 @@ AC_SUBST(QBT_REMOVE_CONFIG)
AC_SUBST(QBT_ADD_DEFINES)
AC_SUBST(QBT_REMOVE_DEFINES)
AC_OUTPUT(conf.pri)
QBT_CONFIG_FILES="conf.pri"
AS_IF([test "x$enable_systemd" = "xyes"],
[AC_OUTPUT(dist/unix/systemd/qbittorrent-nox@.service)])
[QBT_CONFIG_FILES="$QBT_CONFIG_FILES dist/unix/systemd/qbittorrent-nox@.service"])
AC_CONFIG_FILES(["$QBT_CONFIG_FILES"])
AC_OUTPUT
AC_MSG_NOTICE([Running qmake to generate the makefile...])
TOPDIR="$(cd "$(dirname "$0")" && pwd)"

View file

@ -0,0 +1 @@
# empty

4
dist/mac/Info.plist vendored
View file

@ -55,7 +55,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.3.0</string>
<string>4.3.4</string>
<key>CFBundleExecutable</key>
<string>@EXECUTABLE@</string>
<key>CFBundleIdentifier</key>
@ -67,7 +67,7 @@
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2006-2020 The qBittorrent project</string>
<string>Copyright © 2006-2021 The qBittorrent project</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>

View file

@ -74,6 +74,6 @@
<url type="translate">https://github.com/qbittorrent/qBittorrent/wiki/How-to-translate-qBittorrent</url>
<content_rating type="oars-1.1"/>
<releases>
<release version="4.1.5" date="2018-12-24"/>
<release version="4.3.4" date="2021-03-23"/>
</releases>
</component>

View file

@ -12,6 +12,9 @@ StartupNotify=false
StartupWMClass=qbittorrent
Keywords=bittorrent;torrent;magnet;download;p2p;
# Translations
# Translations
Comment[oc]=Telecargar e partejar de fichièrs amb BitTorrent
GenericName[oc]=Client BitTorrent
@ -22,8 +25,8 @@ Name[af]=qBittorrent
Comment[ar]=نزّل وشارك الملفات عبر كيوبتتورنت
GenericName[ar]=عميل بتتورنت
Name[ar]=كيوبتتورنت
Comment[be]=Сцягванне і раздача файлаў праз пратакол BitTorrent
GenericName[be]=BitTorrent-кліент
Comment[be]=Спампоўванне і раздача файлаў праз пратакол BitTorrent
GenericName[be]=Кліент BitTorrent
Name[be]=qBittorrent
Comment[bg]=Сваляне и споделяне на файлове чрез BitTorrent
GenericName[bg]=BitTorrent клиент
@ -34,19 +37,19 @@ Name[bn]=কিউবি্টটরেন্ট
Comment[bs]=Preuzmi i dijeli datoteke preko BitTorrent-a
GenericName[bs]=BitTorrent klijent
Name[bs]=qBittorrent
Comment[ca]=Baixeu i compartiu fitxers mitjançant BitTorrent
Comment[ca]=Baixeu i compartiu fitxers amb el BitTorrent
GenericName[ca]=Client de BitTorrent
Name[ca]=qBittorrent
Comment[cs]=Stahování a sdílení souborů přes síť BitTorrent
GenericName[cs]=BitTorrent klient
Name[cs]=qBittorrent
Comment[da]=Download og del filer over BitTorrent
GenericName[da]=BitTorrent klient
GenericName[da]=BitTorrent-klient
Name[da]=qBittorrent
Comment[de]=Über BitTorrent Dateien herunterladen und teilen
GenericName[de]=BitTorrent Client
Name[de]=qBittorrent
Comment[el]=Κάντε λήψη και ανταλάξτε αρχεία μέσω BitTorrent
Comment[el]=Κάντε λήψη και ανταλλάξτε αρχεία μέσω BitTorrent
GenericName[el]=Πελάτης BitTorrent
Name[el]=qBittorrent
Comment[en_GB]=Download and share files over BitTorrent
@ -55,7 +58,10 @@ Name[en_GB]=qBittorrent
Comment[es]=Descargue y comparta archivos por BitTorrent
GenericName[es]=Cliente BitTorrent
Name[es]=qBittorrent
Comment[eu]=Jeitsi eta elkarbanatu agiriak BitTorrent-en
Comment[et]=Lae alla ja jaga faile üle BitTorrenti
GenericName[et]=BitTorrent klient
Name[et]=qBittorrent
Comment[eu]=Jeitsi eta elkarbanatu agiriak BitTorrent bidez
GenericName[eu]=BitTorrent bezeroa
Name[eu]=qBittorrent
Comment[fa]=دانلود و به اشتراک گذاری فایل های بوسیله بیت تورنت
@ -82,13 +88,16 @@ Name[hr]=qBittorrent
Comment[hu]=Fájlok letöltése és megosztása a BitTorrent hálózaton keresztül
GenericName[hu]=BitTorrent kliens
Name[hu]=qBittorrent
Comment[hy]=Նիշքերի փոխանցում BitTorrent-ի միջոցով
GenericName[hy]=BitTorrent սպասառու
Name[hy]=qBittorrent
Comment[id]=Unduh dan berbagi berkas melalui BitTorrent
GenericName[id]=Klien BitTorrent
Name[id]=qBittorrent
Comment[is]=Sækja og deila skrám yfir BitTorrent
GenericName[is]=BitTorrent biðlarar
Name[is]=qBittorrent
Comment[it]=Client BitTorrent per il download di file via internet
Comment[it]=Scarica e condividi file tramite BitTorrent
GenericName[it]=Client BitTorrent
Name[it]=qBittorrent
Comment[ja]=BitTorrent
@ -97,15 +106,21 @@ Name[ja]=qBittorrent
Comment[ka]= Bittorrent-
GenericName[ka]=BitTorrent
Name[ka]=qBittorrent
Comment[ko]=
GenericName[ko]=
Name[ko]=
Comment[ko]=
GenericName[ko]=
Name[ko]=qBittorrent
Comment[zh]= BitTorrent
GenericName[zh]=BitTorrent
Name[zh]=qBittorrent
Comment[lt]=Atsisiųskite bei dalinkitės failais BitTorrent tinkle
GenericName[lt]=BitTorrent klientas
Name[lt]=qBittorrent
Comment[mk]=Превземајте и споделувајте фајлови преку BitTorrent
GenericName[mk]=BitTorrent клиент
Name[mk]=qBittorrent
Comment[en_AU]=Download and share files over BitTorrent
GenericName[en_AU]=BitTorrent client
Name[en_AU]=qBittorrent
Comment[nb]=Last ned og del filer over BitTorrent
GenericName[nb]=BitTorrent-klient
Name[nb]=qBittorrent
@ -113,7 +128,7 @@ Comment[nqo]=ߞߐߕߐ߯ߘߐ ߟߎ߬ ߟߊߖߌ߰ ߞߊ߬ ߓߊ߲߫ ߞߵߊ߬ߟߎ߬ ߘ
GenericName[nqo]=ߓߌߙߏߙߍ߲ߕ ߕߣߐ߬ߓߐ߬ߟߊ
Name[nqo]=ߞߎ߳ߓߌߕߏߙߍ߲ߕ
Comment[nl]=Bestanden downloaden en delen via BitTorrent
GenericName[nl]=BitTorrent-cliënt
GenericName[nl]=BitTorrent-client
Name[nl]=qBittorrent
Comment[pl]=Pobieraj i dziel się plikami przez BitTorrent
GenericName[pl]=Klient BitTorrent
@ -127,8 +142,8 @@ Name[pt_BR]=qBittorrent
Comment[ro]=Descărcați și partajați fișiere prin BitTorrent
GenericName[ro]=Client BitTorrent
Name[ro]=qBittorrent
Comment[ru]=Скачивайте и делитесь файлами с помощью BitTorrent
GenericName[ru]=BitTorrent-клиент
Comment[ru]=Обмен файлами по сети BitTorrent
GenericName[ru]=Клиент сети BitTorrent
Name[ru]=qBittorrent
Comment[sk]=Sťahovanie a zdieľanie súborov prostredníctvom siete BitTorrent
GenericName[sk]=Klient siete BitTorrent
@ -136,6 +151,7 @@ Name[sk]=qBittorrent
Comment[sl]=Prenesite in delite datoteke preko BitTorrenta
GenericName[sl]=BitTorrent odjemalec
Name[sl]=qBittorrent
Comment[sr]=Преузимајте и делите фајлове преко BitTorrent протокола
GenericName[sr]=BitTorrent-клијент
Comment[sr@latin]=Preuzimanje i deljenje fajlova preko BitTorrent-a
GenericName[sr@latin]=BitTorrent klijent
@ -146,21 +162,27 @@ Name[sv]=qBittorrent
Comment[uz@Latn]=BitTorrent orqali fayllarni yuklab olish va baham korish
GenericName[uz@Latn]=BitTorrent mijozi
Name[uz@Latn]=qBittorrent
Comment[te]= ి ిి ి , ి
GenericName[te]= ి ి
Name[te]= ి
Comment[hi_IN]= BitTorrent
GenericName[hi_IN]=BitTorrent
Name[hi_IN]=qBittorrent
Comment[ltg]=Atsasyuteit i daleit failus ar BitTorrent
GenericName[ltg]=BitTorrent klients
Name[ltg]=qBittorrent
Comment[hi_IN]=ि
GenericName[hi_IN]=ि
Name[hi_IN]=ि
Comment[tr]=Dosyaları BitTorrent üzerinden indirin ve paylaşın
GenericName[tr]=BitTorrent istemcisi
Name[tr]=qBittorrent
Comment[uk]=Завантажувати і обмінюватися файлами через BitTorrent
Comment[ur]=BitTorrent پر فائلوں کو ڈاؤن لوڈ کریں اور اشتراک کریں
GenericName[ur]=قیو بٹ ٹورنٹ کلائنٹ
Name[ur]=قیو بٹ ٹورنٹ
Comment[uk]=Завантажуйте та поширюйте файли через BitTorrent
GenericName[uk]=BitTorrent-клієнт
Name[uk]=qBittorrent
Comment[vi]=Ti v và chia s các tp tin thông qua BitTorrent
GenericName[vi]=Máy trm dng BitTorrent
Name[vi]=qBittorrent
Comment[az@latin]=Faylları BitTorrent vasitəsilə göndərin və paylaşın
GenericName[az@latin]=BitTorrent client
Name[az@latin]=qBittorrent
Comment[zh_HK]=BitTorrent
GenericName[zh_HK]=BitTorrent
Name[zh_HK]=qBittorrent
@ -176,15 +198,21 @@ Name[ms_MY]=qBittorrent
Comment[eo]=Elŝutu kaj kunhavigu dosierojn per BitTorrent
GenericName[eo]=BitTorrent-kliento
Name[eo]=qBittorrent
Comment[mn_MN]=BitTorrent ашиглан файлуудыг татаж түгээх
GenericName[mn_MN]=BitTorrent үйлчлүүлэгч
Comment[mn_MN]=BitTorrent-оор файлуудаа тат, түгээ
GenericName[mn_MN]=BitTorrent татагч
Name[mn_MN]=qBittorrent
Comment[ta]=BitTorrent ி ிி ி
GenericName[ta]=BitTorrent ி
Name[ta]=qBittorrent
Comment[ne_NP]= BitTorrent
GenericName[ne_NP]=BitTorrent
Name[ne_NP]=qBittorrent
Comment[en_AU]=Download and share files over BitTorrent
GenericName[en_AU]=BitTorrent client
Name[en_AU]=qBittorrent
Comment[th]=
Comment[te]= ి ిి ి , ి
GenericName[te]= ి ి
Name[te]= ి
Comment[pt_PT]=Transferir e partilhar ficheiros por BitTorrent
GenericName[pt_PT]=Cliente BitTorrent
Name[pt_PT]=qBittorrent
Comment[th]=
GenericName[th]=
Name[th]=qBittorrent

View file

@ -2,7 +2,7 @@
Description=qBittorrent-nox service for user %I
Documentation=man:qbittorrent-nox(1)
Wants=network-online.target
After=network-online.target nss-lookup.target
After=local-fs.target network-online.target nss-lookup.target
[Service]
Type=simple

View file

@ -8,7 +8,8 @@ TRANSLATORS:
english message to help you with the translation.
4. Edit only the part inside the quotation marks(""). Unless you know
what you are doing.
5. Save the files with utf8 encoding and BOM.
5. Save the files with UTF-8 encoding, without BOM
(this should be the default in any modern text editor).
6. Submit your changes: 1) as a pull request to the official git repo or
2) open an issue to the bugtracker and attach them or 3) via email or
4)the same way you provide the translations for qbt itself

10
dist/windows/UAC.nsh vendored
View file

@ -22,7 +22,7 @@ Interactive User (MediumIL) Admin user (HighIL)
!ifndef UAC_HDR__INC
!verbose push
!verbose 3
!ifndef UAC_VERBOSE
!ifndef UAC_VERBOSE
!define UAC_VERBOSE 3
!endif
!verbose ${UAC_VERBOSE}
@ -195,7 +195,7 @@ _UAC_L_E_${__UAC_L}:
!endif
!insertmacro UAC_AsUser_Call Label _UAC_L_F_${__UAC_L} ${UAC_SYNCREGISTERS}|${UAC_SYNCOUTDIR}|${UAC_SYNCINSTDIR} #|${UAC_CLEARERRFLAG}
!if "${workdir}" != ""
pop $outdir
pop $outdir
SetOutPath $outdir
!endif
!macroend
@ -265,7 +265,7 @@ pop $_LOGICLIB_TEMP
!macroend
!macro _UAC_AsUser_GenOp outvar op opparam1 opparam2
!define _UAC_AUGOGR_ID _UAC_AUGOGR_OP${outvar}${op}${opparam1}${opparam2}
!ifndef ${_UAC_AUGOGR_ID} ;Has this exact action been done before?
!ifndef ${_UAC_AUGOGR_ID} ;Has this exact action been done before?
!if ${outvar} == $0
!define ${_UAC_AUGOGR_ID} $1
!else
@ -277,7 +277,7 @@ pop $_LOGICLIB_TEMP
!else
!define _UAC_AUGOGR_OPP1 ${opparam1}
!define _UAC_AUGOGR_OPP2 ${${_UAC_AUGOGR_ID}}
!endif
!endif
goto ${_UAC_AUGOGR_ID}_C
${_UAC_AUGOGR_ID}_F:
${op} ${_UAC_AUGOGR_OPP1} ${_UAC_AUGOGR_OPP2}
@ -296,4 +296,4 @@ pop ${${_UAC_AUGOGR_ID}}
!verbose pop
!endif /* UAC_HDR__INC */
!endif /* UAC_HDR__INC */

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_AFRIKAANS} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_ALBANIAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_ARABIC} "qBittorrent (مطلوب)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_BASQUE} "qBittorrent (beharrezkoa)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_BELARUSIAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_BOSNIAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_BRETON} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_BULGARIAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_CATALAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_CROATIAN} "qBittorrent (neophodno)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_CZECH} "qBittorrent (vyžadováno)"
@ -7,7 +7,7 @@ LangString inst_dekstop ${LANG_CZECH} "Vytvořit zástupce na ploše"
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
LangString inst_startmenu ${LANG_CZECH} "Vytvořit zástupce v nabídce Start"
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
LangString inst_startup ${LANG_CZECH} "Spusťte aplikaci qBittorrent ve Windows"
LangString inst_startup ${LANG_CZECH} "Spustit qBittorrent při startu Windows"
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
LangString inst_torrent ${LANG_CZECH} "Otevírat .torrent soubory pomocí qBittorrent"
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
@ -15,9 +15,9 @@ LangString inst_magnet ${LANG_CZECH} "Otevírat odkazy Magnet pomocí qBittorren
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
LangString inst_firewall ${LANG_CZECH} "Vytvořit pravidlo ve Windows Firewall"
;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
LangString inst_pathlimit ${LANG_CZECH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
LangString inst_pathlimit ${LANG_CZECH} "Vypnout MAX_PATH limit 260 znaků pro cesty (vyžaduje Windows 10 1607 a novější)"
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
LangString inst_firewallinfo ${LANG_CZECH} "Vytváření pravidla ve Windows Firewall"
LangString inst_firewallinfo ${LANG_CZECH} "Přidávání pravidla do Windows Firewall"
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
LangString inst_warning ${LANG_CZECH} "qBittorrent je spuštěn. Před instalací aplikaci ukončete, prosím."
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_DANISH} "qBittorrent (påkrævet)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_DUTCH} "qBittorrent (vereist)"
@ -19,9 +19,9 @@ LangString inst_pathlimit ${LANG_DUTCH} "De Windows-begrenzing voor padlengte ui
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
LangString inst_firewallinfo ${LANG_DUTCH} "Uitzondering aan Windows Firewall toevoegen"
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
LangString inst_warning ${LANG_DUTCH} "qBittorrent is actief. Sluit de toepassing voordat u deze update installeert."
LangString inst_warning ${LANG_DUTCH} "qBittorrent is actief. Sluit het af voordat u deze update installeert."
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
LangString inst_uninstall_question ${LANG_DUTCH} "Er werd een eerdere installatie gedetecteerd. Deze wordt verwijderd zonder de gebruikersinstellingen te verwijderen."
LangString inst_uninstall_question ${LANG_DUTCH} "De huidige versie zal verwijderd worden. Gebruikersinstellingen en torrents blijven intact."
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
LangString inst_unist ${LANG_DUTCH} "Vorige versie verwijderen."
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
@ -52,7 +52,7 @@ LangString remove_firewallinfo ${LANG_DUTCH} "Uitzondering uit Windows Firewall
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
LangString remove_cache ${LANG_DUTCH} "Torrents en cachegegevens verwijderen"
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
LangString uninst_warning ${LANG_DUTCH} "qBittorrent is actief. Sluit de toepassing voordat u ze verwijdert."
LangString uninst_warning ${LANG_DUTCH} "qBittorrent is actief. Sluit het af voordat u het verwijdert."
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
LangString uninst_tor_warn ${LANG_DUTCH} ".torrent-associatie wordt niet verwijderd. Ze is gekoppeld met:"
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_ESPERANTO} "qBittorrent (required)"

View file

@ -1,59 +1,59 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_ESTONIAN} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_ESTONIAN} "qBittorrent (vajalik)"
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
LangString inst_dekstop ${LANG_ESTONIAN} "Create Desktop Shortcut"
LangString inst_dekstop ${LANG_ESTONIAN} "Loo Töölaua Otsetee"
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
LangString inst_startmenu ${LANG_ESTONIAN} "Create Start Menu Shortcut"
LangString inst_startmenu ${LANG_ESTONIAN} "Loo Start Menüü Otsetee"
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
LangString inst_startup ${LANG_ESTONIAN} "Start qBittorrent on Windows start up"
LangString inst_startup ${LANG_ESTONIAN} "Käivita qBittorrent Windowsi käivitamisel"
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
LangString inst_torrent ${LANG_ESTONIAN} "Open .torrent files with qBittorrent"
LangString inst_torrent ${LANG_ESTONIAN} "Ava .torrent failid qBittorrentiga"
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
LangString inst_magnet ${LANG_ESTONIAN} "Open magnet links with qBittorrent"
LangString inst_magnet ${LANG_ESTONIAN} "Ava magnet lingid qBittorrentiga"
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
LangString inst_firewall ${LANG_ESTONIAN} "Add Windows Firewall rule"
LangString inst_firewall ${LANG_ESTONIAN} "Lisa reegel Windowsi Tulemüüri"
;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
LangString inst_pathlimit ${LANG_ESTONIAN} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
LangString inst_pathlimit ${LANG_ESTONIAN} "Keela Windowsi kaustade pikkuse limiit (260 karakterit MAX_PATH limiit, vajalik Windows 10 1607 või uuemat)"
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
LangString inst_firewallinfo ${LANG_ESTONIAN} "Adding Windows Firewall rule"
LangString inst_firewallinfo ${LANG_ESTONIAN} "Lisatakse Windowsi Tulemüüri reegel"
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
LangString inst_warning ${LANG_ESTONIAN} "qBittorrent is running. Please close the application before installing."
LangString inst_warning ${LANG_ESTONIAN} "qBittorrent töötab. Palun sulge see programm, enne installi."
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
LangString inst_uninstall_question ${LANG_ESTONIAN} "Current version will be uninstalled. User settings and torrents will remain intact."
LangString inst_uninstall_question ${LANG_ESTONIAN} "Praegune versioon uninstallitakse. Kasutaja sätted ja torrenti failid jäetakse alles."
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
LangString inst_unist ${LANG_ESTONIAN} "Uninstalling previous version."
LangString inst_unist ${LANG_ESTONIAN} "Uninstallitakse eelmist versiooni."
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
LangString launch_qbt ${LANG_ESTONIAN} "Launch qBittorrent."
LangString launch_qbt ${LANG_ESTONIAN} "Käivita qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_ESTONIAN} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_ESTONIAN} "See installer töötab ainult 64-bit Windowsi versioonides."
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
LangString inst_requires_win7 ${LANG_ESTONIAN} "This qBittorrent version requires at least Windows 7."
LangString inst_requires_win7 ${LANG_ESTONIAN} "Selle qBittorrenti versiooni jaoks on vajalik vähemalt Windows 7."
;------------------------------------
;Uninstaller strings
;LangString remove_files ${LANG_ENGLISH} "Remove files"
LangString remove_files ${LANG_ESTONIAN} "Remove files"
LangString remove_files ${LANG_ESTONIAN} "Eemalda failid"
;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts"
LangString remove_shortcuts ${LANG_ESTONIAN} "Remove shortcuts"
LangString remove_shortcuts ${LANG_ESTONIAN} "Eemalda otseteed"
;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
LangString remove_associations ${LANG_ESTONIAN} "Remove file associations"
LangString remove_associations ${LANG_ESTONIAN} "Eemalda failide seotus"
;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
LangString remove_registry ${LANG_ESTONIAN} "Remove registry keys"
LangString remove_registry ${LANG_ESTONIAN} "Eemalda registri võtmed"
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
LangString remove_conf ${LANG_ESTONIAN} "Remove configuration files"
LangString remove_conf ${LANG_ESTONIAN} "Eemalda seadistuste failid"
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
LangString remove_firewall ${LANG_ESTONIAN} "Remove Windows Firewall rule"
LangString remove_firewall ${LANG_ESTONIAN} "Eemalda Windowsi Tulemüüri reegel"
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
LangString remove_firewallinfo ${LANG_ESTONIAN} "Removing Windows Firewall rule"
LangString remove_firewallinfo ${LANG_ESTONIAN} "Eemaldatakse Windowsi Tulemüüri reegel"
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
LangString remove_cache ${LANG_ESTONIAN} "Remove torrents and cached data"
LangString remove_cache ${LANG_ESTONIAN} "Eemalda torrentid ja ajutised andmed"
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
LangString uninst_warning ${LANG_ESTONIAN} "qBittorrent is running. Please close the application before uninstalling."
LangString uninst_warning ${LANG_ESTONIAN} "qBittorrent töötab. Palun sulge programm, enne uninstallimist."
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
LangString uninst_tor_warn ${LANG_ESTONIAN} "Not removing .torrent association. It is associated with:"
LangString uninst_tor_warn ${LANG_ESTONIAN} "Ei eemaldata .torrent seotust. Mis on seotud:"
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
LangString uninst_mag_warn ${LANG_ESTONIAN} "Not removing magnet association. It is associated with:"
LangString uninst_mag_warn ${LANG_ESTONIAN} "Ei eemaldata magnetitega seotust. Mis on seotud:"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_FARSI} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_FINNISH} "qBittorrent (pakollinen)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_FRENCH} "qBittorrent (requis)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_GALICIAN} "qBittorrent (necesario)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_GERMAN} "qBittorrent (erforderlich)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_GREEK} "qBittorrent (απαιτείται)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_HEBREW} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_HUNGARIAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_ICELANDIC} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_INDONESIAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_IRISH} "qBittorrent (required)"

View file

@ -1,13 +1,13 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_ITALIAN} "qBittorrent (necessario)"
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
LangString inst_dekstop ${LANG_ITALIAN} "Crea icone sul desktop"
LangString inst_dekstop ${LANG_ITALIAN} "Crea collegamento sul Desktop"
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
LangString inst_startmenu ${LANG_ITALIAN} "Crea gruppo programmi"
LangString inst_startmenu ${LANG_ITALIAN} "Aggiungi al menu Start"
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
LangString inst_startup ${LANG_ITALIAN} "Avvia qBittorrent all'avvio di Windows"
LangString inst_startup ${LANG_ITALIAN} "Esegui qBittorrent all'avvio di Windows"
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
LangString inst_torrent ${LANG_ITALIAN} "Apri file .torrent con qBittorrent"
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
@ -15,21 +15,21 @@ LangString inst_magnet ${LANG_ITALIAN} "Apri collegamenti magnet con qBittorrent
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
LangString inst_firewall ${LANG_ITALIAN} "Aggiungi regola al firewall di Windows"
;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
LangString inst_pathlimit ${LANG_ITALIAN} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
LangString inst_pathlimit ${LANG_ITALIAN} "Disabilita limite lunghezza percorsi Windows (limite MAX_PATH di 260 caratteri, richiede Windows 10 versione 1607 o successive)"
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
LangString inst_firewallinfo ${LANG_ITALIAN} "Aggiunta regola al firewall di Windows"
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
LangString inst_warning ${LANG_ITALIAN} "qBittorrent è in esecuzione. Chiudi l'applicazione prima dell'installazione."
LangString inst_warning ${LANG_ITALIAN} "qBittorrent è in esecuzione. Chiudilo prima di procedere con l'installazione."
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
LangString inst_uninstall_question ${LANG_ITALIAN} "Current version will be uninstalled. User settings and torrents will remain intact."
LangString inst_uninstall_question ${LANG_ITALIAN} "La versione attuale verrà disinstallata. Le impostazioni utente e i torrent rimarranno invariati."
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
LangString inst_unist ${LANG_ITALIAN} "Disinstallazione versione precedente."
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
LangString launch_qbt ${LANG_ITALIAN} "Esegui qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_ITALIAN} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_ITALIAN} "Questo installer funziona solo con versioni di Windows a 64bit."
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
LangString inst_requires_win7 ${LANG_ITALIAN} "This qBittorrent version requires at least Windows 7."
LangString inst_requires_win7 ${LANG_ITALIAN} "Questa versione di qBittorrent richiede Windows 7 o versioni successive."
;------------------------------------
@ -42,7 +42,7 @@ LangString remove_shortcuts ${LANG_ITALIAN} "Rimuovi collegamenti"
;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
LangString remove_associations ${LANG_ITALIAN} "Rimuovi associazione file"
;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
LangString remove_registry ${LANG_ITALIAN} "Rimuovi chiavi registro"
LangString remove_registry ${LANG_ITALIAN} "Rimuovi chiavi di registro"
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
LangString remove_conf ${LANG_ITALIAN} "Rimuovi file di configurazione"
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
@ -52,7 +52,7 @@ LangString remove_firewallinfo ${LANG_ITALIAN} "Rimozione regola dal firewall di
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
LangString remove_cache ${LANG_ITALIAN} "Rimuovi torrent e dati nella cache"
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
LangString uninst_warning ${LANG_ITALIAN} "qBittorrent è in esecuzione. Chiudi l'applicazione prima della disinstallazione."
LangString uninst_warning ${LANG_ITALIAN} "qBittorrent è in esecuzione. Chiudilo prima di procedere con la disinstallazione."
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
LangString uninst_tor_warn ${LANG_ITALIAN} "Associazione file .torrent non rimossa. File associati con:"
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_KOREAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_KURDISH} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_LATVIAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_LITHUANIAN} "qBittorrent (reikalingas)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_LUXEMBOURGISH} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_MACEDONIAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_MALAY} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_MONGOLIAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_NORWEGIAN} "qBittorrent (kreves)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_NORWEGIANNYNORSK} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_POLISH} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_PORTUGUESE} "qBittorrent (obrigatório)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_PORTUGUESEBR} "qBittorrent (requerido)"
@ -15,7 +15,7 @@ LangString inst_magnet ${LANG_PORTUGUESEBR} "Abrir links magnéticos com qBittor
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
LangString inst_firewall ${LANG_PORTUGUESEBR} "Adicionar regra no firewall do Windows"
;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
LangString inst_pathlimit ${LANG_PORTUGUESEBR} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
LangString inst_pathlimit ${LANG_PORTUGUESEBR} "Desativar limite de caracteres em caminhos do Windows (limite MAX_PATH de 260 caracteres, requer Windows 10 1067 ou superior)"
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
LangString inst_firewallinfo ${LANG_PORTUGUESEBR} "Adicionando regra no firewall do Windows"
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
@ -27,9 +27,9 @@ LangString inst_unist ${LANG_PORTUGUESEBR} "Desinstalando versão anterior."
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
LangString launch_qbt ${LANG_PORTUGUESEBR} "Executar qBittorrent."
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_PORTUGUESEBR} "This installer works only in 64-bit Windows versions."
LangString inst_requires_64bit ${LANG_PORTUGUESEBR} "Este instalador apenas funciona em versões 64-bit do Windows."
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
LangString inst_requires_win7 ${LANG_PORTUGUESEBR} "This qBittorrent version requires at least Windows 7."
LangString inst_requires_win7 ${LANG_PORTUGUESEBR} "Esta versão do qBittorrent requer no mínimo o Windows 7."
;------------------------------------
@ -42,13 +42,13 @@ LangString remove_shortcuts ${LANG_PORTUGUESEBR} "Remover atalhos"
;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
LangString remove_associations ${LANG_PORTUGUESEBR} "Remover associação de arquivos"
;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
LangString remove_registry ${LANG_PORTUGUESEBR} "Remover registros"
LangString remove_registry ${LANG_PORTUGUESEBR} "Remover chaves do registro"
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
LangString remove_conf ${LANG_PORTUGUESEBR} "Remover configurações"
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
LangString remove_firewall ${LANG_PORTUGUESEBR} "Remover regras do firewall do Windows"
LangString remove_firewall ${LANG_PORTUGUESEBR} "Remover regra do Firewall do Windows"
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
LangString remove_firewallinfo ${LANG_PORTUGUESEBR} "Removendo regras do firewall do Windows"
LangString remove_firewallinfo ${LANG_PORTUGUESEBR} "Removendo regra do Firewall do Windows"
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
LangString remove_cache ${LANG_PORTUGUESEBR} "Remover torrents e dados em cache"
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_ROMANIAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_RUSSIAN} "qBittorrent (обязательно)"
@ -21,7 +21,7 @@ LangString inst_firewallinfo ${LANG_RUSSIAN} "Добавление в списо
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
LangString inst_warning ${LANG_RUSSIAN} "qBittorrent запущен. Пожалуйста, закройте qBittorrent и перезапустите программу установки."
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
LangString inst_uninstall_question ${LANG_RUSSIAN} "Обнаружена предыдущая установка. Она будет деинсталлирована без удаления пользовательских настроек."
LangString inst_uninstall_question ${LANG_RUSSIAN} "Текущая версия будет деинсталлирована. Пользовательские настройки и торренты останутся нетронутыми."
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
LangString inst_unist ${LANG_RUSSIAN} "Деинсталлируется старая версия."
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_SERBIAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_SERBIANLATIN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_SIMPCHINESE} "qBittorrent (必要)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_SLOVAK} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_SLOVENIAN} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_SPANISH} "qBittorrent (necesario)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_SPANISHINTERNATIONAL} "qBittorrent (necesario)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_SWEDISH} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_THAI} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_TRADCHINESE} "qBittorrent (必要)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_TURKISH} "qBittorrent (zorunlu)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_UKRAINIAN} "qBittorrent (необхідний)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_UZBEK} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
;Installer strings
;Installer strings
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_WELSH} "qBittorrent (required)"

View file

@ -1,4 +1,4 @@
Var uninstallerPath
Var uninstallerPath
Section "-hidden"

View file

@ -1,4 +1,4 @@
Unicode true
Unicode true
ManifestDPIAware true
;Compress the header too
!packhdr "$%TEMP%\exehead.tmp" 'upx.exe -9 --best --ultra-brute "$%TEMP%\exehead.tmp"'
@ -28,7 +28,7 @@ XPStyle on
!define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path
; Program specific
!define PROG_VERSION "4.3.0"
!define PROG_VERSION "4.3.4"
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun
@ -51,7 +51,7 @@ XPStyle on
;Installer Version Information
VIAddVersionKey "ProductName" "qBittorrent"
VIAddVersionKey "CompanyName" "The qBittorrent project"
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2020 The qBittorrent project"
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2021 The qBittorrent project"
VIAddVersionKey "FileDescription" "qBittorrent - A Bittorrent Client"
VIAddVersionKey "FileVersion" "${PROG_VERSION}"

View file

@ -1,4 +1,4 @@
!include options.nsi
!include options.nsi
!include translations.nsi
!include installer.nsi
!include uninstaller.nsi

View file

@ -1,4 +1,4 @@
;Nsis translations
;Nsis translations
!insertmacro MUI_LANGUAGE "English"
!insertmacro MUI_LANGUAGE "Afrikaans"

View file

@ -1,4 +1,4 @@
Section "un.$(remove_files)" ;"un.Remove files"
Section "un.$(remove_files)" ;"un.Remove files"
SectionIn RO
; Remove files and uninstaller

View file

@ -1,6 +1,6 @@
# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*-
# serial 1 (pkg-config-0.24)
#
#
# Copyright © 2004 Scott James Remnant <scott@netsplit.com>.
#
# This program is free software; you can redistribute it and/or modify
@ -123,7 +123,7 @@ if test $pkg_failed = yes; then
_PKG_SHORT_ERRORS_SUPPORTED
if test $_pkg_short_errors_supported = yes; then
$1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1`
else
else
$1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1`
fi
# Put the nasty error message in config.log where it belongs

View file

@ -5,9 +5,9 @@
# Sets the QT_QMAKE variable to the path of Qt5 qmake if found.
# --------------------------------------
AC_DEFUN([FIND_QT5],
[PKG_CHECK_EXISTS([Qt5Core >= 5.9.0],
[PKG_CHECK_EXISTS([Qt5Core >= 5.12],
[PKG_CHECK_VAR(QT_QMAKE,
[Qt5Core >= 5.9.0],
[Qt5Core >= 5.12],
[host_bins])
])
@ -18,7 +18,7 @@ AS_IF([test -f "$QT_QMAKE/qmake"],
[QT_QMAKE=""])
])
AC_MSG_CHECKING([for Qt5 qmake >= 5.9.0])
AC_MSG_CHECKING([for Qt5 qmake >= 5.12])
AS_IF([test "x$QT_QMAKE" != "x"],
[AC_MSG_RESULT([$QT_QMAKE])],
[AC_MSG_RESULT([not found])]
@ -29,23 +29,23 @@ AS_IF([test "x$QT_QMAKE" != "x"],
# Sets the HAVE_QTDBUS variable to true or false.
# --------------------------------------
AC_DEFUN([FIND_QTDBUS],
[AC_MSG_CHECKING([for Qt5DBus >= 5.9.0])
PKG_CHECK_EXISTS([Qt5DBus >= 5.9.0],
[AC_MSG_CHECKING([for Qt5DBus >= 5.12])
PKG_CHECK_EXISTS([Qt5DBus >= 5.12],
[AC_MSG_RESULT([found])
HAVE_QTDBUS=[true]],
[AC_MSG_RESULT([not found])
HAVE_QTDBUS=[false]])
])
# DETECT_CPP14_PROGRAM()
# Detects if at least C++14 mode is enabled.
# DETECT_CPP17_PROGRAM()
# Detects if at least C++17 mode is enabled.
# --------------------------------------
AC_DEFUN([DETECT_CPP14_PROGRAM],
AC_DEFUN([DETECT_CPP17_PROGRAM],
[AC_LANG_PROGRAM([[
#ifndef __cplusplus
#error "This is not a C++ compiler"
#elif __cplusplus < 201402L
#error "This is not a C++14 compiler"
#elif __cplusplus < 201703L
#error "This is not a C++17 compiler"
#endif]],
[[]])
])

View file

@ -7,6 +7,8 @@ else {
include(conf.pri)
}
QMAKE_MACOSX_DEPLOYMENT_TARGET = 10.14
LIBS += -framework Carbon -framework IOKit -framework AppKit
QT_LANG_PATH = ../dist/qt-translations

View file

@ -4,19 +4,6 @@ SUBDIRS += src
include(version.pri)
# Make target to create release tarball. Use 'make tarball'
tarball.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/ &&
tarball.commands += git clone . ../$${PROJECT_NAME}-$${PROJECT_VERSION} &&
tarball.commands += rm -fR ../$${PROJECT_NAME}-$${PROJECT_VERSION}/.git &&
tarball.commands += rm -f ../$${PROJECT_NAME}-$${PROJECT_VERSION}/.gitignore &&
tarball.commands += cd .. &&
tarball.commands += tar czf $${PROJECT_NAME}-$${PROJECT_VERSION}.tar.gz $${PROJECT_NAME}-$${PROJECT_VERSION} &&
tarball.commands += tar cf $${PROJECT_NAME}-$${PROJECT_VERSION}.tar $${PROJECT_NAME}-$${PROJECT_VERSION} &&
tarball.commands += xz -f $${PROJECT_NAME}-$${PROJECT_VERSION}.tar &&
tarball.commands += rm -fR $${PROJECT_NAME}-$${PROJECT_VERSION}
QMAKE_EXTRA_TARGETS += tarball
# For Qt Creator beautifier
DISTFILES += \
uncrustify.cfg

View file

@ -1,12 +1,12 @@
if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
find_package(LibtorrentRasterbar QUIET ${requiredLibtorrentVersion} COMPONENTS torrent-rasterbar)
find_package(LibtorrentRasterbar QUIET ${minLibtorrentVersion} COMPONENTS torrent-rasterbar)
if (NOT LibtorrentRasterbar_FOUND)
include(FindPkgConfig)
pkg_check_modules(LIBTORRENT_RASTERBAR IMPORTED_TARGET GLOBAL "libtorrent-rasterbar>=${requiredLibtorrentVersion}")
pkg_check_modules(LIBTORRENT_RASTERBAR IMPORTED_TARGET GLOBAL "libtorrent-rasterbar>=${minLibtorrentVersion}")
if (NOT LIBTORRENT_RASTERBAR_FOUND)
message(
FATAL_ERROR
"Package LibtorrentRasterbar >= ${requiredLibtorrentVersion} not found"
"Package LibtorrentRasterbar >= ${minLibtorrentVersion} 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"
@ -18,9 +18,9 @@ if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
# force a fake package to show up in the feature summary
set_property(GLOBAL APPEND PROPERTY
PACKAGES_FOUND
"LibtorrentRasterbar via pkg-config (required version >= ${requiredLibtorrentVersion})"
"LibtorrentRasterbar via pkg-config (version >= ${minLibtorrentVersion})"
)
set_package_properties("LibtorrentRasterbar via pkg-config (required version >= ${requiredLibtorrentVersion})"
set_package_properties("LibtorrentRasterbar via pkg-config (version >= ${minLibtorrentVersion})"
PROPERTIES
TYPE REQUIRED
)
@ -28,16 +28,16 @@ if (UNIX AND (NOT APPLE) AND (NOT CYGWIN))
set_package_properties(LibtorrentRasterbar PROPERTIES TYPE REQUIRED)
endif()
else()
find_package(LibtorrentRasterbar ${requiredLibtorrentVersion} REQUIRED COMPONENTS torrent-rasterbar)
find_package(LibtorrentRasterbar ${minLibtorrentVersion} REQUIRED COMPONENTS torrent-rasterbar)
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 ${requiredBoostVersion} REQUIRED)
find_package(OpenSSL ${requiredOpenSSLVersion} REQUIRED)
find_package(ZLIB ${requiredZlibVersion} REQUIRED)
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Core Network Xml LinguistTools)
find_package(Boost ${minBoostVersion} REQUIRED)
find_package(OpenSSL ${minOpenSSLVersion} REQUIRED)
find_package(ZLIB ${minZlibVersion} REQUIRED)
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS Core Network Xml LinguistTools)
if (DBUS)
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS DBus)
find_package(Qt5 ${minQtVersion} 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"
@ -60,11 +60,11 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR})
add_subdirectory(base)
if (GUI)
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS Widgets Svg)
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS Widgets Svg)
if (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS MacExtras)
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS MacExtras)
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
find_package(Qt5 ${requiredQtVersion} REQUIRED COMPONENTS WinExtras)
find_package(Qt5 ${minQtVersion} REQUIRED COMPONENTS WinExtras)
endif()
add_subdirectory(gui)
endif()

View file

@ -4,22 +4,14 @@
# Based on https://gist.github.com/giraldeau/546ba5512a74dfe9d8ea0862d66db412
file(GLOB QBT_TS_FILES "${qBittorrent_SOURCE_DIR}/src/lang/*.ts")
set_source_files_properties(${QBT_TS_FILES} PROPERTIES OUTPUT_LOCATION "${qBittorrent_BINARY_DIR}/src/lang")
if (Qt5_VERSION VERSION_LESS 5.12)
qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES})
else()
qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES} OPTIONS -silent)
endif()
qt5_add_translation(QBT_QM_FILES ${QBT_TS_FILES} OPTIONS -silent)
configure_file("${qBittorrent_SOURCE_DIR}/src/lang/lang.qrc" "${qBittorrent_BINARY_DIR}/src/lang/lang.qrc" COPYONLY)
if (WEBUI)
file(GLOB QBT_WEBUI_TS_FILES "${qBittorrent_SOURCE_DIR}/src/webui/www/translations/*.ts")
set_source_files_properties(${QBT_WEBUI_TS_FILES}
PROPERTIES OUTPUT_LOCATION "${qBittorrent_BINARY_DIR}/src/webui/www/translations")
if (Qt5_VERSION VERSION_LESS 5.12)
qt5_add_translation(QBT_WEBUI_QM_FILES ${QBT_WEBUI_TS_FILES})
else()
qt5_add_translation(QBT_WEBUI_QM_FILES ${QBT_WEBUI_TS_FILES} OPTIONS -silent)
endif()
qt5_add_translation(QBT_WEBUI_QM_FILES ${QBT_WEBUI_TS_FILES} OPTIONS -silent)
configure_file("${qBittorrent_SOURCE_DIR}/src/webui/www/translations/webui_translations.qrc"
"${qBittorrent_BINARY_DIR}/src/webui/www/translations/webui_translations.qrc" COPYONLY)
endif()
@ -61,7 +53,6 @@ target_sources(qbt_app PRIVATE
target_link_libraries(qbt_app PRIVATE
qbt_base
qbt_version_definitions
)
set_target_properties(qbt_app PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}")

View file

@ -63,7 +63,7 @@
#include "base/bittorrent/infohash.h"
#include "base/bittorrent/session.h"
#include "base/bittorrent/torrenthandle.h"
#include "base/bittorrent/torrent.h"
#include "base/exceptions.h"
#include "base/iconprovider.h"
#include "base/logger.h"
@ -81,6 +81,7 @@
#include "base/utils/fs.h"
#include "base/utils/misc.h"
#include "base/utils/string.h"
#include "base/version.h"
#include "applicationinstancemanager.h"
#include "filelogger.h"
@ -181,12 +182,14 @@ Application::Application(int &argc, char **argv)
m_fileLogger = new FileLogger(fileLoggerPath(), isFileLoggerBackup(), fileLoggerMaxSize(), isFileLoggerDeleteOld(), fileLoggerAge(), static_cast<FileLogger::FileLogAgeType>(fileLoggerAgeType()));
Logger::instance()->addMessage(tr("qBittorrent %1 started", "qBittorrent v3.2.0alpha started").arg(QBT_VERSION));
if (portableModeEnabled) {
if (portableModeEnabled)
{
Logger::instance()->addMessage(tr("Running in portable mode. Auto detected profile folder at: %1").arg(profileDir));
if (m_commandLineArgs.relativeFastresumePaths)
Logger::instance()->addMessage(tr("Redundant command line flag detected: \"%1\". Portable mode implies relative fastresume.").arg("--relative-fastresume"), Log::WARNING); // to avoid translating the `--relative-fastresume` string
}
else {
else
{
Logger::instance()->addMessage(tr("Using config directory: %1").arg(Profile::instance()->location(SpecialFolder::Config)));
}
}
@ -212,7 +215,7 @@ const QBtCommandLineParameters &Application::commandLineArgs() const
bool Application::isFileLoggerEnabled() const
{
return settings()->loadValue(KEY_FILELOGGER_ENABLED, true).toBool();
return settings()->loadValue(KEY_FILELOGGER_ENABLED, true);
}
void Application::setFileLoggerEnabled(const bool value)
@ -226,8 +229,8 @@ void Application::setFileLoggerEnabled(const bool value)
QString Application::fileLoggerPath() const
{
return settings()->loadValue(KEY_FILELOGGER_PATH,
{specialFolderLocation(SpecialFolder::Data) + LOG_FOLDER}).toString();
return settings()->loadValue(KEY_FILELOGGER_PATH
, QString {specialFolderLocation(SpecialFolder::Data) + LOG_FOLDER});
}
void Application::setFileLoggerPath(const QString &path)
@ -239,7 +242,7 @@ void Application::setFileLoggerPath(const QString &path)
bool Application::isFileLoggerBackup() const
{
return settings()->loadValue(KEY_FILELOGGER_BACKUP, true).toBool();
return settings()->loadValue(KEY_FILELOGGER_BACKUP, true);
}
void Application::setFileLoggerBackup(const bool value)
@ -251,7 +254,7 @@ void Application::setFileLoggerBackup(const bool value)
bool Application::isFileLoggerDeleteOld() const
{
return settings()->loadValue(KEY_FILELOGGER_DELETEOLD, true).toBool();
return settings()->loadValue(KEY_FILELOGGER_DELETEOLD, true);
}
void Application::setFileLoggerDeleteOld(const bool value)
@ -263,7 +266,7 @@ void Application::setFileLoggerDeleteOld(const bool value)
int Application::fileLoggerMaxSize() const
{
const int val = settings()->loadValue(KEY_FILELOGGER_MAXSIZEBYTES, DEFAULT_FILELOG_SIZE).toInt();
const int val = settings()->loadValue(KEY_FILELOGGER_MAXSIZEBYTES, DEFAULT_FILELOG_SIZE);
return std::min(std::max(val, MIN_FILELOG_SIZE), MAX_FILELOG_SIZE);
}
@ -277,7 +280,7 @@ void Application::setFileLoggerMaxSize(const int bytes)
int Application::fileLoggerAge() const
{
const int val = settings()->loadValue(KEY_FILELOGGER_AGE, 1).toInt();
const int val = settings()->loadValue(KEY_FILELOGGER_AGE, 1);
return std::min(std::max(val, 1), 365);
}
@ -288,7 +291,7 @@ void Application::setFileLoggerAge(const int value)
int Application::fileLoggerAgeType() const
{
const int val = settings()->loadValue(KEY_FILELOGGER_AGETYPE, 1).toInt();
const int val = settings()->loadValue(KEY_FILELOGGER_AGETYPE, 1);
return ((val < 0) || (val > 2)) ? 1 : val;
}
@ -308,16 +311,8 @@ void Application::processMessage(const QString &message)
m_paramsQueue.append(params);
}
void Application::runExternalProgram(const BitTorrent::TorrentHandle *torrent) const
void Application::runExternalProgram(const BitTorrent::Torrent *torrent) const
{
QString program = Preferences::instance()->getAutoRunProgram().trimmed();
program.replace("%N", torrent->name());
program.replace("%L", torrent->category());
QStringList tags = torrent->tags().values();
std::sort(tags.begin(), tags.end(), Utils::String::naturalLessThan<Qt::CaseInsensitive>);
program.replace("%G", tags.join(','));
#if defined(Q_OS_WIN)
const auto chopPathSep = [](const QString &str) -> QString
{
@ -325,21 +320,74 @@ void Application::runExternalProgram(const BitTorrent::TorrentHandle *torrent) c
return str.mid(0, (str.length() -1));
return str;
};
program.replace("%F", chopPathSep(Utils::Fs::toNativePath(torrent->contentPath())));
program.replace("%R", chopPathSep(Utils::Fs::toNativePath(torrent->rootPath())));
program.replace("%D", chopPathSep(Utils::Fs::toNativePath(torrent->savePath())));
#else
program.replace("%F", Utils::Fs::toNativePath(torrent->contentPath()));
program.replace("%R", Utils::Fs::toNativePath(torrent->rootPath()));
program.replace("%D", Utils::Fs::toNativePath(torrent->savePath()));
#endif
program.replace("%C", QString::number(torrent->filesCount()));
program.replace("%Z", QString::number(torrent->totalSize()));
program.replace("%T", torrent->currentTracker());
program.replace("%I", torrent->hash());
Logger *logger = Logger::instance();
logger->addMessage(tr("Torrent: %1, running external program, command: %2").arg(torrent->name(), program));
QString program = Preferences::instance()->getAutoRunProgram().trimmed();
for (int i = (program.length() - 2); i >= 0; --i)
{
if (program[i] != QLatin1Char('%'))
continue;
const ushort specifier = program[i + 1].unicode();
switch (specifier)
{
case u'C':
program.replace(i, 2, QString::number(torrent->filesCount()));
break;
case u'D':
#if defined(Q_OS_WIN)
program.replace(i, 2, chopPathSep(Utils::Fs::toNativePath(torrent->savePath())));
#else
program.replace(i, 2, Utils::Fs::toNativePath(torrent->savePath()));
#endif
break;
case u'F':
#if defined(Q_OS_WIN)
program.replace(i, 2, chopPathSep(Utils::Fs::toNativePath(torrent->contentPath())));
#else
program.replace(i, 2, Utils::Fs::toNativePath(torrent->contentPath()));
#endif
break;
case u'G':
{
QStringList tags = torrent->tags().values();
std::sort(tags.begin(), tags.end(), Utils::String::naturalLessThan<Qt::CaseInsensitive>);
program.replace(i, 2, tags.join(','));
}
break;
case u'I':
program.replace(i, 2, torrent->id().toString());
break;
case u'L':
program.replace(i, 2, torrent->category());
break;
case u'N':
program.replace(i, 2, torrent->name());
break;
case u'R':
#if defined(Q_OS_WIN)
program.replace(i, 2, chopPathSep(Utils::Fs::toNativePath(torrent->rootPath())));
#else
program.replace(i, 2, Utils::Fs::toNativePath(torrent->rootPath()));
#endif
break;
case u'T':
program.replace(i, 2, torrent->currentTracker());
break;
case u'Z':
program.replace(i, 2, QString::number(torrent->totalSize()));
break;
default:
// do nothing
break;
}
// decrement `i` to avoid unwanted replacement, example pattern: "%%N"
--i;
}
LogMsg(tr("Torrent: %1, running external program, command: %2").arg(torrent->name(), program));
#if defined(Q_OS_WIN)
auto programWchar = std::make_unique<wchar_t[]>(program.length() + 1);
@ -355,17 +403,18 @@ void Application::runExternalProgram(const BitTorrent::TorrentHandle *torrent) c
for (int i = 1; i < argCount; ++i)
argList += QString::fromWCharArray(args[i]);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0))
QProcess proc;
proc.setProgram(QString::fromWCharArray(args[0]));
proc.setArguments(argList);
proc.setCreateProcessArgumentsModifier([](QProcess::CreateProcessArguments *args)
{
if (Preferences::instance()->isAutoRunConsoleEnabled()) {
if (Preferences::instance()->isAutoRunConsoleEnabled())
{
args->flags |= CREATE_NEW_CONSOLE;
args->flags &= ~(CREATE_NO_WINDOW | DETACHED_PROCESS);
}
else {
else
{
args->flags |= CREATE_NO_WINDOW;
args->flags &= ~(CREATE_NEW_CONSOLE | DETACHED_PROCESS);
}
@ -379,9 +428,6 @@ void Application::runExternalProgram(const BitTorrent::TorrentHandle *torrent) c
args->startupInfo->hStdError = nullptr;
});
proc.startDetached();
#else
QProcess::startDetached(QString::fromWCharArray(args[0]), argList);
#endif // QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)
#else // Q_OS_WIN
// Cannot give users shell environment by default, as doing so could
// enable command injection via torrent name and other arguments
@ -400,7 +446,7 @@ void Application::runExternalProgram(const BitTorrent::TorrentHandle *torrent) c
#endif
}
void Application::sendNotificationEmail(const BitTorrent::TorrentHandle *torrent)
void Application::sendNotificationEmail(const BitTorrent::Torrent *torrent)
{
// Prepare mail content
const QString content = tr("Torrent name: %1").arg(torrent->name()) + '\n'
@ -419,7 +465,7 @@ void Application::sendNotificationEmail(const BitTorrent::TorrentHandle *torrent
content);
}
void Application::torrentFinished(BitTorrent::TorrentHandle *const torrent)
void Application::torrentFinished(BitTorrent::Torrent *const torrent)
{
Preferences *const pref = Preferences::instance();
@ -428,7 +474,8 @@ void Application::torrentFinished(BitTorrent::TorrentHandle *const torrent)
runExternalProgram(torrent);
// Mail notification
if (pref->isMailNotificationEnabled()) {
if (pref->isMailNotificationEnabled())
{
Logger::instance()->addMessage(tr("Torrent: %1, sending mail notification").arg(torrent->name()));
sendNotificationEmail(torrent);
}
@ -455,16 +502,19 @@ void Application::allTorrentsFinished()
#ifndef DISABLE_GUI
// ask confirm
if ((action == ShutdownDialogAction::Exit) && (pref->dontConfirmAutoExit())) {
if ((action == ShutdownDialogAction::Exit) && (pref->dontConfirmAutoExit()))
{
// do nothing & skip confirm
}
else {
else
{
if (!ShutdownConfirmDialog::askForConfirmation(m_window, action)) return;
}
#endif // DISABLE_GUI
// Actually shut down
if (action != ShutdownDialogAction::Exit) {
if (action != ShutdownDialogAction::Exit)
{
qDebug("Preparing for auto-shutdown because all downloads are complete!");
// Disabling it for next time
pref->setShutdownWhenDownloadsComplete(false);
@ -490,51 +540,60 @@ bool Application::sendParams(const QStringList &params)
void Application::processParams(const QStringList &params)
{
#ifndef DISABLE_GUI
if (params.isEmpty()) {
if (params.isEmpty())
{
m_window->activate(); // show UI
return;
}
#endif
BitTorrent::AddTorrentParams torrentParams;
TriStateBool skipTorrentDialog;
std::optional<bool> skipTorrentDialog;
for (QString param : params) {
for (QString param : params)
{
param = param.trimmed();
// Process strings indicating options specified by the user.
if (param.startsWith(QLatin1String("@savePath="))) {
if (param.startsWith(QLatin1String("@savePath=")))
{
torrentParams.savePath = param.mid(10);
continue;
}
if (param.startsWith(QLatin1String("@addPaused="))) {
torrentParams.addPaused = param.midRef(11).toInt() ? TriStateBool::True : TriStateBool::False;
if (param.startsWith(QLatin1String("@addPaused=")))
{
torrentParams.addPaused = (param.midRef(11).toInt() != 0);
continue;
}
if (param == QLatin1String("@skipChecking")) {
if (param == QLatin1String("@skipChecking"))
{
torrentParams.skipChecking = true;
continue;
}
if (param.startsWith(QLatin1String("@category="))) {
if (param.startsWith(QLatin1String("@category=")))
{
torrentParams.category = param.mid(10);
continue;
}
if (param == QLatin1String("@sequential")) {
if (param == QLatin1String("@sequential"))
{
torrentParams.sequential = true;
continue;
}
if (param == QLatin1String("@firstLastPiecePriority")) {
if (param == QLatin1String("@firstLastPiecePriority"))
{
torrentParams.firstLastPiecePriority = true;
continue;
}
if (param.startsWith(QLatin1String("@skipDialog="))) {
skipTorrentDialog = param.midRef(12).toInt() ? TriStateBool::True : TriStateBool::False;
if (param.startsWith(QLatin1String("@skipDialog=")))
{
skipTorrentDialog = (param.midRef(12).toInt() != 0);
continue;
}
@ -544,9 +603,7 @@ void Application::processParams(const QStringList &params)
// be shown and skipTorrentDialog is undefined. The other is when
// skipTorrentDialog is false, meaning that the application setting
// should be overridden.
const bool showDialogForThisTorrent =
((AddNewTorrentDialog::isEnabled() && skipTorrentDialog == TriStateBool::Undefined)
|| skipTorrentDialog == TriStateBool::False);
const bool showDialogForThisTorrent = !skipTorrentDialog.value_or(!AddNewTorrentDialog::isEnabled());
if (showDialogForThisTorrent)
AddNewTorrentDialog::show(param, torrentParams, m_window);
else
@ -561,7 +618,8 @@ int Application::exec(const QStringList &params)
Net::DownloadManager::initInstance();
IconProvider::initInstance();
try {
try
{
BitTorrent::Session::initInstance();
connect(BitTorrent::Session::instance(), &BitTorrent::Session::torrentFinished, this, &Application::torrentFinished);
connect(BitTorrent::Session::instance(), &BitTorrent::Session::allTorrentsFinished, this, &Application::allTorrentsFinished, Qt::QueuedConnection);
@ -581,7 +639,8 @@ int Application::exec(const QStringList &params)
new RSS::Session; // create RSS::Session singleton
new RSS::AutoDownloader; // create RSS::AutoDownloader singleton
}
catch (const RuntimeError &err) {
catch (const RuntimeError &err)
{
#ifdef DISABLE_GUI
fprintf(stderr, "%s", err.what());
#else
@ -605,7 +664,8 @@ int Application::exec(const QStringList &params)
.arg(QString("http://localhost:") + QString::number(pref->getWebUiPort())) + '\n';
printf("%s", qUtf8Printable(mesg));
if (pref->getWebUIPassword() == "ARQ77eY1NUZaQsuDHbIMCA==:0WMRkYTUWVT9wVvdDtHAjU9b3b7uB8NR1Gur2hmQCvCDpm39Q+PsJRJPaCU51dEiz+dTzh8qbPsL8WkFljQYFQ==") {
if (pref->getWebUIPassword() == "ARQ77eY1NUZaQsuDHbIMCA==:0WMRkYTUWVT9wVvdDtHAjU9b3b7uB8NR1Gur2hmQCvCDpm39Q+PsJRJPaCU51dEiz+dTzh8qbPsL8WkFljQYFQ==")
{
const QString warning = tr("The Web UI administrator username is: %1").arg(pref->getWebUiUsername()) + '\n'
+ tr("The Web UI administrator password is still the default one: %1").arg("adminadmin") + '\n'
+ tr("This is a security risk, please consider changing your password from program preferences.") + '\n';
@ -623,7 +683,8 @@ int Application::exec(const QStringList &params)
BitTorrent::Session::instance()->startUpTorrents();
m_paramsQueue = params + m_paramsQueue;
if (!m_paramsQueue.isEmpty()) {
if (!m_paramsQueue.isEmpty())
{
processParams(m_paramsQueue);
m_paramsQueue.clear();
}
@ -639,7 +700,8 @@ bool Application::isRunning()
#ifdef Q_OS_MACOS
bool Application::event(QEvent *ev)
{
if (ev->type() == QEvent::FileOpen) {
if (ev->type() == QEvent::FileOpen)
{
QString path = static_cast<QFileOpenEvent *>(ev)->file();
if (path.isEmpty())
// Get the url instead
@ -651,7 +713,8 @@ bool Application::event(QEvent *ev)
m_paramsQueue.append(path);
return true;
}
else {
else
{
return BaseApplication::event(ev);
}
}
@ -679,11 +742,13 @@ void Application::initializeTranslation()
installTranslator(&m_translator);
#ifndef DISABLE_GUI
if (localeStr.startsWith("ar") || localeStr.startsWith("he")) {
if (localeStr.startsWith("ar") || localeStr.startsWith("he"))
{
qDebug("Right to Left mode");
setLayoutDirection(Qt::RightToLeft);
}
else {
else
{
setLayoutDirection(Qt::LeftToRight);
}
#endif
@ -725,7 +790,8 @@ void Application::cleanup()
return;
#ifndef DISABLE_GUI
if (m_window) {
if (m_window)
{
// Hide the window and don't leave it on screen as
// unresponsive. Also for Windows take the WinId
// after it's hidden, because hide() may cause a
@ -769,7 +835,8 @@ void Application::cleanup()
Utils::Fs::removeDirRecursive(Utils::Fs::tempPath());
#ifndef DISABLE_GUI
if (m_window) {
if (m_window)
{
#ifdef Q_OS_WIN
::ShutdownBlockReasonDestroy(reinterpret_cast<HWND>(m_window->effectiveWinId()));
#endif // Q_OS_WIN
@ -780,7 +847,8 @@ void Application::cleanup()
Profile::freeInstance();
if (m_shutdownAct != ShutdownDialogAction::Exit) {
if (m_shutdownAct != ShutdownDialogAction::Exit)
{
qDebug() << "Sending computer shutdown/suspend/hibernate signal...";
Utils::Misc::shutdownComputer(m_shutdownAct);
}

View file

@ -59,7 +59,7 @@ class FileLogger;
namespace BitTorrent
{
class TorrentHandle;
class Torrent;
}
namespace RSS
@ -112,7 +112,7 @@ protected:
private slots:
void processMessage(const QString &message);
void torrentFinished(BitTorrent::TorrentHandle *const torrent);
void torrentFinished(BitTorrent::Torrent *const torrent);
void allTorrentsFinished();
void cleanup();
#if (!defined(DISABLE_GUI) && defined(Q_OS_WIN))
@ -142,6 +142,6 @@ private:
void initializeTranslation();
void processParams(const QStringList &params);
void runExternalProgram(const BitTorrent::TorrentHandle *torrent) const;
void sendNotificationEmail(const BitTorrent::TorrentHandle *torrent);
void runExternalProgram(const BitTorrent::Torrent *torrent) const;
void sendNotificationEmail(const BitTorrent::Torrent *torrent);
};

View file

@ -46,16 +46,20 @@ ApplicationInstanceManager::ApplicationInstanceManager(const QString &appId, QOb
#ifdef Q_OS_WIN
auto sharedMem = new QSharedMemory {appId + QLatin1String {"-shared-memory-key"}, this};
if (m_isFirstInstance) {
if (m_isFirstInstance)
{
// First instance creates shared memory and store PID
if (sharedMem->create(sizeof(DWORD)) && sharedMem->lock()) {
if (sharedMem->create(sizeof(DWORD)) && sharedMem->lock())
{
*(static_cast<DWORD *>(sharedMem->data())) = ::GetCurrentProcessId();
sharedMem->unlock();
}
}
else {
else
{
// Later instances attach to shared memory and retrieve PID
if (sharedMem->attach() && sharedMem->lock()) {
if (sharedMem->attach() && sharedMem->lock())
{
::AllowSetForegroundWindow(*(static_cast<DWORD *>(sharedMem->data())));
sharedMem->unlock();
}

View file

@ -217,7 +217,8 @@ namespace
bool ok;
int res = val.toInt(&ok);
if (!ok) {
if (!ok)
{
qDebug() << QObject::tr("Expected integer number in environment variable '%1', but got '%2'")
.arg(envVarName(), val);
return defaultValue;
@ -253,21 +254,25 @@ namespace
return padUsageText(fullParameter() + QLatin1String("=<true|false>"));
}
TriStateBool value(const QString &arg) const
std::optional<bool> value(const QString &arg) const
{
QStringList parts = arg.split(QLatin1Char('='));
if (parts.size() == 1) {
return TriStateBool(m_defaultValue);
if (parts.size() == 1)
{
return m_defaultValue;
}
if (parts.size() == 2) {
if (parts.size() == 2)
{
QString val = parts[1];
if ((val.toUpper() == QLatin1String("TRUE")) || (val == QLatin1String("1"))) {
return TriStateBool::True;
if ((val.toUpper() == QLatin1String("TRUE")) || (val == QLatin1String("1")))
{
return true;
}
if ((val.toUpper() == QLatin1String("FALSE")) || (val == QLatin1String("0"))) {
return TriStateBool::False;
if ((val.toUpper() == QLatin1String("FALSE")) || (val == QLatin1String("0")))
{
return false;
}
}
@ -277,26 +282,30 @@ namespace
.arg(fullParameter(), QLatin1String("<true|false>")));
}
TriStateBool value(const QProcessEnvironment &env) const
std::optional<bool> value(const QProcessEnvironment &env) const
{
const QString val = env.value(envVarName(), "-1");
if (val.isEmpty()) {
return TriStateBool(m_defaultValue);
if (val.isEmpty())
{
return m_defaultValue;
}
if (val == QLatin1String("-1")) {
return TriStateBool::Undefined;
if (val == QLatin1String("-1"))
{
return std::nullopt;
}
if ((val.toUpper() == QLatin1String("TRUE")) || (val == QLatin1String("1"))) {
return TriStateBool::True;
if ((val.toUpper() == QLatin1String("TRUE")) || (val == QLatin1String("1")))
{
return true;
}
if ((val.toUpper() == QLatin1String("FALSE")) || (val == QLatin1String("0"))) {
return TriStateBool::False;
if ((val.toUpper() == QLatin1String("FALSE")) || (val == QLatin1String("0")))
{
return false;
}
qDebug() << QObject::tr("Expected %1 in environment variable '%2', but got '%3'")
.arg(QLatin1String("true|false"), envVarName(), val);
return TriStateBool::Undefined;
return std::nullopt;
}
bool m_defaultValue;
@ -365,12 +374,8 @@ QStringList QBtCommandLineParameters::paramList() const
if (!savePath.isEmpty())
result.append(QLatin1String("@savePath=") + savePath);
if (addPaused == TriStateBool::True) {
result.append(QLatin1String("@addPaused=1"));
}
else if (addPaused == TriStateBool::False) {
result.append(QLatin1String("@addPaused=0"));
}
if (addPaused.has_value())
result.append(*addPaused ? QLatin1String {"@addPaused=1"} : QLatin1String {"@addPaused=0"});
if (skipChecking)
result.append(QLatin1String("@skipChecking"));
@ -384,12 +389,8 @@ QStringList QBtCommandLineParameters::paramList() const
if (firstLastPiecePriority)
result.append(QLatin1String("@firstLastPiecePriority"));
if (skipDialog == TriStateBool::True) {
result.append(QLatin1String("@skipDialog=1"));
}
else if (skipDialog == TriStateBool::False) {
result.append(QLatin1String("@skipDialog=0"));
}
if (skipDialog.has_value())
result.append(*skipDialog ? QLatin1String {"@skipDialog=1"} : QLatin1String {"@skipDialog=0"});
result += torrents;
return result;
@ -399,72 +400,91 @@ QBtCommandLineParameters parseCommandLine(const QStringList &args)
{
QBtCommandLineParameters result {QProcessEnvironment::systemEnvironment()};
for (int i = 1; i < args.count(); ++i) {
for (int i = 1; i < args.count(); ++i)
{
const QString &arg = args[i];
if ((arg.startsWith("--") && !arg.endsWith(".torrent"))
|| (arg.startsWith('-') && (arg.size() == 2))) {
|| (arg.startsWith('-') && (arg.size() == 2)))
{
// Parse known parameters
if (arg == SHOW_HELP_OPTION) {
if (arg == SHOW_HELP_OPTION)
{
result.showHelp = true;
}
#if !defined(Q_OS_WIN) || defined(DISABLE_GUI)
else if (arg == SHOW_VERSION_OPTION) {
else if (arg == SHOW_VERSION_OPTION)
{
result.showVersion = true;
}
#endif
else if (arg == WEBUI_PORT_OPTION) {
else if (arg == WEBUI_PORT_OPTION)
{
result.webUiPort = WEBUI_PORT_OPTION.value(arg);
if ((result.webUiPort < 1) || (result.webUiPort > 65535))
throw CommandLineParameterError(QObject::tr("%1 must specify a valid port (1 to 65535).")
.arg(QLatin1String("--webui-port")));
}
#ifndef DISABLE_GUI
else if (arg == NO_SPLASH_OPTION) {
else if (arg == NO_SPLASH_OPTION)
{
result.noSplash = true;
}
#elif !defined(Q_OS_WIN)
else if (arg == DAEMON_OPTION) {
else if (arg == DAEMON_OPTION)
{
result.shouldDaemonize = true;
}
#endif
else if (arg == PROFILE_OPTION) {
else if (arg == PROFILE_OPTION)
{
result.profileDir = PROFILE_OPTION.value(arg);
}
else if (arg == RELATIVE_FASTRESUME) {
else if (arg == RELATIVE_FASTRESUME)
{
result.relativeFastresumePaths = true;
}
else if (arg == CONFIGURATION_OPTION) {
else if (arg == CONFIGURATION_OPTION)
{
result.configurationName = CONFIGURATION_OPTION.value(arg);
}
else if (arg == SAVE_PATH_OPTION) {
else if (arg == SAVE_PATH_OPTION)
{
result.savePath = SAVE_PATH_OPTION.value(arg);
}
else if (arg == PAUSED_OPTION) {
else if (arg == PAUSED_OPTION)
{
result.addPaused = PAUSED_OPTION.value(arg);
}
else if (arg == SKIP_HASH_CHECK_OPTION) {
else if (arg == SKIP_HASH_CHECK_OPTION)
{
result.skipChecking = true;
}
else if (arg == CATEGORY_OPTION) {
else if (arg == CATEGORY_OPTION)
{
result.category = CATEGORY_OPTION.value(arg);
}
else if (arg == SEQUENTIAL_OPTION) {
else if (arg == SEQUENTIAL_OPTION)
{
result.sequential = true;
}
else if (arg == FIRST_AND_LAST_OPTION) {
else if (arg == FIRST_AND_LAST_OPTION)
{
result.firstLastPiecePriority = true;
}
else if (arg == SKIP_DIALOG_OPTION) {
else if (arg == SKIP_DIALOG_OPTION)
{
result.skipDialog = SKIP_DIALOG_OPTION.value(arg);
}
else {
else
{
// Unknown argument
result.unknownParameter = arg;
break;
}
}
else {
else
{
QFileInfo torrentPath;
torrentPath.setFile(arg);
@ -495,11 +515,14 @@ QString wrapText(const QString &text, int initialIndentation = USAGE_TEXT_COLUMN
QStringList lines = {words.first()};
int currentLineMaxLength = wrapAtColumn - initialIndentation;
for (const QString &word : asConst(words.mid(1))) {
if (lines.last().length() + word.length() + 1 < currentLineMaxLength) {
for (const QString &word : asConst(words.mid(1)))
{
if (lines.last().length() + word.length() + 1 < currentLineMaxLength)
{
lines.last().append(' ' + word);
}
else {
else
{
lines.append(QString(initialIndentation, ' ') + word);
currentLineMaxLength = wrapAtColumn;
}

View file

@ -28,16 +28,14 @@
* exception statement from your version.
*/
#ifndef APP_OPTIONS_H
#define APP_OPTIONS_H
#pragma once
#include <optional>
#include <stdexcept>
#include <QString>
#include <QStringList>
#include "base/tristatebool.h"
class QProcessEnvironment;
struct QBtCommandLineParameters
@ -56,8 +54,8 @@ struct QBtCommandLineParameters
bool shouldDaemonize;
#endif
int webUiPort;
TriStateBool addPaused;
TriStateBool skipDialog;
std::optional<bool> addPaused;
std::optional<bool> skipDialog;
QStringList torrents;
QString profileDir;
QString configurationName;
@ -81,5 +79,3 @@ private:
QBtCommandLineParameters parseCommandLine(const QStringList &args);
void displayUsage(const QString &prgName);
#endif // APP_OPTIONS_H

View file

@ -33,6 +33,7 @@
#include <QDateTime>
#include <QDir>
#include <QTextStream>
#include <QVector>
#include "base/global.h"
#include "base/logger.h"
@ -73,7 +74,8 @@ void FileLogger::changePath(const QString &newPath)
dir.mkpath(newPath);
const QString tmpPath = dir.absoluteFilePath("qbittorrent.log");
if (tmpPath != m_path) {
if (tmpPath != m_path)
{
m_path = tmpPath;
closeLogFile();
@ -89,9 +91,11 @@ void FileLogger::deleteOld(const int age, const FileLogAgeType ageType)
const QFileInfoList fileList = dir.entryInfoList(QStringList("qbittorrent.log.bak*")
, (QDir::Files | QDir::Writable), (QDir::Time | QDir::Reversed));
for (const QFileInfo &file : fileList) {
for (const QFileInfo &file : fileList)
{
QDateTime modificationDate = file.lastModified();
switch (ageType) {
switch (ageType)
{
case DAYS:
modificationDate = modificationDate.addDays(age);
break;
@ -124,7 +128,8 @@ void FileLogger::addLogMessage(const Log::Msg &msg)
QTextStream stream(&m_logFile);
stream.setCodec("UTF-8");
switch (msg.type) {
switch (msg.type)
{
case Log::INFO:
stream << "(I) ";
break;
@ -140,12 +145,14 @@ void FileLogger::addLogMessage(const Log::Msg &msg)
stream << QDateTime::fromMSecsSinceEpoch(msg.timestamp).toString(Qt::ISODate) << " - " << msg.message << '\n';
if (m_backup && (m_logFile.size() >= m_maxSize)) {
if (m_backup && (m_logFile.size() >= m_maxSize))
{
closeLogFile();
int counter = 0;
QString backupLogFilename = m_path + ".bak";
while (QFile::exists(backupLogFilename)) {
while (QFile::exists(backupLogFilename))
{
++counter;
backupLogFilename = m_path + ".bak" + QString::number(counter);
}
@ -153,7 +160,8 @@ void FileLogger::addLogMessage(const Log::Msg &msg)
QFile::rename(m_path, backupLogFilename);
openLogFile();
}
else {
else
{
if (!m_flusher.isActive())
m_flusher.start();
}
@ -168,7 +176,8 @@ void FileLogger::flushLog()
void FileLogger::openLogFile()
{
if (!m_logFile.open(QIODevice::WriteOnly | QIODevice::Append | QIODevice::Text)
|| !m_logFile.setPermissions(QFile::ReadOwner | QFile::WriteOwner)) {
|| !m_logFile.setPermissions(QFile::ReadOwner | QFile::WriteOwner))
{
m_logFile.close();
LogMsg(tr("An error occurred while trying to open the log file. Logging to file is disabled."), Log::CRITICAL);
}

View file

@ -26,8 +26,7 @@
* exception statement from your version.
*/
#ifndef FILELOGGER_H
#define FILELOGGER_H
#pragma once
#include <QFile>
#include <QObject>
@ -73,5 +72,3 @@ private:
QFile m_logFile;
QTimer m_flusher;
};
#endif // FILELOGGER_H

View file

@ -78,6 +78,7 @@ Q_IMPORT_PLUGIN(QICOPlugin)
#include "base/preferences.h"
#include "base/profile.h"
#include "base/version.h"
#include "application.h"
#include "cmdoptions.h"
#include "upgrade.h"
@ -92,7 +93,8 @@ void sigNormalHandler(int signum);
void sigAbnormalHandler(int signum);
#endif
// sys_signame[] is only defined in BSD
const char *const sysSigName[] = {
const char *const sysSigName[] =
{
#if defined(Q_OS_WIN)
"", "", "SIGINT", "", "SIGILL", "", "SIGABRT_COMPAT", "", "SIGFPE", "",
"", "SIGSEGV", "", "", "", "SIGTERM", "", "", "", "",
@ -141,19 +143,23 @@ int main(int argc, char *argv[])
Application::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
#endif
try {
try
{
// Create Application
auto app = std::make_unique<Application>(argc, argv);
const QBtCommandLineParameters params = app->commandLineArgs();
if (!params.unknownParameter.isEmpty()) {
if (!params.unknownParameter.isEmpty())
{
throw CommandLineParameterError(QObject::tr("%1 is an unknown command line parameter.",
"--random-parameter is an unknown command line parameter.")
.arg(params.unknownParameter));
}
#if !defined(Q_OS_WIN) || defined(DISABLE_GUI)
if (params.showVersion) {
if (isOneArg) {
if (params.showVersion)
{
if (isOneArg)
{
displayVersion();
return EXIT_SUCCESS;
}
@ -161,8 +167,10 @@ int main(int argc, char *argv[])
.arg(QLatin1String("-v (or --version)")));
}
#endif
if (params.showHelp) {
if (isOneArg) {
if (params.showHelp)
{
if (isOneArg)
{
displayUsage(argv[0]);
return EXIT_SUCCESS;
}
@ -175,7 +183,8 @@ int main(int argc, char *argv[])
fprintf(stderr, "Couldn't set environment variable...\n");
const bool firstTimeUser = !Preferences::instance()->getAcceptedLegal();
if (firstTimeUser) {
if (firstTimeUser)
{
#ifndef DISABLE_GUI
if (!userAgreesWithLegalNotice())
return EXIT_SUCCESS;
@ -195,9 +204,11 @@ int main(int argc, char *argv[])
}
// Check if qBittorrent is already running for this user
if (app->isRunning()) {
if (app->isRunning())
{
#if defined(DISABLE_GUI) && !defined(Q_OS_WIN)
if (params.shouldDaemonize) {
if (params.shouldDaemonize)
{
throw CommandLineParameterError(QObject::tr("You cannot use %1: qBittorrent is already running for this user.")
.arg(QLatin1String("-d (or --daemon)")));
}
@ -224,7 +235,7 @@ int main(int argc, char *argv[])
// 3. https://bugreports.qt.io/browse/QTBUG-46015
qputenv("QT_BEARER_POLL_TIMEOUT", QByteArray::number(-1));
#if (QT_VERSION >= QT_VERSION_CHECK(5, 10, 0)) && !defined(DISABLE_GUI)
#if !defined(DISABLE_GUI)
// this is the default in Qt6
app->setAttribute(Qt::AA_DisableWindowContextHelpButton);
#endif
@ -240,9 +251,13 @@ int main(int argc, char *argv[])
// On OS X the standard is to not show icons in the menus
app->setAttribute(Qt::AA_DontShowIconsInMenus);
#else
if (!Preferences::instance()->iconsInMenusEnabled())
app->setAttribute(Qt::AA_DontShowIconsInMenus);
#endif
if (!firstTimeUser) {
if (!firstTimeUser)
{
handleChangedDefaults(DefaultPreferencesMode::Legacy);
#ifndef DISABLE_GUI
@ -256,21 +271,26 @@ int main(int argc, char *argv[])
&& isatty(fileno(stdout)))) return EXIT_FAILURE;
#endif
}
else {
else
{
handleChangedDefaults(DefaultPreferencesMode::Current);
}
#if defined(DISABLE_GUI) && !defined(Q_OS_WIN)
if (params.shouldDaemonize) {
if (params.shouldDaemonize)
{
app.reset(); // Destroy current application
if (daemon(1, 0) == 0) {
if (daemon(1, 0) == 0)
{
app = std::make_unique<Application>(argc, argv);
if (app->isRunning()) {
if (app->isRunning())
{
// Another instance had time to start.
return EXIT_FAILURE;
}
}
else {
else
{
qCritical("Something went wrong while daemonizing, exiting...");
return EXIT_FAILURE;
}
@ -289,7 +309,8 @@ int main(int argc, char *argv[])
return app->exec(params.paramList());
}
catch (const CommandLineParameterError &er) {
catch (const CommandLineParameterError &er)
{
displayBadArgMessage(er.messageForUser());
return EXIT_FAILURE;
}
@ -300,10 +321,12 @@ void reportToUser(const char *str)
{
const size_t strLen = strlen(str);
#ifndef Q_OS_WIN
if (write(STDERR_FILENO, str, strLen) < static_cast<ssize_t>(strLen)) {
if (write(STDERR_FILENO, str, strLen) < static_cast<ssize_t>(strLen))
{
const auto dummy = write(STDOUT_FILENO, str, strLen);
#else
if (_write(STDERR_FILENO, str, strLen) < static_cast<ssize_t>(strLen)) {
if (_write(STDERR_FILENO, str, strLen) < static_cast<ssize_t>(strLen))
{
const auto dummy = _write(STDOUT_FILENO, str, strLen);
#endif
Q_UNUSED(dummy);
@ -358,11 +381,7 @@ void showSplashScreen()
const QString version = QBT_VERSION;
painter.setPen(QPen(Qt::white));
painter.setFont(QFont("Arial", 22, QFont::Black));
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
painter.drawText(224 - painter.fontMetrics().horizontalAdvance(version), 270, version);
#else
painter.drawText(224 - painter.fontMetrics().width(version), 270, version);
#endif
QSplashScreen *splash = new QSplashScreen(splashImg);
splash->show();
QTimer::singleShot(1500, splash, &QObject::deleteLater);
@ -405,7 +424,8 @@ bool userAgreesWithLegalNotice()
printf("%s", qUtf8Printable(eula));
const char ret = getchar(); // Read pressed key
if ((ret == 'y') || (ret == 'Y')) {
if ((ret == 'y') || (ret == 'Y'))
{
// Save the answer
pref->setAcceptedLegal(true);
return true;
@ -419,7 +439,8 @@ bool userAgreesWithLegalNotice()
msgBox.show(); // Need to be shown or to moveToCenter does not work
msgBox.move(Utils::Gui::screenCenter(&msgBox));
msgBox.exec();
if (msgBox.clickedButton() == agreeButton) {
if (msgBox.clickedButton() == agreeButton)
{
// Save the answer
pref->setAcceptedLegal(true);
return true;

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