mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-27 02:38:04 -06:00
Compare commits
80 Commits
release-4.
...
release-4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c77466abb0 | ||
|
|
a9d8cf2ea9 | ||
|
|
22420339a5 | ||
|
|
9076ff8876 | ||
|
|
af20233dfc | ||
|
|
dfd735f2dc | ||
|
|
2a04a4d077 | ||
|
|
67d340ad63 | ||
|
|
2b69cabc2c | ||
|
|
062e35e6b0 | ||
|
|
3088b38d7e | ||
|
|
f5b5570a3b | ||
|
|
80bb19701c | ||
|
|
8376707379 | ||
|
|
483ccb39bf | ||
|
|
41e44d22ea | ||
|
|
766fce82b1 | ||
|
|
938adca47d | ||
|
|
5bb02cbd90 | ||
|
|
66777f3304 | ||
|
|
508896c4f2 | ||
|
|
c1d64cc3ea | ||
|
|
57085ca126 | ||
|
|
7b4b7c2b81 | ||
|
|
6a3a5fac83 | ||
|
|
35e18498d9 | ||
|
|
f99a98306d | ||
|
|
b0cfe53329 | ||
|
|
060466e326 | ||
|
|
392949b313 | ||
|
|
b17307f283 | ||
|
|
e739d38061 | ||
|
|
20f4d0c4e3 | ||
|
|
4f6038c350 | ||
|
|
f08556be30 | ||
|
|
543745b3f2 | ||
|
|
cb0c09769f | ||
|
|
e8f5a3b44e | ||
|
|
5a660fc8a9 | ||
|
|
488464731d | ||
|
|
fb68604ee7 | ||
|
|
4ef9a6444a | ||
|
|
66dfe8545d | ||
|
|
fff7b1dcbd | ||
|
|
b5b1f51cee | ||
|
|
33875aa70a | ||
|
|
9d7dad4a61 | ||
|
|
213b6e316c | ||
|
|
ffc3d8d345 | ||
|
|
7ec80263e1 | ||
|
|
66e533f505 | ||
|
|
045b4f0a06 | ||
|
|
80c637bf99 | ||
|
|
48d5e3326b | ||
|
|
80791e328d | ||
|
|
08a771468d | ||
|
|
c3fc96dfe6 | ||
|
|
715a4f3eb6 | ||
|
|
8655e48336 | ||
|
|
3c139ca333 | ||
|
|
f4deb1050f | ||
|
|
889ed5bce9 | ||
|
|
6680fdda18 | ||
|
|
88bd4f270f | ||
|
|
86a5ad3241 | ||
|
|
1c654d8f47 | ||
|
|
c90863f217 | ||
|
|
deec2ae1b1 | ||
|
|
f37fff31ae | ||
|
|
dffb93a6aa | ||
|
|
3b948b0130 | ||
|
|
b3d2ba7d07 | ||
|
|
03d3552ee0 | ||
|
|
379b0dbe40 | ||
|
|
f213f81727 | ||
|
|
1f2a6455b6 | ||
|
|
fc8c74989b | ||
|
|
b01a48879a | ||
|
|
e780b3a9b7 | ||
|
|
e6d85a468b |
@@ -50,7 +50,7 @@ before_build:
|
||||
|
||||
build_script:
|
||||
- cd "%REPO_DIR%"
|
||||
# lupdate chokes when it parses headers from system inludes, especially Boost
|
||||
# lupdate chokes when it parses headers from system includes, especially Boost
|
||||
# it also chokes with the sources from src/app/qtlocalpeer (formerly qtsingleapplication)
|
||||
# Workaround: temporarily rename them to run lupdate with the .pro file
|
||||
- RENAME conf.pri conf.pri.temp
|
||||
|
||||
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -5,3 +5,5 @@ core.eol=lf
|
||||
*.png binary
|
||||
*.qm binary
|
||||
*.zip binary
|
||||
|
||||
test/testdata/crlf.txt text eol=crlf
|
||||
|
||||
20
.github/workflows/ci_macos.yaml
vendored
20
.github/workflows/ci_macos.yaml
vendored
@@ -33,14 +33,18 @@ jobs:
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
export \
|
||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1 \
|
||||
HOMEBREW_NO_INSTALL_CLEANUP=1
|
||||
brew update > /dev/null
|
||||
brew install \
|
||||
cmake ninja \
|
||||
openssl@1.1 zlib
|
||||
uses: Wandalen/wretry.action@v1
|
||||
env:
|
||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 1
|
||||
HOMEBREW_NO_INSTALL_CLEANUP: 1
|
||||
with:
|
||||
attempt_delay: 20000
|
||||
attempt_limit: 6
|
||||
command: |
|
||||
brew update > /dev/null
|
||||
brew install \
|
||||
cmake ninja \
|
||||
openssl@1.1 zlib
|
||||
|
||||
- name: Setup ccache
|
||||
uses: Chocobo1/setup-ccache-action@v1
|
||||
|
||||
2
.github/workflows/ci_ubuntu.yaml
vendored
2
.github/workflows/ci_ubuntu.yaml
vendored
@@ -117,6 +117,8 @@ jobs:
|
||||
- name: Run CodeQL analysis
|
||||
uses: github/codeql-action/analyze@v2
|
||||
if: startsWith(matrix.libt_version, 2) && (matrix.qbt_gui == 'GUI=ON') && startsWith(matrix.qt_version, 6)
|
||||
with:
|
||||
category: ${{ github.base_ref || github.ref_name }}
|
||||
|
||||
- name: Prepare build artifacts
|
||||
run: |
|
||||
|
||||
2
.github/workflows/coverity-scan.yaml
vendored
2
.github/workflows/coverity-scan.yaml
vendored
@@ -69,7 +69,7 @@ jobs:
|
||||
|
||||
- name: Submit the result to Coverity Scan
|
||||
run: |
|
||||
tar caf qbittorrent.xz cov-int
|
||||
tar -caf qbittorrent.xz cov-int
|
||||
curl \
|
||||
--form token="${{ secrets.COVERITY_SCAN_TOKEN }}" \
|
||||
--form email=sledgehammer999@qbittorrent.org \
|
||||
|
||||
18
.github/workflows/helper/pre-commit/.typos.toml
vendored
Normal file
18
.github/workflows/helper/pre-commit/.typos.toml
vendored
Normal file
@@ -0,0 +1,18 @@
|
||||
# https://github.com/crate-ci/typos/blob/master/docs/reference.md
|
||||
# https://github.com/crate-ci/typos/blob/master/docs/design.md#identifiers-and-words
|
||||
|
||||
# try adding to `identifiers` list first, if doesn't work then `words` list
|
||||
|
||||
[default.extend-identifiers]
|
||||
additionals = "additionals"
|
||||
caf = "caf"
|
||||
curren = "curren"
|
||||
FO = "FO"
|
||||
ket = "ket"
|
||||
Q_INVOKABLE = "Q_INVOKABLE"
|
||||
switchs = "switchs"
|
||||
ths = "ths"
|
||||
|
||||
[default.extend-words]
|
||||
BA = "BA"
|
||||
helo = "helo"
|
||||
@@ -33,19 +33,19 @@ repos:
|
||||
args: ["--fix=lf"]
|
||||
exclude: |
|
||||
(?x)^(
|
||||
compile_commands.json |
|
||||
src/webui/www/private/css/lib/.* |
|
||||
src/webui/www/private/scripts/lib/.*
|
||||
src/webui/www/private/scripts/lib/.* |
|
||||
test/testdata/crlf.txt
|
||||
)$
|
||||
|
||||
- id: end-of-file-fixer
|
||||
name: Check trailing newlines
|
||||
exclude: |
|
||||
(?x)^(
|
||||
compile_commands.json |
|
||||
configure |
|
||||
src/webui/www/private/css/lib/.* |
|
||||
src/webui/www/private/scripts/lib/.*
|
||||
src/webui/www/private/scripts/lib/.* |
|
||||
test/testdata/crlf.txt
|
||||
)$
|
||||
exclude_types:
|
||||
- svg
|
||||
@@ -60,3 +60,49 @@ repos:
|
||||
)$
|
||||
exclude_types:
|
||||
- ts
|
||||
|
||||
- repo: https://github.com/codespell-project/codespell
|
||||
rev: v2.2.5
|
||||
hooks:
|
||||
- id: codespell
|
||||
name: Check spelling (codespell)
|
||||
args: ["--ignore-words-list", "additionals,curren,fo,ket,superseeding,te,ths"]
|
||||
exclude: |
|
||||
(?x)^(
|
||||
.*\.desktop |
|
||||
.*\.qrc |
|
||||
build-aux/.* |
|
||||
Changelog |
|
||||
dist/windows/installer-translations/.* |
|
||||
m4/.* |
|
||||
src/base/3rdparty/.* |
|
||||
src/searchengine/nova3/socks.py |
|
||||
src/webui/www/private/scripts/lib/.*
|
||||
)$
|
||||
exclude_types:
|
||||
- ts
|
||||
|
||||
- repo: https://github.com/crate-ci/typos
|
||||
rev: v1.15.5
|
||||
hooks:
|
||||
- id: typos
|
||||
name: Check spelling (typos)
|
||||
args: ["--config", ".github/workflows/helper/pre-commit/.typos.toml"]
|
||||
exclude: |
|
||||
(?x)^(
|
||||
.*\.asc |
|
||||
.*\.desktop |
|
||||
.*\.qrc |
|
||||
\.pre-commit-config\.yaml |
|
||||
build-aux/.* |
|
||||
Changelog |
|
||||
configure.* |
|
||||
dist/windows/installer-translations/.* |
|
||||
m4/.* |
|
||||
src/base/3rdparty/.* |
|
||||
src/searchengine/nova3/socks.py |
|
||||
src/webui/www/private/scripts/lib/.*
|
||||
)$
|
||||
exclude_types:
|
||||
- svg
|
||||
- ts
|
||||
|
||||
2
AUTHORS
2
AUTHORS
@@ -39,7 +39,7 @@ Images Authors:
|
||||
license: GPLv2+
|
||||
|
||||
* files: src/qbittorrent_file.ico src/icons/fileicon.svg
|
||||
copyright: 'uknown.svg' (LGPLv3+) from Oxygen Icon Theme was used as base which was slightly modified and 'qbittorrent-tray.svg' (GPLv2+) was overlayed above it.
|
||||
copyright: 'unknown.svg' (LGPLv3+) from Oxygen Icon Theme was used as base which was slightly modified and 'qbittorrent-tray.svg' (GPLv2+) was overlaid above it.
|
||||
license: GPLv3+
|
||||
|
||||
* files: src/icons/flags/*.svg
|
||||
|
||||
20
configure
vendored
20
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.71 for qbittorrent v4.6.0beta1.
|
||||
# Generated by GNU Autoconf 2.71 for qbittorrent v4.6.0RC2.
|
||||
#
|
||||
# Report bugs to <bugs.qbittorrent.org>.
|
||||
#
|
||||
@@ -611,8 +611,8 @@ MAKEFLAGS=
|
||||
# Identity of this package.
|
||||
PACKAGE_NAME='qbittorrent'
|
||||
PACKAGE_TARNAME='qbittorrent'
|
||||
PACKAGE_VERSION='v4.6.0beta1'
|
||||
PACKAGE_STRING='qbittorrent v4.6.0beta1'
|
||||
PACKAGE_VERSION='v4.6.0RC2'
|
||||
PACKAGE_STRING='qbittorrent v4.6.0RC2'
|
||||
PACKAGE_BUGREPORT='bugs.qbittorrent.org'
|
||||
PACKAGE_URL='https://www.qbittorrent.org/'
|
||||
|
||||
@@ -1329,7 +1329,7 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures qbittorrent v4.6.0beta1 to adapt to many kinds of systems.
|
||||
\`configure' configures qbittorrent v4.6.0RC2 to adapt to many kinds of systems.
|
||||
|
||||
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||
|
||||
@@ -1400,7 +1400,7 @@ fi
|
||||
|
||||
if test -n "$ac_init_help"; then
|
||||
case $ac_init_help in
|
||||
short | recursive ) echo "Configuration of qbittorrent v4.6.0beta1:";;
|
||||
short | recursive ) echo "Configuration of qbittorrent v4.6.0RC2:";;
|
||||
esac
|
||||
cat <<\_ACEOF
|
||||
|
||||
@@ -1533,7 +1533,7 @@ fi
|
||||
test -n "$ac_init_help" && exit $ac_status
|
||||
if $ac_init_version; then
|
||||
cat <<\_ACEOF
|
||||
qbittorrent configure v4.6.0beta1
|
||||
qbittorrent configure v4.6.0RC2
|
||||
generated by GNU Autoconf 2.71
|
||||
|
||||
Copyright (C) 2021 Free Software Foundation, Inc.
|
||||
@@ -1648,7 +1648,7 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by qbittorrent $as_me v4.6.0beta1, which was
|
||||
It was created by qbittorrent $as_me v4.6.0RC2, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
$ $0$ac_configure_args_raw
|
||||
@@ -4779,7 +4779,7 @@ fi
|
||||
|
||||
# Define the identity of the package.
|
||||
PACKAGE='qbittorrent'
|
||||
VERSION='v4.6.0beta1'
|
||||
VERSION='v4.6.0RC2'
|
||||
|
||||
|
||||
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
|
||||
@@ -7237,7 +7237,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by qbittorrent $as_me v4.6.0beta1, which was
|
||||
This file was extended by qbittorrent $as_me v4.6.0RC2, which was
|
||||
generated by GNU Autoconf 2.71. Invocation command line was
|
||||
|
||||
CONFIG_FILES = $CONFIG_FILES
|
||||
@@ -7297,7 +7297,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config='$ac_cs_config_escaped'
|
||||
ac_cs_version="\\
|
||||
qbittorrent config.status v4.6.0beta1
|
||||
qbittorrent config.status v4.6.0RC2
|
||||
configured by $0, generated by GNU Autoconf 2.71,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
AC_INIT([qbittorrent], [v4.6.0beta1], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||
AC_INIT([qbittorrent], [v4.6.0RC2], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
|
||||
AC_CONFIG_AUX_DIR([build-aux])
|
||||
AC_CONFIG_MACRO_DIR([m4])
|
||||
: ${CFLAGS=""}
|
||||
|
||||
2
dist/mac/Info.plist
vendored
2
dist/mac/Info.plist
vendored
@@ -67,7 +67,7 @@
|
||||
<key>NSAppleScriptEnabled</key>
|
||||
<string>YES</string>
|
||||
<key>NSHumanReadableCopyright</key>
|
||||
<string>Copyright © 2006-2022 The qBittorrent project</string>
|
||||
<string>Copyright © 2006-2023 The qBittorrent project</string>
|
||||
<key>UTExportedTypeDeclarations</key>
|
||||
<array>
|
||||
<dict>
|
||||
|
||||
2
dist/windows/config.nsi
vendored
2
dist/windows/config.nsi
vendored
@@ -112,7 +112,7 @@ OutFile "qbittorrent_${QBT_INSTALLER_FILENAME}_setup.exe"
|
||||
;Installer Version Information
|
||||
VIAddVersionKey "ProductName" "qBittorrent"
|
||||
VIAddVersionKey "CompanyName" "The qBittorrent project"
|
||||
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2022 The qBittorrent project"
|
||||
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2023 The qBittorrent project"
|
||||
VIAddVersionKey "FileDescription" "qBittorrent - A Bittorrent Client"
|
||||
VIAddVersionKey "FileVersion" "${QBT_VERSION}"
|
||||
|
||||
|
||||
2
dist/windows/gather_qt_translations.py
vendored
2
dist/windows/gather_qt_translations.py
vendored
@@ -19,7 +19,7 @@ def main() -> int:
|
||||
tmp_translations: List[str] = glob.glob(f'{args.qt_translations_folder}/qt_??.qm')
|
||||
tmp_translations += glob.glob(f'{args.qt_translations_folder}/qt_??_??.qm')
|
||||
tmp_translations += glob.glob(f'{args.qt_translations_folder}/qtbase_??.qm')
|
||||
tmp_translations += glob.glob(f'{args.qt_translations_folder}qtbase_??_??.qm')
|
||||
tmp_translations += glob.glob(f'{args.qt_translations_folder}/qtbase_??_??.qm')
|
||||
|
||||
filtered = filter(isNotStub, tmp_translations)
|
||||
for file in filtered:
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_AFRIKAANS} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_AFRIKAANS} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_AFRIKAANS} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_AFRIKAANS} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_ALBANIAN} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_ALBANIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_ALBANIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_ALBANIAN} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_ARABIC} "qBittorrent (مطلوب)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_ARABIC} "وضع اختصار على سطح المكتب"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_ARABIC} "وضع اختصار على سطح المكتب"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_ARABIC} "وضع اختصار في قائمة البداية"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_BASQUE} "qBittorrent (beharrezkoa)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_BASQUE} "Sortu Mahaigaineko Lasterbidea"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_BASQUE} "Sortu Mahaigaineko Lasterbidea"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_BASQUE} "Sortu Hasierako Lasterbidea"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_BELARUSIAN} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_BELARUSIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_BELARUSIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_BELARUSIAN} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_BOSNIAN} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_BOSNIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_BOSNIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_BOSNIAN} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_BRETON} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_BRETON} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_BRETON} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_BRETON} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_BULGARIAN} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_BULGARIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_BULGARIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_BULGARIAN} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_CATALAN} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_CATALAN} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_CATALAN} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_CATALAN} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_CROATIAN} "qBittorrent (neophodno)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_CROATIAN} "Kreiraj prečac na radnoj površini"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_CROATIAN} "Kreiraj prečac na radnoj površini"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_CROATIAN} "Kreiraj prečac u početnom meniju"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_CZECH} "qBittorrent (vyžadováno)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_CZECH} "Vytvořit zástupce na ploše"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${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"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_DANISH} "qBittorrent (påkrævet)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_DANISH} "Opret skrivebordsgenvej"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_DANISH} "Opret skrivebordsgenvej"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_DANISH} "Opret genvej i menuen Start"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_DUTCH} "qBittorrent (vereist)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_DUTCH} "Snelkoppeling aanmaken op bureaublad"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_DUTCH} "Snelkoppeling aanmaken op bureaublad"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_DUTCH} "Snelkoppeling aanmaken in startmenu"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_ESPERANTO} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_ESPERANTO} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_ESPERANTO} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_ESPERANTO} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_ESTONIAN} "qBittorrent (vajalik)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_ESTONIAN} "Loo Töölaua Otsetee"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_ESTONIAN} "Loo Töölaua Otsetee"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_ESTONIAN} "Loo Start Menüü Otsetee"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_FARSI} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_FARSI} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_FARSI} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_FARSI} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_FINNISH} "qBittorrent (pakollinen)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_FINNISH} "Luo pikakuvake työpöydälle"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_FINNISH} "Luo pikakuvake työpöydälle"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_FINNISH} "Luo pikakuvake aloitusvalikkoon"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
14
dist/windows/installer-translations/french.nsi
vendored
14
dist/windows/installer-translations/french.nsi
vendored
@@ -2,12 +2,12 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_FRENCH} "qBittorrent (requis)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_FRENCH} "Créer un Raccourci sur le Bureau"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_FRENCH} "Créer un Raccourci sur le Bureau"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_FRENCH} "Créer un Raccourci dans le Menu Démarrer"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
LangString inst_startup ${LANG_FRENCH} "Démarrez qBittorrent au démarrage de Windows"
|
||||
LangString inst_startup ${LANG_FRENCH} "Démarrer qBittorrent au démarrage de Windows"
|
||||
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_FRENCH} "Ouvrir les fichiers .torrent avec qBittorrent"
|
||||
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||
@@ -15,7 +15,7 @@ LangString inst_magnet ${LANG_FRENCH} "Ouvrir les liens magnet avec qBittorrent"
|
||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_FRENCH} "Ajouter une règle au Pare-Feu de 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_FRENCH} "Désactiver la limite de taille du chemin de Windows (limitation de MAX_PATH 260 caractères, nécessite Windows 10 1607 ou plus)"
|
||||
LangString inst_pathlimit ${LANG_FRENCH} "Désactiver la limite de taille des chemins de Windows (limite MAX_PATH de 260 caractères, nécessite Windows 10 1607 ou plus)"
|
||||
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_FRENCH} "Ajout d'une règle au Pare-Feu de Windows"
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
@@ -31,7 +31,7 @@ LangString inst_requires_64bit ${LANG_FRENCH} "Cet installateur ne fonctionne qu
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_FRENCH} "Cette version de qBittorrent nécessite au moins Windows 7."
|
||||
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 1809."
|
||||
LangString inst_requires_win10 ${LANG_FRENCH} "This installer requires at least Windows 10 1809."
|
||||
LangString inst_requires_win10 ${LANG_FRENCH} "Cet installateur nécessite au moins Windows 10 1809."
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_FRENCH} "Désinstaller qBittorrent"
|
||||
|
||||
@@ -53,9 +53,9 @@ LangString remove_firewall ${LANG_FRENCH} "Supprimer la règle du Pare-Feu de Wi
|
||||
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_FRENCH} "Suppression de la règle du Pare-Feu de Windows"
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_FRENCH} "Supprimer les torrents et données cachées"
|
||||
LangString remove_cache ${LANG_FRENCH} "Supprimer les torrents et données en cache"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_FRENCH} "qBittorrent est en cours d'exécution. Veuillez fermer l'application avant la désinstallation."
|
||||
LangString uninst_warning ${LANG_FRENCH} "qBittorrent est en cours d'exécution. Fermez l'application avant de la désinstaller."
|
||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_FRENCH} "Ne peut pas supprimer l'association du .torrent. Elle est associée avec :"
|
||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_GALICIAN} "qBittorrent (necesario)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_GALICIAN} "Crear atallo no escritorio"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_GALICIAN} "Crear atallo no escritorio"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_GALICIAN} "Crear atallo no menú de inicio"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_GERMAN} "qBittorrent (erforderlich)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_GERMAN} "Verknüpfung auf dem Desktop erstellen"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_GERMAN} "Verknüpfung auf dem Desktop erstellen"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_GERMAN} "Eintrag im Startmenü erstellen"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_GREEK} "qBittorrent (απαιτείται)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_GREEK} "Δημιουργία συντόμευσης στην Επιφάνεια Εργασίας"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_GREEK} "Δημιουργία συντόμευσης στην Επιφάνεια Εργασίας"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_GREEK} "Δημιουργία συντόμευσης στο Μενού Έναρξης"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_HEBREW} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_HEBREW} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_HEBREW} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_HEBREW} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_HUNGARIAN} "qBittorrent (kötelező)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_HUNGARIAN} "Asztali parancsikon létrehozása"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_HUNGARIAN} "Asztali parancsikon létrehozása"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_HUNGARIAN} "Start menüben parancsikon létrehozása"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_ICELANDIC} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_ICELANDIC} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_ICELANDIC} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_ICELANDIC} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_INDONESIAN} "qBittorrent (wajib)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_INDONESIAN} "Buat Pintasan Desktop"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_INDONESIAN} "Buat Pintasan Desktop"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_INDONESIAN} "Buat Pintasan Menu"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_IRISH} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_IRISH} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_IRISH} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_IRISH} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;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 collegamento sul Desktop"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_ITALIAN} "Crea collegamento sul Desktop"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_ITALIAN} "Aggiungi al menu Start"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_JAPANESE} "qBittorrent (必須)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_JAPANESE} "デスクトップにショートカットを作成"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_JAPANESE} "デスクトップにショートカットを作成"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_JAPANESE} "スタートメニューにショートカットを作成"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_KOREAN} "qBittorrent (필요)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_KOREAN} "바탕화면 바로 가기 만들기"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_KOREAN} "바탕화면 바로 가기 만들기"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_KOREAN} "시작 메뉴 바로 가기 만들기"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_KURDISH} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_KURDISH} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_KURDISH} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_KURDISH} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_LATVIAN} "qBittorrent (nepieciešams)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_LATVIAN} "Izveidot saīsni uz darbvirsmas"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_LATVIAN} "Izveidot saīsni uz darbvirsmas"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_LATVIAN} "Izveidot izvēlnes Sākt saīsnes"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_LITHUANIAN} "qBittorrent (reikalingas)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_LITHUANIAN} "Sukurti nuorodą darbalaukyje"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_LITHUANIAN} "Sukurti nuorodą darbalaukyje"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_LITHUANIAN} "Sukurti Pradėti meniu nuorodą"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_LUXEMBOURGISH} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_LUXEMBOURGISH} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_LUXEMBOURGISH} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_LUXEMBOURGISH} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_MACEDONIAN} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_MACEDONIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_MACEDONIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_MACEDONIAN} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_MALAY} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_MALAY} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_MALAY} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_MALAY} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_MONGOLIAN} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_MONGOLIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_MONGOLIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_MONGOLIAN} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_NORWEGIAN} "qBittorrent (kreves)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_NORWEGIAN} "Opprett Skrivebordssnarvei"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_NORWEGIAN} "Opprett Skrivebordssnarvei"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_NORWEGIAN} "Opprett Startmeny-snarvei"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_NORWEGIANNYNORSK} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_NORWEGIANNYNORSK} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_NORWEGIANNYNORSK} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_NORWEGIANNYNORSK} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_POLISH} "qBittorrent (wymagany)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_POLISH} "Utwórz skrót na pulpicie"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_POLISH} "Utwórz skrót na pulpicie"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_POLISH} "Utwórz skrót w menu Start"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_PORTUGUESE} "qBittorrent (obrigatório)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_PORTUGUESE} "Criar atalho no ambiente de trabalho"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_PORTUGUESE} "Criar atalho no ambiente de trabalho"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_PORTUGUESE} "Criar atalho no menu Iniciar"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_PORTUGUESEBR} "qBittorrent (requerido)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_PORTUGUESEBR} "Criar Atalho no Desktop"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_PORTUGUESEBR} "Criar Atalho no Desktop"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_PORTUGUESEBR} "Criar Atalho no Menu Iniciar"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
58
dist/windows/installer-translations/romanian.nsi
vendored
58
dist/windows/installer-translations/romanian.nsi
vendored
@@ -1,62 +1,62 @@
|
||||
;Installer strings
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_ROMANIAN} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_ROMANIAN} "Create Desktop Shortcut"
|
||||
LangString inst_qbt_req ${LANG_ROMANIAN} "qBittorrent (obligatoriu)"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_ROMANIAN} "Creați o comandă rapidă pe Desktop"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_ROMANIAN} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_ROMANIAN} "Creați o comandă rapidă în meniul Start"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
LangString inst_startup ${LANG_ROMANIAN} "Start qBittorrent on Windows start up"
|
||||
LangString inst_startup ${LANG_ROMANIAN} "Porniți qBittorrent la pornirea Windows"
|
||||
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_ROMANIAN} "Open .torrent files with qBittorrent"
|
||||
LangString inst_torrent ${LANG_ROMANIAN} "Deschideți fișierele .torrent cu qBittorrent"
|
||||
;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_ROMANIAN} "Open magnet links with qBittorrent"
|
||||
LangString inst_magnet ${LANG_ROMANIAN} "Deschideți linkurile magnet cu qBittorrent"
|
||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_ROMANIAN} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_ROMANIAN} "Adăugați regula 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_ROMANIAN} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)"
|
||||
LangString inst_pathlimit ${LANG_ROMANIAN} "Dezactivați limita de lungime a căii Windows (260 de caractere limită MAX_PATH, necesită Windows 10 1607 sau o versiune ulterioară)"
|
||||
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_ROMANIAN} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_ROMANIAN} "Adăugarea regulii Windows Firewall"
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_ROMANIAN} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_ROMANIAN} "qBittorrent rulează. Vă rugăm să închideți aplicația înainte de instalare."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
|
||||
LangString inst_uninstall_question ${LANG_ROMANIAN} "Current version will be uninstalled. User settings and torrents will remain intact."
|
||||
LangString inst_uninstall_question ${LANG_ROMANIAN} "Versiunea actuală va fi dezinstalată. Setările utilizatorului și torrentele vor rămâne intacte."
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_ROMANIAN} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_ROMANIAN} "Se dezinstalează versiunea anterioară."
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_ROMANIAN} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_ROMANIAN} "Lansați qBittorrent."
|
||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_ROMANIAN} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_ROMANIAN} "Acest program de instalare funcționează doar pe versiunile Windows pe 64 de biți."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_ROMANIAN} "This qBittorrent version requires at least Windows 7."
|
||||
LangString inst_requires_win7 ${LANG_ROMANIAN} "Această versiune de qBittorrent necesită cel puțin Windows 7."
|
||||
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 1809."
|
||||
LangString inst_requires_win10 ${LANG_ROMANIAN} "This installer requires at least Windows 10 1809."
|
||||
LangString inst_requires_win10 ${LANG_ROMANIAN} "Acest program de instalare necesită cel puțin Windows 10 1809."
|
||||
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_ROMANIAN} "Uninstall qBittorrent"
|
||||
LangString inst_uninstall_link_description ${LANG_ROMANIAN} "Dezinstalați qBittorrent"
|
||||
|
||||
;------------------------------------
|
||||
;Uninstaller strings
|
||||
|
||||
;LangString remove_files ${LANG_ENGLISH} "Remove files"
|
||||
LangString remove_files ${LANG_ROMANIAN} "Remove files"
|
||||
LangString remove_files ${LANG_ROMANIAN} "Eliminați fișierele"
|
||||
;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts"
|
||||
LangString remove_shortcuts ${LANG_ROMANIAN} "Remove shortcuts"
|
||||
LangString remove_shortcuts ${LANG_ROMANIAN} "Eliminați comenzile rapide"
|
||||
;LangString remove_associations ${LANG_ENGLISH} "Remove file associations"
|
||||
LangString remove_associations ${LANG_ROMANIAN} "Remove file associations"
|
||||
LangString remove_associations ${LANG_ROMANIAN} "Eliminați asocierile de fișiere"
|
||||
;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys"
|
||||
LangString remove_registry ${LANG_ROMANIAN} "Remove registry keys"
|
||||
LangString remove_registry ${LANG_ROMANIAN} "Eliminați cheile din registru"
|
||||
;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_ROMANIAN} "Remove configuration files"
|
||||
LangString remove_conf ${LANG_ROMANIAN} "Eliminați fișierele de configurare"
|
||||
;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_ROMANIAN} "Remove Windows Firewall rule"
|
||||
LangString remove_firewall ${LANG_ROMANIAN} "Eliminați regula Windows Firewall"
|
||||
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_ROMANIAN} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_ROMANIAN} "Se elimină regula Windows Firewall"
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_ROMANIAN} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_ROMANIAN} "Eliminați torrentele și datele din cache"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_ROMANIAN} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_ROMANIAN} "qBittorrent rulează. Vă rugăm să închideți aplicația înainte de a o dezinstala."
|
||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_ROMANIAN} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_ROMANIAN} "Nu se elimină asocierea .torrent. Este asociat cu:"
|
||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_ROMANIAN} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_ROMANIAN} "Nu se elimină asocierea magnet. Este asociat cu:"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_RUSSIAN} "qBittorrent (обязательно)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_RUSSIAN} "Создать ярлык на рабочем столе"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_RUSSIAN} "Создать ярлык на рабочем столе"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_RUSSIAN} "Создать ярлык в меню Пуск"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_SERBIAN} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_SERBIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_SERBIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_SERBIAN} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_SERBIANLATIN} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_SERBIANLATIN} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_SERBIANLATIN} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_SERBIANLATIN} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_SIMPCHINESE} "qBittorrent 主程序 (必要)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_SIMPCHINESE} "创建桌面快捷方式"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_SIMPCHINESE} "创建桌面快捷方式"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_SIMPCHINESE} "创建开始菜单快捷方式"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_SLOVAK} "qBittorrent (požadované)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_SLOVAK} "Vytvoriť odkaz na pracovnej ploche"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_SLOVAK} "Vytvoriť odkaz na pracovnej ploche"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_SLOVAK} "Vytvoriť odkaz v štart menu"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_SLOVENIAN} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_SLOVENIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_SLOVENIAN} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_SLOVENIAN} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_SPANISH} "qBittorrent (necesario)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_SPANISH} "Crear un acceso directo en el escritorio"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_SPANISH} "Crear un acceso directo en el escritorio"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_SPANISH} "Crear un acceso directo en el menú inicio"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_SPANISHINTERNATIONAL} "qBittorrent (necesario)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_SPANISHINTERNATIONAL} "Crear un acceso directo en el escritorio"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_SPANISHINTERNATIONAL} "Crear un acceso directo en el escritorio"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_SPANISHINTERNATIONAL} "Crear un acceso directo en el menú inicio"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_SWEDISH} "qBittorrent (krävs)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_SWEDISH} "Skapa skrivbordsgenväg"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_SWEDISH} "Skapa skrivbordsgenväg"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_SWEDISH} "Skapa startmenygenväg"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
4
dist/windows/installer-translations/thai.nsi
vendored
4
dist/windows/installer-translations/thai.nsi
vendored
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_THAI} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_THAI} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_THAI} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_THAI} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_TRADCHINESE} "qBittorrent (必要)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_TRADCHINESE} "建立桌面捷徑"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_TRADCHINESE} "建立桌面捷徑"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_TRADCHINESE} "建立開始功能表捷徑"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
16
dist/windows/installer-translations/turkish.nsi
vendored
16
dist/windows/installer-translations/turkish.nsi
vendored
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_TURKISH} "qBittorrent (zorunlu)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_TURKISH} "Masaüstü Kısayolu oluştur"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_TURKISH} "Masaüstü Kısayolu oluştur"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_TURKISH} "Başlangıç Menüsü Kısayolu oluştur"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
@@ -15,17 +15,17 @@ LangString inst_magnet ${LANG_TURKISH} "Magnet bağlantılarını qBittorrent il
|
||||
;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule"
|
||||
LangString inst_firewall ${LANG_TURKISH} "Windows Güvenlik Duvarı kuralı ekle"
|
||||
;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_TURKISH} "Windows yol uzunluğu sınırını etkisizleştir (260 karakter MAX_PATH sınırlaması, Windows 10 1607 veya sonrasını gerektirir)"
|
||||
LangString inst_pathlimit ${LANG_TURKISH} "Windows yol uzunluğu sınırını etkisizleştir (260 karakterlik MAX_PATH sınırlaması, Windows 10 1607 veya sonrasını gerektirir)"
|
||||
;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule"
|
||||
LangString inst_firewallinfo ${LANG_TURKISH} "Windows Güvenlik Duvarı kuralı ekleniyor"
|
||||
;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing."
|
||||
LangString inst_warning ${LANG_TURKISH} "qBittorrent çalışıyor. Lütfen yüklemeden önce uygulamayı kapatın."
|
||||
;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact."
|
||||
LangString inst_uninstall_question ${LANG_TURKISH} "Önceki bir kurulum algılandı. Kullanıcı ayarları silinmeden kaldırılacaktır."
|
||||
LangString inst_uninstall_question ${LANG_TURKISH} "Şu anki sürüm kaldırılacaktır. Kullanıcı ayarları ve torrent'ler bozulmadan kalacaktır."
|
||||
;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version."
|
||||
LangString inst_unist ${LANG_TURKISH} "Önceki sürüm kaldırılıyor."
|
||||
;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent."
|
||||
LangString launch_qbt ${LANG_TURKISH} "qBittorrent'i başlat"
|
||||
LangString launch_qbt ${LANG_TURKISH} "qBittorrent'i başlat."
|
||||
;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions."
|
||||
LangString inst_requires_64bit ${LANG_TURKISH} "Bu yükleyici sadece 64-bit Windows sürümlerinde çalışır."
|
||||
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
|
||||
@@ -53,10 +53,10 @@ LangString remove_firewall ${LANG_TURKISH} "Windows Güvenlik Duvarı kuralını
|
||||
;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule"
|
||||
LangString remove_firewallinfo ${LANG_TURKISH} "Windows Güvenlik Duvarı kuralı kaldırılıyor"
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_TURKISH} "Torrentleri ve önbelleklenen verileri kaldır"
|
||||
LangString remove_cache ${LANG_TURKISH} "Torrent'leri ve önbelleklenen verileri kaldır"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_TURKISH} "qBittorrent çalışıyor. Lütfen kaldırmadan önce uygulamayı kapatın."
|
||||
;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:"
|
||||
LangString uninst_tor_warn ${LANG_TURKISH} ".torrent ilişkilendirmesi kaldırılmıyor. Şununla ilişkilendirildi:"
|
||||
LangString uninst_tor_warn ${LANG_TURKISH} ".torrent ilişkilendirmesi kaldırılamıyor. Şununla ilişkilendirildi:"
|
||||
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
|
||||
LangString uninst_mag_warn ${LANG_TURKISH} "Magnet ilişkilendirmesi kaldırılmıyor. Şununla ilişkilendirildi:"
|
||||
LangString uninst_mag_warn ${LANG_TURKISH} "Magnet ilişkilendirmesi kaldırılamıyor. Şununla ilişkilendirildi:"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_UKRAINIAN} "qBittorrent (необхідний)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_UKRAINIAN} "Створити ярлик на стільниці"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_UKRAINIAN} "Створити ярлик на стільниці"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_UKRAINIAN} "Створити ярлик в меню Пуск"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_UZBEK} "qBittorrent (talab qilinadi)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_UZBEK} "Ish Stolida Yorliq Yaratilsin"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_UZBEK} "Ish Stolida Yorliq Yaratilsin"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_UZBEK} "Boshlash Menyusida Yorliq Yaratilsin"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
|
||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||
LangString inst_qbt_req ${LANG_WELSH} "qBittorrent (required)"
|
||||
;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_dekstop ${LANG_WELSH} "Create Desktop Shortcut"
|
||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
||||
LangString inst_desktop ${LANG_WELSH} "Create Desktop Shortcut"
|
||||
;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut"
|
||||
LangString inst_startmenu ${LANG_WELSH} "Create Start Menu Shortcut"
|
||||
;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up"
|
||||
|
||||
2
dist/windows/installer.nsi
vendored
2
dist/windows/installer.nsi
vendored
@@ -65,7 +65,7 @@ Section $(inst_qbt_req) ;"qBittorrent (required)"
|
||||
SectionEnd
|
||||
|
||||
; Optional section (can be disabled by the user)
|
||||
Section /o $(inst_dekstop) ;"Create Desktop Shortcut"
|
||||
Section /o $(inst_desktop) ;"Create Desktop Shortcut"
|
||||
|
||||
CreateShortCut "$DESKTOP\qBittorrent.lnk" "$INSTDIR\qbittorrent.exe"
|
||||
|
||||
|
||||
@@ -108,12 +108,12 @@ namespace
|
||||
{
|
||||
#define SETTINGS_KEY(name) u"Application/" name
|
||||
#define FILELOGGER_SETTINGS_KEY(name) (SETTINGS_KEY(u"FileLogger/") name)
|
||||
#define NOTIFICATIONS_SETTINGS_KEY(name) (SETTINGS_KEY(u"GUI/Notifications/"_qs) name)
|
||||
#define NOTIFICATIONS_SETTINGS_KEY(name) (SETTINGS_KEY(u"GUI/Notifications/"_s) name)
|
||||
|
||||
const QString LOG_FOLDER = u"logs"_qs;
|
||||
const QString LOG_FOLDER = u"logs"_s;
|
||||
const QChar PARAMS_SEPARATOR = u'|';
|
||||
|
||||
const Path DEFAULT_PORTABLE_MODE_PROFILE_DIR {u"profile"_qs};
|
||||
const Path DEFAULT_PORTABLE_MODE_PROFILE_DIR {u"profile"_s};
|
||||
|
||||
const int MIN_FILELOG_SIZE = 1024; // 1KiB
|
||||
const int MAX_FILELOG_SIZE = 1000 * 1024 * 1024; // 1000MiB
|
||||
@@ -140,22 +140,22 @@ namespace
|
||||
result.append(u"@savePath=" + addTorrentParams.savePath.data());
|
||||
|
||||
if (addTorrentParams.addPaused.has_value())
|
||||
result.append(*addTorrentParams.addPaused ? u"@addPaused=1"_qs : u"@addPaused=0"_qs);
|
||||
result.append(*addTorrentParams.addPaused ? u"@addPaused=1"_s : u"@addPaused=0"_s);
|
||||
|
||||
if (addTorrentParams.skipChecking)
|
||||
result.append(u"@skipChecking"_qs);
|
||||
result.append(u"@skipChecking"_s);
|
||||
|
||||
if (!addTorrentParams.category.isEmpty())
|
||||
result.append(u"@category=" + addTorrentParams.category);
|
||||
|
||||
if (addTorrentParams.sequential)
|
||||
result.append(u"@sequential"_qs);
|
||||
result.append(u"@sequential"_s);
|
||||
|
||||
if (addTorrentParams.firstLastPiecePriority)
|
||||
result.append(u"@firstLastPiecePriority"_qs);
|
||||
result.append(u"@firstLastPiecePriority"_s);
|
||||
|
||||
if (params.skipDialog.has_value())
|
||||
result.append(*params.skipDialog ? u"@skipDialog=1"_qs : u"@skipDialog=0"_qs);
|
||||
result.append(*params.skipDialog ? u"@skipDialog=1"_s : u"@skipDialog=0"_s);
|
||||
|
||||
result += params.torrentSources;
|
||||
|
||||
@@ -225,29 +225,29 @@ namespace
|
||||
Application::Application(int &argc, char **argv)
|
||||
: BaseApplication(argc, argv)
|
||||
, m_commandLineArgs(parseCommandLine(Application::arguments()))
|
||||
, m_storeFileLoggerEnabled(FILELOGGER_SETTINGS_KEY(u"Enabled"_qs))
|
||||
, m_storeFileLoggerBackup(FILELOGGER_SETTINGS_KEY(u"Backup"_qs))
|
||||
, m_storeFileLoggerDeleteOld(FILELOGGER_SETTINGS_KEY(u"DeleteOld"_qs))
|
||||
, m_storeFileLoggerMaxSize(FILELOGGER_SETTINGS_KEY(u"MaxSizeBytes"_qs))
|
||||
, m_storeFileLoggerAge(FILELOGGER_SETTINGS_KEY(u"Age"_qs))
|
||||
, m_storeFileLoggerAgeType(FILELOGGER_SETTINGS_KEY(u"AgeType"_qs))
|
||||
, m_storeFileLoggerPath(FILELOGGER_SETTINGS_KEY(u"Path"_qs))
|
||||
, m_storeMemoryWorkingSetLimit(SETTINGS_KEY(u"MemoryWorkingSetLimit"_qs))
|
||||
, m_storeFileLoggerEnabled(FILELOGGER_SETTINGS_KEY(u"Enabled"_s))
|
||||
, m_storeFileLoggerBackup(FILELOGGER_SETTINGS_KEY(u"Backup"_s))
|
||||
, m_storeFileLoggerDeleteOld(FILELOGGER_SETTINGS_KEY(u"DeleteOld"_s))
|
||||
, m_storeFileLoggerMaxSize(FILELOGGER_SETTINGS_KEY(u"MaxSizeBytes"_s))
|
||||
, m_storeFileLoggerAge(FILELOGGER_SETTINGS_KEY(u"Age"_s))
|
||||
, m_storeFileLoggerAgeType(FILELOGGER_SETTINGS_KEY(u"AgeType"_s))
|
||||
, m_storeFileLoggerPath(FILELOGGER_SETTINGS_KEY(u"Path"_s))
|
||||
, m_storeMemoryWorkingSetLimit(SETTINGS_KEY(u"MemoryWorkingSetLimit"_s))
|
||||
#ifdef Q_OS_WIN
|
||||
, m_processMemoryPriority(SETTINGS_KEY(u"ProcessMemoryPriority"_qs))
|
||||
, m_processMemoryPriority(SETTINGS_KEY(u"ProcessMemoryPriority"_s))
|
||||
#endif
|
||||
#ifndef DISABLE_GUI
|
||||
, m_startUpWindowState(u"GUI/StartUpWindowState"_qs)
|
||||
, m_storeNotificationTorrentAdded(NOTIFICATIONS_SETTINGS_KEY(u"TorrentAdded"_qs))
|
||||
, m_startUpWindowState(u"GUI/StartUpWindowState"_s)
|
||||
, m_storeNotificationTorrentAdded(NOTIFICATIONS_SETTINGS_KEY(u"TorrentAdded"_s))
|
||||
#endif
|
||||
{
|
||||
qRegisterMetaType<Log::Msg>("Log::Msg");
|
||||
qRegisterMetaType<Log::Peer>("Log::Peer");
|
||||
|
||||
setApplicationName(u"qBittorrent"_qs);
|
||||
setOrganizationDomain(u"qbittorrent.org"_qs);
|
||||
setApplicationName(u"qBittorrent"_s);
|
||||
setOrganizationDomain(u"qbittorrent.org"_s);
|
||||
#if !defined(DISABLE_GUI)
|
||||
setDesktopFileName(u"org.qbittorrent.qBittorrent"_qs);
|
||||
setDesktopFileName(u"org.qbittorrent.qBittorrent"_s);
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
setAttribute(Qt::AA_UseHighDpiPixmaps, true); // opt-in to the high DPI pixmap support
|
||||
#endif
|
||||
@@ -275,7 +275,7 @@ Application::Application(int &argc, char **argv)
|
||||
if (!firstTimeUser)
|
||||
{
|
||||
if (!upgrade())
|
||||
throw RuntimeError(u"Failed migration of old settings"_qs); // Not translatable. Translation isn't configured yet.
|
||||
throw RuntimeError(u"Failed migration of old settings"_s); // Not translatable. Translation isn't configured yet.
|
||||
handleChangedDefaults(DefaultPreferencesMode::Legacy);
|
||||
}
|
||||
else
|
||||
@@ -296,7 +296,7 @@ Application::Application(int &argc, char **argv)
|
||||
{
|
||||
LogMsg(tr("Running in portable mode. Auto detected profile folder at: %1").arg(profileDir.toString()));
|
||||
if (m_commandLineArgs.relativeFastresumePaths)
|
||||
LogMsg(tr("Redundant command line flag detected: \"%1\". Portable mode implies relative fastresume.").arg(u"--relative-fastresume"_qs), Log::WARNING); // to avoid translating the `--relative-fastresume` string
|
||||
LogMsg(tr("Redundant command line flag detected: \"%1\". Portable mode implies relative fastresume.").arg(u"--relative-fastresume"_s), Log::WARNING); // to avoid translating the `--relative-fastresume` string
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -311,7 +311,7 @@ Application::Application(int &argc, char **argv)
|
||||
|
||||
if (m_commandLineArgs.torrentingPort > 0) // it will be -1 when user did not set any value
|
||||
{
|
||||
SettingValue<int> port {u"BitTorrent/Session/Port"_qs};
|
||||
SettingValue<int> port {u"BitTorrent/Session/Port"_s};
|
||||
port = m_commandLineArgs.torrentingPort;
|
||||
}
|
||||
}
|
||||
@@ -523,13 +523,13 @@ void Application::runExternalProgram(const QString &programTemplate, const BitTo
|
||||
str.replace(i, 2, torrent->contentPath().toString());
|
||||
break;
|
||||
case u'G':
|
||||
str.replace(i, 2, torrent->tags().join(u","_qs));
|
||||
str.replace(i, 2, torrent->tags().join(u","_s));
|
||||
break;
|
||||
case u'I':
|
||||
str.replace(i, 2, (torrent->infoHash().v1().isValid() ? torrent->infoHash().v1().toString() : u"-"_qs));
|
||||
str.replace(i, 2, (torrent->infoHash().v1().isValid() ? torrent->infoHash().v1().toString() : u"-"_s));
|
||||
break;
|
||||
case u'J':
|
||||
str.replace(i, 2, (torrent->infoHash().v2().isValid() ? torrent->infoHash().v2().toString() : u"-"_qs));
|
||||
str.replace(i, 2, (torrent->infoHash().v2().isValid() ? torrent->infoHash().v2().toString() : u"-"_s));
|
||||
break;
|
||||
case u'K':
|
||||
str.replace(i, 2, torrent->id().toString());
|
||||
@@ -763,7 +763,6 @@ void Application::processParams(const QBtCommandLineParameters ¶ms)
|
||||
}
|
||||
|
||||
int Application::exec()
|
||||
try
|
||||
{
|
||||
#if !defined(DISABLE_WEBUI) && defined(DISABLE_GUI)
|
||||
const QString loadingStr = tr("WebUI will be started shortly after internal preparations. Please wait...");
|
||||
@@ -792,7 +791,7 @@ try
|
||||
#ifndef Q_OS_MACOS
|
||||
auto *desktopIntegrationMenu = new QMenu;
|
||||
auto *actionExit = new QAction(tr("E&xit"), desktopIntegrationMenu);
|
||||
actionExit->setIcon(UIThemeManager::instance()->getIcon(u"application-exit"_qs));
|
||||
actionExit->setIcon(UIThemeManager::instance()->getIcon(u"application-exit"_s));
|
||||
actionExit->setMenuRole(QAction::QuitRole);
|
||||
actionExit->setShortcut(Qt::CTRL | Qt::Key_Q);
|
||||
connect(actionExit, &QAction::triggered, this, []
|
||||
@@ -904,16 +903,16 @@ try
|
||||
|
||||
const Preferences *pref = Preferences::instance();
|
||||
|
||||
const auto scheme = pref->isWebUiHttpsEnabled() ? u"https"_qs : u"http"_qs;
|
||||
const auto url = u"%1://localhost:%2\n"_qs.arg(scheme, QString::number(pref->getWebUiPort()));
|
||||
const QString mesg = u"\n******** %1 ********\n"_qs.arg(tr("Information"))
|
||||
const auto scheme = pref->isWebUiHttpsEnabled() ? u"https"_s : u"http"_s;
|
||||
const auto url = u"%1://localhost:%2\n"_s.arg(scheme, QString::number(pref->getWebUiPort()));
|
||||
const QString mesg = u"\n******** %1 ********\n"_s.arg(tr("Information"))
|
||||
+ tr("To control qBittorrent, access the WebUI at: %1").arg(url);
|
||||
printf("%s\n", qUtf8Printable(mesg));
|
||||
|
||||
if (pref->getWebUIPassword() == QByteArrayLiteral("ARQ77eY1NUZaQsuDHbIMCA==:0WMRkYTUWVT9wVvdDtHAjU9b3b7uB8NR1Gur2hmQCvCDpm39Q+PsJRJPaCU51dEiz+dTzh8qbPsL8WkFljQYFQ=="))
|
||||
{
|
||||
const QString warning = tr("The Web UI administrator username is: %1").arg(pref->getWebUiUsername()) + u'\n'
|
||||
+ tr("The Web UI administrator password has not been changed from the default: %1").arg(u"adminadmin"_qs) + u'\n'
|
||||
+ tr("The Web UI administrator password has not been changed from the default: %1").arg(u"adminadmin"_s) + u'\n'
|
||||
+ tr("This is a security risk, please change your password in program preferences.") + u'\n';
|
||||
printf("%s", qUtf8Printable(warning));
|
||||
}
|
||||
@@ -932,21 +931,6 @@ try
|
||||
|
||||
return BaseApplication::exec();
|
||||
}
|
||||
catch (const RuntimeError &err)
|
||||
{
|
||||
#ifdef DISABLE_GUI
|
||||
fprintf(stderr, "%s", qPrintable(err.message()));
|
||||
#else
|
||||
QMessageBox msgBox;
|
||||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setText(QCoreApplication::translate("Application", "Application failed to start."));
|
||||
msgBox.setInformativeText(err.message());
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
msgBox.move(Utils::Gui::screenCenter(&msgBox));
|
||||
msgBox.exec();
|
||||
#endif
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
|
||||
bool Application::isRunning()
|
||||
{
|
||||
@@ -1165,12 +1149,12 @@ void Application::setProcessMemoryPriority(const MemoryPriority priority)
|
||||
void Application::applyMemoryPriority() const
|
||||
{
|
||||
using SETPROCESSINFORMATION = BOOL (WINAPI *)(HANDLE, PROCESS_INFORMATION_CLASS, LPVOID, DWORD);
|
||||
const auto setProcessInformation = Utils::Misc::loadWinAPI<SETPROCESSINFORMATION>(u"Kernel32.dll"_qs, "SetProcessInformation");
|
||||
const auto setProcessInformation = Utils::Misc::loadWinAPI<SETPROCESSINFORMATION>(u"Kernel32.dll"_s, "SetProcessInformation");
|
||||
if (!setProcessInformation) // only available on Windows >= 8
|
||||
return;
|
||||
|
||||
using SETTHREADINFORMATION = BOOL (WINAPI *)(HANDLE, THREAD_INFORMATION_CLASS, LPVOID, DWORD);
|
||||
const auto setThreadInformation = Utils::Misc::loadWinAPI<SETTHREADINFORMATION>(u"Kernel32.dll"_qs, "SetThreadInformation");
|
||||
const auto setThreadInformation = Utils::Misc::loadWinAPI<SETTHREADINFORMATION>(u"Kernel32.dll"_s, "SetThreadInformation");
|
||||
if (!setThreadInformation) // only available on Windows >= 8
|
||||
return;
|
||||
|
||||
|
||||
@@ -152,16 +152,16 @@ namespace
|
||||
{
|
||||
QStringList parts = arg.split(u'=');
|
||||
if (parts.size() == 2)
|
||||
return Utils::String::unquote(parts[1], u"'\""_qs);
|
||||
return Utils::String::unquote(parts[1], u"'\""_s);
|
||||
throw CommandLineParameterError(QCoreApplication::translate("CMD Options", "Parameter '%1' must follow syntax '%1=%2'",
|
||||
"e.g. Parameter '--webui-port' must follow syntax '--webui-port=value'")
|
||||
.arg(fullParameter(), u"<value>"_qs));
|
||||
.arg(fullParameter(), u"<value>"_s));
|
||||
}
|
||||
|
||||
QString value(const QProcessEnvironment &env, const QString &defaultValue = {}) const
|
||||
{
|
||||
QString val = env.value(envVarName());
|
||||
return val.isEmpty() ? defaultValue : Utils::String::unquote(val, u"'\""_qs);
|
||||
return val.isEmpty() ? defaultValue : Utils::String::unquote(val, u"'\""_s);
|
||||
}
|
||||
|
||||
QString usage(const QString &valueName) const
|
||||
@@ -206,7 +206,7 @@ namespace
|
||||
{
|
||||
throw CommandLineParameterError(QCoreApplication::translate("CMD Options", "Parameter '%1' must follow syntax '%1=%2'",
|
||||
"e.g. Parameter '--webui-port' must follow syntax '--webui-port=<value>'")
|
||||
.arg(fullParameter(), u"<integer value>"_qs));
|
||||
.arg(fullParameter(), u"<integer value>"_s));
|
||||
}
|
||||
return res;
|
||||
}
|
||||
@@ -279,12 +279,12 @@ namespace
|
||||
throw CommandLineParameterError(QCoreApplication::translate("CMD Options", "Parameter '%1' must follow syntax '%1=%2'",
|
||||
"e.g. Parameter '--add-paused' must follow syntax "
|
||||
"'--add-paused=<true|false>'")
|
||||
.arg(fullParameter(), u"<true|false>"_qs));
|
||||
.arg(fullParameter(), u"<true|false>"_s));
|
||||
}
|
||||
|
||||
std::optional<bool> value(const QProcessEnvironment &env) const
|
||||
{
|
||||
const QString val = env.value(envVarName(), u"-1"_qs);
|
||||
const QString val = env.value(envVarName(), u"-1"_s);
|
||||
|
||||
if (val.isEmpty())
|
||||
{
|
||||
@@ -304,7 +304,7 @@ namespace
|
||||
}
|
||||
|
||||
qDebug() << QCoreApplication::translate("CMD Options", "Expected %1 in environment variable '%2', but got '%3'")
|
||||
.arg(u"true|false"_qs, envVarName(), val);
|
||||
.arg(u"true|false"_s, envVarName(), val);
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
@@ -390,7 +390,7 @@ QBtCommandLineParameters parseCommandLine(const QStringList &args)
|
||||
result.webUiPort = WEBUI_PORT_OPTION.value(arg);
|
||||
if ((result.webUiPort < 1) || (result.webUiPort > 65535))
|
||||
throw CommandLineParameterError(QCoreApplication::translate("CMD Options", "%1 must specify a valid port (1 to 65535).")
|
||||
.arg(u"--webui-port"_qs));
|
||||
.arg(u"--webui-port"_s));
|
||||
}
|
||||
else if (arg == TORRENTING_PORT_OPTION)
|
||||
{
|
||||
@@ -398,7 +398,7 @@ QBtCommandLineParameters parseCommandLine(const QStringList &args)
|
||||
if ((result.torrentingPort < 1) || (result.torrentingPort > 65535))
|
||||
{
|
||||
throw CommandLineParameterError(QCoreApplication::translate("CMD Options", "%1 must specify a valid port (1 to 65535).")
|
||||
.arg(u"--torrenting-port"_qs));
|
||||
.arg(u"--torrenting-port"_s));
|
||||
}
|
||||
}
|
||||
#ifndef DISABLE_GUI
|
||||
|
||||
@@ -78,7 +78,7 @@ void FileLogger::changePath(const Path &newPath)
|
||||
|
||||
closeLogFile();
|
||||
|
||||
m_path = newPath / Path(u"qbittorrent.log"_qs);
|
||||
m_path = newPath / Path(u"qbittorrent.log"_s);
|
||||
m_logFile.setFileName(m_path.data());
|
||||
|
||||
Utils::Fs::mkpath(newPath);
|
||||
@@ -89,7 +89,7 @@ void FileLogger::deleteOld(const int age, const FileLogAgeType ageType)
|
||||
{
|
||||
const QDateTime date = QDateTime::currentDateTime();
|
||||
const QDir dir {m_path.parentPath().data()};
|
||||
const QFileInfoList fileList = dir.entryInfoList(QStringList(u"qbittorrent.log.bak*"_qs)
|
||||
const QFileInfoList fileList = dir.entryInfoList(QStringList(u"qbittorrent.log.bak*"_s)
|
||||
, (QDir::Files | QDir::Writable), (QDir::Time | QDir::Reversed));
|
||||
|
||||
for (const QFileInfo &file : fileList)
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
#endif
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QDebug>
|
||||
#include <QString>
|
||||
#include <QThread>
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
@@ -86,6 +86,7 @@ using namespace std::chrono_literals;
|
||||
void displayVersion();
|
||||
bool userAgreesWithLegalNotice();
|
||||
void displayBadArgMessage(const QString &message);
|
||||
void displayErrorMessage(const QString &message);
|
||||
|
||||
#ifndef DISABLE_GUI
|
||||
void showSplashScreen();
|
||||
@@ -114,10 +115,12 @@ int main(int argc, char *argv[])
|
||||
Application::setHighDpiScaleFactorRoundingPolicy(Qt::HighDpiScaleFactorRoundingPolicy::PassThrough);
|
||||
#endif
|
||||
|
||||
// `app` must be declared out of try block to allow display message box in case of exception
|
||||
std::unique_ptr<Application> app;
|
||||
try
|
||||
{
|
||||
// Create Application
|
||||
auto app = std::make_unique<Application>(argc, argv);
|
||||
app = std::make_unique<Application>(argc, argv);
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
// QCoreApplication::applicationDirPath() needs an Application object instantiated first
|
||||
@@ -127,7 +130,7 @@ int main(int argc, char *argv[])
|
||||
if (envValue.isEmpty())
|
||||
qputenv(envName, Application::applicationDirPath().toLocal8Bit());
|
||||
else
|
||||
qputenv(envName, u"%1;%2"_qs.arg(envValue, Application::applicationDirPath()).toLocal8Bit());
|
||||
qputenv(envName, u"%1;%2"_s.arg(envValue, Application::applicationDirPath()).toLocal8Bit());
|
||||
#endif
|
||||
|
||||
const QBtCommandLineParameters params = app->commandLineArgs();
|
||||
@@ -146,7 +149,7 @@ int main(int argc, char *argv[])
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
throw CommandLineParameterError(QCoreApplication::translate("Main", "%1 must be the single command line parameter.")
|
||||
.arg(u"-v (or --version)"_qs));
|
||||
.arg(u"-v (or --version)"_s));
|
||||
}
|
||||
#endif
|
||||
if (params.showHelp)
|
||||
@@ -157,7 +160,7 @@ int main(int argc, char *argv[])
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
throw CommandLineParameterError(QCoreApplication::translate("Main", "%1 must be the single command line parameter.")
|
||||
.arg(u"-h (or --help)"_qs));
|
||||
.arg(u"-h (or --help)"_s));
|
||||
}
|
||||
|
||||
const bool firstTimeUser = !Preferences::instance()->getAcceptedLegal();
|
||||
@@ -189,7 +192,7 @@ int main(int argc, char *argv[])
|
||||
if (params.shouldDaemonize)
|
||||
{
|
||||
throw CommandLineParameterError(QCoreApplication::translate("Main", "You cannot use %1: qBittorrent is already running for this user.")
|
||||
.arg(u"-d (or --daemon)"_qs));
|
||||
.arg(u"-d (or --daemon)"_s));
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -268,7 +271,7 @@ int main(int argc, char *argv[])
|
||||
}
|
||||
catch (const RuntimeError &er)
|
||||
{
|
||||
qDebug() << er.message();
|
||||
displayErrorMessage(er.message());
|
||||
return EXIT_FAILURE;
|
||||
}
|
||||
}
|
||||
@@ -276,11 +279,11 @@ int main(int argc, char *argv[])
|
||||
#if !defined(DISABLE_GUI)
|
||||
void showSplashScreen()
|
||||
{
|
||||
QPixmap splashImg(u":/icons/splash.png"_qs);
|
||||
QPixmap splashImg(u":/icons/splash.png"_s);
|
||||
QPainter painter(&splashImg);
|
||||
const auto version = QStringLiteral(QBT_VERSION);
|
||||
painter.setPen(QPen(Qt::white));
|
||||
painter.setFont(QFont(u"Arial"_qs, 22, QFont::Black));
|
||||
painter.setFont(QFont(u"Arial"_s, 22, QFont::Black));
|
||||
painter.drawText(224 - painter.fontMetrics().horizontalAdvance(version), 270, version);
|
||||
QSplashScreen *splash = new QSplashScreen(splashImg);
|
||||
splash->show();
|
||||
@@ -311,16 +314,40 @@ void displayBadArgMessage(const QString &message)
|
||||
#endif
|
||||
}
|
||||
|
||||
void displayErrorMessage(const QString &message)
|
||||
{
|
||||
#ifndef DISABLE_GUI
|
||||
if (QApplication::instance())
|
||||
{
|
||||
QMessageBox msgBox;
|
||||
msgBox.setIcon(QMessageBox::Critical);
|
||||
msgBox.setText(QCoreApplication::translate("Main", "An unrecoverable error occurred."));
|
||||
msgBox.setInformativeText(message);
|
||||
msgBox.show(); // Need to be shown or to moveToCenter does not work
|
||||
msgBox.move(Utils::Gui::screenCenter(&msgBox));
|
||||
msgBox.exec();
|
||||
}
|
||||
else
|
||||
{
|
||||
const QString errMsg = QCoreApplication::translate("Main", "qBittorrent has encountered an unrecoverable error.") + u'\n' + message + u'\n';
|
||||
fprintf(stderr, "%s", qUtf8Printable(errMsg));
|
||||
}
|
||||
#else
|
||||
const QString errMsg = QCoreApplication::translate("Main", "qBittorrent has encountered an unrecoverable error.") + u'\n' + message + u'\n';
|
||||
fprintf(stderr, "%s", qUtf8Printable(errMsg));
|
||||
#endif
|
||||
}
|
||||
|
||||
bool userAgreesWithLegalNotice()
|
||||
{
|
||||
Preferences *const pref = Preferences::instance();
|
||||
Q_ASSERT(!pref->getAcceptedLegal());
|
||||
|
||||
#ifdef DISABLE_GUI
|
||||
const QString eula = u"\n*** %1 ***\n"_qs.arg(QCoreApplication::translate("Main", "Legal Notice"))
|
||||
const QString eula = u"\n*** %1 ***\n"_s.arg(QCoreApplication::translate("Main", "Legal Notice"))
|
||||
+ QCoreApplication::translate("Main", "qBittorrent is a file sharing program. When you run a torrent, its data will be made available to others by means of upload. Any content you share is your sole responsibility.") + u"\n\n"
|
||||
+ QCoreApplication::translate("Main", "No further notices will be issued.") + u"\n\n"
|
||||
+ QCoreApplication::translate("Main", "Press %1 key to accept and continue...").arg(u"'y'"_qs) + u'\n';
|
||||
+ QCoreApplication::translate("Main", "Press %1 key to accept and continue...").arg(u"'y'"_s) + u'\n';
|
||||
printf("%s", qUtf8Printable(eula));
|
||||
|
||||
const char ret = getchar(); // Read pressed key
|
||||
|
||||
@@ -46,7 +46,7 @@
|
||||
namespace
|
||||
{
|
||||
const int MIGRATION_VERSION = 6;
|
||||
const QString MIGRATION_VERSION_KEY = u"Meta/MigrationVersion"_qs;
|
||||
const QString MIGRATION_VERSION_KEY = u"Meta/MigrationVersion"_s;
|
||||
|
||||
void exportWebUIHttpsFiles()
|
||||
{
|
||||
@@ -75,18 +75,18 @@ namespace
|
||||
};
|
||||
|
||||
const Path configPath = specialFolderLocation(SpecialFolder::Config);
|
||||
migrate(u"Preferences/WebUI/HTTPS/Certificate"_qs
|
||||
, u"Preferences/WebUI/HTTPS/CertificatePath"_qs
|
||||
, (configPath / Path(u"WebUICertificate.crt"_qs)));
|
||||
migrate(u"Preferences/WebUI/HTTPS/Key"_qs
|
||||
, u"Preferences/WebUI/HTTPS/KeyPath"_qs
|
||||
, (configPath / Path(u"WebUIPrivateKey.pem"_qs)));
|
||||
migrate(u"Preferences/WebUI/HTTPS/Certificate"_s
|
||||
, u"Preferences/WebUI/HTTPS/CertificatePath"_s
|
||||
, (configPath / Path(u"WebUICertificate.crt"_s)));
|
||||
migrate(u"Preferences/WebUI/HTTPS/Key"_s
|
||||
, u"Preferences/WebUI/HTTPS/KeyPath"_s
|
||||
, (configPath / Path(u"WebUIPrivateKey.pem"_s)));
|
||||
}
|
||||
|
||||
void upgradeTorrentContentLayout()
|
||||
{
|
||||
const QString oldKey = u"BitTorrent/Session/CreateTorrentSubfolder"_qs;
|
||||
const QString newKey = u"BitTorrent/Session/TorrentContentLayout"_qs;
|
||||
const QString oldKey = u"BitTorrent/Session/CreateTorrentSubfolder"_s;
|
||||
const QString newKey = u"BitTorrent/Session/TorrentContentLayout"_s;
|
||||
|
||||
SettingsStorage *settingsStorage {SettingsStorage::instance()};
|
||||
const auto oldData {settingsStorage->loadValue<QVariant>(oldKey)};
|
||||
@@ -105,8 +105,8 @@ namespace
|
||||
|
||||
void upgradeListenPortSettings()
|
||||
{
|
||||
const auto oldKey = u"BitTorrent/Session/UseRandomPort"_qs;
|
||||
const auto newKey = u"Preferences/Connection/PortRangeMin"_qs;
|
||||
const auto oldKey = u"BitTorrent/Session/UseRandomPort"_s;
|
||||
const auto newKey = u"Preferences/Connection/PortRangeMin"_s;
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
|
||||
if (settingsStorage->hasKey(oldKey))
|
||||
@@ -121,7 +121,7 @@ namespace
|
||||
void upgradeSchedulerDaysSettings()
|
||||
{
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
const auto key = u"Preferences/Scheduler/days"_qs;
|
||||
const auto key = u"Preferences/Scheduler/days"_s;
|
||||
const auto value = settingsStorage->loadValue<QString>(key);
|
||||
|
||||
bool ok = false;
|
||||
@@ -173,7 +173,7 @@ namespace
|
||||
void upgradeDNSServiceSettings()
|
||||
{
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
const auto key = u"Preferences/DynDNS/Service"_qs;
|
||||
const auto key = u"Preferences/DynDNS/Service"_s;
|
||||
const auto value = settingsStorage->loadValue<QString>(key);
|
||||
|
||||
bool ok = false;
|
||||
@@ -204,7 +204,7 @@ namespace
|
||||
void upgradeTrayIconStyleSettings()
|
||||
{
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
const auto key = u"Preferences/Advanced/TrayIconStyle"_qs;
|
||||
const auto key = u"Preferences/Advanced/TrayIconStyle"_s;
|
||||
const auto value = settingsStorage->loadValue<QString>(key);
|
||||
|
||||
bool ok = false;
|
||||
@@ -242,80 +242,80 @@ namespace
|
||||
|
||||
const KeyMapping mappings[] =
|
||||
{
|
||||
{u"AddNewTorrentDialog/Enabled"_qs, u"Preferences/Downloads/NewAdditionDialog"_qs},
|
||||
{u"AddNewTorrentDialog/Expanded"_qs, u"AddNewTorrentDialog/expanded"_qs},
|
||||
{u"AddNewTorrentDialog/Position"_qs, u"AddNewTorrentDialog/y"_qs},
|
||||
{u"AddNewTorrentDialog/SavePathHistory"_qs, u"TorrentAdditionDlg/save_path_history"_qs},
|
||||
{u"AddNewTorrentDialog/TopLevel"_qs, u"Preferences/Downloads/NewAdditionDialogFront"_qs},
|
||||
{u"AddNewTorrentDialog/TreeHeaderState"_qs, u"AddNewTorrentDialog/qt5/treeHeaderState"_qs},
|
||||
{u"AddNewTorrentDialog/Width"_qs, u"AddNewTorrentDialog/width"_qs},
|
||||
{u"BitTorrent/Session/AddExtensionToIncompleteFiles"_qs, u"Preferences/Downloads/UseIncompleteExtension"_qs},
|
||||
{u"BitTorrent/Session/AdditionalTrackers"_qs, u"Preferences/Bittorrent/TrackersList"_qs},
|
||||
{u"BitTorrent/Session/AddTorrentPaused"_qs, u"Preferences/Downloads/StartInPause"_qs},
|
||||
{u"BitTorrent/Session/AddTrackersEnabled"_qs, u"Preferences/Bittorrent/AddTrackers"_qs},
|
||||
{u"BitTorrent/Session/AlternativeGlobalDLSpeedLimit"_qs, u"Preferences/Connection/GlobalDLLimitAlt"_qs},
|
||||
{u"BitTorrent/Session/AlternativeGlobalUPSpeedLimit"_qs, u"Preferences/Connection/GlobalUPLimitAlt"_qs},
|
||||
{u"BitTorrent/Session/AnnounceIP"_qs, u"Preferences/Connection/InetAddress"_qs},
|
||||
{u"BitTorrent/Session/AnnounceToAllTrackers"_qs, u"Preferences/Advanced/AnnounceToAllTrackers"_qs},
|
||||
{u"BitTorrent/Session/AnonymousModeEnabled"_qs, u"Preferences/Advanced/AnonymousMode"_qs},
|
||||
{u"BitTorrent/Session/BandwidthSchedulerEnabled"_qs, u"Preferences/Scheduler/Enabled"_qs},
|
||||
{u"BitTorrent/Session/DefaultSavePath"_qs, u"Preferences/Downloads/SavePath"_qs},
|
||||
{u"BitTorrent/Session/DHTEnabled"_qs, u"Preferences/Bittorrent/DHT"_qs},
|
||||
{u"BitTorrent/Session/DiskCacheSize"_qs, u"Preferences/Downloads/DiskWriteCacheSize"_qs},
|
||||
{u"BitTorrent/Session/DiskCacheTTL"_qs, u"Preferences/Downloads/DiskWriteCacheTTL"_qs},
|
||||
{u"BitTorrent/Session/Encryption"_qs, u"Preferences/Bittorrent/Encryption"_qs},
|
||||
{u"BitTorrent/Session/FinishedTorrentExportDirectory"_qs, u"Preferences/Downloads/FinishedTorrentExportDir"_qs},
|
||||
{u"BitTorrent/Session/ForceProxy"_qs, u"Preferences/Connection/ProxyForce"_qs},
|
||||
{u"BitTorrent/Session/GlobalDLSpeedLimit"_qs, u"Preferences/Connection/GlobalDLLimit"_qs},
|
||||
{u"BitTorrent/Session/GlobalMaxRatio"_qs, u"Preferences/Bittorrent/MaxRatio"_qs},
|
||||
{u"BitTorrent/Session/GlobalUPSpeedLimit"_qs, u"Preferences/Connection/GlobalUPLimit"_qs},
|
||||
{u"BitTorrent/Session/IgnoreLimitsOnLAN"_qs, u"Preferences/Advanced/IgnoreLimitsLAN"_qs},
|
||||
{u"BitTorrent/Session/IgnoreSlowTorrentsForQueueing"_qs, u"Preferences/Queueing/IgnoreSlowTorrents"_qs},
|
||||
{u"BitTorrent/Session/IncludeOverheadInLimits"_qs, u"Preferences/Advanced/IncludeOverhead"_qs},
|
||||
{u"BitTorrent/Session/Interface"_qs, u"Preferences/Connection/Interface"_qs},
|
||||
{u"BitTorrent/Session/InterfaceAddress"_qs, u"Preferences/Connection/InterfaceAddress"_qs},
|
||||
{u"BitTorrent/Session/InterfaceName"_qs, u"Preferences/Connection/InterfaceName"_qs},
|
||||
{u"BitTorrent/Session/IPFilter"_qs, u"Preferences/IPFilter/File"_qs},
|
||||
{u"BitTorrent/Session/IPFilteringEnabled"_qs, u"Preferences/IPFilter/Enabled"_qs},
|
||||
{u"BitTorrent/Session/LSDEnabled"_qs, u"Preferences/Bittorrent/LSD"_qs},
|
||||
{u"BitTorrent/Session/MaxActiveDownloads"_qs, u"Preferences/Queueing/MaxActiveDownloads"_qs},
|
||||
{u"BitTorrent/Session/MaxActiveTorrents"_qs, u"Preferences/Queueing/MaxActiveTorrents"_qs},
|
||||
{u"BitTorrent/Session/MaxActiveUploads"_qs, u"Preferences/Queueing/MaxActiveUploads"_qs},
|
||||
{u"BitTorrent/Session/MaxConnections"_qs, u"Preferences/Bittorrent/MaxConnecs"_qs},
|
||||
{u"BitTorrent/Session/MaxConnectionsPerTorrent"_qs, u"Preferences/Bittorrent/MaxConnecsPerTorrent"_qs},
|
||||
{u"BitTorrent/Session/MaxHalfOpenConnections"_qs, u"Preferences/Connection/MaxHalfOpenConnec"_qs},
|
||||
{u"BitTorrent/Session/MaxRatioAction"_qs, u"Preferences/Bittorrent/MaxRatioAction"_qs},
|
||||
{u"BitTorrent/Session/MaxUploads"_qs, u"Preferences/Bittorrent/MaxUploads"_qs},
|
||||
{u"BitTorrent/Session/MaxUploadsPerTorrent"_qs, u"Preferences/Bittorrent/MaxUploadsPerTorrent"_qs},
|
||||
{u"BitTorrent/Session/OutgoingPortsMax"_qs, u"Preferences/Advanced/OutgoingPortsMax"_qs},
|
||||
{u"BitTorrent/Session/OutgoingPortsMin"_qs, u"Preferences/Advanced/OutgoingPortsMin"_qs},
|
||||
{u"BitTorrent/Session/PeXEnabled"_qs, u"Preferences/Bittorrent/PeX"_qs},
|
||||
{u"BitTorrent/Session/Port"_qs, u"Preferences/Connection/PortRangeMin"_qs},
|
||||
{u"BitTorrent/Session/Preallocation"_qs, u"Preferences/Downloads/PreAllocation"_qs},
|
||||
{u"BitTorrent/Session/ProxyPeerConnections"_qs, u"Preferences/Connection/ProxyPeerConnections"_qs},
|
||||
{u"BitTorrent/Session/QueueingSystemEnabled"_qs, u"Preferences/Queueing/QueueingEnabled"_qs},
|
||||
{u"BitTorrent/Session/RefreshInterval"_qs, u"Preferences/General/RefreshInterval"_qs},
|
||||
{u"BitTorrent/Session/SaveResumeDataInterval"_qs, u"Preferences/Downloads/SaveResumeDataInterval"_qs},
|
||||
{u"BitTorrent/Session/SuperSeedingEnabled"_qs, u"Preferences/Advanced/SuperSeeding"_qs},
|
||||
{u"BitTorrent/Session/TempPath"_qs, u"Preferences/Downloads/TempPath"_qs},
|
||||
{u"BitTorrent/Session/TempPathEnabled"_qs, u"Preferences/Downloads/TempPathEnabled"_qs},
|
||||
{u"BitTorrent/Session/TorrentExportDirectory"_qs, u"Preferences/Downloads/TorrentExportDir"_qs},
|
||||
{u"BitTorrent/Session/TrackerFilteringEnabled"_qs, u"Preferences/IPFilter/FilterTracker"_qs},
|
||||
{u"BitTorrent/Session/UseAlternativeGlobalSpeedLimit"_qs, u"Preferences/Connection/alt_speeds_on"_qs},
|
||||
{u"BitTorrent/Session/UseOSCache"_qs, u"Preferences/Advanced/osCache"_qs},
|
||||
{u"BitTorrent/Session/UseRandomPort"_qs, u"Preferences/General/UseRandomPort"_qs},
|
||||
{u"BitTorrent/Session/uTPEnabled"_qs, u"Preferences/Bittorrent/uTP"_qs},
|
||||
{u"BitTorrent/Session/uTPRateLimited"_qs, u"Preferences/Bittorrent/uTP_rate_limited"_qs},
|
||||
{u"BitTorrent/TrackerEnabled"_qs, u"Preferences/Advanced/trackerEnabled"_qs},
|
||||
{u"Network/PortForwardingEnabled"_qs, u"Preferences/Connection/UPnP"_qs},
|
||||
{u"Network/Proxy/Authentication"_qs, u"Preferences/Connection/Proxy/Authentication"_qs},
|
||||
{u"Network/Proxy/IP"_qs, u"Preferences/Connection/Proxy/IP"_qs},
|
||||
{u"Network/Proxy/OnlyForTorrents"_qs, u"Preferences/Connection/ProxyOnlyForTorrents"_qs},
|
||||
{u"Network/Proxy/Password"_qs, u"Preferences/Connection/Proxy/Password"_qs},
|
||||
{u"Network/Proxy/Port"_qs, u"Preferences/Connection/Proxy/Port"_qs},
|
||||
{u"Network/Proxy/Type"_qs, u"Preferences/Connection/ProxyType"_qs},
|
||||
{u"Network/Proxy/Username"_qs, u"Preferences/Connection/Proxy/Username"_qs},
|
||||
{u"State/BannedIPs"_qs, u"Preferences/IPFilter/BannedIPs"_qs}
|
||||
{u"AddNewTorrentDialog/Enabled"_s, u"Preferences/Downloads/NewAdditionDialog"_s},
|
||||
{u"AddNewTorrentDialog/Expanded"_s, u"AddNewTorrentDialog/expanded"_s},
|
||||
{u"AddNewTorrentDialog/Position"_s, u"AddNewTorrentDialog/y"_s},
|
||||
{u"AddNewTorrentDialog/SavePathHistory"_s, u"TorrentAdditionDlg/save_path_history"_s},
|
||||
{u"AddNewTorrentDialog/TopLevel"_s, u"Preferences/Downloads/NewAdditionDialogFront"_s},
|
||||
{u"AddNewTorrentDialog/TreeHeaderState"_s, u"AddNewTorrentDialog/qt5/treeHeaderState"_s},
|
||||
{u"AddNewTorrentDialog/Width"_s, u"AddNewTorrentDialog/width"_s},
|
||||
{u"BitTorrent/Session/AddExtensionToIncompleteFiles"_s, u"Preferences/Downloads/UseIncompleteExtension"_s},
|
||||
{u"BitTorrent/Session/AdditionalTrackers"_s, u"Preferences/Bittorrent/TrackersList"_s},
|
||||
{u"BitTorrent/Session/AddTorrentPaused"_s, u"Preferences/Downloads/StartInPause"_s},
|
||||
{u"BitTorrent/Session/AddTrackersEnabled"_s, u"Preferences/Bittorrent/AddTrackers"_s},
|
||||
{u"BitTorrent/Session/AlternativeGlobalDLSpeedLimit"_s, u"Preferences/Connection/GlobalDLLimitAlt"_s},
|
||||
{u"BitTorrent/Session/AlternativeGlobalUPSpeedLimit"_s, u"Preferences/Connection/GlobalUPLimitAlt"_s},
|
||||
{u"BitTorrent/Session/AnnounceIP"_s, u"Preferences/Connection/InetAddress"_s},
|
||||
{u"BitTorrent/Session/AnnounceToAllTrackers"_s, u"Preferences/Advanced/AnnounceToAllTrackers"_s},
|
||||
{u"BitTorrent/Session/AnonymousModeEnabled"_s, u"Preferences/Advanced/AnonymousMode"_s},
|
||||
{u"BitTorrent/Session/BandwidthSchedulerEnabled"_s, u"Preferences/Scheduler/Enabled"_s},
|
||||
{u"BitTorrent/Session/DefaultSavePath"_s, u"Preferences/Downloads/SavePath"_s},
|
||||
{u"BitTorrent/Session/DHTEnabled"_s, u"Preferences/Bittorrent/DHT"_s},
|
||||
{u"BitTorrent/Session/DiskCacheSize"_s, u"Preferences/Downloads/DiskWriteCacheSize"_s},
|
||||
{u"BitTorrent/Session/DiskCacheTTL"_s, u"Preferences/Downloads/DiskWriteCacheTTL"_s},
|
||||
{u"BitTorrent/Session/Encryption"_s, u"Preferences/Bittorrent/Encryption"_s},
|
||||
{u"BitTorrent/Session/FinishedTorrentExportDirectory"_s, u"Preferences/Downloads/FinishedTorrentExportDir"_s},
|
||||
{u"BitTorrent/Session/ForceProxy"_s, u"Preferences/Connection/ProxyForce"_s},
|
||||
{u"BitTorrent/Session/GlobalDLSpeedLimit"_s, u"Preferences/Connection/GlobalDLLimit"_s},
|
||||
{u"BitTorrent/Session/GlobalMaxRatio"_s, u"Preferences/Bittorrent/MaxRatio"_s},
|
||||
{u"BitTorrent/Session/GlobalUPSpeedLimit"_s, u"Preferences/Connection/GlobalUPLimit"_s},
|
||||
{u"BitTorrent/Session/IgnoreLimitsOnLAN"_s, u"Preferences/Advanced/IgnoreLimitsLAN"_s},
|
||||
{u"BitTorrent/Session/IgnoreSlowTorrentsForQueueing"_s, u"Preferences/Queueing/IgnoreSlowTorrents"_s},
|
||||
{u"BitTorrent/Session/IncludeOverheadInLimits"_s, u"Preferences/Advanced/IncludeOverhead"_s},
|
||||
{u"BitTorrent/Session/Interface"_s, u"Preferences/Connection/Interface"_s},
|
||||
{u"BitTorrent/Session/InterfaceAddress"_s, u"Preferences/Connection/InterfaceAddress"_s},
|
||||
{u"BitTorrent/Session/InterfaceName"_s, u"Preferences/Connection/InterfaceName"_s},
|
||||
{u"BitTorrent/Session/IPFilter"_s, u"Preferences/IPFilter/File"_s},
|
||||
{u"BitTorrent/Session/IPFilteringEnabled"_s, u"Preferences/IPFilter/Enabled"_s},
|
||||
{u"BitTorrent/Session/LSDEnabled"_s, u"Preferences/Bittorrent/LSD"_s},
|
||||
{u"BitTorrent/Session/MaxActiveDownloads"_s, u"Preferences/Queueing/MaxActiveDownloads"_s},
|
||||
{u"BitTorrent/Session/MaxActiveTorrents"_s, u"Preferences/Queueing/MaxActiveTorrents"_s},
|
||||
{u"BitTorrent/Session/MaxActiveUploads"_s, u"Preferences/Queueing/MaxActiveUploads"_s},
|
||||
{u"BitTorrent/Session/MaxConnections"_s, u"Preferences/Bittorrent/MaxConnecs"_s},
|
||||
{u"BitTorrent/Session/MaxConnectionsPerTorrent"_s, u"Preferences/Bittorrent/MaxConnecsPerTorrent"_s},
|
||||
{u"BitTorrent/Session/MaxHalfOpenConnections"_s, u"Preferences/Connection/MaxHalfOpenConnec"_s},
|
||||
{u"BitTorrent/Session/MaxRatioAction"_s, u"Preferences/Bittorrent/MaxRatioAction"_s},
|
||||
{u"BitTorrent/Session/MaxUploads"_s, u"Preferences/Bittorrent/MaxUploads"_s},
|
||||
{u"BitTorrent/Session/MaxUploadsPerTorrent"_s, u"Preferences/Bittorrent/MaxUploadsPerTorrent"_s},
|
||||
{u"BitTorrent/Session/OutgoingPortsMax"_s, u"Preferences/Advanced/OutgoingPortsMax"_s},
|
||||
{u"BitTorrent/Session/OutgoingPortsMin"_s, u"Preferences/Advanced/OutgoingPortsMin"_s},
|
||||
{u"BitTorrent/Session/PeXEnabled"_s, u"Preferences/Bittorrent/PeX"_s},
|
||||
{u"BitTorrent/Session/Port"_s, u"Preferences/Connection/PortRangeMin"_s},
|
||||
{u"BitTorrent/Session/Preallocation"_s, u"Preferences/Downloads/PreAllocation"_s},
|
||||
{u"BitTorrent/Session/ProxyPeerConnections"_s, u"Preferences/Connection/ProxyPeerConnections"_s},
|
||||
{u"BitTorrent/Session/QueueingSystemEnabled"_s, u"Preferences/Queueing/QueueingEnabled"_s},
|
||||
{u"BitTorrent/Session/RefreshInterval"_s, u"Preferences/General/RefreshInterval"_s},
|
||||
{u"BitTorrent/Session/SaveResumeDataInterval"_s, u"Preferences/Downloads/SaveResumeDataInterval"_s},
|
||||
{u"BitTorrent/Session/SuperSeedingEnabled"_s, u"Preferences/Advanced/SuperSeeding"_s},
|
||||
{u"BitTorrent/Session/TempPath"_s, u"Preferences/Downloads/TempPath"_s},
|
||||
{u"BitTorrent/Session/TempPathEnabled"_s, u"Preferences/Downloads/TempPathEnabled"_s},
|
||||
{u"BitTorrent/Session/TorrentExportDirectory"_s, u"Preferences/Downloads/TorrentExportDir"_s},
|
||||
{u"BitTorrent/Session/TrackerFilteringEnabled"_s, u"Preferences/IPFilter/FilterTracker"_s},
|
||||
{u"BitTorrent/Session/UseAlternativeGlobalSpeedLimit"_s, u"Preferences/Connection/alt_speeds_on"_s},
|
||||
{u"BitTorrent/Session/UseOSCache"_s, u"Preferences/Advanced/osCache"_s},
|
||||
{u"BitTorrent/Session/UseRandomPort"_s, u"Preferences/General/UseRandomPort"_s},
|
||||
{u"BitTorrent/Session/uTPEnabled"_s, u"Preferences/Bittorrent/uTP"_s},
|
||||
{u"BitTorrent/Session/uTPRateLimited"_s, u"Preferences/Bittorrent/uTP_rate_limited"_s},
|
||||
{u"BitTorrent/TrackerEnabled"_s, u"Preferences/Advanced/trackerEnabled"_s},
|
||||
{u"Network/PortForwardingEnabled"_s, u"Preferences/Connection/UPnP"_s},
|
||||
{u"Network/Proxy/Authentication"_s, u"Preferences/Connection/Proxy/Authentication"_s},
|
||||
{u"Network/Proxy/IP"_s, u"Preferences/Connection/Proxy/IP"_s},
|
||||
{u"Network/Proxy/OnlyForTorrents"_s, u"Preferences/Connection/ProxyOnlyForTorrents"_s},
|
||||
{u"Network/Proxy/Password"_s, u"Preferences/Connection/Proxy/Password"_s},
|
||||
{u"Network/Proxy/Port"_s, u"Preferences/Connection/Proxy/Port"_s},
|
||||
{u"Network/Proxy/Type"_s, u"Preferences/Connection/ProxyType"_s},
|
||||
{u"Network/Proxy/Username"_s, u"Preferences/Connection/Proxy/Username"_s},
|
||||
{u"State/BannedIPs"_s, u"Preferences/IPFilter/BannedIPs"_s}
|
||||
};
|
||||
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
@@ -333,7 +333,7 @@ namespace
|
||||
void migrateProxySettingsEnum()
|
||||
{
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
const auto key = u"Network/Proxy/Type"_qs;
|
||||
const auto key = u"Network/Proxy/Type"_s;
|
||||
const auto value = settingsStorage->loadValue<QString>(key);
|
||||
|
||||
bool ok = false;
|
||||
@@ -344,7 +344,7 @@ namespace
|
||||
switch (number)
|
||||
{
|
||||
case 0:
|
||||
settingsStorage->storeValue(key, u"None"_qs);
|
||||
settingsStorage->storeValue(key, Net::ProxyType::None);
|
||||
break;
|
||||
case 1:
|
||||
settingsStorage->storeValue(key, Net::ProxyType::HTTP);
|
||||
@@ -353,17 +353,17 @@ namespace
|
||||
settingsStorage->storeValue(key, Net::ProxyType::SOCKS5);
|
||||
break;
|
||||
case 3:
|
||||
settingsStorage->storeValue(key, u"HTTP_PW"_qs);
|
||||
settingsStorage->storeValue(key, u"HTTP_PW"_s);
|
||||
break;
|
||||
case 4:
|
||||
settingsStorage->storeValue(key, u"SOCKS5_PW"_qs);
|
||||
settingsStorage->storeValue(key, u"SOCKS5_PW"_s);
|
||||
break;
|
||||
case 5:
|
||||
settingsStorage->storeValue(key, Net::ProxyType::SOCKS4);
|
||||
break;
|
||||
default:
|
||||
LogMsg(QCoreApplication::translate("Upgrade", "Invalid value found in configuration file, reverting it to default. Key: \"%1\". Invalid value: \"%2\".")
|
||||
.arg(key, QString::number(number)), Log::WARNING);
|
||||
.arg(key, QString::number(number)), Log::WARNING);
|
||||
settingsStorage->removeValue(key);
|
||||
break;
|
||||
}
|
||||
@@ -373,49 +373,38 @@ namespace
|
||||
void migrateProxySettings()
|
||||
{
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
const auto proxyType = settingsStorage->loadValue<QString>(u"Network/Proxy/Type"_qs, u"None"_qs);
|
||||
const auto onlyForTorrents = settingsStorage->loadValue<bool>(u"Network/Proxy/OnlyForTorrents"_qs)
|
||||
const auto proxyType = settingsStorage->loadValue<QString>(u"Network/Proxy/Type"_s, u"None"_s);
|
||||
const auto onlyForTorrents = settingsStorage->loadValue<bool>(u"Network/Proxy/OnlyForTorrents"_s)
|
||||
|| (proxyType == u"SOCKS4");
|
||||
|
||||
if (proxyType == u"None")
|
||||
{
|
||||
settingsStorage->storeValue(u"Network/Proxy/Type"_qs, Net::ProxyType::HTTP);
|
||||
settingsStorage->storeValue(u"Network/Proxy/Profiles/BitTorrent"_s, true);
|
||||
settingsStorage->storeValue(u"Network/Proxy/Profiles/RSS"_s, !onlyForTorrents);
|
||||
settingsStorage->storeValue(u"Network/Proxy/Profiles/Misc"_s, !onlyForTorrents);
|
||||
|
||||
settingsStorage->storeValue(u"Network/Proxy/Profiles/BitTorrent"_qs, false);
|
||||
settingsStorage->storeValue(u"Network/Proxy/Profiles/RSS"_qs, false);
|
||||
settingsStorage->storeValue(u"Network/Proxy/Profiles/Misc"_qs, false);
|
||||
if (proxyType == u"HTTP_PW"_s)
|
||||
{
|
||||
settingsStorage->storeValue(u"Network/Proxy/Type"_s, Net::ProxyType::HTTP);
|
||||
settingsStorage->storeValue(u"Network/Proxy/AuthEnabled"_s, true);
|
||||
}
|
||||
else
|
||||
else if (proxyType == u"SOCKS5_PW"_s)
|
||||
{
|
||||
settingsStorage->storeValue(u"Network/Proxy/Profiles/BitTorrent"_qs, true);
|
||||
settingsStorage->storeValue(u"Network/Proxy/Profiles/RSS"_qs, !onlyForTorrents);
|
||||
settingsStorage->storeValue(u"Network/Proxy/Profiles/Misc"_qs, !onlyForTorrents);
|
||||
|
||||
if (proxyType == u"HTTP_PW"_qs)
|
||||
{
|
||||
settingsStorage->storeValue(u"Network/Proxy/Type"_qs, Net::ProxyType::HTTP);
|
||||
settingsStorage->storeValue(u"Network/Proxy/AuthEnabled"_qs, true);
|
||||
}
|
||||
else if (proxyType == u"SOCKS5_PW"_qs)
|
||||
{
|
||||
settingsStorage->storeValue(u"Network/Proxy/Type"_qs, Net::ProxyType::SOCKS5);
|
||||
settingsStorage->storeValue(u"Network/Proxy/AuthEnabled"_qs, true);
|
||||
}
|
||||
settingsStorage->storeValue(u"Network/Proxy/Type"_s, Net::ProxyType::SOCKS5);
|
||||
settingsStorage->storeValue(u"Network/Proxy/AuthEnabled"_s, true);
|
||||
}
|
||||
|
||||
settingsStorage->removeValue(u"Network/Proxy/OnlyForTorrents"_qs);
|
||||
settingsStorage->removeValue(u"Network/Proxy/OnlyForTorrents"_s);
|
||||
|
||||
const auto proxyHostnameLookup = settingsStorage->loadValue<bool>(u"BitTorrent/Session/ProxyHostnameLookup"_qs);
|
||||
settingsStorage->storeValue(u"Network/Proxy/HostnameLookupEnabled"_qs, proxyHostnameLookup);
|
||||
settingsStorage->removeValue(u"BitTorrent/Session/ProxyHostnameLookup"_qs);
|
||||
const auto proxyHostnameLookup = settingsStorage->loadValue<bool>(u"BitTorrent/Session/ProxyHostnameLookup"_s);
|
||||
settingsStorage->storeValue(u"Network/Proxy/HostnameLookupEnabled"_s, proxyHostnameLookup);
|
||||
settingsStorage->removeValue(u"BitTorrent/Session/ProxyHostnameLookup"_s);
|
||||
}
|
||||
|
||||
#ifdef Q_OS_WIN
|
||||
void migrateMemoryPrioritySettings()
|
||||
{
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
const QString oldKey = u"BitTorrent/OSMemoryPriority"_qs;
|
||||
const QString newKey = u"Application/ProcessMemoryPriority"_qs;
|
||||
const QString oldKey = u"BitTorrent/OSMemoryPriority"_s;
|
||||
const QString newKey = u"Application/ProcessMemoryPriority"_s;
|
||||
|
||||
if (settingsStorage->hasKey(oldKey))
|
||||
{
|
||||
@@ -428,24 +417,24 @@ namespace
|
||||
void migrateStartupWindowState()
|
||||
{
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
if (settingsStorage->hasKey(u"Preferences/General/StartMinimized"_qs))
|
||||
if (settingsStorage->hasKey(u"Preferences/General/StartMinimized"_s))
|
||||
{
|
||||
const auto startMinimized = settingsStorage->loadValue<bool>(u"Preferences/General/StartMinimized"_qs);
|
||||
const auto minimizeToTray = settingsStorage->loadValue<bool>(u"Preferences/General/MinimizeToTray"_qs);
|
||||
const QString windowState = startMinimized ? (minimizeToTray ? u"Hidden"_qs : u"Minimized"_qs) : u"Normal"_qs;
|
||||
settingsStorage->storeValue(u"GUI/StartUpWindowState"_qs, windowState);
|
||||
const auto startMinimized = settingsStorage->loadValue<bool>(u"Preferences/General/StartMinimized"_s);
|
||||
const auto minimizeToTray = settingsStorage->loadValue<bool>(u"Preferences/General/MinimizeToTray"_s);
|
||||
const QString windowState = startMinimized ? (minimizeToTray ? u"Hidden"_s : u"Minimized"_s) : u"Normal"_s;
|
||||
settingsStorage->storeValue(u"GUI/StartUpWindowState"_s, windowState);
|
||||
}
|
||||
}
|
||||
|
||||
void migrateChineseLocale()
|
||||
{
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
const auto key = u"Preferences/General/Locale"_qs;
|
||||
const auto key = u"Preferences/General/Locale"_s;
|
||||
if (settingsStorage->hasKey(key))
|
||||
{
|
||||
const auto locale = settingsStorage->loadValue<QString>(key);
|
||||
if (locale.compare(u"zh"_qs, Qt::CaseInsensitive) == 0)
|
||||
settingsStorage->storeValue(key, u"zh_CN"_qs);
|
||||
if (locale.compare(u"zh"_s, Qt::CaseInsensitive) == 0)
|
||||
settingsStorage->storeValue(key, u"zh_CN"_s);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -508,7 +497,7 @@ void handleChangedDefaults(const DefaultPreferencesMode mode)
|
||||
|
||||
const DefaultValue changedDefaults[] =
|
||||
{
|
||||
{u"BitTorrent/Session/QueueingSystemEnabled"_qs, true, false}
|
||||
{u"BitTorrent/Session/QueueingSystemEnabled"_s, true, false}
|
||||
};
|
||||
|
||||
auto *settingsStorage = SettingsStorage::instance();
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
AsyncFileStorage::AsyncFileStorage(const Path &storageFolderPath, QObject *parent)
|
||||
: QObject(parent)
|
||||
, m_storageDir(storageFolderPath)
|
||||
, m_lockFile((m_storageDir / Path(u"storage.lock"_qs)).data())
|
||||
, m_lockFile((m_storageDir / Path(u"storage.lock"_s)).data())
|
||||
{
|
||||
Q_ASSERT(m_storageDir.isAbsolute());
|
||||
|
||||
|
||||
@@ -36,21 +36,22 @@
|
||||
|
||||
#include "base/utils/string.h"
|
||||
|
||||
const QString PARAM_CATEGORY = u"category"_qs;
|
||||
const QString PARAM_TAGS = u"tags"_qs;
|
||||
const QString PARAM_SAVEPATH = u"save_path"_qs;
|
||||
const QString PARAM_USEDOWNLOADPATH = u"use_download_path"_qs;
|
||||
const QString PARAM_DOWNLOADPATH = u"download_path"_qs;
|
||||
const QString PARAM_OPERATINGMODE = u"operating_mode"_qs;
|
||||
const QString PARAM_QUEUETOP = u"add_to_top_of_queue"_qs;
|
||||
const QString PARAM_STOPPED = u"stopped"_qs;
|
||||
const QString PARAM_SKIPCHECKING = u"skip_checking"_qs;
|
||||
const QString PARAM_CONTENTLAYOUT = u"content_layout"_qs;
|
||||
const QString PARAM_AUTOTMM = u"use_auto_tmm"_qs;
|
||||
const QString PARAM_UPLOADLIMIT = u"upload_limit"_qs;
|
||||
const QString PARAM_DOWNLOADLIMIT = u"download_limit"_qs;
|
||||
const QString PARAM_SEEDINGTIMELIMIT = u"seeding_time_limit"_qs;
|
||||
const QString PARAM_RATIOLIMIT = u"ratio_limit"_qs;
|
||||
const QString PARAM_CATEGORY = u"category"_s;
|
||||
const QString PARAM_TAGS = u"tags"_s;
|
||||
const QString PARAM_SAVEPATH = u"save_path"_s;
|
||||
const QString PARAM_USEDOWNLOADPATH = u"use_download_path"_s;
|
||||
const QString PARAM_DOWNLOADPATH = u"download_path"_s;
|
||||
const QString PARAM_OPERATINGMODE = u"operating_mode"_s;
|
||||
const QString PARAM_QUEUETOP = u"add_to_top_of_queue"_s;
|
||||
const QString PARAM_STOPPED = u"stopped"_s;
|
||||
const QString PARAM_SKIPCHECKING = u"skip_checking"_s;
|
||||
const QString PARAM_CONTENTLAYOUT = u"content_layout"_s;
|
||||
const QString PARAM_AUTOTMM = u"use_auto_tmm"_s;
|
||||
const QString PARAM_UPLOADLIMIT = u"upload_limit"_s;
|
||||
const QString PARAM_DOWNLOADLIMIT = u"download_limit"_s;
|
||||
const QString PARAM_SEEDINGTIMELIMIT = u"seeding_time_limit"_s;
|
||||
const QString PARAM_INACTIVESEEDINGTIMELIMIT = u"inactive_seeding_time_limit"_s;
|
||||
const QString PARAM_RATIOLIMIT = u"ratio_limit"_s;
|
||||
|
||||
namespace
|
||||
{
|
||||
@@ -107,14 +108,14 @@ bool BitTorrent::operator==(const AddTorrentParams &lhs, const AddTorrentParams
|
||||
lhs.addToQueueTop, lhs.addPaused, lhs.stopCondition,
|
||||
lhs.filePaths, lhs.filePriorities, lhs.skipChecking,
|
||||
lhs.contentLayout, lhs.useAutoTMM, lhs.uploadLimit,
|
||||
lhs.downloadLimit, lhs.seedingTimeLimit, lhs.ratioLimit)
|
||||
lhs.downloadLimit, lhs.seedingTimeLimit, lhs.inactiveSeedingTimeLimit, lhs.ratioLimit)
|
||||
== std::tie(rhs.name, rhs.category, rhs.tags,
|
||||
rhs.savePath, rhs.useDownloadPath, rhs.downloadPath,
|
||||
rhs.sequential, rhs.firstLastPiecePriority, rhs.addForced,
|
||||
rhs.addToQueueTop, rhs.addPaused, rhs.stopCondition,
|
||||
rhs.filePaths, rhs.filePriorities, rhs.skipChecking,
|
||||
rhs.contentLayout, rhs.useAutoTMM, rhs.uploadLimit,
|
||||
rhs.downloadLimit, rhs.seedingTimeLimit, rhs.ratioLimit);
|
||||
rhs.downloadLimit, rhs.seedingTimeLimit, rhs.inactiveSeedingTimeLimit, rhs.ratioLimit);
|
||||
}
|
||||
|
||||
BitTorrent::AddTorrentParams BitTorrent::parseAddTorrentParams(const QJsonObject &jsonObj)
|
||||
@@ -134,6 +135,7 @@ BitTorrent::AddTorrentParams BitTorrent::parseAddTorrentParams(const QJsonObject
|
||||
params.uploadLimit = jsonObj.value(PARAM_UPLOADLIMIT).toInt(-1);
|
||||
params.downloadLimit = jsonObj.value(PARAM_DOWNLOADLIMIT).toInt(-1);
|
||||
params.seedingTimeLimit = jsonObj.value(PARAM_SEEDINGTIMELIMIT).toInt(BitTorrent::Torrent::USE_GLOBAL_SEEDING_TIME);
|
||||
params.inactiveSeedingTimeLimit = jsonObj.value(PARAM_INACTIVESEEDINGTIMELIMIT).toInt(BitTorrent::Torrent::USE_GLOBAL_INACTIVE_SEEDING_TIME);
|
||||
params.ratioLimit = jsonObj.value(PARAM_RATIOLIMIT).toDouble(BitTorrent::Torrent::USE_GLOBAL_RATIO);
|
||||
|
||||
return params;
|
||||
@@ -152,6 +154,7 @@ QJsonObject BitTorrent::serializeAddTorrentParams(const AddTorrentParams ¶ms
|
||||
{PARAM_UPLOADLIMIT, params.uploadLimit},
|
||||
{PARAM_DOWNLOADLIMIT, params.downloadLimit},
|
||||
{PARAM_SEEDINGTIMELIMIT, params.seedingTimeLimit},
|
||||
{PARAM_INACTIVESEEDINGTIMELIMIT, params.inactiveSeedingTimeLimit},
|
||||
{PARAM_RATIOLIMIT, params.ratioLimit}
|
||||
};
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ namespace BitTorrent
|
||||
int uploadLimit = -1;
|
||||
int downloadLimit = -1;
|
||||
int seedingTimeLimit = Torrent::USE_GLOBAL_SEEDING_TIME;
|
||||
int inactiveSeedingTimeLimit = Torrent::USE_GLOBAL_INACTIVE_SEEDING_TIME;
|
||||
qreal ratioLimit = Torrent::USE_GLOBAL_RATIO;
|
||||
};
|
||||
|
||||
|
||||
@@ -44,6 +44,7 @@
|
||||
#include "base/exceptions.h"
|
||||
#include "base/global.h"
|
||||
#include "base/logger.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/profile.h"
|
||||
#include "base/tagset.h"
|
||||
#include "base/utils/fs.h"
|
||||
@@ -103,8 +104,8 @@ BitTorrent::BencodeResumeDataStorage::BencodeResumeDataStorage(const Path &path,
|
||||
.arg(path.toString()));
|
||||
}
|
||||
|
||||
const QRegularExpression filenamePattern {u"^([A-Fa-f0-9]{40})\\.fastresume$"_qs};
|
||||
const QStringList filenames = QDir(path.data()).entryList(QStringList(u"*.fastresume"_qs), QDir::Files, QDir::Unsorted);
|
||||
const QRegularExpression filenamePattern {u"^([A-Fa-f0-9]{40})\\.fastresume$"_s};
|
||||
const QStringList filenames = QDir(path.data()).entryList(QStringList(u"*.fastresume"_s), QDir::Files, QDir::Unsorted);
|
||||
|
||||
m_registeredTorrents.reserve(filenames.size());
|
||||
for (const QString &filename : filenames)
|
||||
@@ -114,7 +115,7 @@ BitTorrent::BencodeResumeDataStorage::BencodeResumeDataStorage(const Path &path,
|
||||
m_registeredTorrents.append(TorrentID::fromString(rxMatch.captured(1)));
|
||||
}
|
||||
|
||||
loadQueue(path / Path(u"queue"_qs));
|
||||
loadQueue(path / Path(u"queue"_s));
|
||||
|
||||
qDebug() << "Registered torrents count: " << m_registeredTorrents.size();
|
||||
|
||||
@@ -133,12 +134,13 @@ BitTorrent::LoadResumeDataResult BitTorrent::BencodeResumeDataStorage::load(cons
|
||||
const QString idString = id.toString();
|
||||
const Path fastresumePath = path() / Path(idString + u".fastresume");
|
||||
const Path torrentFilePath = path() / Path(idString + u".torrent");
|
||||
const qint64 torrentSizeLimit = Preferences::instance()->getTorrentFileSizeLimit();
|
||||
|
||||
const auto resumeDataReadResult = Utils::IO::readFile(fastresumePath, MAX_TORRENT_SIZE);
|
||||
const auto resumeDataReadResult = Utils::IO::readFile(fastresumePath, torrentSizeLimit);
|
||||
if (!resumeDataReadResult)
|
||||
return nonstd::make_unexpected(resumeDataReadResult.error().message);
|
||||
|
||||
const auto metadataReadResult = Utils::IO::readFile(torrentFilePath, MAX_TORRENT_SIZE);
|
||||
const auto metadataReadResult = Utils::IO::readFile(torrentFilePath, torrentSizeLimit);
|
||||
if (!metadataReadResult)
|
||||
{
|
||||
if (metadataReadResult.error().status != Utils::IO::ReadError::NotExist)
|
||||
@@ -176,7 +178,7 @@ void BitTorrent::BencodeResumeDataStorage::loadQueue(const Path &queueFilename)
|
||||
return;
|
||||
}
|
||||
|
||||
const QRegularExpression hashPattern {u"^([A-Fa-f0-9]{40})$"_qs};
|
||||
const QRegularExpression hashPattern {u"^([A-Fa-f0-9]{40})$"_s};
|
||||
int start = 0;
|
||||
while (true)
|
||||
{
|
||||
@@ -200,8 +202,11 @@ void BitTorrent::BencodeResumeDataStorage::loadQueue(const Path &queueFilename)
|
||||
|
||||
BitTorrent::LoadResumeDataResult BitTorrent::BencodeResumeDataStorage::loadTorrentResumeData(const QByteArray &data, const QByteArray &metadata) const
|
||||
{
|
||||
const auto *pref = Preferences::instance();
|
||||
|
||||
lt::error_code ec;
|
||||
const lt::bdecode_node resumeDataRoot = lt::bdecode(data, ec);
|
||||
const lt::bdecode_node resumeDataRoot = lt::bdecode(data, ec
|
||||
, nullptr, pref->getBdecodeDepthLimit(), pref->getBdecodeTokenLimit());
|
||||
if (ec)
|
||||
return nonstd::make_unexpected(tr("Cannot parse resume data: %1").arg(QString::fromStdString(ec.message())));
|
||||
|
||||
@@ -214,6 +219,7 @@ BitTorrent::LoadResumeDataResult BitTorrent::BencodeResumeDataStorage::loadTorre
|
||||
torrentParams.hasFinishedStatus = resumeDataRoot.dict_find_int_value("qBt-seedStatus");
|
||||
torrentParams.firstLastPiecePriority = resumeDataRoot.dict_find_int_value("qBt-firstLastPiecePriority");
|
||||
torrentParams.seedingTimeLimit = resumeDataRoot.dict_find_int_value("qBt-seedingTimeLimit", Torrent::USE_GLOBAL_SEEDING_TIME);
|
||||
torrentParams.inactiveSeedingTimeLimit = resumeDataRoot.dict_find_int_value("qBt-inactiveSeedingTimeLimit", Torrent::USE_GLOBAL_INACTIVE_SEEDING_TIME);
|
||||
|
||||
torrentParams.savePath = Profile::instance()->fromPortablePath(
|
||||
Path(fromLTString(resumeDataRoot.dict_find_string_value("qBt-savePath"))));
|
||||
@@ -268,7 +274,9 @@ BitTorrent::LoadResumeDataResult BitTorrent::BencodeResumeDataStorage::loadTorre
|
||||
|
||||
if (!metadata.isEmpty())
|
||||
{
|
||||
const lt::bdecode_node torentInfoRoot = lt::bdecode(metadata, ec);
|
||||
const auto *pref = Preferences::instance();
|
||||
const lt::bdecode_node torentInfoRoot = lt::bdecode(metadata, ec
|
||||
, nullptr, pref->getBdecodeDepthLimit(), pref->getBdecodeTokenLimit());
|
||||
if (ec)
|
||||
return nonstd::make_unexpected(tr("Cannot parse torrent info: %1").arg(QString::fromStdString(ec.message())));
|
||||
|
||||
@@ -370,7 +378,7 @@ void BitTorrent::BencodeResumeDataStorage::Worker::store(const TorrentID &id, co
|
||||
metadataDict.insert(dataDict.extract("created by"));
|
||||
metadataDict.insert(dataDict.extract("comment"));
|
||||
|
||||
const Path torrentFilepath = m_resumeDataDir / Path(u"%1.torrent"_qs.arg(id.toString()));
|
||||
const Path torrentFilepath = m_resumeDataDir / Path(u"%1.torrent"_s.arg(id.toString()));
|
||||
const nonstd::expected<void, QString> result = Utils::IO::saveToFile(torrentFilepath, metadata);
|
||||
if (!result)
|
||||
{
|
||||
@@ -382,6 +390,7 @@ void BitTorrent::BencodeResumeDataStorage::Worker::store(const TorrentID &id, co
|
||||
|
||||
data["qBt-ratioLimit"] = static_cast<int>(resumeData.ratioLimit * 1000);
|
||||
data["qBt-seedingTimeLimit"] = resumeData.seedingTimeLimit;
|
||||
data["qBt-inactiveSeedingTimeLimit"] = resumeData.inactiveSeedingTimeLimit;
|
||||
data["qBt-category"] = resumeData.category.toStdString();
|
||||
data["qBt-tags"] = setToEntryList(resumeData.tags);
|
||||
data["qBt-name"] = resumeData.name.toStdString();
|
||||
@@ -396,7 +405,7 @@ void BitTorrent::BencodeResumeDataStorage::Worker::store(const TorrentID &id, co
|
||||
data["qBt-downloadPath"] = Profile::instance()->toPortablePath(resumeData.downloadPath).data().toStdString();
|
||||
}
|
||||
|
||||
const Path resumeFilepath = m_resumeDataDir / Path(u"%1.fastresume"_qs.arg(id.toString()));
|
||||
const Path resumeFilepath = m_resumeDataDir / Path(u"%1.fastresume"_s.arg(id.toString()));
|
||||
const nonstd::expected<void, QString> result = Utils::IO::saveToFile(resumeFilepath, data);
|
||||
if (!result)
|
||||
{
|
||||
@@ -407,10 +416,10 @@ void BitTorrent::BencodeResumeDataStorage::Worker::store(const TorrentID &id, co
|
||||
|
||||
void BitTorrent::BencodeResumeDataStorage::Worker::remove(const TorrentID &id) const
|
||||
{
|
||||
const Path resumeFilename {u"%1.fastresume"_qs.arg(id.toString())};
|
||||
const Path resumeFilename {u"%1.fastresume"_s.arg(id.toString())};
|
||||
Utils::Fs::removeFile(m_resumeDataDir / resumeFilename);
|
||||
|
||||
const Path torrentFilename {u"%1.torrent"_qs.arg(id.toString())};
|
||||
const Path torrentFilename {u"%1.torrent"_s.arg(id.toString())};
|
||||
Utils::Fs::removeFile(m_resumeDataDir / torrentFilename);
|
||||
}
|
||||
|
||||
@@ -421,7 +430,7 @@ void BitTorrent::BencodeResumeDataStorage::Worker::storeQueue(const QVector<Torr
|
||||
for (const BitTorrent::TorrentID &torrentID : queue)
|
||||
data += (torrentID.toString().toLatin1() + '\n');
|
||||
|
||||
const Path filepath = m_resumeDataDir / Path(u"queue"_qs);
|
||||
const Path filepath = m_resumeDataDir / Path(u"queue"_s);
|
||||
const nonstd::expected<void, QString> result = Utils::IO::saveToFile(filepath, data);
|
||||
if (!result)
|
||||
{
|
||||
|
||||
@@ -33,8 +33,8 @@
|
||||
|
||||
#include "base/global.h"
|
||||
|
||||
const QString OPTION_SAVEPATH = u"save_path"_qs;
|
||||
const QString OPTION_DOWNLOADPATH = u"download_path"_qs;
|
||||
const QString OPTION_SAVEPATH = u"save_path"_s;
|
||||
const QString OPTION_DOWNLOADPATH = u"download_path"_s;
|
||||
|
||||
BitTorrent::CategoryOptions BitTorrent::CategoryOptions::fromJSON(const QJsonObject &jsonObj)
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2020 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2020-2023 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -32,4 +32,4 @@
|
||||
|
||||
#include "base/global.h"
|
||||
|
||||
inline const QString QB_EXT = u".!qB"_qs;
|
||||
inline const QString QB_EXT = u".!qB"_s;
|
||||
|
||||
@@ -92,7 +92,7 @@ bool CustomDiskIOThread::async_write(lt::storage_index_t storage, const lt::peer
|
||||
, const char *buf, std::shared_ptr<lt::disk_observer> diskObserver
|
||||
, std::function<void (const lt::storage_error &)> handler, lt::disk_job_flags_t flags)
|
||||
{
|
||||
return m_nativeDiskIO->async_write(storage, peerRequest, buf, diskObserver, std::move(handler), flags);
|
||||
return m_nativeDiskIO->async_write(storage, peerRequest, buf, std::move(diskObserver), std::move(handler), flags);
|
||||
}
|
||||
|
||||
void CustomDiskIOThread::async_hash(lt::storage_index_t storage, lt::piece_index_t piece
|
||||
@@ -141,7 +141,7 @@ void CustomDiskIOThread::async_check_files(lt::storage_index_t storage, const lt
|
||||
, std::function<void (lt::status_t, const lt::storage_error &)> handler)
|
||||
{
|
||||
handleCompleteFiles(storage, m_storageData[storage].savePath);
|
||||
m_nativeDiskIO->async_check_files(storage, resume_data, links, std::move(handler));
|
||||
m_nativeDiskIO->async_check_files(storage, resume_data, std::move(links), std::move(handler));
|
||||
}
|
||||
|
||||
void CustomDiskIOThread::async_stop_torrent(lt::storage_index_t storage, std::function<void ()> handler)
|
||||
@@ -170,7 +170,7 @@ void CustomDiskIOThread::async_delete_files(lt::storage_index_t storage, lt::rem
|
||||
void CustomDiskIOThread::async_set_file_priority(lt::storage_index_t storage, lt::aux::vector<lt::download_priority_t, lt::file_index_t> priorities
|
||||
, std::function<void (const lt::storage_error &, lt::aux::vector<lt::download_priority_t, lt::file_index_t>)> handler)
|
||||
{
|
||||
m_nativeDiskIO->async_set_file_priority(storage, priorities
|
||||
m_nativeDiskIO->async_set_file_priority(storage, std::move(priorities)
|
||||
, [=, handler = std::move(handler)](const lt::storage_error &error, const lt::aux::vector<lt::download_priority_t, lt::file_index_t> &priorities)
|
||||
{
|
||||
m_storageData[storage].filePriorities = priorities;
|
||||
|
||||
@@ -55,6 +55,7 @@
|
||||
#include "base/global.h"
|
||||
#include "base/logger.h"
|
||||
#include "base/path.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/profile.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/string.h"
|
||||
@@ -63,14 +64,14 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
const QString DB_CONNECTION_NAME = u"ResumeDataStorage"_qs;
|
||||
const QString DB_CONNECTION_NAME = u"ResumeDataStorage"_s;
|
||||
|
||||
const int DB_VERSION = 4;
|
||||
const int DB_VERSION = 5;
|
||||
|
||||
const QString DB_TABLE_META = u"meta"_qs;
|
||||
const QString DB_TABLE_TORRENTS = u"torrents"_qs;
|
||||
const QString DB_TABLE_META = u"meta"_s;
|
||||
const QString DB_TABLE_TORRENTS = u"torrents"_s;
|
||||
|
||||
const QString META_VERSION = u"version"_qs;
|
||||
const QString META_VERSION = u"version"_s;
|
||||
|
||||
using namespace BitTorrent;
|
||||
|
||||
@@ -134,6 +135,7 @@ namespace
|
||||
const Column DB_COLUMN_CONTENT_LAYOUT = makeColumn("content_layout");
|
||||
const Column DB_COLUMN_RATIO_LIMIT = makeColumn("ratio_limit");
|
||||
const Column DB_COLUMN_SEEDING_TIME_LIMIT = makeColumn("seeding_time_limit");
|
||||
const Column DB_COLUMN_INACTIVE_SEEDING_TIME_LIMIT = makeColumn("inactive_seeding_time_limit");
|
||||
const Column DB_COLUMN_HAS_OUTER_PIECES_PRIORITY = makeColumn("has_outer_pieces_priority");
|
||||
const Column DB_COLUMN_HAS_SEED_STATUS = makeColumn("has_seed_status");
|
||||
const Column DB_COLUMN_OPERATING_MODE = makeColumn("operating_mode");
|
||||
@@ -158,7 +160,7 @@ namespace
|
||||
|
||||
QString makeCreateTableStatement(const QString &tableName, const QStringList &items)
|
||||
{
|
||||
return u"CREATE TABLE %1 (%2)"_qs.arg(quoted(tableName), items.join(u','));
|
||||
return u"CREATE TABLE %1 (%2)"_s.arg(quoted(tableName), items.join(u','));
|
||||
}
|
||||
|
||||
std::pair<QString, QString> joinColumns(const QVector<Column> &columns)
|
||||
@@ -189,27 +191,27 @@ namespace
|
||||
QString makeInsertStatement(const QString &tableName, const QVector<Column> &columns)
|
||||
{
|
||||
const auto [names, values] = joinColumns(columns);
|
||||
return u"INSERT INTO %1 (%2) VALUES (%3)"_qs
|
||||
return u"INSERT INTO %1 (%2) VALUES (%3)"_s
|
||||
.arg(quoted(tableName), names, values);
|
||||
}
|
||||
|
||||
QString makeUpdateStatement(const QString &tableName, const QVector<Column> &columns)
|
||||
{
|
||||
const auto [names, values] = joinColumns(columns);
|
||||
return u"UPDATE %1 SET (%2) = (%3)"_qs
|
||||
return u"UPDATE %1 SET (%2) = (%3)"_s
|
||||
.arg(quoted(tableName), names, values);
|
||||
}
|
||||
|
||||
QString makeOnConflictUpdateStatement(const Column &constraint, const QVector<Column> &columns)
|
||||
{
|
||||
const auto [names, values] = joinColumns(columns);
|
||||
return u" ON CONFLICT (%1) DO UPDATE SET (%2) = (%3)"_qs
|
||||
return u" ON CONFLICT (%1) DO UPDATE SET (%2) = (%3)"_s
|
||||
.arg(quoted(constraint.name), names, values);
|
||||
}
|
||||
|
||||
QString makeColumnDefinition(const Column &column, const char *definition)
|
||||
{
|
||||
return u"%1 %2"_qs.arg(quoted(column.name), QString::fromLatin1(definition));
|
||||
return u"%1 %2"_s.arg(quoted(column.name), QString::fromLatin1(definition));
|
||||
}
|
||||
|
||||
LoadTorrentParams parseQueryResultRow(const QSqlQuery &query)
|
||||
@@ -227,6 +229,7 @@ namespace
|
||||
resumeData.firstLastPiecePriority = query.value(DB_COLUMN_HAS_OUTER_PIECES_PRIORITY.name).toBool();
|
||||
resumeData.ratioLimit = query.value(DB_COLUMN_RATIO_LIMIT.name).toInt() / 1000.0;
|
||||
resumeData.seedingTimeLimit = query.value(DB_COLUMN_SEEDING_TIME_LIMIT.name).toInt();
|
||||
resumeData.inactiveSeedingTimeLimit = query.value(DB_COLUMN_INACTIVE_SEEDING_TIME_LIMIT.name).toInt();
|
||||
resumeData.contentLayout = Utils::String::toEnum<TorrentContentLayout>(
|
||||
query.value(DB_COLUMN_CONTENT_LAYOUT.name).toString(), TorrentContentLayout::Original);
|
||||
resumeData.operatingMode = Utils::String::toEnum<TorrentOperatingMode>(
|
||||
@@ -245,9 +248,13 @@ namespace
|
||||
}
|
||||
|
||||
const QByteArray bencodedResumeData = query.value(DB_COLUMN_RESUMEDATA.name).toByteArray();
|
||||
const auto *pref = Preferences::instance();
|
||||
const int bdecodeDepthLimit = pref->getBdecodeDepthLimit();
|
||||
const int bdecodeTokenLimit = pref->getBdecodeTokenLimit();
|
||||
|
||||
lt::error_code ec;
|
||||
const lt::bdecode_node resumeDataRoot = lt::bdecode(bencodedResumeData, ec);
|
||||
const lt::bdecode_node resumeDataRoot = lt::bdecode(bencodedResumeData, ec
|
||||
, nullptr, bdecodeDepthLimit, bdecodeTokenLimit);
|
||||
|
||||
lt::add_torrent_params &p = resumeData.ltAddTorrentParams;
|
||||
|
||||
@@ -256,7 +263,8 @@ namespace
|
||||
if (const QByteArray bencodedMetadata = query.value(DB_COLUMN_METADATA.name).toByteArray()
|
||||
; !bencodedMetadata.isEmpty())
|
||||
{
|
||||
const lt::bdecode_node torentInfoRoot = lt::bdecode(bencodedMetadata, ec);
|
||||
const lt::bdecode_node torentInfoRoot = lt::bdecode(bencodedMetadata, ec
|
||||
, nullptr, bdecodeDepthLimit, bdecodeTokenLimit);
|
||||
p.ti = std::make_shared<lt::torrent_info>(torentInfoRoot, ec);
|
||||
}
|
||||
|
||||
@@ -292,7 +300,7 @@ namespace BitTorrent
|
||||
private:
|
||||
void addJob(std::unique_ptr<Job> job);
|
||||
|
||||
const QString m_connectionName = u"ResumeDataStorageWorker"_qs;
|
||||
const QString m_connectionName = u"ResumeDataStorageWorker"_s;
|
||||
const Path m_path;
|
||||
QReadWriteLock &m_dbLock;
|
||||
|
||||
@@ -308,7 +316,7 @@ BitTorrent::DBResumeDataStorage::DBResumeDataStorage(const Path &dbPath, QObject
|
||||
{
|
||||
const bool needCreateDB = !dbPath.exists();
|
||||
|
||||
auto db = QSqlDatabase::addDatabase(u"QSQLITE"_qs, DB_CONNECTION_NAME);
|
||||
auto db = QSqlDatabase::addDatabase(u"QSQLITE"_s, DB_CONNECTION_NAME);
|
||||
db.setDatabaseName(dbPath.data());
|
||||
if (!db.open())
|
||||
throw RuntimeError(db.lastError().text());
|
||||
@@ -337,7 +345,7 @@ BitTorrent::DBResumeDataStorage::~DBResumeDataStorage()
|
||||
|
||||
QVector<BitTorrent::TorrentID> BitTorrent::DBResumeDataStorage::registeredTorrents() const
|
||||
{
|
||||
const auto selectTorrentIDStatement = u"SELECT %1 FROM %2 ORDER BY %3;"_qs
|
||||
const auto selectTorrentIDStatement = u"SELECT %1 FROM %2 ORDER BY %3;"_s
|
||||
.arg(quoted(DB_COLUMN_TORRENT_ID.name), quoted(DB_TABLE_TORRENTS), quoted(DB_COLUMN_QUEUE_POSITION.name));
|
||||
|
||||
auto db = QSqlDatabase::database(DB_CONNECTION_NAME);
|
||||
@@ -356,7 +364,7 @@ QVector<BitTorrent::TorrentID> BitTorrent::DBResumeDataStorage::registeredTorren
|
||||
|
||||
BitTorrent::LoadResumeDataResult BitTorrent::DBResumeDataStorage::load(const TorrentID &id) const
|
||||
{
|
||||
const QString selectTorrentStatement = u"SELECT * FROM %1 WHERE %2 = %3;"_qs
|
||||
const QString selectTorrentStatement = u"SELECT * FROM %1 WHERE %2 = %3;"_s
|
||||
.arg(quoted(DB_TABLE_TORRENTS), quoted(DB_COLUMN_TORRENT_ID.name), DB_COLUMN_TORRENT_ID.placeholder);
|
||||
|
||||
auto db = QSqlDatabase::database(DB_CONNECTION_NAME);
|
||||
@@ -399,17 +407,17 @@ void BitTorrent::DBResumeDataStorage::storeQueue(const QVector<TorrentID> &queue
|
||||
|
||||
void BitTorrent::DBResumeDataStorage::doLoadAll() const
|
||||
{
|
||||
const QString connectionName = u"ResumeDataStorageLoadAll"_qs;
|
||||
const QString connectionName = u"ResumeDataStorageLoadAll"_s;
|
||||
|
||||
{
|
||||
auto db = QSqlDatabase::addDatabase(u"QSQLITE"_qs, connectionName);
|
||||
auto db = QSqlDatabase::addDatabase(u"QSQLITE"_s, connectionName);
|
||||
db.setDatabaseName(path().data());
|
||||
if (!db.open())
|
||||
throw RuntimeError(db.lastError().text());
|
||||
|
||||
QSqlQuery query {db};
|
||||
|
||||
const auto selectTorrentIDStatement = u"SELECT %1 FROM %2 ORDER BY %3;"_qs
|
||||
const auto selectTorrentIDStatement = u"SELECT %1 FROM %2 ORDER BY %3;"_s
|
||||
.arg(quoted(DB_COLUMN_TORRENT_ID.name), quoted(DB_TABLE_TORRENTS), quoted(DB_COLUMN_QUEUE_POSITION.name));
|
||||
|
||||
const QReadLocker locker {&m_dbLock};
|
||||
@@ -424,7 +432,7 @@ void BitTorrent::DBResumeDataStorage::doLoadAll() const
|
||||
|
||||
emit const_cast<DBResumeDataStorage *>(this)->loadStarted(registeredTorrents);
|
||||
|
||||
const auto selectStatement = u"SELECT * FROM %1 ORDER BY %2;"_qs.arg(quoted(DB_TABLE_TORRENTS), quoted(DB_COLUMN_QUEUE_POSITION.name));
|
||||
const auto selectStatement = u"SELECT * FROM %1 ORDER BY %2;"_s.arg(quoted(DB_TABLE_TORRENTS), quoted(DB_COLUMN_QUEUE_POSITION.name));
|
||||
if (!query.exec(selectStatement))
|
||||
throw RuntimeError(query.lastError().text());
|
||||
|
||||
@@ -442,7 +450,7 @@ void BitTorrent::DBResumeDataStorage::doLoadAll() const
|
||||
|
||||
int BitTorrent::DBResumeDataStorage::currentDBVersion() const
|
||||
{
|
||||
const auto selectDBVersionStatement = u"SELECT %1 FROM %2 WHERE %3 = %4;"_qs
|
||||
const auto selectDBVersionStatement = u"SELECT %1 FROM %2 WHERE %3 = %4;"_s
|
||||
.arg(quoted(DB_COLUMN_VALUE.name), quoted(DB_TABLE_META), quoted(DB_COLUMN_NAME.name), DB_COLUMN_NAME.placeholder);
|
||||
|
||||
auto db = QSqlDatabase::database(DB_CONNECTION_NAME);
|
||||
@@ -521,6 +529,7 @@ void BitTorrent::DBResumeDataStorage::createDB() const
|
||||
makeColumnDefinition(DB_COLUMN_CONTENT_LAYOUT, "TEXT NOT NULL"),
|
||||
makeColumnDefinition(DB_COLUMN_RATIO_LIMIT, "INTEGER NOT NULL"),
|
||||
makeColumnDefinition(DB_COLUMN_SEEDING_TIME_LIMIT, "INTEGER NOT NULL"),
|
||||
makeColumnDefinition(DB_COLUMN_INACTIVE_SEEDING_TIME_LIMIT, "INTEGER NOT NULL"),
|
||||
makeColumnDefinition(DB_COLUMN_HAS_OUTER_PIECES_PRIORITY, "INTEGER NOT NULL"),
|
||||
makeColumnDefinition(DB_COLUMN_HAS_SEED_STATUS, "INTEGER NOT NULL"),
|
||||
makeColumnDefinition(DB_COLUMN_OPERATING_MODE, "TEXT NOT NULL"),
|
||||
@@ -533,8 +542,8 @@ void BitTorrent::DBResumeDataStorage::createDB() const
|
||||
if (!query.exec(createTableTorrentsQuery))
|
||||
throw RuntimeError(query.lastError().text());
|
||||
|
||||
const QString torrentsQueuePositionIndexName = u"%1_%2_INDEX"_qs.arg(DB_TABLE_TORRENTS, DB_COLUMN_QUEUE_POSITION.name);
|
||||
const QString createTorrentsQueuePositionIndexQuery = u"CREATE INDEX %1 ON %2 (%3)"_qs
|
||||
const QString torrentsQueuePositionIndexName = u"%1_%2_INDEX"_s.arg(DB_TABLE_TORRENTS, DB_COLUMN_QUEUE_POSITION.name);
|
||||
const QString createTorrentsQueuePositionIndexQuery = u"CREATE INDEX %1 ON %2 (%3)"_s
|
||||
.arg(quoted(torrentsQueuePositionIndexName), quoted(DB_TABLE_TORRENTS), quoted(DB_COLUMN_QUEUE_POSITION.name));
|
||||
if (!query.exec(createTorrentsQueuePositionIndexQuery))
|
||||
throw RuntimeError(query.lastError().text());
|
||||
@@ -567,11 +576,11 @@ void BitTorrent::DBResumeDataStorage::updateDB(const int fromVersion) const
|
||||
{
|
||||
if (fromVersion == 1)
|
||||
{
|
||||
const auto testQuery = u"SELECT COUNT(%1) FROM %2;"_qs
|
||||
const auto testQuery = u"SELECT COUNT(%1) FROM %2;"_s
|
||||
.arg(quoted(DB_COLUMN_DOWNLOAD_PATH.name), quoted(DB_TABLE_TORRENTS));
|
||||
if (!query.exec(testQuery))
|
||||
{
|
||||
const auto alterTableTorrentsQuery = u"ALTER TABLE %1 ADD %2"_qs
|
||||
const auto alterTableTorrentsQuery = u"ALTER TABLE %1 ADD %2"_s
|
||||
.arg(quoted(DB_TABLE_TORRENTS), makeColumnDefinition(DB_COLUMN_DOWNLOAD_PATH, "TEXT"));
|
||||
if (!query.exec(alterTableTorrentsQuery))
|
||||
throw RuntimeError(query.lastError().text());
|
||||
@@ -580,11 +589,11 @@ void BitTorrent::DBResumeDataStorage::updateDB(const int fromVersion) const
|
||||
|
||||
if (fromVersion <= 2)
|
||||
{
|
||||
const auto testQuery = u"SELECT COUNT(%1) FROM %2;"_qs
|
||||
const auto testQuery = u"SELECT COUNT(%1) FROM %2;"_s
|
||||
.arg(quoted(DB_COLUMN_STOP_CONDITION.name), quoted(DB_TABLE_TORRENTS));
|
||||
if (!query.exec(testQuery))
|
||||
{
|
||||
const auto alterTableTorrentsQuery = u"ALTER TABLE %1 ADD %2"_qs
|
||||
const auto alterTableTorrentsQuery = u"ALTER TABLE %1 ADD %2"_s
|
||||
.arg(quoted(DB_TABLE_TORRENTS), makeColumnDefinition(DB_COLUMN_STOP_CONDITION, "TEXT NOT NULL DEFAULT `None`"));
|
||||
if (!query.exec(alterTableTorrentsQuery))
|
||||
throw RuntimeError(query.lastError().text());
|
||||
@@ -593,13 +602,21 @@ void BitTorrent::DBResumeDataStorage::updateDB(const int fromVersion) const
|
||||
|
||||
if (fromVersion <= 3)
|
||||
{
|
||||
const QString torrentsQueuePositionIndexName = u"%1_%2_INDEX"_qs.arg(DB_TABLE_TORRENTS, DB_COLUMN_QUEUE_POSITION.name);
|
||||
const QString createTorrentsQueuePositionIndexQuery = u"CREATE INDEX IF NOT EXISTS %1 ON %2 (%3)"_qs
|
||||
const QString torrentsQueuePositionIndexName = u"%1_%2_INDEX"_s.arg(DB_TABLE_TORRENTS, DB_COLUMN_QUEUE_POSITION.name);
|
||||
const QString createTorrentsQueuePositionIndexQuery = u"CREATE INDEX IF NOT EXISTS %1 ON %2 (%3)"_s
|
||||
.arg(quoted(torrentsQueuePositionIndexName), quoted(DB_TABLE_TORRENTS), quoted(DB_COLUMN_QUEUE_POSITION.name));
|
||||
if (!query.exec(createTorrentsQueuePositionIndexQuery))
|
||||
throw RuntimeError(query.lastError().text());
|
||||
}
|
||||
|
||||
if (fromVersion <= 4)
|
||||
{
|
||||
const auto alterTableTorrentsQuery = u"ALTER TABLE %1 ADD %2"_s
|
||||
.arg(quoted(DB_TABLE_TORRENTS), makeColumnDefinition(DB_COLUMN_INACTIVE_SEEDING_TIME_LIMIT, "INTEGER NOT NULL DEFAULT -2"));
|
||||
if (!query.exec(alterTableTorrentsQuery))
|
||||
throw RuntimeError(query.lastError().text());
|
||||
}
|
||||
|
||||
const QString updateMetaVersionQuery = makeUpdateStatement(DB_TABLE_META, {DB_COLUMN_NAME, DB_COLUMN_VALUE});
|
||||
if (!query.prepare(updateMetaVersionQuery))
|
||||
throw RuntimeError(query.lastError().text());
|
||||
@@ -625,14 +642,14 @@ void BitTorrent::DBResumeDataStorage::enableWALMode() const
|
||||
auto db = QSqlDatabase::database(DB_CONNECTION_NAME);
|
||||
QSqlQuery query {db};
|
||||
|
||||
if (!query.exec(u"PRAGMA journal_mode = WAL;"_qs))
|
||||
if (!query.exec(u"PRAGMA journal_mode = WAL;"_s))
|
||||
throw RuntimeError(query.lastError().text());
|
||||
|
||||
if (!query.next())
|
||||
throw RuntimeError(tr("Couldn't obtain query result."));
|
||||
|
||||
const QString result = query.value(0).toString();
|
||||
if (result.compare(u"WAL"_qs, Qt::CaseInsensitive) != 0)
|
||||
if (result.compare(u"WAL"_s, Qt::CaseInsensitive) != 0)
|
||||
throw RuntimeError(tr("WAL mode is probably unsupported due to filesystem limitations."));
|
||||
}
|
||||
|
||||
@@ -645,7 +662,7 @@ BitTorrent::DBResumeDataStorage::Worker::Worker(const Path &dbPath, QReadWriteLo
|
||||
void BitTorrent::DBResumeDataStorage::Worker::run()
|
||||
{
|
||||
{
|
||||
auto db = QSqlDatabase::addDatabase(u"QSQLITE"_qs, m_connectionName);
|
||||
auto db = QSqlDatabase::addDatabase(u"QSQLITE"_s, m_connectionName);
|
||||
db.setDatabaseName(m_path.data());
|
||||
if (!db.open())
|
||||
throw RuntimeError(db.lastError().text());
|
||||
@@ -661,7 +678,7 @@ void BitTorrent::DBResumeDataStorage::Worker::run()
|
||||
db.commit();
|
||||
m_dbLock.unlock();
|
||||
|
||||
qDebug() << "Resume data changes are commited. Transacted jobs:" << transactedJobsCount;
|
||||
qDebug() << "Resume data changes are committed. Transacted jobs:" << transactedJobsCount;
|
||||
transactedJobsCount = 0;
|
||||
}
|
||||
|
||||
@@ -776,6 +793,7 @@ namespace
|
||||
DB_COLUMN_CONTENT_LAYOUT,
|
||||
DB_COLUMN_RATIO_LIMIT,
|
||||
DB_COLUMN_SEEDING_TIME_LIMIT,
|
||||
DB_COLUMN_INACTIVE_SEEDING_TIME_LIMIT,
|
||||
DB_COLUMN_HAS_OUTER_PIECES_PRIORITY,
|
||||
DB_COLUMN_HAS_SEED_STATUS,
|
||||
DB_COLUMN_OPERATING_MODE,
|
||||
@@ -830,10 +848,11 @@ namespace
|
||||
query.bindValue(DB_COLUMN_NAME.placeholder, m_resumeData.name);
|
||||
query.bindValue(DB_COLUMN_CATEGORY.placeholder, m_resumeData.category);
|
||||
query.bindValue(DB_COLUMN_TAGS.placeholder, (m_resumeData.tags.isEmpty()
|
||||
? QVariant(QVariant::String) : m_resumeData.tags.join(u","_qs)));
|
||||
? QVariant(QVariant::String) : m_resumeData.tags.join(u","_s)));
|
||||
query.bindValue(DB_COLUMN_CONTENT_LAYOUT.placeholder, Utils::String::fromEnum(m_resumeData.contentLayout));
|
||||
query.bindValue(DB_COLUMN_RATIO_LIMIT.placeholder, static_cast<int>(m_resumeData.ratioLimit * 1000));
|
||||
query.bindValue(DB_COLUMN_SEEDING_TIME_LIMIT.placeholder, m_resumeData.seedingTimeLimit);
|
||||
query.bindValue(DB_COLUMN_INACTIVE_SEEDING_TIME_LIMIT.placeholder, m_resumeData.inactiveSeedingTimeLimit);
|
||||
query.bindValue(DB_COLUMN_HAS_OUTER_PIECES_PRIORITY.placeholder, m_resumeData.firstLastPiecePriority);
|
||||
query.bindValue(DB_COLUMN_HAS_SEED_STATUS.placeholder, m_resumeData.hasFinishedStatus);
|
||||
query.bindValue(DB_COLUMN_OPERATING_MODE.placeholder, Utils::String::fromEnum(m_resumeData.operatingMode));
|
||||
@@ -867,7 +886,7 @@ namespace
|
||||
|
||||
void RemoveJob::perform(QSqlDatabase db)
|
||||
{
|
||||
const auto deleteTorrentStatement = u"DELETE FROM %1 WHERE %2 = %3;"_qs
|
||||
const auto deleteTorrentStatement = u"DELETE FROM %1 WHERE %2 = %3;"_s
|
||||
.arg(quoted(DB_TABLE_TORRENTS), quoted(DB_COLUMN_TORRENT_ID.name), DB_COLUMN_TORRENT_ID.placeholder);
|
||||
|
||||
QSqlQuery query {db};
|
||||
@@ -895,7 +914,7 @@ namespace
|
||||
|
||||
void StoreQueueJob::perform(QSqlDatabase db)
|
||||
{
|
||||
const auto updateQueuePosStatement = u"UPDATE %1 SET %2 = %3 WHERE %4 = %5;"_qs
|
||||
const auto updateQueuePosStatement = u"UPDATE %1 SET %2 = %3 WHERE %4 = %5;"_s
|
||||
.arg(quoted(DB_TABLE_TORRENTS), quoted(DB_COLUMN_QUEUE_POSITION.name), DB_COLUMN_QUEUE_POSITION.placeholder
|
||||
, quoted(DB_COLUMN_TORRENT_ID.name), DB_COLUMN_TORRENT_ID.placeholder);
|
||||
|
||||
|
||||
@@ -617,17 +617,17 @@ void FilterParserThread::run()
|
||||
{
|
||||
qDebug("Processing filter file");
|
||||
int ruleCount = 0;
|
||||
if (m_filePath.hasExtension(u".p2p"_qs))
|
||||
if (m_filePath.hasExtension(u".p2p"_s))
|
||||
{
|
||||
// PeerGuardian p2p file
|
||||
ruleCount = parseP2PFilterFile();
|
||||
}
|
||||
else if (m_filePath.hasExtension(u".p2b"_qs))
|
||||
else if (m_filePath.hasExtension(u".p2b"_s))
|
||||
{
|
||||
// PeerGuardian p2b file
|
||||
ruleCount = parseP2BFilterFile();
|
||||
}
|
||||
else if (m_filePath.hasExtension(u".dat"_qs))
|
||||
else if (m_filePath.hasExtension(u".dat"_s))
|
||||
{
|
||||
// eMule DAT format
|
||||
ruleCount = parseDATFilterFile();
|
||||
|
||||
@@ -60,5 +60,6 @@ namespace BitTorrent
|
||||
|
||||
qreal ratioLimit = Torrent::USE_GLOBAL_RATIO;
|
||||
int seedingTimeLimit = Torrent::USE_GLOBAL_SEEDING_TIME;
|
||||
int inactiveSeedingTimeLimit = Torrent::USE_GLOBAL_INACTIVE_SEEDING_TIME;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -53,9 +53,9 @@ namespace
|
||||
const int V1_BASE32_SIZE = SHA1Hash::length() * 1.6;
|
||||
|
||||
return ((((string.size() == V1_HEX_SIZE))
|
||||
&& !string.contains(QRegularExpression(u"[^0-9A-Fa-f]"_qs)))
|
||||
&& !string.contains(QRegularExpression(u"[^0-9A-Fa-f]"_s)))
|
||||
|| ((string.size() == V1_BASE32_SIZE)
|
||||
&& !string.contains(QRegularExpression(u"[^2-7A-Za-z]"_qs))));
|
||||
&& !string.contains(QRegularExpression(u"[^2-7A-Za-z]"_s))));
|
||||
}
|
||||
|
||||
bool isV2Hash(const QString &string)
|
||||
@@ -66,7 +66,7 @@ namespace
|
||||
const int V2_HEX_SIZE = SHA256Hash::length() * 2;
|
||||
|
||||
return (string.size() == V2_HEX_SIZE)
|
||||
&& !string.contains(QRegularExpression(u"[^0-9A-Fa-f]"_qs));
|
||||
&& !string.contains(QRegularExpression(u"[^0-9A-Fa-f]"_s));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace
|
||||
bool NativeSessionExtension::isSessionListening() const
|
||||
{
|
||||
const QReadLocker locker {&m_lock};
|
||||
return m_isSesssionListening;
|
||||
return m_isSessionListening;
|
||||
}
|
||||
|
||||
void NativeSessionExtension::added(const lt::session_handle &nativeSession)
|
||||
@@ -81,5 +81,5 @@ void NativeSessionExtension::on_alert(const lt::alert *alert)
|
||||
void NativeSessionExtension::handleSessionStatsAlert([[maybe_unused]] const lt::session_stats_alert *alert)
|
||||
{
|
||||
const QWriteLocker locker {&m_lock};
|
||||
m_isSesssionListening = m_nativeSession.is_listening();
|
||||
m_isSessionListening = m_nativeSession.is_listening();
|
||||
}
|
||||
|
||||
@@ -52,5 +52,5 @@ private:
|
||||
lt::session_handle m_nativeSession;
|
||||
|
||||
mutable QReadWriteLock m_lock;
|
||||
bool m_isSesssionListening = false;
|
||||
bool m_isSessionListening = false;
|
||||
};
|
||||
|
||||
@@ -184,7 +184,7 @@ QString PeerInfo::I2PAddress() const
|
||||
if (!useI2PSocket())
|
||||
return {};
|
||||
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
#if defined(QBT_USES_LIBTORRENT2) && TORRENT_USE_I2P
|
||||
if (m_I2PAddress.isEmpty())
|
||||
{
|
||||
const lt::sha256_hash destHash = m_nativeInfo.i2p_destination();
|
||||
@@ -262,8 +262,8 @@ QString PeerInfo::connectionType() const
|
||||
return C_UTP;
|
||||
|
||||
return (m_nativeInfo.connection_type == lt::peer_info::standard_bittorrent)
|
||||
? u"BT"_qs
|
||||
: u"Web"_qs;
|
||||
? u"BT"_s
|
||||
: u"Web"_s;
|
||||
}
|
||||
|
||||
qreal PeerInfo::calcRelevance(const QBitArray &allPieces) const
|
||||
@@ -287,7 +287,7 @@ void PeerInfo::determineFlags()
|
||||
const auto updateFlags = [this](const QChar specifier, const QString &explanation)
|
||||
{
|
||||
m_flags += (specifier + u' ');
|
||||
m_flagsDescription += u"%1 = %2\n"_qs.arg(specifier, explanation);
|
||||
m_flagsDescription += u"%1 = %2\n"_s.arg(specifier, explanation);
|
||||
};
|
||||
|
||||
if (isInteresting())
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
|
||||
PortForwarderImpl::PortForwarderImpl(BitTorrent::SessionImpl *provider, QObject *parent)
|
||||
: Net::PortForwarder(parent)
|
||||
, m_storeActive {u"Network/PortForwardingEnabled"_qs, true}
|
||||
, m_storeActive {u"Network/PortForwardingEnabled"_s, true}
|
||||
, m_provider {provider}
|
||||
{
|
||||
if (isEnabled())
|
||||
@@ -67,7 +67,7 @@ void PortForwarderImpl::setPorts(const QString &profile, QSet<quint16> ports)
|
||||
{
|
||||
const QSet<quint16> oldForwardedPorts = std::accumulate(m_portProfiles.cbegin(), m_portProfiles.cend(), QSet<quint16>());
|
||||
|
||||
m_portProfiles[profile] = ports;
|
||||
m_portProfiles[profile] = std::move(ports);
|
||||
const QSet<quint16> newForwardedPorts = std::accumulate(m_portProfiles.cbegin(), m_portProfiles.cend(), QSet<quint16>());
|
||||
|
||||
m_provider->removeMappedPorts(oldForwardedPorts - newForwardedPorts);
|
||||
|
||||
@@ -203,6 +203,8 @@ namespace BitTorrent
|
||||
virtual void setGlobalMaxRatio(qreal ratio) = 0;
|
||||
virtual int globalMaxSeedingMinutes() const = 0;
|
||||
virtual void setGlobalMaxSeedingMinutes(int minutes) = 0;
|
||||
virtual int globalMaxInactiveSeedingMinutes() const = 0;
|
||||
virtual void setGlobalMaxInactiveSeedingMinutes(int minutes) = 0;
|
||||
virtual bool isDHTEnabled() const = 0;
|
||||
virtual void setDHTEnabled(bool enabled) = 0;
|
||||
virtual bool isLSDEnabled() const = 0;
|
||||
@@ -419,6 +421,8 @@ namespace BitTorrent
|
||||
virtual void setBannedIPs(const QStringList &newList) = 0;
|
||||
virtual ResumeDataStorageType resumeDataStorageType() const = 0;
|
||||
virtual void setResumeDataStorageType(ResumeDataStorageType type) = 0;
|
||||
virtual bool isMergeTrackersEnabled() const = 0;
|
||||
virtual void setMergeTrackersEnabled(bool enabled) = 0;
|
||||
|
||||
virtual bool isRestored() const = 0;
|
||||
|
||||
|
||||
@@ -96,7 +96,6 @@
|
||||
#include "base/version.h"
|
||||
#include "bandwidthscheduler.h"
|
||||
#include "bencoderesumedatastorage.h"
|
||||
#include "common.h"
|
||||
#include "customstorage.h"
|
||||
#include "dbresumedatastorage.h"
|
||||
#include "downloadpriority.h"
|
||||
@@ -115,7 +114,7 @@
|
||||
using namespace std::chrono_literals;
|
||||
using namespace BitTorrent;
|
||||
|
||||
const Path CATEGORIES_FILE_NAME {u"categories.json"_qs};
|
||||
const Path CATEGORIES_FILE_NAME {u"categories.json"_s};
|
||||
const int MAX_PROCESSING_RESUMEDATA_COUNT = 50;
|
||||
const int STATISTICS_SAVE_INTERVAL = std::chrono::milliseconds(15min).count();
|
||||
|
||||
@@ -213,33 +212,33 @@ namespace
|
||||
{
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
case lt::socket_type_t::http:
|
||||
return u"HTTP"_qs;
|
||||
return u"HTTP"_s;
|
||||
case lt::socket_type_t::http_ssl:
|
||||
return u"HTTP_SSL"_qs;
|
||||
return u"HTTP_SSL"_s;
|
||||
#endif
|
||||
case lt::socket_type_t::i2p:
|
||||
return u"I2P"_qs;
|
||||
return u"I2P"_s;
|
||||
case lt::socket_type_t::socks5:
|
||||
return u"SOCKS5"_qs;
|
||||
return u"SOCKS5"_s;
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
case lt::socket_type_t::socks5_ssl:
|
||||
return u"SOCKS5_SSL"_qs;
|
||||
return u"SOCKS5_SSL"_s;
|
||||
#endif
|
||||
case lt::socket_type_t::tcp:
|
||||
return u"TCP"_qs;
|
||||
return u"TCP"_s;
|
||||
case lt::socket_type_t::tcp_ssl:
|
||||
return u"TCP_SSL"_qs;
|
||||
return u"TCP_SSL"_s;
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
case lt::socket_type_t::utp:
|
||||
return u"UTP"_qs;
|
||||
return u"UTP"_s;
|
||||
#else
|
||||
case lt::socket_type_t::udp:
|
||||
return u"UDP"_qs;
|
||||
return u"UDP"_s;
|
||||
#endif
|
||||
case lt::socket_type_t::utp_ssl:
|
||||
return u"UTP_SSL"_qs;
|
||||
return u"UTP_SSL"_s;
|
||||
}
|
||||
return u"INVALID"_qs;
|
||||
return u"INVALID"_s;
|
||||
}
|
||||
|
||||
QString toString(const lt::address &address)
|
||||
@@ -378,7 +377,7 @@ Session *Session::instance()
|
||||
|
||||
bool Session::isValidCategoryName(const QString &name)
|
||||
{
|
||||
const QRegularExpression re {uR"(^([^\\\/]|[^\\\/]([^\\\/]|\/(?=[^\/]))*[^\\\/])$)"_qs};
|
||||
const QRegularExpression re {uR"(^([^\\\/]|[^\\\/]([^\\\/]|\/(?=[^\/]))*[^\\\/])$)"_s};
|
||||
return (name.isEmpty() || (name.indexOf(re) == 0));
|
||||
}
|
||||
|
||||
@@ -406,131 +405,133 @@ QStringList Session::expandCategory(const QString &category)
|
||||
|
||||
SessionImpl::SessionImpl(QObject *parent)
|
||||
: Session(parent)
|
||||
, m_isDHTEnabled(BITTORRENT_SESSION_KEY(u"DHTEnabled"_qs), true)
|
||||
, m_isLSDEnabled(BITTORRENT_SESSION_KEY(u"LSDEnabled"_qs), true)
|
||||
, m_isPeXEnabled(BITTORRENT_SESSION_KEY(u"PeXEnabled"_qs), true)
|
||||
, m_isIPFilteringEnabled(BITTORRENT_SESSION_KEY(u"IPFilteringEnabled"_qs), false)
|
||||
, m_isTrackerFilteringEnabled(BITTORRENT_SESSION_KEY(u"TrackerFilteringEnabled"_qs), false)
|
||||
, m_IPFilterFile(BITTORRENT_SESSION_KEY(u"IPFilter"_qs))
|
||||
, m_announceToAllTrackers(BITTORRENT_SESSION_KEY(u"AnnounceToAllTrackers"_qs), false)
|
||||
, m_announceToAllTiers(BITTORRENT_SESSION_KEY(u"AnnounceToAllTiers"_qs), true)
|
||||
, m_asyncIOThreads(BITTORRENT_SESSION_KEY(u"AsyncIOThreadsCount"_qs), 10)
|
||||
, m_hashingThreads(BITTORRENT_SESSION_KEY(u"HashingThreadsCount"_qs), 1)
|
||||
, m_filePoolSize(BITTORRENT_SESSION_KEY(u"FilePoolSize"_qs), 500)
|
||||
, m_checkingMemUsage(BITTORRENT_SESSION_KEY(u"CheckingMemUsageSize"_qs), 32)
|
||||
, m_diskCacheSize(BITTORRENT_SESSION_KEY(u"DiskCacheSize"_qs), -1)
|
||||
, m_diskCacheTTL(BITTORRENT_SESSION_KEY(u"DiskCacheTTL"_qs), 60)
|
||||
, m_diskQueueSize(BITTORRENT_SESSION_KEY(u"DiskQueueSize"_qs), (1024 * 1024))
|
||||
, m_diskIOType(BITTORRENT_SESSION_KEY(u"DiskIOType"_qs), DiskIOType::Default)
|
||||
, m_diskIOReadMode(BITTORRENT_SESSION_KEY(u"DiskIOReadMode"_qs), DiskIOReadMode::EnableOSCache)
|
||||
, m_diskIOWriteMode(BITTORRENT_SESSION_KEY(u"DiskIOWriteMode"_qs), DiskIOWriteMode::EnableOSCache)
|
||||
, m_isDHTEnabled(BITTORRENT_SESSION_KEY(u"DHTEnabled"_s), true)
|
||||
, m_isLSDEnabled(BITTORRENT_SESSION_KEY(u"LSDEnabled"_s), true)
|
||||
, m_isPeXEnabled(BITTORRENT_SESSION_KEY(u"PeXEnabled"_s), true)
|
||||
, m_isIPFilteringEnabled(BITTORRENT_SESSION_KEY(u"IPFilteringEnabled"_s), false)
|
||||
, m_isTrackerFilteringEnabled(BITTORRENT_SESSION_KEY(u"TrackerFilteringEnabled"_s), false)
|
||||
, m_IPFilterFile(BITTORRENT_SESSION_KEY(u"IPFilter"_s))
|
||||
, m_announceToAllTrackers(BITTORRENT_SESSION_KEY(u"AnnounceToAllTrackers"_s), false)
|
||||
, m_announceToAllTiers(BITTORRENT_SESSION_KEY(u"AnnounceToAllTiers"_s), true)
|
||||
, m_asyncIOThreads(BITTORRENT_SESSION_KEY(u"AsyncIOThreadsCount"_s), 10)
|
||||
, m_hashingThreads(BITTORRENT_SESSION_KEY(u"HashingThreadsCount"_s), 1)
|
||||
, m_filePoolSize(BITTORRENT_SESSION_KEY(u"FilePoolSize"_s), 100)
|
||||
, m_checkingMemUsage(BITTORRENT_SESSION_KEY(u"CheckingMemUsageSize"_s), 32)
|
||||
, m_diskCacheSize(BITTORRENT_SESSION_KEY(u"DiskCacheSize"_s), -1)
|
||||
, m_diskCacheTTL(BITTORRENT_SESSION_KEY(u"DiskCacheTTL"_s), 60)
|
||||
, m_diskQueueSize(BITTORRENT_SESSION_KEY(u"DiskQueueSize"_s), (1024 * 1024))
|
||||
, m_diskIOType(BITTORRENT_SESSION_KEY(u"DiskIOType"_s), DiskIOType::Default)
|
||||
, m_diskIOReadMode(BITTORRENT_SESSION_KEY(u"DiskIOReadMode"_s), DiskIOReadMode::EnableOSCache)
|
||||
, m_diskIOWriteMode(BITTORRENT_SESSION_KEY(u"DiskIOWriteMode"_s), DiskIOWriteMode::EnableOSCache)
|
||||
#ifdef Q_OS_WIN
|
||||
, m_coalesceReadWriteEnabled(BITTORRENT_SESSION_KEY(u"CoalesceReadWrite"_qs), true)
|
||||
, m_coalesceReadWriteEnabled(BITTORRENT_SESSION_KEY(u"CoalesceReadWrite"_s), true)
|
||||
#else
|
||||
, m_coalesceReadWriteEnabled(BITTORRENT_SESSION_KEY(u"CoalesceReadWrite"_qs), false)
|
||||
, m_coalesceReadWriteEnabled(BITTORRENT_SESSION_KEY(u"CoalesceReadWrite"_s), false)
|
||||
#endif
|
||||
, m_usePieceExtentAffinity(BITTORRENT_SESSION_KEY(u"PieceExtentAffinity"_qs), false)
|
||||
, m_isSuggestMode(BITTORRENT_SESSION_KEY(u"SuggestMode"_qs), false)
|
||||
, m_sendBufferWatermark(BITTORRENT_SESSION_KEY(u"SendBufferWatermark"_qs), 500)
|
||||
, m_sendBufferLowWatermark(BITTORRENT_SESSION_KEY(u"SendBufferLowWatermark"_qs), 10)
|
||||
, m_sendBufferWatermarkFactor(BITTORRENT_SESSION_KEY(u"SendBufferWatermarkFactor"_qs), 50)
|
||||
, m_connectionSpeed(BITTORRENT_SESSION_KEY(u"ConnectionSpeed"_qs), 30)
|
||||
, m_socketSendBufferSize(BITTORRENT_SESSION_KEY(u"SocketSendBufferSize"_qs), 0)
|
||||
, m_socketReceiveBufferSize(BITTORRENT_SESSION_KEY(u"SocketReceiveBufferSize"_qs), 0)
|
||||
, m_socketBacklogSize(BITTORRENT_SESSION_KEY(u"SocketBacklogSize"_qs), 30)
|
||||
, m_isAnonymousModeEnabled(BITTORRENT_SESSION_KEY(u"AnonymousModeEnabled"_qs), false)
|
||||
, m_isQueueingEnabled(BITTORRENT_SESSION_KEY(u"QueueingSystemEnabled"_qs), false)
|
||||
, m_maxActiveDownloads(BITTORRENT_SESSION_KEY(u"MaxActiveDownloads"_qs), 3, lowerLimited(-1))
|
||||
, m_maxActiveUploads(BITTORRENT_SESSION_KEY(u"MaxActiveUploads"_qs), 3, lowerLimited(-1))
|
||||
, m_maxActiveTorrents(BITTORRENT_SESSION_KEY(u"MaxActiveTorrents"_qs), 5, lowerLimited(-1))
|
||||
, m_ignoreSlowTorrentsForQueueing(BITTORRENT_SESSION_KEY(u"IgnoreSlowTorrentsForQueueing"_qs), false)
|
||||
, m_downloadRateForSlowTorrents(BITTORRENT_SESSION_KEY(u"SlowTorrentsDownloadRate"_qs), 2)
|
||||
, m_uploadRateForSlowTorrents(BITTORRENT_SESSION_KEY(u"SlowTorrentsUploadRate"_qs), 2)
|
||||
, m_slowTorrentsInactivityTimer(BITTORRENT_SESSION_KEY(u"SlowTorrentsInactivityTimer"_qs), 60)
|
||||
, m_outgoingPortsMin(BITTORRENT_SESSION_KEY(u"OutgoingPortsMin"_qs), 0)
|
||||
, m_outgoingPortsMax(BITTORRENT_SESSION_KEY(u"OutgoingPortsMax"_qs), 0)
|
||||
, m_UPnPLeaseDuration(BITTORRENT_SESSION_KEY(u"UPnPLeaseDuration"_qs), 0)
|
||||
, m_peerToS(BITTORRENT_SESSION_KEY(u"PeerToS"_qs), 0x04)
|
||||
, m_ignoreLimitsOnLAN(BITTORRENT_SESSION_KEY(u"IgnoreLimitsOnLAN"_qs), false)
|
||||
, m_includeOverheadInLimits(BITTORRENT_SESSION_KEY(u"IncludeOverheadInLimits"_qs), false)
|
||||
, m_announceIP(BITTORRENT_SESSION_KEY(u"AnnounceIP"_qs))
|
||||
, m_maxConcurrentHTTPAnnounces(BITTORRENT_SESSION_KEY(u"MaxConcurrentHTTPAnnounces"_qs), 50)
|
||||
, m_isReannounceWhenAddressChangedEnabled(BITTORRENT_SESSION_KEY(u"ReannounceWhenAddressChanged"_qs), false)
|
||||
, m_stopTrackerTimeout(BITTORRENT_SESSION_KEY(u"StopTrackerTimeout"_qs), 5)
|
||||
, m_maxConnections(BITTORRENT_SESSION_KEY(u"MaxConnections"_qs), 500, lowerLimited(0, -1))
|
||||
, m_maxUploads(BITTORRENT_SESSION_KEY(u"MaxUploads"_qs), 20, lowerLimited(0, -1))
|
||||
, m_maxConnectionsPerTorrent(BITTORRENT_SESSION_KEY(u"MaxConnectionsPerTorrent"_qs), 100, lowerLimited(0, -1))
|
||||
, m_maxUploadsPerTorrent(BITTORRENT_SESSION_KEY(u"MaxUploadsPerTorrent"_qs), 4, lowerLimited(0, -1))
|
||||
, m_btProtocol(BITTORRENT_SESSION_KEY(u"BTProtocol"_qs), BTProtocol::Both
|
||||
, m_usePieceExtentAffinity(BITTORRENT_SESSION_KEY(u"PieceExtentAffinity"_s), false)
|
||||
, m_isSuggestMode(BITTORRENT_SESSION_KEY(u"SuggestMode"_s), false)
|
||||
, m_sendBufferWatermark(BITTORRENT_SESSION_KEY(u"SendBufferWatermark"_s), 500)
|
||||
, m_sendBufferLowWatermark(BITTORRENT_SESSION_KEY(u"SendBufferLowWatermark"_s), 10)
|
||||
, m_sendBufferWatermarkFactor(BITTORRENT_SESSION_KEY(u"SendBufferWatermarkFactor"_s), 50)
|
||||
, m_connectionSpeed(BITTORRENT_SESSION_KEY(u"ConnectionSpeed"_s), 30)
|
||||
, m_socketSendBufferSize(BITTORRENT_SESSION_KEY(u"SocketSendBufferSize"_s), 0)
|
||||
, m_socketReceiveBufferSize(BITTORRENT_SESSION_KEY(u"SocketReceiveBufferSize"_s), 0)
|
||||
, m_socketBacklogSize(BITTORRENT_SESSION_KEY(u"SocketBacklogSize"_s), 30)
|
||||
, m_isAnonymousModeEnabled(BITTORRENT_SESSION_KEY(u"AnonymousModeEnabled"_s), false)
|
||||
, m_isQueueingEnabled(BITTORRENT_SESSION_KEY(u"QueueingSystemEnabled"_s), false)
|
||||
, m_maxActiveDownloads(BITTORRENT_SESSION_KEY(u"MaxActiveDownloads"_s), 3, lowerLimited(-1))
|
||||
, m_maxActiveUploads(BITTORRENT_SESSION_KEY(u"MaxActiveUploads"_s), 3, lowerLimited(-1))
|
||||
, m_maxActiveTorrents(BITTORRENT_SESSION_KEY(u"MaxActiveTorrents"_s), 5, lowerLimited(-1))
|
||||
, m_ignoreSlowTorrentsForQueueing(BITTORRENT_SESSION_KEY(u"IgnoreSlowTorrentsForQueueing"_s), false)
|
||||
, m_downloadRateForSlowTorrents(BITTORRENT_SESSION_KEY(u"SlowTorrentsDownloadRate"_s), 2)
|
||||
, m_uploadRateForSlowTorrents(BITTORRENT_SESSION_KEY(u"SlowTorrentsUploadRate"_s), 2)
|
||||
, m_slowTorrentsInactivityTimer(BITTORRENT_SESSION_KEY(u"SlowTorrentsInactivityTimer"_s), 60)
|
||||
, m_outgoingPortsMin(BITTORRENT_SESSION_KEY(u"OutgoingPortsMin"_s), 0)
|
||||
, m_outgoingPortsMax(BITTORRENT_SESSION_KEY(u"OutgoingPortsMax"_s), 0)
|
||||
, m_UPnPLeaseDuration(BITTORRENT_SESSION_KEY(u"UPnPLeaseDuration"_s), 0)
|
||||
, m_peerToS(BITTORRENT_SESSION_KEY(u"PeerToS"_s), 0x04)
|
||||
, m_ignoreLimitsOnLAN(BITTORRENT_SESSION_KEY(u"IgnoreLimitsOnLAN"_s), false)
|
||||
, m_includeOverheadInLimits(BITTORRENT_SESSION_KEY(u"IncludeOverheadInLimits"_s), false)
|
||||
, m_announceIP(BITTORRENT_SESSION_KEY(u"AnnounceIP"_s))
|
||||
, m_maxConcurrentHTTPAnnounces(BITTORRENT_SESSION_KEY(u"MaxConcurrentHTTPAnnounces"_s), 50)
|
||||
, m_isReannounceWhenAddressChangedEnabled(BITTORRENT_SESSION_KEY(u"ReannounceWhenAddressChanged"_s), false)
|
||||
, m_stopTrackerTimeout(BITTORRENT_SESSION_KEY(u"StopTrackerTimeout"_s), 2)
|
||||
, m_maxConnections(BITTORRENT_SESSION_KEY(u"MaxConnections"_s), 500, lowerLimited(0, -1))
|
||||
, m_maxUploads(BITTORRENT_SESSION_KEY(u"MaxUploads"_s), 20, lowerLimited(0, -1))
|
||||
, m_maxConnectionsPerTorrent(BITTORRENT_SESSION_KEY(u"MaxConnectionsPerTorrent"_s), 100, lowerLimited(0, -1))
|
||||
, m_maxUploadsPerTorrent(BITTORRENT_SESSION_KEY(u"MaxUploadsPerTorrent"_s), 4, lowerLimited(0, -1))
|
||||
, m_btProtocol(BITTORRENT_SESSION_KEY(u"BTProtocol"_s), BTProtocol::Both
|
||||
, clampValue(BTProtocol::Both, BTProtocol::UTP))
|
||||
, m_isUTPRateLimited(BITTORRENT_SESSION_KEY(u"uTPRateLimited"_qs), true)
|
||||
, m_utpMixedMode(BITTORRENT_SESSION_KEY(u"uTPMixedMode"_qs), MixedModeAlgorithm::TCP
|
||||
, m_isUTPRateLimited(BITTORRENT_SESSION_KEY(u"uTPRateLimited"_s), true)
|
||||
, m_utpMixedMode(BITTORRENT_SESSION_KEY(u"uTPMixedMode"_s), MixedModeAlgorithm::TCP
|
||||
, clampValue(MixedModeAlgorithm::TCP, MixedModeAlgorithm::Proportional))
|
||||
, m_IDNSupportEnabled(BITTORRENT_SESSION_KEY(u"IDNSupportEnabled"_qs), false)
|
||||
, m_multiConnectionsPerIpEnabled(BITTORRENT_SESSION_KEY(u"MultiConnectionsPerIp"_qs), false)
|
||||
, m_validateHTTPSTrackerCertificate(BITTORRENT_SESSION_KEY(u"ValidateHTTPSTrackerCertificate"_qs), true)
|
||||
, m_SSRFMitigationEnabled(BITTORRENT_SESSION_KEY(u"SSRFMitigation"_qs), true)
|
||||
, m_blockPeersOnPrivilegedPorts(BITTORRENT_SESSION_KEY(u"BlockPeersOnPrivilegedPorts"_qs), false)
|
||||
, m_isAddTrackersEnabled(BITTORRENT_SESSION_KEY(u"AddTrackersEnabled"_qs), false)
|
||||
, m_additionalTrackers(BITTORRENT_SESSION_KEY(u"AdditionalTrackers"_qs))
|
||||
, m_globalMaxRatio(BITTORRENT_SESSION_KEY(u"GlobalMaxRatio"_qs), -1, [](qreal r) { return r < 0 ? -1. : r;})
|
||||
, m_globalMaxSeedingMinutes(BITTORRENT_SESSION_KEY(u"GlobalMaxSeedingMinutes"_qs), -1, lowerLimited(-1))
|
||||
, m_isAddTorrentToQueueTop(BITTORRENT_SESSION_KEY(u"AddTorrentToTopOfQueue"_qs), false)
|
||||
, m_isAddTorrentPaused(BITTORRENT_SESSION_KEY(u"AddTorrentPaused"_qs), false)
|
||||
, m_torrentStopCondition(BITTORRENT_SESSION_KEY(u"TorrentStopCondition"_qs), Torrent::StopCondition::None)
|
||||
, m_torrentContentLayout(BITTORRENT_SESSION_KEY(u"TorrentContentLayout"_qs), TorrentContentLayout::Original)
|
||||
, m_isAppendExtensionEnabled(BITTORRENT_SESSION_KEY(u"AddExtensionToIncompleteFiles"_qs), false)
|
||||
, m_refreshInterval(BITTORRENT_SESSION_KEY(u"RefreshInterval"_qs), 1500)
|
||||
, m_isPreallocationEnabled(BITTORRENT_SESSION_KEY(u"Preallocation"_qs), false)
|
||||
, m_torrentExportDirectory(BITTORRENT_SESSION_KEY(u"TorrentExportDirectory"_qs))
|
||||
, m_finishedTorrentExportDirectory(BITTORRENT_SESSION_KEY(u"FinishedTorrentExportDirectory"_qs))
|
||||
, m_globalDownloadSpeedLimit(BITTORRENT_SESSION_KEY(u"GlobalDLSpeedLimit"_qs), 0, lowerLimited(0))
|
||||
, m_globalUploadSpeedLimit(BITTORRENT_SESSION_KEY(u"GlobalUPSpeedLimit"_qs), 0, lowerLimited(0))
|
||||
, m_altGlobalDownloadSpeedLimit(BITTORRENT_SESSION_KEY(u"AlternativeGlobalDLSpeedLimit"_qs), 10, lowerLimited(0))
|
||||
, m_altGlobalUploadSpeedLimit(BITTORRENT_SESSION_KEY(u"AlternativeGlobalUPSpeedLimit"_qs), 10, lowerLimited(0))
|
||||
, m_isAltGlobalSpeedLimitEnabled(BITTORRENT_SESSION_KEY(u"UseAlternativeGlobalSpeedLimit"_qs), false)
|
||||
, m_isBandwidthSchedulerEnabled(BITTORRENT_SESSION_KEY(u"BandwidthSchedulerEnabled"_qs), false)
|
||||
, m_isPerformanceWarningEnabled(BITTORRENT_SESSION_KEY(u"PerformanceWarning"_qs), false)
|
||||
, m_saveResumeDataInterval(BITTORRENT_SESSION_KEY(u"SaveResumeDataInterval"_qs), 60)
|
||||
, m_port(BITTORRENT_SESSION_KEY(u"Port"_qs), -1)
|
||||
, m_networkInterface(BITTORRENT_SESSION_KEY(u"Interface"_qs))
|
||||
, m_networkInterfaceName(BITTORRENT_SESSION_KEY(u"InterfaceName"_qs))
|
||||
, m_networkInterfaceAddress(BITTORRENT_SESSION_KEY(u"InterfaceAddress"_qs))
|
||||
, m_encryption(BITTORRENT_SESSION_KEY(u"Encryption"_qs), 0)
|
||||
, m_maxActiveCheckingTorrents(BITTORRENT_SESSION_KEY(u"MaxActiveCheckingTorrents"_qs), 1)
|
||||
, m_isProxyPeerConnectionsEnabled(BITTORRENT_SESSION_KEY(u"ProxyPeerConnections"_qs), false)
|
||||
, m_chokingAlgorithm(BITTORRENT_SESSION_KEY(u"ChokingAlgorithm"_qs), ChokingAlgorithm::FixedSlots
|
||||
, m_IDNSupportEnabled(BITTORRENT_SESSION_KEY(u"IDNSupportEnabled"_s), false)
|
||||
, m_multiConnectionsPerIpEnabled(BITTORRENT_SESSION_KEY(u"MultiConnectionsPerIp"_s), false)
|
||||
, m_validateHTTPSTrackerCertificate(BITTORRENT_SESSION_KEY(u"ValidateHTTPSTrackerCertificate"_s), true)
|
||||
, m_SSRFMitigationEnabled(BITTORRENT_SESSION_KEY(u"SSRFMitigation"_s), true)
|
||||
, m_blockPeersOnPrivilegedPorts(BITTORRENT_SESSION_KEY(u"BlockPeersOnPrivilegedPorts"_s), false)
|
||||
, m_isAddTrackersEnabled(BITTORRENT_SESSION_KEY(u"AddTrackersEnabled"_s), false)
|
||||
, m_additionalTrackers(BITTORRENT_SESSION_KEY(u"AdditionalTrackers"_s))
|
||||
, m_globalMaxRatio(BITTORRENT_SESSION_KEY(u"GlobalMaxRatio"_s), -1, [](qreal r) { return r < 0 ? -1. : r;})
|
||||
, m_globalMaxSeedingMinutes(BITTORRENT_SESSION_KEY(u"GlobalMaxSeedingMinutes"_s), -1, lowerLimited(-1))
|
||||
, m_globalMaxInactiveSeedingMinutes(BITTORRENT_SESSION_KEY(u"GlobalMaxInactiveSeedingMinutes"_s), -1, lowerLimited(-1))
|
||||
, m_isAddTorrentToQueueTop(BITTORRENT_SESSION_KEY(u"AddTorrentToTopOfQueue"_s), false)
|
||||
, m_isAddTorrentPaused(BITTORRENT_SESSION_KEY(u"AddTorrentPaused"_s), false)
|
||||
, m_torrentStopCondition(BITTORRENT_SESSION_KEY(u"TorrentStopCondition"_s), Torrent::StopCondition::None)
|
||||
, m_torrentContentLayout(BITTORRENT_SESSION_KEY(u"TorrentContentLayout"_s), TorrentContentLayout::Original)
|
||||
, m_isAppendExtensionEnabled(BITTORRENT_SESSION_KEY(u"AddExtensionToIncompleteFiles"_s), false)
|
||||
, m_refreshInterval(BITTORRENT_SESSION_KEY(u"RefreshInterval"_s), 1500)
|
||||
, m_isPreallocationEnabled(BITTORRENT_SESSION_KEY(u"Preallocation"_s), false)
|
||||
, m_torrentExportDirectory(BITTORRENT_SESSION_KEY(u"TorrentExportDirectory"_s))
|
||||
, m_finishedTorrentExportDirectory(BITTORRENT_SESSION_KEY(u"FinishedTorrentExportDirectory"_s))
|
||||
, m_globalDownloadSpeedLimit(BITTORRENT_SESSION_KEY(u"GlobalDLSpeedLimit"_s), 0, lowerLimited(0))
|
||||
, m_globalUploadSpeedLimit(BITTORRENT_SESSION_KEY(u"GlobalUPSpeedLimit"_s), 0, lowerLimited(0))
|
||||
, m_altGlobalDownloadSpeedLimit(BITTORRENT_SESSION_KEY(u"AlternativeGlobalDLSpeedLimit"_s), 10, lowerLimited(0))
|
||||
, m_altGlobalUploadSpeedLimit(BITTORRENT_SESSION_KEY(u"AlternativeGlobalUPSpeedLimit"_s), 10, lowerLimited(0))
|
||||
, m_isAltGlobalSpeedLimitEnabled(BITTORRENT_SESSION_KEY(u"UseAlternativeGlobalSpeedLimit"_s), false)
|
||||
, m_isBandwidthSchedulerEnabled(BITTORRENT_SESSION_KEY(u"BandwidthSchedulerEnabled"_s), false)
|
||||
, m_isPerformanceWarningEnabled(BITTORRENT_SESSION_KEY(u"PerformanceWarning"_s), false)
|
||||
, m_saveResumeDataInterval(BITTORRENT_SESSION_KEY(u"SaveResumeDataInterval"_s), 60)
|
||||
, m_port(BITTORRENT_SESSION_KEY(u"Port"_s), -1)
|
||||
, m_networkInterface(BITTORRENT_SESSION_KEY(u"Interface"_s))
|
||||
, m_networkInterfaceName(BITTORRENT_SESSION_KEY(u"InterfaceName"_s))
|
||||
, m_networkInterfaceAddress(BITTORRENT_SESSION_KEY(u"InterfaceAddress"_s))
|
||||
, m_encryption(BITTORRENT_SESSION_KEY(u"Encryption"_s), 0)
|
||||
, m_maxActiveCheckingTorrents(BITTORRENT_SESSION_KEY(u"MaxActiveCheckingTorrents"_s), 1)
|
||||
, m_isProxyPeerConnectionsEnabled(BITTORRENT_SESSION_KEY(u"ProxyPeerConnections"_s), false)
|
||||
, m_chokingAlgorithm(BITTORRENT_SESSION_KEY(u"ChokingAlgorithm"_s), ChokingAlgorithm::FixedSlots
|
||||
, clampValue(ChokingAlgorithm::FixedSlots, ChokingAlgorithm::RateBased))
|
||||
, m_seedChokingAlgorithm(BITTORRENT_SESSION_KEY(u"SeedChokingAlgorithm"_qs), SeedChokingAlgorithm::FastestUpload
|
||||
, m_seedChokingAlgorithm(BITTORRENT_SESSION_KEY(u"SeedChokingAlgorithm"_s), SeedChokingAlgorithm::FastestUpload
|
||||
, clampValue(SeedChokingAlgorithm::RoundRobin, SeedChokingAlgorithm::AntiLeech))
|
||||
, m_storedTags(BITTORRENT_SESSION_KEY(u"Tags"_qs))
|
||||
, m_maxRatioAction(BITTORRENT_SESSION_KEY(u"MaxRatioAction"_qs), Pause)
|
||||
, m_savePath(BITTORRENT_SESSION_KEY(u"DefaultSavePath"_qs), specialFolderLocation(SpecialFolder::Downloads))
|
||||
, m_downloadPath(BITTORRENT_SESSION_KEY(u"TempPath"_qs), (savePath() / Path(u"temp"_qs)))
|
||||
, m_isDownloadPathEnabled(BITTORRENT_SESSION_KEY(u"TempPathEnabled"_qs), false)
|
||||
, m_isSubcategoriesEnabled(BITTORRENT_SESSION_KEY(u"SubcategoriesEnabled"_qs), false)
|
||||
, m_useCategoryPathsInManualMode(BITTORRENT_SESSION_KEY(u"UseCategoryPathsInManualMode"_qs), false)
|
||||
, m_isAutoTMMDisabledByDefault(BITTORRENT_SESSION_KEY(u"DisableAutoTMMByDefault"_qs), true)
|
||||
, m_isDisableAutoTMMWhenCategoryChanged(BITTORRENT_SESSION_KEY(u"DisableAutoTMMTriggers/CategoryChanged"_qs), false)
|
||||
, m_isDisableAutoTMMWhenDefaultSavePathChanged(BITTORRENT_SESSION_KEY(u"DisableAutoTMMTriggers/DefaultSavePathChanged"_qs), true)
|
||||
, m_isDisableAutoTMMWhenCategorySavePathChanged(BITTORRENT_SESSION_KEY(u"DisableAutoTMMTriggers/CategorySavePathChanged"_qs), true)
|
||||
, m_isTrackerEnabled(BITTORRENT_KEY(u"TrackerEnabled"_qs), false)
|
||||
, m_peerTurnover(BITTORRENT_SESSION_KEY(u"PeerTurnover"_qs), 4)
|
||||
, m_peerTurnoverCutoff(BITTORRENT_SESSION_KEY(u"PeerTurnoverCutOff"_qs), 90)
|
||||
, m_peerTurnoverInterval(BITTORRENT_SESSION_KEY(u"PeerTurnoverInterval"_qs), 300)
|
||||
, m_requestQueueSize(BITTORRENT_SESSION_KEY(u"RequestQueueSize"_qs), 500)
|
||||
, m_isExcludedFileNamesEnabled(BITTORRENT_KEY(u"ExcludedFileNamesEnabled"_qs), false)
|
||||
, m_excludedFileNames(BITTORRENT_SESSION_KEY(u"ExcludedFileNames"_qs))
|
||||
, m_bannedIPs(u"State/BannedIPs"_qs, QStringList(), Algorithm::sorted<QStringList>)
|
||||
, m_resumeDataStorageType(BITTORRENT_SESSION_KEY(u"ResumeDataStorageType"_qs), ResumeDataStorageType::Legacy)
|
||||
, m_isI2PEnabled {BITTORRENT_SESSION_KEY(u"I2P/Enabled"_qs), false}
|
||||
, m_I2PAddress {BITTORRENT_SESSION_KEY(u"I2P/Address"_qs), u"127.0.0.1"_qs}
|
||||
, m_I2PPort {BITTORRENT_SESSION_KEY(u"I2P/Port"_qs), 7656}
|
||||
, m_I2PMixedMode {BITTORRENT_SESSION_KEY(u"I2P/MixedMode"_qs), false}
|
||||
, m_I2PInboundQuantity {BITTORRENT_SESSION_KEY(u"I2P/InboundQuantity"_qs), 3}
|
||||
, m_I2POutboundQuantity {BITTORRENT_SESSION_KEY(u"I2P/OutboundQuantity"_qs), 3}
|
||||
, m_I2PInboundLength {BITTORRENT_SESSION_KEY(u"I2P/InboundLength"_qs), 3}
|
||||
, m_I2POutboundLength {BITTORRENT_SESSION_KEY(u"I2P/OutboundLength"_qs), 3}
|
||||
, m_storedTags(BITTORRENT_SESSION_KEY(u"Tags"_s))
|
||||
, m_maxRatioAction(BITTORRENT_SESSION_KEY(u"MaxRatioAction"_s), Pause)
|
||||
, m_savePath(BITTORRENT_SESSION_KEY(u"DefaultSavePath"_s), specialFolderLocation(SpecialFolder::Downloads))
|
||||
, m_downloadPath(BITTORRENT_SESSION_KEY(u"TempPath"_s), (savePath() / Path(u"temp"_s)))
|
||||
, m_isDownloadPathEnabled(BITTORRENT_SESSION_KEY(u"TempPathEnabled"_s), false)
|
||||
, m_isSubcategoriesEnabled(BITTORRENT_SESSION_KEY(u"SubcategoriesEnabled"_s), false)
|
||||
, m_useCategoryPathsInManualMode(BITTORRENT_SESSION_KEY(u"UseCategoryPathsInManualMode"_s), false)
|
||||
, m_isAutoTMMDisabledByDefault(BITTORRENT_SESSION_KEY(u"DisableAutoTMMByDefault"_s), true)
|
||||
, m_isDisableAutoTMMWhenCategoryChanged(BITTORRENT_SESSION_KEY(u"DisableAutoTMMTriggers/CategoryChanged"_s), false)
|
||||
, m_isDisableAutoTMMWhenDefaultSavePathChanged(BITTORRENT_SESSION_KEY(u"DisableAutoTMMTriggers/DefaultSavePathChanged"_s), true)
|
||||
, m_isDisableAutoTMMWhenCategorySavePathChanged(BITTORRENT_SESSION_KEY(u"DisableAutoTMMTriggers/CategorySavePathChanged"_s), true)
|
||||
, m_isTrackerEnabled(BITTORRENT_KEY(u"TrackerEnabled"_s), false)
|
||||
, m_peerTurnover(BITTORRENT_SESSION_KEY(u"PeerTurnover"_s), 4)
|
||||
, m_peerTurnoverCutoff(BITTORRENT_SESSION_KEY(u"PeerTurnoverCutOff"_s), 90)
|
||||
, m_peerTurnoverInterval(BITTORRENT_SESSION_KEY(u"PeerTurnoverInterval"_s), 300)
|
||||
, m_requestQueueSize(BITTORRENT_SESSION_KEY(u"RequestQueueSize"_s), 500)
|
||||
, m_isExcludedFileNamesEnabled(BITTORRENT_KEY(u"ExcludedFileNamesEnabled"_s), false)
|
||||
, m_excludedFileNames(BITTORRENT_SESSION_KEY(u"ExcludedFileNames"_s))
|
||||
, m_bannedIPs(u"State/BannedIPs"_s, QStringList(), Algorithm::sorted<QStringList>)
|
||||
, m_resumeDataStorageType(BITTORRENT_SESSION_KEY(u"ResumeDataStorageType"_s), ResumeDataStorageType::Legacy)
|
||||
, m_isMergeTrackersEnabled(BITTORRENT_KEY(u"MergeTrackersEnabled"_s), false)
|
||||
, m_isI2PEnabled {BITTORRENT_SESSION_KEY(u"I2P/Enabled"_s), false}
|
||||
, m_I2PAddress {BITTORRENT_SESSION_KEY(u"I2P/Address"_s), u"127.0.0.1"_s}
|
||||
, m_I2PPort {BITTORRENT_SESSION_KEY(u"I2P/Port"_s), 7656}
|
||||
, m_I2PMixedMode {BITTORRENT_SESSION_KEY(u"I2P/MixedMode"_s), false}
|
||||
, m_I2PInboundQuantity {BITTORRENT_SESSION_KEY(u"I2P/InboundQuantity"_s), 3}
|
||||
, m_I2POutboundQuantity {BITTORRENT_SESSION_KEY(u"I2P/OutboundQuantity"_s), 3}
|
||||
, m_I2PInboundLength {BITTORRENT_SESSION_KEY(u"I2P/InboundLength"_s), 3}
|
||||
, m_I2POutboundLength {BITTORRENT_SESSION_KEY(u"I2P/OutboundLength"_s), 3}
|
||||
, m_seedingLimitTimer {new QTimer(this)}
|
||||
, m_resumeDataTimer {new QTimer(this)}
|
||||
, m_ioThread {new QThread}
|
||||
@@ -879,7 +880,7 @@ bool SessionImpl::removeCategory(const QString &name)
|
||||
for (TorrentImpl *const torrent : asConst(m_torrents))
|
||||
{
|
||||
if (torrent->belongsToCategory(name))
|
||||
torrent->setCategory(u""_qs);
|
||||
torrent->setCategory(u""_s);
|
||||
}
|
||||
|
||||
// remove stored category and its subcategories if exist
|
||||
@@ -1118,6 +1119,22 @@ void SessionImpl::setGlobalMaxSeedingMinutes(int minutes)
|
||||
}
|
||||
}
|
||||
|
||||
int SessionImpl::globalMaxInactiveSeedingMinutes() const
|
||||
{
|
||||
return m_globalMaxInactiveSeedingMinutes;
|
||||
}
|
||||
|
||||
void SessionImpl::setGlobalMaxInactiveSeedingMinutes(int minutes)
|
||||
{
|
||||
minutes = std::max(minutes, -1);
|
||||
|
||||
if (minutes != globalMaxInactiveSeedingMinutes())
|
||||
{
|
||||
m_globalMaxInactiveSeedingMinutes = minutes;
|
||||
updateSeedingLimitTimer();
|
||||
}
|
||||
}
|
||||
|
||||
void SessionImpl::applyBandwidthLimits()
|
||||
{
|
||||
lt::settings_pack settingsPack;
|
||||
@@ -1156,7 +1173,7 @@ void SessionImpl::prepareStartup()
|
||||
{
|
||||
qDebug("Initializing torrents resume data storage...");
|
||||
|
||||
const Path dbPath = specialFolderLocation(SpecialFolder::Data) / Path(u"torrents.db"_qs);
|
||||
const Path dbPath = specialFolderLocation(SpecialFolder::Data) / Path(u"torrents.db"_s);
|
||||
const bool dbStorageExists = dbPath.exists();
|
||||
|
||||
auto *context = new ResumeSessionContext(this);
|
||||
@@ -1168,13 +1185,13 @@ void SessionImpl::prepareStartup()
|
||||
|
||||
if (!dbStorageExists)
|
||||
{
|
||||
const Path dataPath = specialFolderLocation(SpecialFolder::Data) / Path(u"BT_backup"_qs);
|
||||
const Path dataPath = specialFolderLocation(SpecialFolder::Data) / Path(u"BT_backup"_s);
|
||||
context->startupStorage = new BencodeResumeDataStorage(dataPath, this);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
const Path dataPath = specialFolderLocation(SpecialFolder::Data) / Path(u"BT_backup"_qs);
|
||||
const Path dataPath = specialFolderLocation(SpecialFolder::Data) / Path(u"BT_backup"_s);
|
||||
m_resumeDataStorage = new BencodeResumeDataStorage(dataPath, this);
|
||||
|
||||
if (dbStorageExists)
|
||||
@@ -1318,7 +1335,7 @@ void SessionImpl::processNextResumeData(ResumeSessionContext *context)
|
||||
std::shared_ptr<lt::torrent_info> ti = resumeData.ltAddTorrentParams.ti;
|
||||
resumeData = *loadPreferredResumeDataResult;
|
||||
if (!resumeData.ltAddTorrentParams.ti)
|
||||
resumeData.ltAddTorrentParams.ti = ti;
|
||||
resumeData.ltAddTorrentParams.ti = std::move(ti);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1668,6 +1685,7 @@ lt::settings_pack SessionImpl::loadLTSettings() const
|
||||
settingsPack.set_int(lt::settings_pack::active_checking, maxActiveCheckingTorrents());
|
||||
|
||||
// I2P
|
||||
#if defined(QBT_USES_LIBTORRENT2) && TORRENT_USE_I2P
|
||||
if (isI2PEnabled())
|
||||
{
|
||||
settingsPack.set_str(lt::settings_pack::i2p_hostname, I2PAddress().toStdString());
|
||||
@@ -1681,7 +1699,6 @@ lt::settings_pack SessionImpl::loadLTSettings() const
|
||||
settingsPack.set_bool(lt::settings_pack::allow_i2p_mixed, false);
|
||||
}
|
||||
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
// I2P session options
|
||||
settingsPack.set_int(lt::settings_pack::i2p_inbound_quantity, I2PInboundQuantity());
|
||||
settingsPack.set_int(lt::settings_pack::i2p_outbound_quantity, I2POutboundQuantity());
|
||||
@@ -1691,11 +1708,10 @@ lt::settings_pack SessionImpl::loadLTSettings() const
|
||||
|
||||
// proxy
|
||||
settingsPack.set_int(lt::settings_pack::proxy_type, lt::settings_pack::none);
|
||||
if (Preferences::instance()->useProxyForBT())
|
||||
const auto *proxyManager = Net::ProxyConfigurationManager::instance();
|
||||
const Net::ProxyConfiguration proxyConfig = proxyManager->proxyConfiguration();
|
||||
if ((proxyConfig.type != Net::ProxyType::None) && Preferences::instance()->useProxyForBT())
|
||||
{
|
||||
const auto *proxyManager = Net::ProxyConfigurationManager::instance();
|
||||
const Net::ProxyConfiguration proxyConfig = proxyManager->proxyConfiguration();
|
||||
|
||||
switch (proxyConfig.type)
|
||||
{
|
||||
case Net::ProxyType::SOCKS4:
|
||||
@@ -1742,6 +1758,10 @@ lt::settings_pack SessionImpl::loadLTSettings() const
|
||||
|
||||
settingsPack.set_int(lt::settings_pack::max_out_request_queue, requestQueueSize());
|
||||
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
settingsPack.set_int(lt::settings_pack::metadata_token_limit, Preferences::instance()->getBdecodeTokenLimit());
|
||||
#endif
|
||||
|
||||
settingsPack.set_int(lt::settings_pack::aio_threads, asyncIOThreads());
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
settingsPack.set_int(lt::settings_pack::hashing_threads, hashingThreads());
|
||||
@@ -2068,7 +2088,7 @@ void SessionImpl::configurePeerClasses()
|
||||
|
||||
void SessionImpl::enableTracker(const bool enable)
|
||||
{
|
||||
const QString profile = u"embeddedTracker"_qs;
|
||||
const QString profile = u"embeddedTracker"_s;
|
||||
auto *portForwarder = Net::PortForwarder::instance();
|
||||
|
||||
if (enable)
|
||||
@@ -2146,23 +2166,23 @@ void SessionImpl::processShareLimits()
|
||||
|
||||
if (m_maxRatioAction == Remove)
|
||||
{
|
||||
LogMsg(u"%1 %2 %3"_qs.arg(description, tr("Removed torrent."), torrentName));
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Removed torrent."), torrentName));
|
||||
deleteTorrent(torrent->id());
|
||||
}
|
||||
else if (m_maxRatioAction == DeleteFiles)
|
||||
{
|
||||
LogMsg(u"%1 %2 %3"_qs.arg(description, tr("Removed torrent and deleted its content."), torrentName));
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Removed torrent and deleted its content."), torrentName));
|
||||
deleteTorrent(torrent->id(), DeleteTorrentAndFiles);
|
||||
}
|
||||
else if ((m_maxRatioAction == Pause) && !torrent->isPaused())
|
||||
{
|
||||
torrent->pause();
|
||||
LogMsg(u"%1 %2 %3"_qs.arg(description, tr("Torrent paused."), torrentName));
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Torrent paused."), torrentName));
|
||||
}
|
||||
else if ((m_maxRatioAction == EnableSuperSeeding) && !torrent->isPaused() && !torrent->superSeeding())
|
||||
{
|
||||
torrent->setSuperSeeding(true);
|
||||
LogMsg(u"%1 %2 %3"_qs.arg(description, tr("Super seeding enabled."), torrentName));
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Super seeding enabled."), torrentName));
|
||||
}
|
||||
|
||||
continue;
|
||||
@@ -2189,23 +2209,64 @@ void SessionImpl::processShareLimits()
|
||||
|
||||
if (m_maxRatioAction == Remove)
|
||||
{
|
||||
LogMsg(u"%1 %2 %3"_qs.arg(description, tr("Removed torrent."), torrentName));
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Removed torrent."), torrentName));
|
||||
deleteTorrent(torrent->id());
|
||||
}
|
||||
else if (m_maxRatioAction == DeleteFiles)
|
||||
{
|
||||
LogMsg(u"%1 %2 %3"_qs.arg(description, tr("Removed torrent and deleted its content."), torrentName));
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Removed torrent and deleted its content."), torrentName));
|
||||
deleteTorrent(torrent->id(), DeleteTorrentAndFiles);
|
||||
}
|
||||
else if ((m_maxRatioAction == Pause) && !torrent->isPaused())
|
||||
{
|
||||
torrent->pause();
|
||||
LogMsg(u"%1 %2 %3"_qs.arg(description, tr("Torrent paused."), torrentName));
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Torrent paused."), torrentName));
|
||||
}
|
||||
else if ((m_maxRatioAction == EnableSuperSeeding) && !torrent->isPaused() && !torrent->superSeeding())
|
||||
{
|
||||
torrent->setSuperSeeding(true);
|
||||
LogMsg(u"%1 %2 %3"_qs.arg(description, tr("Super seeding enabled."), torrentName));
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Super seeding enabled."), torrentName));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (torrent->inactiveSeedingTimeLimit() != Torrent::NO_INACTIVE_SEEDING_TIME_LIMIT)
|
||||
{
|
||||
const qlonglong inactiveSeedingTimeInMinutes = torrent->timeSinceActivity() / 60;
|
||||
int inactiveSeedingTimeLimit = torrent->inactiveSeedingTimeLimit();
|
||||
if (inactiveSeedingTimeLimit == Torrent::USE_GLOBAL_INACTIVE_SEEDING_TIME)
|
||||
{
|
||||
// If Global Seeding Time Limit is really set...
|
||||
inactiveSeedingTimeLimit = globalMaxInactiveSeedingMinutes();
|
||||
}
|
||||
|
||||
if (inactiveSeedingTimeLimit >= 0)
|
||||
{
|
||||
if ((inactiveSeedingTimeInMinutes <= Torrent::MAX_INACTIVE_SEEDING_TIME) && (inactiveSeedingTimeInMinutes >= inactiveSeedingTimeLimit))
|
||||
{
|
||||
const QString description = tr("Torrent reached the inactive seeding time limit.");
|
||||
const QString torrentName = tr("Torrent: \"%1\".").arg(torrent->name());
|
||||
|
||||
if (m_maxRatioAction == Remove)
|
||||
{
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Removed torrent."), torrentName));
|
||||
deleteTorrent(torrent->id());
|
||||
}
|
||||
else if (m_maxRatioAction == DeleteFiles)
|
||||
{
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Removed torrent and deleted its content."), torrentName));
|
||||
deleteTorrent(torrent->id(), DeleteTorrentAndFiles);
|
||||
}
|
||||
else if ((m_maxRatioAction == Pause) && !torrent->isPaused())
|
||||
{
|
||||
torrent->pause();
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Torrent paused."), torrentName));
|
||||
}
|
||||
else if ((m_maxRatioAction == EnableSuperSeeding) && !torrent->isPaused() && !torrent->superSeeding())
|
||||
{
|
||||
torrent->setSuperSeeding(true);
|
||||
LogMsg(u"%1 %2 %3"_s.arg(description, tr("Super seeding enabled."), torrentName));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2555,9 +2616,10 @@ bool SessionImpl::addTorrent(const QString &source, const AddTorrentParams ¶
|
||||
if (Net::DownloadManager::hasSupportedScheme(source))
|
||||
{
|
||||
LogMsg(tr("Downloading torrent, please wait... Source: \"%1\"").arg(source));
|
||||
const auto *pref = Preferences::instance();
|
||||
// Launch downloader
|
||||
Net::DownloadManager::instance()->download(Net::DownloadRequest(source).limit(MAX_TORRENT_SIZE)
|
||||
, Preferences::instance()->useProxyForGeneralPurposes(), this, &SessionImpl::handleDownloadFinished);
|
||||
Net::DownloadManager::instance()->download(Net::DownloadRequest(source).limit(pref->getTorrentFileSizeLimit())
|
||||
, pref->useProxyForGeneralPurposes(), this, &SessionImpl::handleDownloadFinished);
|
||||
m_downloadedTorrents[source] = params;
|
||||
return true;
|
||||
}
|
||||
@@ -2615,7 +2677,7 @@ LoadTorrentParams SessionImpl::initLoadTorrentParams(const AddTorrentParams &add
|
||||
|
||||
const QString category = addTorrentParams.category;
|
||||
if (!category.isEmpty() && !m_categories.contains(category) && !addCategory(category))
|
||||
loadTorrentParams.category = u""_qs;
|
||||
loadTorrentParams.category = u""_s;
|
||||
else
|
||||
loadTorrentParams.category = category;
|
||||
|
||||
@@ -2676,14 +2738,46 @@ bool SessionImpl::addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &so
|
||||
if (m_loadingTorrents.contains(id) || (infoHash.isHybrid() && m_loadingTorrents.contains(altID)))
|
||||
return false;
|
||||
|
||||
if (Torrent *torrent = findTorrent(infoHash); torrent)
|
||||
if (Torrent *torrent = findTorrent(infoHash))
|
||||
{
|
||||
// a duplicate torrent is being added
|
||||
if (hasMetadata)
|
||||
{
|
||||
// Trying to set metadata to existing torrent in case if it has none
|
||||
torrent->setMetadata(std::get<TorrentInfo>(source));
|
||||
}
|
||||
|
||||
if (!isMergeTrackersEnabled())
|
||||
{
|
||||
LogMsg(tr("Detected an attempt to add a duplicate torrent. Merging of trackers is disabled. Torrent: %1").arg(torrent->name()));
|
||||
return false;
|
||||
}
|
||||
|
||||
const bool isPrivate = torrent->isPrivate() || (hasMetadata && std::get<TorrentInfo>(source).isPrivate());
|
||||
if (isPrivate)
|
||||
{
|
||||
LogMsg(tr("Detected an attempt to add a duplicate torrent. Trackers cannot be merged because it is a private torrent. Torrent: %1").arg(torrent->name()));
|
||||
return false;
|
||||
}
|
||||
|
||||
if (hasMetadata)
|
||||
{
|
||||
const TorrentInfo &torrentInfo = std::get<TorrentInfo>(source);
|
||||
|
||||
// merge trackers and web seeds
|
||||
torrent->addTrackers(torrentInfo.trackers());
|
||||
torrent->addUrlSeeds(torrentInfo.urlSeeds());
|
||||
}
|
||||
else
|
||||
{
|
||||
const MagnetUri &magnetUri = std::get<MagnetUri>(source);
|
||||
|
||||
// merge trackers and web seeds
|
||||
torrent->addTrackers(magnetUri.trackers());
|
||||
torrent->addUrlSeeds(magnetUri.urlSeeds());
|
||||
}
|
||||
|
||||
LogMsg(tr("Detected an attempt to add a duplicate torrent. Trackers are merged from new source. Torrent: %1").arg(torrent->name()));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -2856,7 +2950,7 @@ bool SessionImpl::addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &so
|
||||
}
|
||||
|
||||
void SessionImpl::findIncompleteFiles(const TorrentInfo &torrentInfo, const Path &savePath
|
||||
, const Path &downloadPath, const PathList &filePaths) const
|
||||
, const Path &downloadPath, const PathList &filePaths) const
|
||||
{
|
||||
Q_ASSERT(filePaths.isEmpty() || (filePaths.size() == torrentInfo.filesCount()));
|
||||
|
||||
@@ -3013,13 +3107,13 @@ void SessionImpl::exportTorrentFile(const Torrent *torrent, const Path &folderPa
|
||||
return;
|
||||
|
||||
const QString validName = Utils::Fs::toValidFileName(torrent->name());
|
||||
QString torrentExportFilename = u"%1.torrent"_qs.arg(validName);
|
||||
QString torrentExportFilename = u"%1.torrent"_s.arg(validName);
|
||||
Path newTorrentPath = folderPath / Path(torrentExportFilename);
|
||||
int counter = 0;
|
||||
while (newTorrentPath.exists())
|
||||
{
|
||||
// Append number to torrent name to make it unique
|
||||
torrentExportFilename = u"%1 %2.torrent"_qs.arg(validName).arg(++counter);
|
||||
torrentExportFilename = u"%1 %2.torrent"_s.arg(validName).arg(++counter);
|
||||
newTorrentPath = folderPath / Path(torrentExportFilename);
|
||||
}
|
||||
|
||||
@@ -3049,8 +3143,16 @@ void SessionImpl::generateResumeData()
|
||||
void SessionImpl::saveResumeData()
|
||||
{
|
||||
for (const TorrentImpl *torrent : asConst(m_torrents))
|
||||
torrent->nativeHandle().save_resume_data(lt::torrent_handle::only_if_modified);
|
||||
m_numResumeData += m_torrents.size();
|
||||
{
|
||||
// When the session is terminated due to unrecoverable error
|
||||
// some of the torrent handles can be corrupted
|
||||
try
|
||||
{
|
||||
torrent->nativeHandle().save_resume_data(lt::torrent_handle::only_if_modified);
|
||||
++m_numResumeData;
|
||||
}
|
||||
catch (const std::exception &) {}
|
||||
}
|
||||
|
||||
// clear queued storage move jobs except the current ongoing one
|
||||
if (m_moveStorageQueue.size() > 1)
|
||||
@@ -3154,7 +3256,7 @@ void SessionImpl::setSavePath(const Path &path)
|
||||
|
||||
void SessionImpl::setDownloadPath(const Path &path)
|
||||
{
|
||||
const Path newPath = (path.isAbsolute() ? path : (savePath() / Path(u"temp"_qs) / path));
|
||||
const Path newPath = (path.isAbsolute() ? path : (savePath() / Path(u"temp"_s) / path));
|
||||
if (newPath == m_downloadPath)
|
||||
return;
|
||||
|
||||
@@ -3230,13 +3332,13 @@ QStringList SessionImpl::getListeningIPs() const
|
||||
if (ifaceName.isEmpty())
|
||||
{
|
||||
if (ifaceAddr.isEmpty())
|
||||
return {u"0.0.0.0"_qs, u"::"_qs}; // Indicates all interfaces + all addresses (aka default)
|
||||
return {u"0.0.0.0"_s, u"::"_s}; // Indicates all interfaces + all addresses (aka default)
|
||||
|
||||
if (allIPv4)
|
||||
return {u"0.0.0.0"_qs};
|
||||
return {u"0.0.0.0"_s};
|
||||
|
||||
if (allIPv6)
|
||||
return {u"::"_qs};
|
||||
return {u"::"_s};
|
||||
}
|
||||
|
||||
const auto checkAndAddIP = [allIPv4, allIPv6, &IPs](const QHostAddress &addr, const QHostAddress &match)
|
||||
@@ -3905,6 +4007,16 @@ void SessionImpl::setResumeDataStorageType(const ResumeDataStorageType type)
|
||||
m_resumeDataStorageType = type;
|
||||
}
|
||||
|
||||
bool SessionImpl::isMergeTrackersEnabled() const
|
||||
{
|
||||
return m_isMergeTrackersEnabled;
|
||||
}
|
||||
|
||||
void SessionImpl::setMergeTrackersEnabled(const bool enabled)
|
||||
{
|
||||
m_isMergeTrackersEnabled = enabled;
|
||||
}
|
||||
|
||||
QStringList SessionImpl::bannedIPs() const
|
||||
{
|
||||
return m_bannedIPs;
|
||||
@@ -4802,7 +4914,8 @@ bool SessionImpl::isKnownTorrent(const InfoHash &infoHash) const
|
||||
void SessionImpl::updateSeedingLimitTimer()
|
||||
{
|
||||
if ((globalMaxRatio() == Torrent::NO_RATIO_LIMIT) && !hasPerTorrentRatioLimit()
|
||||
&& (globalMaxSeedingMinutes() == Torrent::NO_SEEDING_TIME_LIMIT) && !hasPerTorrentSeedingTimeLimit())
|
||||
&& (globalMaxSeedingMinutes() == Torrent::NO_SEEDING_TIME_LIMIT) && !hasPerTorrentSeedingTimeLimit()
|
||||
&& (globalMaxInactiveSeedingMinutes() == Torrent::NO_INACTIVE_SEEDING_TIME_LIMIT) && !hasPerTorrentInactiveSeedingTimeLimit())
|
||||
{
|
||||
if (m_seedingLimitTimer->isActive())
|
||||
m_seedingLimitTimer->stop();
|
||||
@@ -4920,7 +5033,7 @@ void SessionImpl::handleTorrentFinished(TorrentImpl *const torrent)
|
||||
// Check whether it contains .torrent files
|
||||
for (const Path &torrentRelpath : asConst(torrent->filePaths()))
|
||||
{
|
||||
if (torrentRelpath.hasExtension(u".torrent"_qs))
|
||||
if (torrentRelpath.hasExtension(u".torrent"_s))
|
||||
{
|
||||
emit recursiveTorrentDownloadPossible(torrent);
|
||||
break;
|
||||
@@ -4963,6 +5076,11 @@ void SessionImpl::handleTorrentInfoHashChanged(TorrentImpl *torrent, const InfoH
|
||||
}
|
||||
}
|
||||
|
||||
void SessionImpl::handleTorrentStorageMovingStateChanged(TorrentImpl *torrent)
|
||||
{
|
||||
emit torrentsUpdated({torrent});
|
||||
}
|
||||
|
||||
bool SessionImpl::addMoveTorrentStorageJob(TorrentImpl *torrent, const Path &newPath, const MoveStorageMode mode, const MoveStorageContext context)
|
||||
{
|
||||
Q_ASSERT(torrent);
|
||||
@@ -5084,7 +5202,7 @@ void SessionImpl::storeCategories() const
|
||||
|
||||
void SessionImpl::upgradeCategories()
|
||||
{
|
||||
const auto legacyCategories = SettingValue<QVariantMap>(u"BitTorrent/Session/Categories"_qs).get();
|
||||
const auto legacyCategories = SettingValue<QVariantMap>(u"BitTorrent/Session/Categories"_s).get();
|
||||
for (auto it = legacyCategories.cbegin(); it != legacyCategories.cend(); ++it)
|
||||
{
|
||||
const QString &categoryName = it.key();
|
||||
@@ -5161,6 +5279,14 @@ bool SessionImpl::hasPerTorrentSeedingTimeLimit() const
|
||||
});
|
||||
}
|
||||
|
||||
bool SessionImpl::hasPerTorrentInactiveSeedingTimeLimit() const
|
||||
{
|
||||
return std::any_of(m_torrents.cbegin(), m_torrents.cend(), [](const TorrentImpl *torrent)
|
||||
{
|
||||
return (torrent->inactiveSeedingTimeLimit() >= 0);
|
||||
});
|
||||
}
|
||||
|
||||
void SessionImpl::configureDeferred()
|
||||
{
|
||||
if (m_deferredConfigureScheduled)
|
||||
@@ -5214,7 +5340,7 @@ void SessionImpl::recursiveTorrentDownload(const TorrentID &id)
|
||||
|
||||
for (const Path &torrentRelpath : asConst(torrent->filePaths()))
|
||||
{
|
||||
if (torrentRelpath.hasExtension(u".torrent"_qs))
|
||||
if (torrentRelpath.hasExtension(u".torrent"_s))
|
||||
{
|
||||
const Path torrentFullpath = torrent->savePath() / torrentRelpath;
|
||||
|
||||
@@ -5723,7 +5849,7 @@ void SessionImpl::handlePeerBlockedAlert(const lt::peer_blocked_alert *p)
|
||||
reason = tr("filtered port (%1)", "this peer was blocked. Reason: filtered port (8899).").arg(QString::number(p->endpoint.port()));
|
||||
break;
|
||||
case lt::peer_blocked_alert::i2p_mixed:
|
||||
reason = tr("%1 mixed mode restrictions", "this peer was blocked. Reason: I2P mixed mode restrictions.").arg(u"I2P"_qs); // don't translate I2P
|
||||
reason = tr("%1 mixed mode restrictions", "this peer was blocked. Reason: I2P mixed mode restrictions.").arg(u"I2P"_s); // don't translate I2P
|
||||
break;
|
||||
case lt::peer_blocked_alert::privileged_ports:
|
||||
reason = tr("privileged port (%1)", "this peer was blocked. Reason: privileged port (80).").arg(QString::number(p->endpoint.port()));
|
||||
@@ -5732,7 +5858,7 @@ void SessionImpl::handlePeerBlockedAlert(const lt::peer_blocked_alert *p)
|
||||
reason = tr("%1 is disabled", "this peer was blocked. Reason: uTP is disabled.").arg(C_UTP); // don't translate μTP
|
||||
break;
|
||||
case lt::peer_blocked_alert::tcp_disabled:
|
||||
reason = tr("%1 is disabled", "this peer was blocked. Reason: TCP is disabled.").arg(u"TCP"_qs); // don't translate TCP
|
||||
reason = tr("%1 is disabled", "this peer was blocked. Reason: TCP is disabled.").arg(u"TCP"_s); // don't translate TCP
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -5983,7 +6109,7 @@ void SessionImpl::handleSocks5Alert(const lt::socks5_alert *p) const
|
||||
if (p->error)
|
||||
{
|
||||
const auto addr = p->ip.address();
|
||||
const QString endpoint = (addr.is_v6() ? u"[%1]:%2"_qs : u"%1:%2"_qs)
|
||||
const QString endpoint = (addr.is_v6() ? u"[%1]:%2"_s : u"%1:%2"_s)
|
||||
.arg(QString::fromStdString(addr.to_string()), QString::number(p->ip.port()));
|
||||
LogMsg(tr("SOCKS5 proxy error. Address: %1. Message: \"%2\".")
|
||||
.arg(endpoint, QString::fromLocal8Bit(p->error.message().c_str()))
|
||||
@@ -6086,7 +6212,8 @@ void SessionImpl::processTrackerStatuses()
|
||||
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0))
|
||||
updatedTrackerEntries[trackerEntry.url] = std::move(trackerEntry);
|
||||
#else
|
||||
updatedTrackerEntries.emplace(trackerEntry.url, std::move(trackerEntry));
|
||||
const QString url = trackerEntry.url;
|
||||
updatedTrackerEntries.emplace(url, std::move(trackerEntry));
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -6108,10 +6235,10 @@ void SessionImpl::saveStatistics() const
|
||||
return;
|
||||
|
||||
const QVariantHash stats {
|
||||
{u"AlltimeDL"_qs, m_status.allTimeDownload},
|
||||
{u"AlltimeUL"_qs, m_status.allTimeUpload}};
|
||||
std::unique_ptr<QSettings> settings = Profile::instance()->applicationSettings(u"qBittorrent-data"_qs);
|
||||
settings->setValue(u"Stats/AllStats"_qs, stats);
|
||||
{u"AlltimeDL"_s, m_status.allTimeDownload},
|
||||
{u"AlltimeUL"_s, m_status.allTimeUpload}};
|
||||
std::unique_ptr<QSettings> settings = Profile::instance()->applicationSettings(u"qBittorrent-data"_s);
|
||||
settings->setValue(u"Stats/AllStats"_s, stats);
|
||||
|
||||
m_statisticsLastUpdateTimer.start();
|
||||
m_isStatisticsDirty = false;
|
||||
@@ -6119,9 +6246,9 @@ void SessionImpl::saveStatistics() const
|
||||
|
||||
void SessionImpl::loadStatistics()
|
||||
{
|
||||
const std::unique_ptr<QSettings> settings = Profile::instance()->applicationSettings(u"qBittorrent-data"_qs);
|
||||
const QVariantHash value = settings->value(u"Stats/AllStats"_qs).toHash();
|
||||
const std::unique_ptr<QSettings> settings = Profile::instance()->applicationSettings(u"qBittorrent-data"_s);
|
||||
const QVariantHash value = settings->value(u"Stats/AllStats"_s).toHash();
|
||||
|
||||
m_previouslyDownloaded = value[u"AlltimeDL"_qs].toLongLong();
|
||||
m_previouslyUploaded = value[u"AlltimeUL"_qs].toLongLong();
|
||||
m_previouslyDownloaded = value[u"AlltimeDL"_s].toLongLong();
|
||||
m_previouslyUploaded = value[u"AlltimeUL"_s].toLongLong();
|
||||
}
|
||||
|
||||
@@ -182,6 +182,8 @@ namespace BitTorrent
|
||||
void setGlobalMaxRatio(qreal ratio) override;
|
||||
int globalMaxSeedingMinutes() const override;
|
||||
void setGlobalMaxSeedingMinutes(int minutes) override;
|
||||
int globalMaxInactiveSeedingMinutes() const override;
|
||||
void setGlobalMaxInactiveSeedingMinutes(int minutes) override;
|
||||
bool isDHTEnabled() const override;
|
||||
void setDHTEnabled(bool enabled) override;
|
||||
bool isLSDEnabled() const override;
|
||||
@@ -398,6 +400,8 @@ namespace BitTorrent
|
||||
void setBannedIPs(const QStringList &newList) override;
|
||||
ResumeDataStorageType resumeDataStorageType() const override;
|
||||
void setResumeDataStorageType(ResumeDataStorageType type) override;
|
||||
bool isMergeTrackersEnabled() const override;
|
||||
void setMergeTrackersEnabled(bool enabled) override;
|
||||
|
||||
bool isRestored() const override;
|
||||
|
||||
@@ -451,6 +455,7 @@ namespace BitTorrent
|
||||
void handleTorrentUrlSeedsRemoved(TorrentImpl *torrent, const QVector<QUrl> &urlSeeds);
|
||||
void handleTorrentResumeDataReady(TorrentImpl *torrent, const LoadTorrentParams &data);
|
||||
void handleTorrentInfoHashChanged(TorrentImpl *torrent, const InfoHash &prevInfoHash);
|
||||
void handleTorrentStorageMovingStateChanged(TorrentImpl *torrent);
|
||||
|
||||
bool addMoveTorrentStorageJob(TorrentImpl *torrent, const Path &newPath, MoveStorageMode mode, MoveStorageContext context);
|
||||
|
||||
@@ -510,6 +515,7 @@ namespace BitTorrent
|
||||
|
||||
bool hasPerTorrentRatioLimit() const;
|
||||
bool hasPerTorrentSeedingTimeLimit() const;
|
||||
bool hasPerTorrentInactiveSeedingTimeLimit() const;
|
||||
|
||||
// Session configuration
|
||||
Q_INVOKABLE void configure();
|
||||
@@ -657,6 +663,7 @@ namespace BitTorrent
|
||||
CachedSettingValue<QString> m_additionalTrackers;
|
||||
CachedSettingValue<qreal> m_globalMaxRatio;
|
||||
CachedSettingValue<int> m_globalMaxSeedingMinutes;
|
||||
CachedSettingValue<int> m_globalMaxInactiveSeedingMinutes;
|
||||
CachedSettingValue<bool> m_isAddTorrentToQueueTop;
|
||||
CachedSettingValue<bool> m_isAddTorrentPaused;
|
||||
CachedSettingValue<Torrent::StopCondition> m_torrentStopCondition;
|
||||
@@ -703,6 +710,7 @@ namespace BitTorrent
|
||||
CachedSettingValue<QStringList> m_excludedFileNames;
|
||||
CachedSettingValue<QStringList> m_bannedIPs;
|
||||
CachedSettingValue<ResumeDataStorageType> m_resumeDataStorageType;
|
||||
CachedSettingValue<bool> m_isMergeTrackersEnabled;
|
||||
CachedSettingValue<bool> m_isI2PEnabled;
|
||||
CachedSettingValue<QString> m_I2PAddress;
|
||||
CachedSettingValue<int> m_I2PPort;
|
||||
|
||||
@@ -52,8 +52,12 @@ namespace BitTorrent
|
||||
const int Torrent::USE_GLOBAL_SEEDING_TIME = -2;
|
||||
const int Torrent::NO_SEEDING_TIME_LIMIT = -1;
|
||||
|
||||
const int Torrent::USE_GLOBAL_INACTIVE_SEEDING_TIME = -2;
|
||||
const int Torrent::NO_INACTIVE_SEEDING_TIME_LIMIT = -1;
|
||||
|
||||
const qreal Torrent::MAX_RATIO = 9999;
|
||||
const int Torrent::MAX_SEEDING_TIME = 525600;
|
||||
const int Torrent::MAX_INACTIVE_SEEDING_TIME = 525600;
|
||||
|
||||
TorrentID Torrent::id() const
|
||||
{
|
||||
|
||||
@@ -126,8 +126,12 @@ namespace BitTorrent
|
||||
static const int USE_GLOBAL_SEEDING_TIME;
|
||||
static const int NO_SEEDING_TIME_LIMIT;
|
||||
|
||||
static const int USE_GLOBAL_INACTIVE_SEEDING_TIME;
|
||||
static const int NO_INACTIVE_SEEDING_TIME_LIMIT;
|
||||
|
||||
static const qreal MAX_RATIO;
|
||||
static const int MAX_SEEDING_TIME;
|
||||
static const int MAX_INACTIVE_SEEDING_TIME;
|
||||
|
||||
using TorrentContentHandler::TorrentContentHandler;
|
||||
|
||||
@@ -210,6 +214,7 @@ namespace BitTorrent
|
||||
virtual QDateTime addedTime() const = 0;
|
||||
virtual qreal ratioLimit() const = 0;
|
||||
virtual int seedingTimeLimit() const = 0;
|
||||
virtual int inactiveSeedingTimeLimit() const = 0;
|
||||
|
||||
virtual PathList filePaths() const = 0;
|
||||
|
||||
@@ -264,6 +269,7 @@ namespace BitTorrent
|
||||
virtual qreal distributedCopies() const = 0;
|
||||
virtual qreal maxRatio() const = 0;
|
||||
virtual int maxSeedingTime() const = 0;
|
||||
virtual int maxInactiveSeedingTime() const = 0;
|
||||
virtual qreal realRatio() const = 0;
|
||||
virtual int uploadPayloadRate() const = 0;
|
||||
virtual int downloadPayloadRate() const = 0;
|
||||
@@ -283,6 +289,7 @@ namespace BitTorrent
|
||||
virtual void forceRecheck() = 0;
|
||||
virtual void setRatioLimit(qreal limit) = 0;
|
||||
virtual void setSeedingTimeLimit(int limit) = 0;
|
||||
virtual void setInactiveSeedingTimeLimit(int limit) = 0;
|
||||
virtual void setUploadLimit(int limit) = 0;
|
||||
virtual void setDownloadLimit(int limit) = 0;
|
||||
virtual void setSuperSeeding(bool enable) = 0;
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
#include <QStringList>
|
||||
#include <QUrl>
|
||||
|
||||
#include "base/exceptions.h"
|
||||
#include "base/global.h"
|
||||
#include "base/logger.h"
|
||||
#include "base/preferences.h"
|
||||
@@ -251,6 +252,7 @@ TorrentImpl::TorrentImpl(SessionImpl *session, lt::session *nativeSession
|
||||
, m_tags(params.tags)
|
||||
, m_ratioLimit(params.ratioLimit)
|
||||
, m_seedingTimeLimit(params.seedingTimeLimit)
|
||||
, m_inactiveSeedingTimeLimit(params.inactiveSeedingTimeLimit)
|
||||
, m_operatingMode(params.operatingMode)
|
||||
, m_contentLayout(params.contentLayout)
|
||||
, m_hasFinishedStatus(params.hasFinishedStatus)
|
||||
@@ -330,8 +332,8 @@ TorrentImpl::TorrentImpl(SessionImpl *session, lt::session *nativeSession
|
||||
|
||||
// Remove .unwanted directory if empty
|
||||
const Path newPath = spath / newRelPath;
|
||||
qDebug() << "Attempting to remove \".unwanted\" folder at " << (newPath / Path(u".unwanted"_qs)).toString();
|
||||
Utils::Fs::rmdir(newPath / Path(u".unwanted"_qs));
|
||||
qDebug() << "Attempting to remove \".unwanted\" folder at " << (newPath / Path(u".unwanted"_s)).toString();
|
||||
Utils::Fs::rmdir(newPath / Path(u".unwanted"_s));
|
||||
}
|
||||
}
|
||||
// == END UPGRADE CODE ==
|
||||
@@ -862,6 +864,11 @@ int TorrentImpl::seedingTimeLimit() const
|
||||
return m_seedingTimeLimit;
|
||||
}
|
||||
|
||||
int TorrentImpl::inactiveSeedingTimeLimit() const
|
||||
{
|
||||
return m_inactiveSeedingTimeLimit;
|
||||
}
|
||||
|
||||
Path TorrentImpl::filePath(const int index) const
|
||||
{
|
||||
Q_ASSERT(index >= 0);
|
||||
@@ -1165,7 +1172,8 @@ qlonglong TorrentImpl::eta() const
|
||||
{
|
||||
const qreal maxRatioValue = maxRatio();
|
||||
const int maxSeedingTimeValue = maxSeedingTime();
|
||||
if ((maxRatioValue < 0) && (maxSeedingTimeValue < 0)) return MAX_ETA;
|
||||
const int maxInactiveSeedingTimeValue = maxInactiveSeedingTime();
|
||||
if ((maxRatioValue < 0) && (maxSeedingTimeValue < 0) && (maxInactiveSeedingTimeValue < 0)) return MAX_ETA;
|
||||
|
||||
qlonglong ratioEta = MAX_ETA;
|
||||
|
||||
@@ -1188,7 +1196,15 @@ qlonglong TorrentImpl::eta() const
|
||||
seedingTimeEta = 0;
|
||||
}
|
||||
|
||||
return std::min(ratioEta, seedingTimeEta);
|
||||
qlonglong inactiveSeedingTimeEta = MAX_ETA;
|
||||
|
||||
if (maxInactiveSeedingTimeValue >= 0)
|
||||
{
|
||||
inactiveSeedingTimeEta = (maxInactiveSeedingTimeValue * 60) - timeSinceActivity();
|
||||
inactiveSeedingTimeEta = std::max<qlonglong>(inactiveSeedingTimeEta, 0);
|
||||
}
|
||||
|
||||
return std::min({ratioEta, seedingTimeEta, inactiveSeedingTimeEta});
|
||||
}
|
||||
|
||||
if (!speedAverage.download) return MAX_ETA;
|
||||
@@ -1385,6 +1401,14 @@ int TorrentImpl::maxSeedingTime() const
|
||||
return m_seedingTimeLimit;
|
||||
}
|
||||
|
||||
int TorrentImpl::maxInactiveSeedingTime() const
|
||||
{
|
||||
if (m_inactiveSeedingTimeLimit == USE_GLOBAL_INACTIVE_SEEDING_TIME)
|
||||
return m_session->globalMaxInactiveSeedingMinutes();
|
||||
|
||||
return m_inactiveSeedingTimeLimit;
|
||||
}
|
||||
|
||||
qreal TorrentImpl::realRatio() const
|
||||
{
|
||||
const int64_t upload = m_nativeStatus.all_time_upload;
|
||||
@@ -1579,7 +1603,8 @@ void TorrentImpl::applyFirstLastPiecePriority(const bool enabled)
|
||||
|
||||
void TorrentImpl::fileSearchFinished(const Path &savePath, const PathList &fileNames)
|
||||
{
|
||||
endReceivedMetadataHandling(savePath, fileNames);
|
||||
if (m_maintenanceJob == MaintenanceJob::HandleMetadata)
|
||||
endReceivedMetadataHandling(savePath, fileNames);
|
||||
}
|
||||
|
||||
TrackerEntry TorrentImpl::updateTrackerEntry(const lt::announce_entry &announceEntry, const QMap<TrackerEntry::Endpoint, int> &updateInfo)
|
||||
@@ -1612,7 +1637,13 @@ std::shared_ptr<const libtorrent::torrent_info> TorrentImpl::nativeTorrentInfo()
|
||||
|
||||
void TorrentImpl::endReceivedMetadataHandling(const Path &savePath, const PathList &fileNames)
|
||||
{
|
||||
Q_ASSERT(m_maintenanceJob == MaintenanceJob::HandleMetadata);
|
||||
if (Q_UNLIKELY(m_maintenanceJob != MaintenanceJob::HandleMetadata))
|
||||
return;
|
||||
|
||||
Q_ASSERT(m_filePaths.isEmpty());
|
||||
if (Q_UNLIKELY(!m_filePaths.isEmpty()))
|
||||
m_filePaths.clear();
|
||||
|
||||
lt::add_torrent_params &p = m_ltAddTorrentParams;
|
||||
|
||||
@@ -1621,7 +1652,7 @@ void TorrentImpl::endReceivedMetadataHandling(const Path &savePath, const PathLi
|
||||
m_filePriorities.reserve(filesCount());
|
||||
const auto nativeIndexes = m_torrentInfo.nativeIndexes();
|
||||
p.file_priorities = resized(p.file_priorities, metadata->files().num_files()
|
||||
, LT::toNative(p.file_priorities.empty() ? DownloadPriority::Normal : DownloadPriority::Ignored));
|
||||
, LT::toNative(p.file_priorities.empty() ? DownloadPriority::Normal : DownloadPriority::Ignored));
|
||||
|
||||
m_completedFiles.fill(static_cast<bool>(p.flags & lt::torrent_flags::seed_mode), filesCount());
|
||||
m_filesProgress.resize(filesCount());
|
||||
@@ -1671,6 +1702,7 @@ void TorrentImpl::endReceivedMetadataHandling(const Path &savePath, const PathLi
|
||||
}
|
||||
|
||||
void TorrentImpl::reload()
|
||||
try
|
||||
{
|
||||
m_completedFiles.fill(false);
|
||||
m_filesProgress.fill(0);
|
||||
@@ -1713,6 +1745,11 @@ void TorrentImpl::reload()
|
||||
|
||||
updateState();
|
||||
}
|
||||
catch (const lt::system_error &err)
|
||||
{
|
||||
throw RuntimeError(tr("Failed to reload torrent. Torrent: %1. Reason: %2")
|
||||
.arg(id().toString(), QString::fromLocal8Bit(err.what())));
|
||||
}
|
||||
|
||||
void TorrentImpl::pause()
|
||||
{
|
||||
@@ -1779,8 +1816,12 @@ void TorrentImpl::moveStorage(const Path &newPath, const MoveStorageContext cont
|
||||
? MoveStorageMode::Overwrite : MoveStorageMode::KeepExistingFiles;
|
||||
if (m_session->addMoveTorrentStorageJob(this, newPath, mode, context))
|
||||
{
|
||||
m_storageIsMoving = true;
|
||||
updateState();
|
||||
if (!m_storageIsMoving)
|
||||
{
|
||||
m_storageIsMoving = true;
|
||||
updateState();
|
||||
m_session->handleTorrentStorageMovingStateChanged(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1813,6 +1854,9 @@ void TorrentImpl::handleMoveStorageJobFinished(const Path &path, const MoveStora
|
||||
|
||||
if (!m_storageIsMoving)
|
||||
{
|
||||
updateState();
|
||||
m_session->handleTorrentStorageMovingStateChanged(this);
|
||||
|
||||
if (m_hasMissingFiles)
|
||||
{
|
||||
// it can be moved to the proper location
|
||||
@@ -2007,6 +2051,7 @@ void TorrentImpl::prepareResumeData(const lt::add_torrent_params ¶ms)
|
||||
resumeData.contentLayout = m_contentLayout;
|
||||
resumeData.ratioLimit = m_ratioLimit;
|
||||
resumeData.seedingTimeLimit = m_seedingTimeLimit;
|
||||
resumeData.inactiveSeedingTimeLimit = m_inactiveSeedingTimeLimit;
|
||||
resumeData.firstLastPiecePriority = m_hasFirstLastPiecePriority;
|
||||
resumeData.hasFinishedStatus = m_hasFinishedStatus;
|
||||
resumeData.stopped = m_isStopped;
|
||||
@@ -2143,7 +2188,7 @@ void TorrentImpl::handleMetadataReceivedAlert(const lt::metadata_received_alert
|
||||
|
||||
void TorrentImpl::handlePerformanceAlert(const lt::performance_alert *p) const
|
||||
{
|
||||
LogMsg((tr("Performance alert: %1. More info: %2").arg(QString::fromStdString(p->message()), u"https://libtorrent.org/reference-Alerts.html#enum-performance-warning-t"_qs))
|
||||
LogMsg((tr("Performance alert: %1. More info: %2").arg(QString::fromStdString(p->message()), u"https://libtorrent.org/reference-Alerts.html#enum-performance-warning-t"_s))
|
||||
, Log::INFO);
|
||||
}
|
||||
|
||||
@@ -2399,6 +2444,21 @@ void TorrentImpl::setSeedingTimeLimit(int limit)
|
||||
}
|
||||
}
|
||||
|
||||
void TorrentImpl::setInactiveSeedingTimeLimit(int limit)
|
||||
{
|
||||
if (limit < USE_GLOBAL_INACTIVE_SEEDING_TIME)
|
||||
limit = NO_INACTIVE_SEEDING_TIME_LIMIT;
|
||||
else if (limit > MAX_INACTIVE_SEEDING_TIME)
|
||||
limit = MAX_SEEDING_TIME;
|
||||
|
||||
if (m_inactiveSeedingTimeLimit != limit)
|
||||
{
|
||||
m_inactiveSeedingTimeLimit = limit;
|
||||
m_session->handleTorrentNeedSaveResumeData(this);
|
||||
m_session->handleTorrentShareLimitChanged(this);
|
||||
}
|
||||
}
|
||||
|
||||
void TorrentImpl::setUploadLimit(const int limit)
|
||||
{
|
||||
const int cleanValue = cleanLimitValue(limit);
|
||||
@@ -2480,7 +2540,7 @@ void TorrentImpl::flushCache() const
|
||||
|
||||
QString TorrentImpl::createMagnetURI() const
|
||||
{
|
||||
QString ret = u"magnet:?"_qs;
|
||||
QString ret = u"magnet:?"_s;
|
||||
|
||||
const SHA1Hash infoHash1 = infoHash().v1();
|
||||
if (infoHash1.isValid())
|
||||
|
||||
@@ -138,6 +138,7 @@ namespace BitTorrent
|
||||
QDateTime addedTime() const override;
|
||||
qreal ratioLimit() const override;
|
||||
int seedingTimeLimit() const override;
|
||||
int inactiveSeedingTimeLimit() const override;
|
||||
|
||||
Path filePath(int index) const override;
|
||||
Path actualFilePath(int index) const override;
|
||||
@@ -198,6 +199,7 @@ namespace BitTorrent
|
||||
qreal distributedCopies() const override;
|
||||
qreal maxRatio() const override;
|
||||
int maxSeedingTime() const override;
|
||||
int maxInactiveSeedingTime() const override;
|
||||
qreal realRatio() const override;
|
||||
int uploadPayloadRate() const override;
|
||||
int downloadPayloadRate() const override;
|
||||
@@ -220,6 +222,7 @@ namespace BitTorrent
|
||||
void prioritizeFiles(const QVector<DownloadPriority> &priorities) override;
|
||||
void setRatioLimit(qreal limit) override;
|
||||
void setSeedingTimeLimit(int limit) override;
|
||||
void setInactiveSeedingTimeLimit(int limit) override;
|
||||
void setUploadLimit(int limit) override;
|
||||
void setDownloadLimit(int limit) override;
|
||||
void setSuperSeeding(bool enable) override;
|
||||
@@ -345,6 +348,7 @@ namespace BitTorrent
|
||||
TagSet m_tags;
|
||||
qreal m_ratioLimit;
|
||||
int m_seedingTimeLimit;
|
||||
int m_inactiveSeedingTimeLimit;
|
||||
TorrentOperatingMode m_operatingMode;
|
||||
TorrentContentLayout m_contentLayout;
|
||||
bool m_hasFinishedStatus;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2015 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2015-2023 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
@@ -42,6 +42,7 @@
|
||||
|
||||
#include "base/global.h"
|
||||
#include "base/path.h"
|
||||
#include "base/preferences.h"
|
||||
#include "base/utils/fs.h"
|
||||
#include "base/utils/io.h"
|
||||
#include "base/utils/misc.h"
|
||||
@@ -85,12 +86,11 @@ nonstd::expected<TorrentInfo, QString> TorrentInfo::load(const QByteArray &data)
|
||||
{
|
||||
// 2-step construction to overcome default limits of `depth_limit` & `token_limit` which are
|
||||
// used in `torrent_info()` constructor
|
||||
const int depthLimit = 100;
|
||||
const int tokenLimit = 10000000;
|
||||
const auto *pref = Preferences::instance();
|
||||
|
||||
lt::error_code ec;
|
||||
const lt::bdecode_node node = lt::bdecode(data, ec
|
||||
, nullptr, depthLimit, tokenLimit);
|
||||
, nullptr, pref->getBdecodeDepthLimit(), pref->getBdecodeTokenLimit());
|
||||
if (ec)
|
||||
return nonstd::make_unexpected(QString::fromStdString(ec.message()));
|
||||
|
||||
@@ -106,7 +106,8 @@ nonstd::expected<TorrentInfo, QString> TorrentInfo::loadFromFile(const Path &pat
|
||||
QByteArray data;
|
||||
try
|
||||
{
|
||||
const auto readResult = Utils::IO::readFile(path, MAX_TORRENT_SIZE);
|
||||
const qint64 torrentSizeLimit = Preferences::instance()->getTorrentFileSizeLimit();
|
||||
const auto readResult = Utils::IO::readFile(path, torrentSizeLimit);
|
||||
if (!readResult)
|
||||
return nonstd::make_unexpected(readResult.error().message);
|
||||
data = readResult.value();
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user