1
mirror of https://github.com/qbittorrent/qBittorrent synced 2025-10-14 11:52:15 +02:00

Compare commits

...

73 Commits

Author SHA1 Message Date
sledgehammer999
91943e4815 Merge pull request #21808 from sledgehammer999/backport_ssl
Don't ignore SSL errors (v4_6_x)

Backport of PR #21364
2024-11-09 15:28:03 +02:00
sledgehammer999
2388ad0aab Reorder code to match UI 2024-11-09 12:11:58 +02:00
sledgehammer999
a65eb6c604 Don't ignore SSL errors 2024-11-09 12:05:37 +02:00
sledgehammer999
a869e4151c Update Changelog 2024-09-17 17:26:37 +03:00
sledgehammer999
839bc696d0 Bump to 4.6.7 2024-09-17 00:12:42 +03:00
sledgehammer999
e6845d6960 Update Changelog 2024-09-17 00:09:40 +03:00
sledgehammer999
413b2e14fa Sync translations from Transifex and run lupdate 2024-09-17 00:08:34 +03:00
sledgehammer999
b0fbe7bfdb Make Program Updater choose the same build for download
We're probably stuck offering the duo of RC_1_2 and RC_2_0 for some
time in the future. So hardcode the choices and make the Program Updater
choose the variant the user currently uses.
2024-09-16 22:40:00 +03:00
Vladimir Golovnev
bb0fcc5841 Focus on Download button if torrent link retrieved from the clipboard
PR #20716.
Closes #20682.
2024-09-16 09:59:27 +03:00
Vladimir Golovnev
94d98e78db WebUI: Fix incorrectly backported code
PR #21248.
Closes #21237.
2024-08-24 20:24:20 +03:00
sledgehammer999
c01265c4cf Bump to 4.6.6 2024-08-18 21:28:49 +03:00
sledgehammer999
f1466871ee Update Changelog 2024-08-18 21:18:33 +03:00
sledgehammer999
cfe15c2455 Sync translations from Transifex and run lupdate 2024-08-18 21:08:57 +03:00
Vladimir Golovnev
742bc410f4 Backport changes to v4.6.x branch
PR #21035.
2024-08-16 07:12:35 +03:00
cayenne17
64029e0493 Update User-Agent
PR #20801.
2024-08-15 20:41:24 +03:00
skomerko
58ba6f41f3 WebUI: Clear trackerList on full update
Like other similar data structures, trackerList also need to be cleared in the event of a full sync update.

PR #21148.
2024-08-11 15:39:01 +03:00
Vladimir Golovnev
d9023c647a Fix Incomplete Save Path cannot be changed for torrents without metadata
PR #21152.
Closes #21140.
2024-08-11 15:38:52 +03:00
Vladimir Golovnev
827f9d1345 Hide zero status filters when torrents removed
PR #21150.
Closes #21146.
2024-08-08 08:22:01 +03:00
Vladimir Golovnev
2f8044bd26 Prevent incorrect size from being used for creating array
PR #21050.
2024-07-14 15:55:42 +03:00
Vladimir Golovnev
92db0170d5 Apply bulk changes to correct content widget items
PR #21006.
Closes #21001.
2024-07-14 15:55:21 +03:00
Vladimir Golovnev
efa517ea90 WebUI: Correctly apply changed "save path" of RSS rules
PR #21030.
Closes #20141.
2024-07-08 10:12:02 +03:00
Vladimir Golovnev
47723115f6 Show scroll bar in Torrent Tags dialog
PR #21026.
Closes #21022.
2024-07-07 17:04:52 +03:00
Vladimir Golovnev
95e431a296 Fix handling of tags containing '&' character
PR #21024.
Closes #20773.
2024-07-07 17:04:35 +03:00
sledgehammer999
5e81347933 Bump to 4.6.5 2024-05-26 13:44:37 +03:00
sledgehammer999
ef1d3bcf0b Update Changelog 2024-05-26 13:37:46 +03:00
sledgehammer999
ea28d5213b Sync translations from Transifex and run lupdate 2024-05-26 13:30:18 +03:00
Vladimir Golovnev
21143a9764 Backport changes to v4.6.x branch
PR #20636.
2024-05-12 14:20:30 +03:00
Vladimir Golovnev
f86a574b9d Don't forget to resume "missing files" torrent when rechecking
PR #20747.
2024-05-11 10:13:20 +03:00
Vladimir Golovnev
769de08463 Restore ability to use server-side translation by custom WebUI
PR #20711.
2024-04-27 17:53:29 +03:00
Vladimir Golovnev
0bbfeeb987 Don't overwrite stored layout of main window with incorrect one
Prevents overwriting of the stored layout in case the main window was hidden at startup and
has not been shown since, because incorrect dimensions can be provided by it in this case.

PR #20725.
Closes #20720.
2024-04-20 11:12:29 +03:00
Vladimir Golovnev
9c3382f0d7 Add extra offset for dialog frame
PR #20715.
Closes #20609.
2024-04-18 09:25:13 +03:00
Vladimir Golovnev
2aa7a7f453 Prevent invalid status filter index from being used
PR #20714.
Closes #20701.
2024-04-18 09:10:30 +03:00
Chocobo1
c1b62e0e61 WebUI: fix wrong peer number
PR #20695.
2024-04-15 12:44:43 +08:00
Chocobo1
40833ca510 Update screenshot URL in appstream metadata
Those URL are pointing to our git repo:
723c0df824/src/img/screenshots/linux

PR #20694.
2024-04-15 12:44:40 +08:00
Chocobo1
749746e812 GHA CI: revise packaging failure detection
Fix up 1d221c22e4.
PR #20664.
2024-04-09 14:25:05 +08:00
Chocobo1
db384896b8 GHA CI: lock to ESLint v8
For unknown reasons, ESLint v9 doesn't work correctly. Migration to ESLint v9 will be done
later when it is stable enough.

PR #20665.
2024-04-09 14:24:57 +08:00
Vladimir Golovnev
a7dfefc2a5 Fix Enter key behavior in Add new torrent dialog
Prevent inappropriate default completer from being used by path edit.

PR #20670.
Closes #20663.
2024-04-08 16:25:32 +03:00
Chocobo1
684a561974 GHA CI: retry action on failure
PR #20641.
2024-04-05 15:51:09 +03:00
Chocobo1
73cedb6ea1 GHA CI: only store cache for master branch
Also set a lower cache limit for macOS to prevent cache thrashing. Previously the default was 5G.

PR #20640.
2024-04-05 15:50:39 +03:00
Vladimir Golovnev
020b49add1 Prevent app from being closed when disabling system tray icon
PR #20627.
Closes #20604.
2024-03-29 09:41:55 +03:00
Chocobo1
694661d751 GHA CI: disable security hardening flag
OpenSSL isn't compatible with `/guard:cf` flag so we omit it for now.
Related: https://github.com/openssl/openssl/issues/22554

Closes #20479.
PR #20487.
2024-03-28 10:09:53 +08:00
Chocobo1
79ba577a25 Improve AppStream metadata
PR #20606.
2024-03-28 10:09:53 +08:00
sledgehammer999
785320e7f6 Bump to 4.6.4 2024-03-24 01:58:40 +02:00
sledgehammer999
954d6ff5c6 Update Changelog 2024-03-24 01:55:39 +02:00
sledgehammer999
1f6a817020 Sync translations from Transifex and run lupdate 2024-03-24 01:54:57 +02:00
sledgehammer999
4e30e6cb8e Merge pull request #20498 from sledgehammer999/backport
Backport changes to v4.6.x branch
2024-03-24 01:31:22 +02:00
Vladimir Golovnev
753cdfdb1a Initialize completer for file system path widget on demand
PR #20586.
2024-03-23 08:24:40 +03:00
Vladimir Golovnev
daaaa11f93 Use better icons for RSS articles
PR #20587.
Closes #20579.
2024-03-22 18:50:28 +03:00
foxi69
c0e0e36d10 NSIS: Update Hungarian translation
PR #20565
2024-03-19 02:14:53 +02:00
MarcDrieu
188469a42c Update french.nsh (#20545)
Updated a couple of strings with more accurate wording.

PR #20545
2024-03-19 02:14:52 +02:00
Chocobo1
18296b2f75 Ensure the profile path is pointing to a directory
Closes #20513.
PR #20519.
2024-03-19 02:14:45 +02:00
sledgehammer999
cce1290c0c Fix qmake build 2024-03-15 23:18:52 +02:00
tehcneko
64acc64c58 Fix invisible tray icon on Plasma 6 in Linux
PR #20529.
Closes #20367.

---------

Co-authored-by: thalieht <thalieht@users.noreply.github.com>
Co-authored-by: Vladimir Golovnev <glassez@yandex.ru>
2024-03-14 22:01:11 +03:00
sledgehammer999
d5a3f724ab Update gitignore for vscode (#20494)
PR #20494
2024-03-03 19:43:43 +02:00
Chocobo1
7567f71c55 Add a small delay before processing the key input of search boxes
PR #20465.
Closes #20025.
Closes #20235.
2024-03-03 19:39:44 +02:00
sledgehammer999
6805922521 Sync translations from Transifex and run lupdate 2024-03-03 06:20:41 +02:00
Vladimir Golovnev
a3812c0831 Backport changes to v4.6.x branch
PR #20293.
2024-03-02 07:28:17 +03:00
Vladimir Golovnev
361741d677 Correctly adjust "Add New torrent" dialog position in all the cases
PR #20457.
Closes #20449.
2024-02-26 15:44:44 +03:00
Vladimir Golovnev
acd9102dc2 Change "metadata received" stop condition behavior
PR #20283.
Closes #20122.
2024-02-22 08:55:35 +03:00
Chocobo1
e74b587420 Revise conditional for when to use QCollator
According to https://doc.qt.io/qt-6/qcollator.html#posix-fallback-implementation
The 'POSIX fallback implementation' is only used when ICU is not available. So the correct way is to detect ICU directly and not depend on the OS. The exceptions are macOS and Windows since they support the required functionalities natively.
Closes #20205.
PR #20207.
2024-02-22 08:52:40 +03:00
Vladimir Golovnev (Glassez)
2589363622 Don't use iterator after erase
PR #20357.
Closes #20356.
2024-02-01 17:07:33 +03:00
sledgehammer999
cfa7a6db46 Bump to 4.6.3 2024-01-15 01:45:17 +02:00
sledgehammer999
5609fa49a6 Update Changelog 2024-01-15 01:44:15 +02:00
sledgehammer999
d0ad08e495 Bump copyright year 2024-01-15 01:40:55 +02:00
sledgehammer999
33b51249dc Sync translations from Transifex and run lupdate 2024-01-14 23:54:42 +02:00
Vladimir Golovnev
17b6dcfbef Don't stuck loading on mismatching info-hashes in resume data
PR #20262.
Closes #20251.
2024-01-13 20:35:46 +03:00
Vladimir Golovnev
c894d84ed3 Backport changes to v4.6.x branch
PR #20044.
2024-01-09 09:38:46 +03:00
Vladimir Golovnev
8c52b53300 Show URL seeds for torrents that have no metadata
PR #20233.
Closes #20198.
2024-01-06 16:11:39 +03:00
Vladimir Golovnev
4c3af5d923 Apply inactive seeding time limit set on new torrents
PR #20231.
Closes #20224.
2024-01-05 18:26:41 +03:00
Chocobo1
77d907c2aa Specify a locale if none is set
Sometimes users had not properly configured their system locale and thus
qbt will specify a default locale just in case.

Closes #16127.
Closes #19609.
Closes #19834.
PR #20203.
2024-01-03 15:24:08 +03:00
Vladimir Golovnev
a56b3edc58 Show correctly decoded filename in log
PR #20214.
Closes #20186.
2024-01-02 16:06:53 +03:00
Vladimir Golovnev
a83424a7a7 Don't forget to store Stop condition
PR #20045.
Closes #20043.
2023-11-30 09:25:07 +03:00
Vladimir Golovnev
cdf66e069d Don't forget to update filter items
PR #20030.
Closes #19905.
2023-11-30 09:24:54 +03:00
160 changed files with 28353 additions and 27664 deletions

View File

@@ -49,8 +49,10 @@ jobs:
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
store_cache: ${{ startsWith(github.ref, 'refs/heads/') }}
store_cache: ${{ github.ref == 'refs/heads/master' }}
update_packager_index: false
ccache_options: |
max_size=2G
- name: Install boost
run: |
@@ -136,8 +138,18 @@ jobs:
if [ "${{ matrix.qbt_gui }}" = "GUI=OFF" ]; then
appName="qbittorrent-nox"
fi
# package
pushd build
macdeployqt "$appName.app" -dmg -no-strip
PACKAGE_RETRY=0
while [ "$PACKAGE_RETRY" -lt "3" ]; do
macdeployqt "$appName.app" -dmg -no-strip
if [ -f "$appName.dmg" ]; then
break
fi
sleep 5
PACKAGE_RETRY=$((PACKAGE_RETRY + 1))
echo "Retry $PACKAGE_RETRY..."
done
popd
# prepare upload folder
mkdir upload

View File

@@ -39,7 +39,7 @@ jobs:
- name: Setup ccache
uses: Chocobo1/setup-ccache-action@v1
with:
store_cache: ${{ startsWith(github.ref, 'refs/heads/') }}
store_cache: ${{ github.ref == 'refs/heads/master' }}
update_packager_index: false
ccache_options: |
max_size=2G

View File

@@ -50,15 +50,13 @@ jobs:
-Force `
-ItemType File `
-Path "${{ env.vpkg_triplet_path }}/x64-windows-static-md-release.cmake"
# OpenSSL isn't compatible with `/guard:cf` flag so we omit it for now, see: https://github.com/openssl/openssl/issues/22554
Add-Content `
-Path "${{ env.vpkg_triplet_path }}/x64-windows-static-md-release.cmake" `
-Value @("set(VCPKG_TARGET_ARCHITECTURE x64)",
"set(VCPKG_LIBRARY_LINKAGE static)",
"set(VCPKG_CRT_LINKAGE dynamic)",
"set(VCPKG_BUILD_TYPE release)",
"set(VCPKG_C_FLAGS /guard:cf)",
"set(VCPKG_CXX_FLAGS /guard:cf)",
"set(VCPKG_LINKER_FLAGS /guard:cf)")
"set(VCPKG_BUILD_TYPE release)")
# clear buildtrees after each package installation to reduce disk space requirements
$packages = `
"openssl:x64-windows-static-md-release",

1
.gitignore vendored
View File

@@ -1,3 +1,4 @@
.vscode/
src/gui/geoip/GeoIP.dat
src/gui/geoip/GeoIP.dat.gz
src/qbittorrent

View File

@@ -1,3 +1,48 @@
Mon Sep 16th 2024 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.6.7
- BUGFIX: The updater will launch the link to the build variant you're currently using (sledgehammer999)
- BUGFIX: Focus on Download button if torrent link retrieved from the clipboard (glassez)
- WEBUI: RSS: The list of feeds wouldn't load for Apply Rule (glassez)
Sun Aug 18th 2024 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.6.6
- BUGFIX: Fix handling of tags containing '&' character (glassez)
- BUGFIX: Show scroll bar in Torrent Tags dialog (glassez)
- BUGFIX: Apply bulk changes to correct content widget items (glassez)
- BUGFIX: Hide zero status filters when torrents are removed (glassez)
- BUGFIX: Fix `Incomplete Save Path` cannot be changed for torrents without metadata (glassez)
- WEBUI: Correctly apply changed "save path" of RSS rules (glassez)
- WEBUI: Clear tracker list on full update (skomerko)
- OTHER: Update User-Agent string for internal downloader and search engines (cayenne17)
Sun May 26th 2024 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.6.5
- BUGFIX: Prevent app from being closed when disabling system tray icon (glassez)
- BUGFIX: Fix <kbd>Enter</kbd> key behavior in Add new torrent dialog (glassez)
- BUGFIX: Prevent invalid status filter index from being used (glassez)
- BUGFIX: Add extra offset for dialog frame (glassez)
- BUGFIX: Don't overwrite stored layout of main window with incorrect one (glassez)
- BUGFIX: Don't forget to resume "missing files" torrent when rechecking (glassez)
- WEBUI: Restore ability to use server-side translation by custom WebUI (glassez)
- WEBUI: Fix wrong peer number (Chocobo1)
- LINUX: Improve AppStream metadata (Chocobo1)
Sun Mar 24th 2024 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.6.4
- BUGFIX: Correctly adjust "Add New torrent" dialog position in all the cases (glassez)
- BUGFIX: Change "metadata received" stop condition behavior (glassez)
- BUGFIX: Add a small delay before processing the key input of search boxes (Chocobo1)
- BUGFIX: Ensure the profile path is pointing to a directory (Chocobo1)
- RSS: Use better icons for RSS articles (glassez)
- WINDOWS: NSIS: Update French, Hungarian translations (MarcDrieu, foxi69)
- LINUX: Fix sorting when ICU isn't used (Chocobo1)
- LINUX: Fix invisible tray icon on Plasma 6 (tehcneko)
Mon Jan 15th 2024 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.6.3
- BUGFIX: Correctly update number of filtered items (glassez)
- BUGFIX: Don't forget to store Stop condition value (glassez)
- BUGFIX: Show correctly decoded filename in log (glassez)
- BUGFIX: Specify a locale if none is set (Chocobo1)
- BUGFIX: Apply inactive seeding time limit set on new torrents (glassez)
- BUGFIX: Show URL seeds for torrents that have no metadata (glassez)
- BUGFIX: Don't get stuck loading on mismatched info-hashes in resume data (glassez)
Mon Nov 27th 2023 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.6.2
- BUGFIX: Do not apply share limit if the previous one was applied (glassez)
- BUGFIX: Show Add new torrent dialog on main window screen (glassez)
@@ -6,7 +51,7 @@ Mon Nov 27th 2023 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.6.2
- WINDOWS: NSIS: Display correct Minimum Windows OS requirement (xavier2k6)
- WINDOWS: NSIS: Add Hebrew translation (avivmu)
- LINUX: WAYLAND: Fix parent widget of "Lock qBittorrent" submenu (Vlad Zahorodnii)
Mon Nov 20th 2023 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.6.1
- FEATURE: Add option to enable previous Add new torrent dialog behavior (glassez)
- BUGFIX: Prevent crash due to race condition when adding magnet link (glassez)

20
configure vendored
View File

@@ -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.2.
# Generated by GNU Autoconf 2.71 for qbittorrent v4.6.7.
#
# 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.2'
PACKAGE_STRING='qbittorrent v4.6.2'
PACKAGE_VERSION='v4.6.7'
PACKAGE_STRING='qbittorrent v4.6.7'
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.2 to adapt to many kinds of systems.
\`configure' configures qbittorrent v4.6.7 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.2:";;
short | recursive ) echo "Configuration of qbittorrent v4.6.7:";;
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.2
qbittorrent configure v4.6.7
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.2, which was
It was created by qbittorrent $as_me v4.6.7, 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.2'
VERSION='v4.6.7'
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.2, which was
This file was extended by qbittorrent $as_me v4.6.7, 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.2
qbittorrent config.status v4.6.7
configured by $0, generated by GNU Autoconf 2.71,
with options \\"\$ac_cs_config\\"

View File

@@ -1,4 +1,4 @@
AC_INIT([qbittorrent], [v4.6.2], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
AC_INIT([qbittorrent], [v4.6.7], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
: ${CFLAGS=""}

4
dist/mac/Info.plist vendored
View File

@@ -55,7 +55,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>4.6.2</string>
<string>4.6.7</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIdentifier</key>
@@ -67,7 +67,7 @@
<key>NSAppleScriptEnabled</key>
<string>YES</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2006-2023 The qBittorrent project</string>
<string>Copyright © 2006-2024 The qBittorrent project</string>
<key>UTExportedTypeDeclarations</key>
<array>
<dict>

View File

@@ -35,7 +35,7 @@ if (GUI)
COMPONENT data
)
install(FILES org.qbittorrent.qBittorrent.appdata.xml
install(FILES org.qbittorrent.qBittorrent.metainfo.xml
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo/
COMPONENT data
)

View File

@@ -105,7 +105,7 @@ GenericName[ka]=BitTorrent კლიენტი
Comment[ka]=გადმოტვირთეთ და გააზიარეთ ფაილები BitTorrent-ის საშუალებით
Name[ka]=qBittorrent
GenericName[ko]=BitTorrent 클라이언트
Comment[ko]=BitTorrent를 통한 파일 내려받기 및 공유
Comment[ko]=BitTorrent를 통한 파일 다운로드 및 공유
Name[ko]=qBittorrent
GenericName[lt]=BitTorrent klientas
Comment[lt]=Atsisiųskite bei dalinkitės failais BitTorrent tinkle
@@ -143,9 +143,11 @@ Name[sk]=qBittorrent
GenericName[sl]=BitTorrent odjemalec
Comment[sl]=Prenesite in delite datoteke preko BitTorrenta
Name[sl]=qBittorrent
GenericName[sq]=Klienti BitTorrent
Comment[sq]=Shkarko dhe shpërndaj skedarë në BitTorrent
Name[sq]=qBittorrent
GenericName[sr]=BitTorrent-клијент
Comment[sr]=Преузимајте и делите фајлове преко BitTorrent протокола
GenericName[sr]=BitTorrent клијент
Comment[sr]=Преузимајте и делите фајлове преко BitTorrent-а
Name[sr]=qBittorrent
GenericName[sr@latin]=BitTorrent klijent
Comment[sr@latin]=Preuzimanje i deljenje fajlova preko BitTorrent-a
@@ -226,4 +228,6 @@ Name[ne_NP]=qBittorrent
GenericName[pt_PT]=Cliente BitTorrent
Comment[pt_PT]=Transferir e partilhar ficheiros por BitTorrent
Name[pt_PT]=qBittorrent
GenericName[si_LK]=BitTorrent සේවාදායකයා
Comment[si_LK]=BitTorrent හරහා ගොනු බාගත කර බෙදාගන්න.
Name[si_LK]=qBittorrent

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Copyright 2014 sledgehammer999 <sledgehammer999@qbittorrent.org> -->
<component type="desktop">
<component type="desktop-application">
<id>org.qbittorrent.qBittorrent</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0-or-later and OpenSSL</project_license>
@@ -14,33 +14,12 @@
</p>
<ul>
<li>Polished µTorrent-like User Interface</li>
<li>
Well-integrated and extensible Search Engine
<ul>
<li>Simultaneous search in many Torrent search sites</li>
<li>Category-specific search requests (e.g. Books, Music, Software)</li>
</ul>
</li>
<li>Well-integrated and extensible Search Engine</li>
<li>RSS feed support with advanced download filters (incl. regex)</li>
<li>
Many Bittorrent extensions supported:
<ul>
<li>Magnet links</li>
<li>Distributed hash table (DHT), peer exchange protocol (PEX), local peer discovery (LSD)</li>
<li>Private torrents</li>
<li>Encrypted connections</li>
<li>and many more...</li>
</ul>
</li>
<li>Many Bittorrent extensions supported</li>
<li>Remote control through Web user interface, written with AJAX</li>
<li>Sequential downloading (Download in order)</li>
<li>
Advanced control over torrents, trackers and peers
<ul>
<li>Torrents queueing and prioritizing</li>
<li>Torrent content selection and prioritizing</li>
</ul>
</li>
<li>Advanced control over torrents, trackers and peers</li>
<li>Bandwidth scheduler</li>
<li>Torrent creation tool</li>
<li>IP Filtering (eMule &amp; PeerGuardian format compatible)</li>
@@ -53,27 +32,36 @@
<launchable type="desktop-id">org.qbittorrent.qBittorrent.desktop</launchable>
<screenshots>
<screenshot type="default">
<image height="675" width="1200">https://alexpl.fedorapeople.org/AppData/qbittorrent/screens/qbittorrent_01.png</image>
<caption>Main window (General tab collapsed)</caption>
<image>https://raw.githubusercontent.com/qbittorrent/qBittorrent-website/2741f2a90854604e268c6bba9e6859aad0103583/src/img/screenshots/linux/1.webp</image>
</screenshot>
<screenshot>
<image height="675" width="1200">https://alexpl.fedorapeople.org/AppData/qbittorrent/screens/qbittorrent_02.png</image>
<caption>Main window (General tab expanded)</caption>
<image>https://raw.githubusercontent.com/qbittorrent/qBittorrent-website/2741f2a90854604e268c6bba9e6859aad0103583/src/img/screenshots/linux/2.webp</image>
</screenshot>
<screenshot>
<image height="675" width="1200">https://alexpl.fedorapeople.org/AppData/qbittorrent/screens/qbittorrent_03.png</image>
<caption>Options dialog</caption>
<image>https://raw.githubusercontent.com/qbittorrent/qBittorrent-website/2741f2a90854604e268c6bba9e6859aad0103583/src/img/screenshots/linux/3.webp</image>
</screenshot>
<screenshot>
<image height="675" width="1200">https://alexpl.fedorapeople.org/AppData/qbittorrent/screens/qbittorrent_04.png</image>
<caption>Search engine</caption>
<image>https://raw.githubusercontent.com/qbittorrent/qBittorrent-website/2741f2a90854604e268c6bba9e6859aad0103583/src/img/screenshots/linux/4.webp</image>
</screenshot>
</screenshots>
<update_contact>sledgehammer999@qbittorrent.org</update_contact>
<developer_name>The qBittorrent Project</developer_name>
<developer id="org.qbittorrent">
<name>The qBittorrent Project</name>
</developer>
<url type="homepage">https://www.qbittorrent.org/</url>
<url type="bugtracker">https://bugs.qbittorrent.org/</url>
<url type="donation">https://www.qbittorrent.org/donate</url>
<url type="faq">https://wiki.qbittorrent.org/Frequently-Asked-Questions</url>
<url type="help">https://forum.qbittorrent.org/</url>
<url type="translate">https://github.com/qbittorrent/qBittorrent/wiki/How-to-translate-qBittorrent</url>
<url type="donation">https://www.qbittorrent.org/donate</url>
<url type="translate">https://wiki.qbittorrent.org/How-to-translate-qBittorrent</url>
<url type="vcs-browser">https://github.com/qbittorrent/qBittorrent</url>
<url type="contribute">https://github.com/qbittorrent/qBittorrent/blob/master/CONTRIBUTING.md</url>
<content_rating type="oars-1.1"/>
<releases>
<release version="4.6.2" date="2023-11-27"/>
<release version="4.6.7" date="2024-09-16"/>
</releases>
</component>

View File

@@ -25,7 +25,7 @@
; 4.5.1.3 -> good
; 4.5.1.3.2 -> bad
; 4.5.0beta -> bad
!define /ifndef QBT_VERSION "4.6.2"
!define /ifndef QBT_VERSION "4.6.7"
; Option that controls the installer's window name
; If set, its value will be used like this:
@@ -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-2023 The qBittorrent project"
VIAddVersionKey "LegalCopyright" "Copyright ©2006-2024 The qBittorrent project"
VIAddVersionKey "FileDescription" "qBittorrent - A Bittorrent Client"
VIAddVersionKey "FileVersion" "${QBT_VERSION}"

View File

@@ -3,9 +3,9 @@
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
LangString inst_qbt_req ${LANG_FRENCH} "qBittorrent (requis)"
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
LangString inst_desktop ${LANG_FRENCH} "Créer un Raccourci sur le Bureau"
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_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émarrer qBittorrent au démarrage de Windows"
;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent"
@@ -57,6 +57,6 @@ LangString remove_cache ${LANG_FRENCH} "Supprimer les torrents et données en ca
;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. 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_tor_warn ${LANG_FRENCH} "Impossible de supprimer l'association .torrent. Elle est associée avec :"
;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:"
LangString uninst_mag_warn ${LANG_FRENCH} "Ne peut pas supprimer l'association du magnet. Elle est associée avec :"
LangString uninst_mag_warn ${LANG_FRENCH} "Impossible de supprimer l'association magnet. Elle est associée avec :"

View File

@@ -31,7 +31,7 @@ LangString inst_requires_64bit ${LANG_HUNGARIAN} "A telepítő csak 64-bites Win
;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7."
LangString inst_requires_win7 ${LANG_HUNGARIAN} "A qBittorrent ezen verziójához minimum Windows 7 szükséges."
;LangString inst_requires_win10 ${LANG_ENGLISH} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_HUNGARIAN} "This installer requires at least Windows 10 (1809) / Windows Server 2019."
LangString inst_requires_win10 ${LANG_HUNGARIAN} "A telepítéshez minimum Windows 10 (1809) / Windows Server 2019 szükséges."
;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent"
LangString inst_uninstall_link_description ${LANG_HUNGARIAN} "qBittorrent eltávolítása"

View File

@@ -258,17 +258,15 @@ Application::Application(int &argc, char **argv)
setAttribute(Qt::AA_UseHighDpiPixmaps, true); // opt-in to the high DPI pixmap support
#endif
setQuitOnLastWindowClosed(false);
setQuitLockEnabled(false);
QPixmapCache::setCacheLimit(PIXMAP_CACHE_SIZE);
#endif
Logger::initInstance();
const auto portableProfilePath = Path(QCoreApplication::applicationDirPath()) / DEFAULT_PORTABLE_MODE_PROFILE_DIR;
const bool portableModeEnabled = m_commandLineArgs.profileDir.isEmpty() && portableProfilePath.exists();
const Path profileDir = portableModeEnabled
? portableProfilePath
: m_commandLineArgs.profileDir;
const bool portableModeEnabled = m_commandLineArgs.profileDir.isEmpty() && Utils::Fs::isDir(portableProfilePath);
const Path profileDir = portableModeEnabled ? portableProfilePath : m_commandLineArgs.profileDir;
Profile::initInstance(profileDir, m_commandLineArgs.configurationName,
(m_commandLineArgs.relativeFastresumePaths || portableModeEnabled));

View File

@@ -94,6 +94,7 @@ void showSplashScreen();
#ifdef Q_OS_UNIX
void adjustFileDescriptorLimit();
void adjustLocale();
#endif
// Main
@@ -104,6 +105,7 @@ int main(int argc, char *argv[])
#endif
#ifdef Q_OS_UNIX
adjustLocale();
adjustFileDescriptorLimit();
#endif
@@ -392,4 +394,12 @@ void adjustFileDescriptorLimit()
limit.rlim_cur = limit.rlim_max;
setrlimit(RLIMIT_NOFILE, &limit);
}
void adjustLocale()
{
// specify the default locale just in case if user has not set any other locale
// only `C` locale is available universally without installing locale packages
if (qEnvironmentVariableIsEmpty("LANG"))
qputenv("LANG", "C.UTF-8");
}
#endif

View File

@@ -194,11 +194,16 @@ add_library(qbt_base STATIC
target_link_libraries(qbt_base
PRIVATE
OpenSSL::Crypto OpenSSL::SSL
OpenSSL::Crypto
OpenSSL::SSL
ZLIB::ZLIB
PUBLIC
LibtorrentRasterbar::torrent-rasterbar
Qt::Core Qt::Network Qt::Sql Qt::Xml
Qt::Core
Qt::CorePrivate
Qt::Network
Qt::Sql
Qt::Xml
qbt_common_cfg
)

View File

@@ -44,6 +44,7 @@ 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_STOPCONDITION = u"stop_condition"_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;
@@ -126,17 +127,18 @@ BitTorrent::AddTorrentParams BitTorrent::parseAddTorrentParams(const QJsonObject
params.savePath = Path(jsonObj.value(PARAM_SAVEPATH).toString());
params.useDownloadPath = getOptionalBool(jsonObj, PARAM_USEDOWNLOADPATH);
params.downloadPath = Path(jsonObj.value(PARAM_DOWNLOADPATH).toString());
params.addForced = (getEnum<BitTorrent::TorrentOperatingMode>(jsonObj, PARAM_OPERATINGMODE) == BitTorrent::TorrentOperatingMode::Forced);
params.addForced = (getEnum<TorrentOperatingMode>(jsonObj, PARAM_OPERATINGMODE) == TorrentOperatingMode::Forced);
params.addToQueueTop = getOptionalBool(jsonObj, PARAM_QUEUETOP);
params.addPaused = getOptionalBool(jsonObj, PARAM_STOPPED);
params.stopCondition = getOptionalEnum<Torrent::StopCondition>(jsonObj, PARAM_STOPCONDITION);
params.skipChecking = jsonObj.value(PARAM_SKIPCHECKING).toBool();
params.contentLayout = getOptionalEnum<BitTorrent::TorrentContentLayout>(jsonObj, PARAM_CONTENTLAYOUT);
params.contentLayout = getOptionalEnum<TorrentContentLayout>(jsonObj, PARAM_CONTENTLAYOUT);
params.useAutoTMM = getOptionalBool(jsonObj, PARAM_AUTOTMM);
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);
params.seedingTimeLimit = jsonObj.value(PARAM_SEEDINGTIMELIMIT).toInt(Torrent::USE_GLOBAL_SEEDING_TIME);
params.inactiveSeedingTimeLimit = jsonObj.value(PARAM_INACTIVESEEDINGTIMELIMIT).toInt(Torrent::USE_GLOBAL_INACTIVE_SEEDING_TIME);
params.ratioLimit = jsonObj.value(PARAM_RATIOLIMIT).toDouble(Torrent::USE_GLOBAL_RATIO);
return params;
}
@@ -149,7 +151,7 @@ QJsonObject BitTorrent::serializeAddTorrentParams(const AddTorrentParams &params
{PARAM_SAVEPATH, params.savePath.data()},
{PARAM_DOWNLOADPATH, params.downloadPath.data()},
{PARAM_OPERATINGMODE, Utils::String::fromEnum(params.addForced
? BitTorrent::TorrentOperatingMode::Forced : BitTorrent::TorrentOperatingMode::AutoManaged)},
? TorrentOperatingMode::Forced : TorrentOperatingMode::AutoManaged)},
{PARAM_SKIPCHECKING, params.skipChecking},
{PARAM_UPLOADLIMIT, params.uploadLimit},
{PARAM_DOWNLOADLIMIT, params.downloadLimit},
@@ -162,6 +164,8 @@ QJsonObject BitTorrent::serializeAddTorrentParams(const AddTorrentParams &params
jsonObj[PARAM_QUEUETOP] = *params.addToQueueTop;
if (params.addPaused)
jsonObj[PARAM_STOPPED] = *params.addPaused;
if (params.stopCondition)
jsonObj[PARAM_STOPCONDITION] = Utils::String::fromEnum(*params.stopCondition);
if (params.contentLayout)
jsonObj[PARAM_CONTENTLAYOUT] = Utils::String::fromEnum(*params.contentLayout);
if (params.useAutoTMM)

View File

@@ -288,6 +288,16 @@ BitTorrent::LoadResumeDataResult BitTorrent::BencodeResumeDataStorage::loadTorre
return nonstd::make_unexpected(tr("Cannot parse torrent info: %1").arg(QString::fromStdString(ec.message())));
p.ti = torrentInfo;
#ifdef QBT_USES_LIBTORRENT2
if (((p.info_hashes.has_v1() && (p.info_hashes.v1 != p.ti->info_hashes().v1))
|| (p.info_hashes.has_v2() && (p.info_hashes.v2 != p.ti->info_hashes().v2))))
#else
if (!p.info_hash.is_all_zeros() && (p.info_hash != p.ti->info_hash()))
#endif
{
return nonstd::make_unexpected(tr("Mismatching info-hash detected in resume data"));
}
}
p.save_path = Profile::instance()->fromPortablePath(

View File

@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2015-2023 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2015-2024 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
*
* This program is free software; you can redistribute it and/or
@@ -1217,13 +1217,13 @@ void SessionImpl::prepareStartup()
context->isLoadFinished = true;
});
connect(this, &SessionImpl::torrentsLoaded, context, [this, context](const QVector<Torrent *> &torrents)
connect(this, &SessionImpl::addTorrentAlertsReceived, context, [this, context](const qsizetype alertsCount)
{
context->processingResumeDataCount -= torrents.count();
context->finishedResumeDataCount += torrents.count();
context->processingResumeDataCount -= alertsCount;
context->finishedResumeDataCount += alertsCount;
if (!context->isLoadedResumeDataHandlingEnqueued)
{
QMetaObject::invokeMethod(this, [this, context]() { handleLoadedResumeData(context); }, Qt::QueuedConnection);
QMetaObject::invokeMethod(this, [this, context] { handleLoadedResumeData(context); }, Qt::QueuedConnection);
context->isLoadedResumeDataHandlingEnqueued = true;
}
@@ -2449,7 +2449,7 @@ bool SessionImpl::cancelDownloadMetadata(const TorrentID &id)
// if magnet link was hybrid initially then it is indexed also by v1 info hash
// so we need to remove both entries
const auto altID = TorrentID::fromSHA1Hash(infoHash.v1());
m_downloadedMetadata.remove((altID == downloadedMetadataIter.key()) ? id : altID);
m_downloadedMetadata.remove(altID);
}
#endif
@@ -2681,6 +2681,7 @@ LoadTorrentParams SessionImpl::initLoadTorrentParams(const AddTorrentParams &add
loadTorrentParams.addToQueueTop = addTorrentParams.addToQueueTop.value_or(isAddTorrentToQueueTop());
loadTorrentParams.ratioLimit = addTorrentParams.ratioLimit;
loadTorrentParams.seedingTimeLimit = addTorrentParams.seedingTimeLimit;
loadTorrentParams.inactiveSeedingTimeLimit = addTorrentParams.inactiveSeedingTimeLimit;
const QString category = addTorrentParams.category;
if (!category.isEmpty() && !m_categories.contains(category) && !addCategory(category))
@@ -2806,6 +2807,14 @@ bool SessionImpl::addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &so
if (hasMetadata)
{
// Torrent that is being added with metadata is considered to be added as stopped
// if "metadata received" stop condition is set for it.
if (loadTorrentParams.stopCondition == Torrent::StopCondition::MetadataReceived)
{
loadTorrentParams.stopped = true;
loadTorrentParams.stopCondition = Torrent::StopCondition::None;
}
const TorrentInfo &torrentInfo = std::get<TorrentInfo>(source);
Q_ASSERT(addTorrentParams.filePaths.isEmpty() || (addTorrentParams.filePaths.size() == torrentInfo.filesCount()));
@@ -5459,11 +5468,14 @@ void SessionImpl::handleAddTorrentAlerts(const std::vector<lt::alert *> &alerts)
if (!isRestored())
loadedTorrents.reserve(MAX_PROCESSING_RESUMEDATA_COUNT);
qsizetype alertsCount = 0;
for (const lt::alert *a : alerts)
{
if (a->type() != lt::add_torrent_alert::alert_type)
continue;
++alertsCount;
const auto *alert = static_cast<const lt::add_torrent_alert *>(a);
if (alert->error)
{
@@ -5473,6 +5485,7 @@ void SessionImpl::handleAddTorrentAlerts(const std::vector<lt::alert *> &alerts)
const lt::add_torrent_params &params = alert->params;
const bool hasMetadata = (params.ti && params.ti->is_valid());
#ifdef QBT_USES_LIBTORRENT2
const InfoHash infoHash {(hasMetadata ? params.ti->info_hashes() : params.info_hashes)};
if (infoHash.isHybrid())
@@ -5497,10 +5510,9 @@ void SessionImpl::handleAddTorrentAlerts(const std::vector<lt::alert *> &alerts)
}
}
return;
continue;
}
#ifdef QBT_USES_LIBTORRENT2
const InfoHash infoHash {alert->handle.info_hashes()};
#else
@@ -5518,7 +5530,7 @@ void SessionImpl::handleAddTorrentAlerts(const std::vector<lt::alert *> &alerts)
loadedTorrents.append(torrent);
}
else if (const auto downloadedMetadataIter = m_downloadedMetadata.find(torrentID)
; downloadedMetadataIter != m_downloadedMetadata.end())
; downloadedMetadataIter != m_downloadedMetadata.end())
{
downloadedMetadataIter.value() = alert->handle;
if (infoHash.isHybrid())
@@ -5530,11 +5542,16 @@ void SessionImpl::handleAddTorrentAlerts(const std::vector<lt::alert *> &alerts)
}
}
if (!loadedTorrents.isEmpty())
if (alertsCount > 0)
{
if (isRestored())
m_torrentsQueueChanged = true;
emit torrentsLoaded(loadedTorrents);
emit addTorrentAlertsReceived(alertsCount);
if (!loadedTorrents.isEmpty())
{
if (isRestored())
m_torrentsQueueChanged = true;
emit torrentsLoaded(loadedTorrents);
}
}
}
@@ -5831,7 +5848,7 @@ void SessionImpl::handleFileErrorAlert(const lt::file_error_alert *p)
const QString msg = QString::fromStdString(p->message());
LogMsg(tr("File error alert. Torrent: \"%1\". File: \"%2\". Reason: \"%3\"")
.arg(torrent->name(), QString::fromLocal8Bit(p->filename()), msg)
.arg(torrent->name(), QString::fromUtf8(p->filename()), msg)
, Log::WARNING);
emit fullDiskError(torrent, msg);
}

View File

@@ -1,6 +1,6 @@
/*
* Bittorrent Client using Qt and libtorrent.
* Copyright (C) 2015-2023 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2015-2024 Vladimir Golovnev <glassez@yandex.ru>
* Copyright (C) 2006 Christophe Dumez <chris@qbittorrent.org>
*
* This program is free software; you can redistribute it and/or
@@ -475,6 +475,9 @@ namespace BitTorrent
void invokeAsync(std::function<void ()> func);
signals:
void addTorrentAlertsReceived(qsizetype count);
private slots:
void configureDeferred();
void readAlerts();

View File

@@ -425,6 +425,8 @@ Path TorrentImpl::savePath() const
void TorrentImpl::setSavePath(const Path &path)
{
Q_ASSERT(!isAutoTMMEnabled());
if (Q_UNLIKELY(isAutoTMMEnabled()))
return;
const Path basePath = m_session->useCategoryPathsInManualMode()
? m_session->categorySavePath(category()) : m_session->savePath();
@@ -452,6 +454,8 @@ Path TorrentImpl::downloadPath() const
void TorrentImpl::setDownloadPath(const Path &path)
{
Q_ASSERT(!isAutoTMMEnabled());
if (Q_UNLIKELY(isAutoTMMEnabled()))
return;
const Path basePath = m_session->useCategoryPathsInManualMode()
? m_session->categoryDownloadPath(category()) : m_session->downloadPath();
@@ -1364,11 +1368,13 @@ QBitArray TorrentImpl::pieces() const
QBitArray TorrentImpl::downloadingPieces() const
{
QBitArray result(piecesCount());
if (!hasMetadata())
return {};
std::vector<lt::partial_piece_info> queue;
m_nativeHandle.get_download_queue(queue);
QBitArray result {piecesCount()};
for (const lt::partial_piece_info &info : queue)
result.setBit(LT::toUnderlyingType(info.piece_index));
@@ -1519,7 +1525,17 @@ void TorrentImpl::forceRecheck()
// an incorrect one during the interval until the cached state is updated in a regular way.
m_nativeStatus.state = lt::torrent_status::checking_resume_data;
m_hasMissingFiles = false;
if (m_hasMissingFiles)
{
m_hasMissingFiles = false;
if (!isPaused())
{
setAutoManaged(m_operatingMode == TorrentOperatingMode::AutoManaged);
if (m_operatingMode == TorrentOperatingMode::Forced)
m_nativeHandle.resume();
}
}
m_unchecked = false;
m_completedFiles.fill(false);
@@ -1811,8 +1827,17 @@ void TorrentImpl::moveStorage(const Path &newPath, const MoveStorageContext cont
{
if (!hasMetadata())
{
m_savePath = newPath;
m_session->handleTorrentSavePathChanged(this);
if (context == MoveStorageContext::ChangeSavePath)
{
m_savePath = newPath;
m_session->handleTorrentSavePathChanged(this);
}
else if (context == MoveStorageContext::ChangeDownloadPath)
{
m_downloadPath = newPath;
m_session->handleTorrentSavePathChanged(this);
}
return;
}

View File

@@ -51,7 +51,7 @@
namespace
{
// Disguise as Firefox to avoid web server banning
const char DEFAULT_USER_AGENT[] = "Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Firefox/68.0";
const char DEFAULT_USER_AGENT[] = "Mozilla/5.0 (X11; Linux x86_64; rv:125.0) Gecko/20100101 Firefox/125.0";
}
class Net::DownloadManager::NetworkCookieJar final : public QNetworkCookieJar
@@ -124,10 +124,20 @@ Net::DownloadManager::DownloadManager(QObject *parent)
QStringList errorList;
for (const QSslError &error : errors)
errorList += error.errorString();
LogMsg(tr("Ignoring SSL error, URL: \"%1\", errors: \"%2\"").arg(reply->url().toString(), errorList.join(u". ")), Log::WARNING);
// Ignore all SSL errors
reply->ignoreSslErrors();
QString errorMsg;
if (!Preferences::instance()->isIgnoreSSLErrors())
{
errorMsg = tr("SSL error, URL: \"%1\", errors: \"%2\"");
}
else
{
errorMsg = tr("Ignoring SSL error, URL: \"%1\", errors: \"%2\"");
// Ignore all SSL errors
reply->ignoreSslErrors();
}
LogMsg(errorMsg.arg(reply->url().toString(), errorList.join(u". ")), Log::WARNING);
});
connect(ProxyConfigurationManager::instance(), &ProxyConfigurationManager::proxyConfigurationChanged

View File

@@ -1331,6 +1331,19 @@ void Preferences::setTrackerPortForwardingEnabled(const bool enabled)
setValue(u"Preferences/Advanced/trackerPortForwarding"_s, enabled);
}
bool Preferences::isIgnoreSSLErrors() const
{
return value(u"Preferences/Advanced/IgnoreSSLErrors"_s, false);
}
void Preferences::setIgnoreSSLErrors(const bool enabled)
{
if (enabled == isIgnoreSSLErrors())
return;
setValue(u"Preferences/Advanced/IgnoreSSLErrors"_s, enabled);
}
#if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
bool Preferences::isUpdateCheckEnabled() const
{

View File

@@ -296,6 +296,8 @@ public:
void setTrackerPort(int port);
bool isTrackerPortForwardingEnabled() const;
void setTrackerPortForwardingEnabled(bool enabled);
bool isIgnoreSSLErrors() const;
void setIgnoreSSLErrors(bool enabled);
#if defined(Q_OS_WIN) || defined(Q_OS_MACOS)
bool isUpdateCheckEnabled() const;
void setUpdateCheckEnabled(bool enabled);

View File

@@ -60,7 +60,9 @@ public:
StalledDownloading,
Checking,
Moving,
Errored
Errored,
_Count
};
// These mean any permutation, including no category / tag.

View File

@@ -31,7 +31,14 @@
#include <Qt>
#include <QtGlobal>
#if !defined(Q_OS_WIN) && (!defined(Q_OS_UNIX) || defined(Q_OS_MACOS) || defined(QT_FEATURE_icu))
// for QT_FEATURE_xxx, see: https://wiki.qt.io/Qt5_Build_System#How_to
#include <QtCore/private/qtcore-config_p.h>
// macOS and Windows support 'case sensitivity' and 'numeric mode' natively
// https://github.com/qt/qtbase/blob/6.0/src/corelib/CMakeLists.txt#L777-L793
// https://github.com/qt/qtbase/blob/6.0/src/corelib/text/qcollator_macx.cpp#L74-L77
// https://github.com/qt/qtbase/blob/6.0/src/corelib/text/qcollator_win.cpp#L72-L78
#if ((QT_FEATURE_icu == 1) || defined(Q_OS_MACOS) || defined(Q_OS_WIN))
#define QBT_USE_QCOLLATOR
#include <QCollator>
#endif

View File

@@ -30,7 +30,7 @@
#define QBT_VERSION_MAJOR 4
#define QBT_VERSION_MINOR 6
#define QBT_VERSION_BUGFIX 2
#define QBT_VERSION_BUGFIX 7
#define QBT_VERSION_BUILD 0
#define QBT_VERSION_STATUS "" // Should be empty for stable releases!

View File

@@ -67,7 +67,7 @@ AboutDialog::AboutDialog(QWidget *parent)
u"</p>"_s
.arg(tr("An advanced BitTorrent client programmed in C++, based on Qt toolkit and libtorrent-rasterbar.")
.replace(u"C++"_s, u"C\u2060+\u2060+"_s) // make C++ non-breaking
, tr("Copyright %1 2006-2023 The qBittorrent project").arg(C_COPYRIGHT)
, tr("Copyright %1 2006-2024 The qBittorrent project").arg(C_COPYRIGHT)
, tr("Home Page:")
, tr("Forum:")
, tr("Bug Tracker:"));

View File

@@ -33,6 +33,7 @@
#include <functional>
#include <QAction>
#include <QByteArray>
#include <QDateTime>
#include <QDebug>
#include <QDir>
@@ -41,6 +42,7 @@
#include <QPushButton>
#include <QScreen>
#include <QShortcut>
#include <QSize>
#include <QString>
#include <QUrl>
#include <QVector>
@@ -157,7 +159,8 @@ namespace
delta.setY(0);
dialogGeometry.translate(delta);
delta = screenGeometry.topLeft() - dialogGeometry.topLeft();
const QPoint frameOffset {10, 40};
delta = screenGeometry.topLeft() - dialogGeometry.topLeft() + frameOffset;
if (delta.x() < 0)
delta.setX(0);
if (delta.y() < 0)
@@ -356,18 +359,28 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
m_ui->downloadPath->setMaxVisibleItems(20);
m_ui->addToQueueTopCheckBox->setChecked(m_torrentParams.addToQueueTop.value_or(session->isAddTorrentToQueueTop()));
m_ui->startTorrentCheckBox->setChecked(!m_torrentParams.addPaused.value_or(session->isAddTorrentPaused()));
m_ui->stopConditionComboBox->setToolTip(
u"<html><body><p><b>" + tr("None") + u"</b> - " + tr("No stop condition is set.") + u"</p><p><b>" +
tr("Metadata received") + u"</b> - " + tr("Torrent will stop after metadata is received.") +
u" <em>" + tr("Torrents that have metadata initially aren't affected.") + u"</em></p><p><b>" +
u" <em>" + tr("Torrents that have metadata initially will be added as stopped.") + u"</em></p><p><b>" +
tr("Files checked") + u"</b> - " + tr("Torrent will stop after files are initially checked.") +
u" <em>" + tr("This will also download metadata if it wasn't there initially.") + u"</em></p></body></html>");
m_ui->stopConditionComboBox->setItemData(0, QVariant::fromValue(BitTorrent::Torrent::StopCondition::None));
m_ui->stopConditionComboBox->setItemData(1, QVariant::fromValue(BitTorrent::Torrent::StopCondition::MetadataReceived));
m_ui->stopConditionComboBox->setItemData(2, QVariant::fromValue(BitTorrent::Torrent::StopCondition::FilesChecked));
m_ui->stopConditionComboBox->setCurrentIndex(m_ui->stopConditionComboBox->findData(
QVariant::fromValue(m_torrentParams.stopCondition.value_or(session->torrentStopCondition()))));
m_ui->stopConditionComboBox->addItem(tr("None"), QVariant::fromValue(BitTorrent::Torrent::StopCondition::None));
if (!hasMetadata())
m_ui->stopConditionComboBox->addItem(tr("Metadata received"), QVariant::fromValue(BitTorrent::Torrent::StopCondition::MetadataReceived));
m_ui->stopConditionComboBox->addItem(tr("Files checked"), QVariant::fromValue(BitTorrent::Torrent::StopCondition::FilesChecked));
const auto stopCondition = m_torrentParams.stopCondition.value_or(session->torrentStopCondition());
if (hasMetadata() && (stopCondition == BitTorrent::Torrent::StopCondition::MetadataReceived))
{
m_ui->startTorrentCheckBox->setChecked(false);
m_ui->stopConditionComboBox->setCurrentIndex(m_ui->stopConditionComboBox->findData(QVariant::fromValue(BitTorrent::Torrent::StopCondition::None)));
}
else
{
m_ui->startTorrentCheckBox->setChecked(!m_torrentParams.addPaused.value_or(session->isAddTorrentPaused()));
m_ui->stopConditionComboBox->setCurrentIndex(m_ui->stopConditionComboBox->findData(QVariant::fromValue(stopCondition)));
}
m_ui->stopConditionLabel->setEnabled(m_ui->startTorrentCheckBox->isChecked());
m_ui->stopConditionComboBox->setEnabled(m_ui->startTorrentCheckBox->isChecked());
connect(m_ui->startTorrentCheckBox, &QCheckBox::toggled, this, [this](const bool checked)
@@ -551,7 +564,10 @@ void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorre
// Qt::Window is required to avoid showing only two dialog on top (see #12852).
// Also improves the general convenience of adding multiple torrents.
if (!attached)
{
dlg->setWindowFlags(Qt::Window);
adjustDialogGeometry(dlg, parent);
}
dlg->setAttribute(Qt::WA_DeleteOnClose);
if (Net::DownloadManager::hasSupportedScheme(source))
@@ -570,14 +586,9 @@ void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorre
: dlg->loadTorrentFile(source);
if (isLoaded)
{
adjustDialogGeometry(dlg, parent);
dlg->QDialog::show();
}
else
{
delete dlg;
}
}
void AddNewTorrentDialog::show(const QString &source, QWidget *parent)
@@ -993,14 +1004,22 @@ void AddNewTorrentDialog::updateMetadata(const BitTorrent::TorrentInfo &metadata
// Good to go
m_torrentInfo = metadata;
setMetadataProgressIndicator(true, tr("Parsing metadata..."));
const auto stopCondition = m_ui->stopConditionComboBox->currentData().value<BitTorrent::Torrent::StopCondition>();
if (stopCondition == BitTorrent::Torrent::StopCondition::MetadataReceived)
m_ui->startTorrentCheckBox->setChecked(false);
// Update UI
setupTreeview();
setMetadataProgressIndicator(false, tr("Metadata retrieval complete"));
if (const auto stopCondition = m_ui->stopConditionComboBox->currentData().value<BitTorrent::Torrent::StopCondition>()
; stopCondition == BitTorrent::Torrent::StopCondition::MetadataReceived)
{
m_ui->startTorrentCheckBox->setChecked(false);
const auto index = m_ui->stopConditionComboBox->currentIndex();
m_ui->stopConditionComboBox->setCurrentIndex(m_ui->stopConditionComboBox->findData(
QVariant::fromValue(BitTorrent::Torrent::StopCondition::None)));
m_ui->stopConditionComboBox->removeItem(index);
}
m_ui->buttonSave->setVisible(true);
if (m_torrentInfo.infoHash().v2().isValid())
{

View File

@@ -39,6 +39,9 @@
#include "base/path.h"
#include "base/settingvalue.h"
class LineEdit;
class TorrentFileGuard;
namespace BitTorrent
{
class InfoHash;
@@ -54,9 +57,6 @@ namespace Ui
class AddNewTorrentDialog;
}
class LineEdit;
class TorrentFileGuard;
class AddNewTorrentDialog final : public QDialog
{
Q_OBJECT

View File

@@ -261,24 +261,6 @@
</item>
<item>
<widget class="QComboBox" name="stopConditionComboBox">
<property name="currentIndex">
<number>0</number>
</property>
<item>
<property name="text">
<string>None</string>
</property>
</item>
<item>
<property name="text">
<string>Metadata received</string>
</property>
</item>
<item>
<property name="text">
<string>Files checked</string>
</property>
</item>
</widget>
</item>
</layout>

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