You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-11-11 18:37:40 +01:00
Compare commits
57 Commits
release-4.
...
release-4.
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
839bc696d0 | ||
|
|
e6845d6960 | ||
|
|
413b2e14fa | ||
|
|
b0fbe7bfdb | ||
|
|
bb0fcc5841 | ||
|
|
94d98e78db | ||
|
|
c01265c4cf | ||
|
|
f1466871ee | ||
|
|
cfe15c2455 | ||
|
|
742bc410f4 | ||
|
|
64029e0493 | ||
|
|
58ba6f41f3 | ||
|
|
d9023c647a | ||
|
|
827f9d1345 | ||
|
|
2f8044bd26 | ||
|
|
92db0170d5 | ||
|
|
efa517ea90 | ||
|
|
47723115f6 | ||
|
|
95e431a296 | ||
|
|
5e81347933 | ||
|
|
ef1d3bcf0b | ||
|
|
ea28d5213b | ||
|
|
21143a9764 | ||
|
|
f86a574b9d | ||
|
|
769de08463 | ||
|
|
0bbfeeb987 | ||
|
|
9c3382f0d7 | ||
|
|
2aa7a7f453 | ||
|
|
c1b62e0e61 | ||
|
|
40833ca510 | ||
|
|
749746e812 | ||
|
|
db384896b8 | ||
|
|
a7dfefc2a5 | ||
|
|
684a561974 | ||
|
|
73cedb6ea1 | ||
|
|
020b49add1 | ||
|
|
694661d751 | ||
|
|
79ba577a25 | ||
|
|
785320e7f6 | ||
|
|
954d6ff5c6 | ||
|
|
1f6a817020 | ||
|
|
4e30e6cb8e | ||
|
|
753cdfdb1a | ||
|
|
daaaa11f93 | ||
|
|
c0e0e36d10 | ||
|
|
188469a42c | ||
|
|
18296b2f75 | ||
|
|
cce1290c0c | ||
|
|
64acc64c58 | ||
|
|
d5a3f724ab | ||
|
|
7567f71c55 | ||
|
|
6805922521 | ||
|
|
a3812c0831 | ||
|
|
361741d677 | ||
|
|
acd9102dc2 | ||
|
|
e74b587420 | ||
|
|
2589363622 |
16
.github/workflows/ci_macos.yaml
vendored
16
.github/workflows/ci_macos.yaml
vendored
@@ -49,8 +49,10 @@ jobs:
|
|||||||
- name: Setup ccache
|
- name: Setup ccache
|
||||||
uses: Chocobo1/setup-ccache-action@v1
|
uses: Chocobo1/setup-ccache-action@v1
|
||||||
with:
|
with:
|
||||||
store_cache: ${{ startsWith(github.ref, 'refs/heads/') }}
|
store_cache: ${{ github.ref == 'refs/heads/master' }}
|
||||||
update_packager_index: false
|
update_packager_index: false
|
||||||
|
ccache_options: |
|
||||||
|
max_size=2G
|
||||||
|
|
||||||
- name: Install boost
|
- name: Install boost
|
||||||
run: |
|
run: |
|
||||||
@@ -136,8 +138,18 @@ jobs:
|
|||||||
if [ "${{ matrix.qbt_gui }}" = "GUI=OFF" ]; then
|
if [ "${{ matrix.qbt_gui }}" = "GUI=OFF" ]; then
|
||||||
appName="qbittorrent-nox"
|
appName="qbittorrent-nox"
|
||||||
fi
|
fi
|
||||||
|
# package
|
||||||
pushd build
|
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
|
popd
|
||||||
# prepare upload folder
|
# prepare upload folder
|
||||||
mkdir upload
|
mkdir upload
|
||||||
|
|||||||
2
.github/workflows/ci_ubuntu.yaml
vendored
2
.github/workflows/ci_ubuntu.yaml
vendored
@@ -39,7 +39,7 @@ jobs:
|
|||||||
- name: Setup ccache
|
- name: Setup ccache
|
||||||
uses: Chocobo1/setup-ccache-action@v1
|
uses: Chocobo1/setup-ccache-action@v1
|
||||||
with:
|
with:
|
||||||
store_cache: ${{ startsWith(github.ref, 'refs/heads/') }}
|
store_cache: ${{ github.ref == 'refs/heads/master' }}
|
||||||
update_packager_index: false
|
update_packager_index: false
|
||||||
ccache_options: |
|
ccache_options: |
|
||||||
max_size=2G
|
max_size=2G
|
||||||
|
|||||||
6
.github/workflows/ci_windows.yaml
vendored
6
.github/workflows/ci_windows.yaml
vendored
@@ -50,15 +50,13 @@ jobs:
|
|||||||
-Force `
|
-Force `
|
||||||
-ItemType File `
|
-ItemType File `
|
||||||
-Path "${{ env.vpkg_triplet_path }}/x64-windows-static-md-release.cmake"
|
-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 `
|
Add-Content `
|
||||||
-Path "${{ env.vpkg_triplet_path }}/x64-windows-static-md-release.cmake" `
|
-Path "${{ env.vpkg_triplet_path }}/x64-windows-static-md-release.cmake" `
|
||||||
-Value @("set(VCPKG_TARGET_ARCHITECTURE x64)",
|
-Value @("set(VCPKG_TARGET_ARCHITECTURE x64)",
|
||||||
"set(VCPKG_LIBRARY_LINKAGE static)",
|
"set(VCPKG_LIBRARY_LINKAGE static)",
|
||||||
"set(VCPKG_CRT_LINKAGE dynamic)",
|
"set(VCPKG_CRT_LINKAGE dynamic)",
|
||||||
"set(VCPKG_BUILD_TYPE release)",
|
"set(VCPKG_BUILD_TYPE release)")
|
||||||
"set(VCPKG_C_FLAGS /guard:cf)",
|
|
||||||
"set(VCPKG_CXX_FLAGS /guard:cf)",
|
|
||||||
"set(VCPKG_LINKER_FLAGS /guard:cf)")
|
|
||||||
# clear buildtrees after each package installation to reduce disk space requirements
|
# clear buildtrees after each package installation to reduce disk space requirements
|
||||||
$packages = `
|
$packages = `
|
||||||
"openssl:x64-windows-static-md-release",
|
"openssl:x64-windows-static-md-release",
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
|||||||
|
.vscode/
|
||||||
src/gui/geoip/GeoIP.dat
|
src/gui/geoip/GeoIP.dat
|
||||||
src/gui/geoip/GeoIP.dat.gz
|
src/gui/geoip/GeoIP.dat.gz
|
||||||
src/qbittorrent
|
src/qbittorrent
|
||||||
|
|||||||
36
Changelog
36
Changelog
@@ -1,3 +1,39 @@
|
|||||||
|
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)
|
||||||
|
- WEBUI: RSS: The list of feeds wouldn't load for Apply Rule (glassez)
|
||||||
|
- WEBUI: Focus on Download button if torrent link retrieved from the clipboard (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
|
Mon Jan 15th 2024 - sledgehammer999 <sledgehammer999@qbittorrent.org> - v4.6.3
|
||||||
- BUGFIX: Correctly update number of filtered items (glassez)
|
- BUGFIX: Correctly update number of filtered items (glassez)
|
||||||
- BUGFIX: Don't forget to store Stop condition value (glassez)
|
- BUGFIX: Don't forget to store Stop condition value (glassez)
|
||||||
|
|||||||
20
configure
vendored
20
configure
vendored
@@ -1,6 +1,6 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
# Guess values for system-dependent variables and create Makefiles.
|
# Guess values for system-dependent variables and create Makefiles.
|
||||||
# Generated by GNU Autoconf 2.71 for qbittorrent v4.6.3.
|
# Generated by GNU Autoconf 2.71 for qbittorrent v4.6.7.
|
||||||
#
|
#
|
||||||
# Report bugs to <bugs.qbittorrent.org>.
|
# Report bugs to <bugs.qbittorrent.org>.
|
||||||
#
|
#
|
||||||
@@ -611,8 +611,8 @@ MAKEFLAGS=
|
|||||||
# Identity of this package.
|
# Identity of this package.
|
||||||
PACKAGE_NAME='qbittorrent'
|
PACKAGE_NAME='qbittorrent'
|
||||||
PACKAGE_TARNAME='qbittorrent'
|
PACKAGE_TARNAME='qbittorrent'
|
||||||
PACKAGE_VERSION='v4.6.3'
|
PACKAGE_VERSION='v4.6.7'
|
||||||
PACKAGE_STRING='qbittorrent v4.6.3'
|
PACKAGE_STRING='qbittorrent v4.6.7'
|
||||||
PACKAGE_BUGREPORT='bugs.qbittorrent.org'
|
PACKAGE_BUGREPORT='bugs.qbittorrent.org'
|
||||||
PACKAGE_URL='https://www.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.
|
# 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.
|
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||||
cat <<_ACEOF
|
cat <<_ACEOF
|
||||||
\`configure' configures qbittorrent v4.6.3 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]...
|
Usage: $0 [OPTION]... [VAR=VALUE]...
|
||||||
|
|
||||||
@@ -1400,7 +1400,7 @@ fi
|
|||||||
|
|
||||||
if test -n "$ac_init_help"; then
|
if test -n "$ac_init_help"; then
|
||||||
case $ac_init_help in
|
case $ac_init_help in
|
||||||
short | recursive ) echo "Configuration of qbittorrent v4.6.3:";;
|
short | recursive ) echo "Configuration of qbittorrent v4.6.7:";;
|
||||||
esac
|
esac
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
|
|
||||||
@@ -1533,7 +1533,7 @@ fi
|
|||||||
test -n "$ac_init_help" && exit $ac_status
|
test -n "$ac_init_help" && exit $ac_status
|
||||||
if $ac_init_version; then
|
if $ac_init_version; then
|
||||||
cat <<\_ACEOF
|
cat <<\_ACEOF
|
||||||
qbittorrent configure v4.6.3
|
qbittorrent configure v4.6.7
|
||||||
generated by GNU Autoconf 2.71
|
generated by GNU Autoconf 2.71
|
||||||
|
|
||||||
Copyright (C) 2021 Free Software Foundation, Inc.
|
Copyright (C) 2021 Free Software Foundation, Inc.
|
||||||
@@ -1648,7 +1648,7 @@ cat >config.log <<_ACEOF
|
|||||||
This file contains any messages produced by compilers while
|
This file contains any messages produced by compilers while
|
||||||
running configure, to aid debugging if configure makes a mistake.
|
running configure, to aid debugging if configure makes a mistake.
|
||||||
|
|
||||||
It was created by qbittorrent $as_me v4.6.3, which was
|
It was created by qbittorrent $as_me v4.6.7, which was
|
||||||
generated by GNU Autoconf 2.71. Invocation command line was
|
generated by GNU Autoconf 2.71. Invocation command line was
|
||||||
|
|
||||||
$ $0$ac_configure_args_raw
|
$ $0$ac_configure_args_raw
|
||||||
@@ -4779,7 +4779,7 @@ fi
|
|||||||
|
|
||||||
# Define the identity of the package.
|
# Define the identity of the package.
|
||||||
PACKAGE='qbittorrent'
|
PACKAGE='qbittorrent'
|
||||||
VERSION='v4.6.3'
|
VERSION='v4.6.7'
|
||||||
|
|
||||||
|
|
||||||
printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h
|
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
|
# report actual input values of CONFIG_FILES etc. instead of their
|
||||||
# values after options handling.
|
# values after options handling.
|
||||||
ac_log="
|
ac_log="
|
||||||
This file was extended by qbittorrent $as_me v4.6.3, 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
|
generated by GNU Autoconf 2.71. Invocation command line was
|
||||||
|
|
||||||
CONFIG_FILES = $CONFIG_FILES
|
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
|
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||||
ac_cs_config='$ac_cs_config_escaped'
|
ac_cs_config='$ac_cs_config_escaped'
|
||||||
ac_cs_version="\\
|
ac_cs_version="\\
|
||||||
qbittorrent config.status v4.6.3
|
qbittorrent config.status v4.6.7
|
||||||
configured by $0, generated by GNU Autoconf 2.71,
|
configured by $0, generated by GNU Autoconf 2.71,
|
||||||
with options \\"\$ac_cs_config\\"
|
with options \\"\$ac_cs_config\\"
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
AC_INIT([qbittorrent], [v4.6.3], [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_AUX_DIR([build-aux])
|
||||||
AC_CONFIG_MACRO_DIR([m4])
|
AC_CONFIG_MACRO_DIR([m4])
|
||||||
: ${CFLAGS=""}
|
: ${CFLAGS=""}
|
||||||
|
|||||||
2
dist/mac/Info.plist
vendored
2
dist/mac/Info.plist
vendored
@@ -55,7 +55,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>4.6.3</string>
|
<string>4.6.7</string>
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
|
|||||||
2
dist/unix/CMakeLists.txt
vendored
2
dist/unix/CMakeLists.txt
vendored
@@ -35,7 +35,7 @@ if (GUI)
|
|||||||
COMPONENT data
|
COMPONENT data
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES org.qbittorrent.qBittorrent.appdata.xml
|
install(FILES org.qbittorrent.qBittorrent.metainfo.xml
|
||||||
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo/
|
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/metainfo/
|
||||||
COMPONENT data
|
COMPONENT data
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ GenericName[ka]=BitTorrent კლიენტი
|
|||||||
Comment[ka]=გადმოტვირთეთ და გააზიარეთ ფაილები BitTorrent-ის საშუალებით
|
Comment[ka]=გადმოტვირთეთ და გააზიარეთ ფაილები BitTorrent-ის საშუალებით
|
||||||
Name[ka]=qBittorrent
|
Name[ka]=qBittorrent
|
||||||
GenericName[ko]=BitTorrent 클라이언트
|
GenericName[ko]=BitTorrent 클라이언트
|
||||||
Comment[ko]=BitTorrent를 통한 파일 내려받기 및 공유
|
Comment[ko]=BitTorrent를 통한 파일 다운로드 및 공유
|
||||||
Name[ko]=qBittorrent
|
Name[ko]=qBittorrent
|
||||||
GenericName[lt]=BitTorrent klientas
|
GenericName[lt]=BitTorrent klientas
|
||||||
Comment[lt]=Atsisiųskite bei dalinkitės failais BitTorrent tinkle
|
Comment[lt]=Atsisiųskite bei dalinkitės failais BitTorrent tinkle
|
||||||
@@ -143,6 +143,8 @@ Name[sk]=qBittorrent
|
|||||||
GenericName[sl]=BitTorrent odjemalec
|
GenericName[sl]=BitTorrent odjemalec
|
||||||
Comment[sl]=Prenesite in delite datoteke preko BitTorrenta
|
Comment[sl]=Prenesite in delite datoteke preko BitTorrenta
|
||||||
Name[sl]=qBittorrent
|
Name[sl]=qBittorrent
|
||||||
|
GenericName[sq]=Klienti BitTorrent
|
||||||
|
Comment[sq]=Shkarko dhe shpërndaj skedarë në BitTorrent
|
||||||
Name[sq]=qBittorrent
|
Name[sq]=qBittorrent
|
||||||
GenericName[sr]=BitTorrent клијент
|
GenericName[sr]=BitTorrent клијент
|
||||||
Comment[sr]=Преузимајте и делите фајлове преко BitTorrent-а
|
Comment[sr]=Преузимајте и делите фајлове преко BitTorrent-а
|
||||||
@@ -226,4 +228,6 @@ Name[ne_NP]=qBittorrent
|
|||||||
GenericName[pt_PT]=Cliente BitTorrent
|
GenericName[pt_PT]=Cliente BitTorrent
|
||||||
Comment[pt_PT]=Transferir e partilhar ficheiros por BitTorrent
|
Comment[pt_PT]=Transferir e partilhar ficheiros por BitTorrent
|
||||||
Name[pt_PT]=qBittorrent
|
Name[pt_PT]=qBittorrent
|
||||||
|
GenericName[si_LK]=BitTorrent සේවාදායකයා
|
||||||
|
Comment[si_LK]=BitTorrent හරහා ගොනු බාගත කර බෙදාගන්න.
|
||||||
Name[si_LK]=qBittorrent
|
Name[si_LK]=qBittorrent
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!-- Copyright 2014 sledgehammer999 <sledgehammer999@qbittorrent.org> -->
|
<!-- Copyright 2014 sledgehammer999 <sledgehammer999@qbittorrent.org> -->
|
||||||
<component type="desktop">
|
<component type="desktop-application">
|
||||||
<id>org.qbittorrent.qBittorrent</id>
|
<id>org.qbittorrent.qBittorrent</id>
|
||||||
<metadata_license>CC0-1.0</metadata_license>
|
<metadata_license>CC0-1.0</metadata_license>
|
||||||
<project_license>GPL-3.0-or-later and OpenSSL</project_license>
|
<project_license>GPL-3.0-or-later and OpenSSL</project_license>
|
||||||
@@ -14,33 +14,12 @@
|
|||||||
</p>
|
</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>Polished µTorrent-like User Interface</li>
|
<li>Polished µTorrent-like User Interface</li>
|
||||||
<li>
|
<li>Well-integrated and extensible Search Engine</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>RSS feed support with advanced download filters (incl. regex)</li>
|
<li>RSS feed support with advanced download filters (incl. regex)</li>
|
||||||
<li>
|
<li>Many Bittorrent extensions supported</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>Remote control through Web user interface, written with AJAX</li>
|
<li>Remote control through Web user interface, written with AJAX</li>
|
||||||
<li>Sequential downloading (Download in order)</li>
|
<li>Sequential downloading (Download in order)</li>
|
||||||
<li>
|
<li>Advanced control over torrents, trackers and peers</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>Bandwidth scheduler</li>
|
<li>Bandwidth scheduler</li>
|
||||||
<li>Torrent creation tool</li>
|
<li>Torrent creation tool</li>
|
||||||
<li>IP Filtering (eMule & PeerGuardian format compatible)</li>
|
<li>IP Filtering (eMule & PeerGuardian format compatible)</li>
|
||||||
@@ -53,27 +32,36 @@
|
|||||||
<launchable type="desktop-id">org.qbittorrent.qBittorrent.desktop</launchable>
|
<launchable type="desktop-id">org.qbittorrent.qBittorrent.desktop</launchable>
|
||||||
<screenshots>
|
<screenshots>
|
||||||
<screenshot type="default">
|
<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>
|
||||||
<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>
|
||||||
<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>
|
||||||
<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>
|
</screenshot>
|
||||||
</screenshots>
|
</screenshots>
|
||||||
<update_contact>sledgehammer999@qbittorrent.org</update_contact>
|
<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="homepage">https://www.qbittorrent.org/</url>
|
||||||
<url type="bugtracker">https://bugs.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="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"/>
|
<content_rating type="oars-1.1"/>
|
||||||
<releases>
|
<releases>
|
||||||
<release version="4.6.3" date="2024-01-15"/>
|
<release version="4.6.7" date="2024-09-16"/>
|
||||||
</releases>
|
</releases>
|
||||||
</component>
|
</component>
|
||||||
2
dist/windows/config.nsi
vendored
2
dist/windows/config.nsi
vendored
@@ -25,7 +25,7 @@
|
|||||||
; 4.5.1.3 -> good
|
; 4.5.1.3 -> good
|
||||||
; 4.5.1.3.2 -> bad
|
; 4.5.1.3.2 -> bad
|
||||||
; 4.5.0beta -> bad
|
; 4.5.0beta -> bad
|
||||||
!define /ifndef QBT_VERSION "4.6.3"
|
!define /ifndef QBT_VERSION "4.6.7"
|
||||||
|
|
||||||
; Option that controls the installer's window name
|
; Option that controls the installer's window name
|
||||||
; If set, its value will be used like this:
|
; If set, its value will be used like this:
|
||||||
|
|||||||
@@ -3,9 +3,9 @@
|
|||||||
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)"
|
||||||
LangString inst_qbt_req ${LANG_FRENCH} "qBittorrent (requis)"
|
LangString inst_qbt_req ${LANG_FRENCH} "qBittorrent (requis)"
|
||||||
;LangString inst_desktop ${LANG_ENGLISH} "Create Desktop Shortcut"
|
;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_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_ENGLISH} "Start qBittorrent on Windows start up"
|
||||||
LangString inst_startup ${LANG_FRENCH} "Démarrer 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_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_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_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_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_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 :"
|
||||||
|
|||||||
@@ -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_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_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_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_ENGLISH} "Uninstall qBittorrent"
|
||||||
LangString inst_uninstall_link_description ${LANG_HUNGARIAN} "qBittorrent eltávolítása"
|
LangString inst_uninstall_link_description ${LANG_HUNGARIAN} "qBittorrent eltávolítása"
|
||||||
|
|
||||||
|
|||||||
@@ -258,17 +258,15 @@ Application::Application(int &argc, char **argv)
|
|||||||
setAttribute(Qt::AA_UseHighDpiPixmaps, true); // opt-in to the high DPI pixmap support
|
setAttribute(Qt::AA_UseHighDpiPixmaps, true); // opt-in to the high DPI pixmap support
|
||||||
#endif
|
#endif
|
||||||
setQuitOnLastWindowClosed(false);
|
setQuitOnLastWindowClosed(false);
|
||||||
|
setQuitLockEnabled(false);
|
||||||
QPixmapCache::setCacheLimit(PIXMAP_CACHE_SIZE);
|
QPixmapCache::setCacheLimit(PIXMAP_CACHE_SIZE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Logger::initInstance();
|
Logger::initInstance();
|
||||||
|
|
||||||
const auto portableProfilePath = Path(QCoreApplication::applicationDirPath()) / DEFAULT_PORTABLE_MODE_PROFILE_DIR;
|
const auto portableProfilePath = Path(QCoreApplication::applicationDirPath()) / DEFAULT_PORTABLE_MODE_PROFILE_DIR;
|
||||||
const bool portableModeEnabled = m_commandLineArgs.profileDir.isEmpty() && portableProfilePath.exists();
|
const bool portableModeEnabled = m_commandLineArgs.profileDir.isEmpty() && Utils::Fs::isDir(portableProfilePath);
|
||||||
|
const Path profileDir = portableModeEnabled ? portableProfilePath : m_commandLineArgs.profileDir;
|
||||||
const Path profileDir = portableModeEnabled
|
|
||||||
? portableProfilePath
|
|
||||||
: m_commandLineArgs.profileDir;
|
|
||||||
Profile::initInstance(profileDir, m_commandLineArgs.configurationName,
|
Profile::initInstance(profileDir, m_commandLineArgs.configurationName,
|
||||||
(m_commandLineArgs.relativeFastresumePaths || portableModeEnabled));
|
(m_commandLineArgs.relativeFastresumePaths || portableModeEnabled));
|
||||||
|
|
||||||
|
|||||||
@@ -194,11 +194,16 @@ add_library(qbt_base STATIC
|
|||||||
|
|
||||||
target_link_libraries(qbt_base
|
target_link_libraries(qbt_base
|
||||||
PRIVATE
|
PRIVATE
|
||||||
OpenSSL::Crypto OpenSSL::SSL
|
OpenSSL::Crypto
|
||||||
|
OpenSSL::SSL
|
||||||
ZLIB::ZLIB
|
ZLIB::ZLIB
|
||||||
PUBLIC
|
PUBLIC
|
||||||
LibtorrentRasterbar::torrent-rasterbar
|
LibtorrentRasterbar::torrent-rasterbar
|
||||||
Qt::Core Qt::Network Qt::Sql Qt::Xml
|
Qt::Core
|
||||||
|
Qt::CorePrivate
|
||||||
|
Qt::Network
|
||||||
|
Qt::Sql
|
||||||
|
Qt::Xml
|
||||||
qbt_common_cfg
|
qbt_common_cfg
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
// if magnet link was hybrid initially then it is indexed also by v1 info hash
|
||||||
// so we need to remove both entries
|
// so we need to remove both entries
|
||||||
const auto altID = TorrentID::fromSHA1Hash(infoHash.v1());
|
const auto altID = TorrentID::fromSHA1Hash(infoHash.v1());
|
||||||
m_downloadedMetadata.remove((altID == downloadedMetadataIter.key()) ? id : altID);
|
m_downloadedMetadata.remove(altID);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@@ -2807,6 +2807,14 @@ bool SessionImpl::addTorrent_impl(const std::variant<MagnetUri, TorrentInfo> &so
|
|||||||
|
|
||||||
if (hasMetadata)
|
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);
|
const TorrentInfo &torrentInfo = std::get<TorrentInfo>(source);
|
||||||
|
|
||||||
Q_ASSERT(addTorrentParams.filePaths.isEmpty() || (addTorrentParams.filePaths.size() == torrentInfo.filesCount()));
|
Q_ASSERT(addTorrentParams.filePaths.isEmpty() || (addTorrentParams.filePaths.size() == torrentInfo.filesCount()));
|
||||||
|
|||||||
@@ -425,6 +425,8 @@ Path TorrentImpl::savePath() const
|
|||||||
void TorrentImpl::setSavePath(const Path &path)
|
void TorrentImpl::setSavePath(const Path &path)
|
||||||
{
|
{
|
||||||
Q_ASSERT(!isAutoTMMEnabled());
|
Q_ASSERT(!isAutoTMMEnabled());
|
||||||
|
if (Q_UNLIKELY(isAutoTMMEnabled()))
|
||||||
|
return;
|
||||||
|
|
||||||
const Path basePath = m_session->useCategoryPathsInManualMode()
|
const Path basePath = m_session->useCategoryPathsInManualMode()
|
||||||
? m_session->categorySavePath(category()) : m_session->savePath();
|
? m_session->categorySavePath(category()) : m_session->savePath();
|
||||||
@@ -452,6 +454,8 @@ Path TorrentImpl::downloadPath() const
|
|||||||
void TorrentImpl::setDownloadPath(const Path &path)
|
void TorrentImpl::setDownloadPath(const Path &path)
|
||||||
{
|
{
|
||||||
Q_ASSERT(!isAutoTMMEnabled());
|
Q_ASSERT(!isAutoTMMEnabled());
|
||||||
|
if (Q_UNLIKELY(isAutoTMMEnabled()))
|
||||||
|
return;
|
||||||
|
|
||||||
const Path basePath = m_session->useCategoryPathsInManualMode()
|
const Path basePath = m_session->useCategoryPathsInManualMode()
|
||||||
? m_session->categoryDownloadPath(category()) : m_session->downloadPath();
|
? m_session->categoryDownloadPath(category()) : m_session->downloadPath();
|
||||||
@@ -1364,11 +1368,13 @@ QBitArray TorrentImpl::pieces() const
|
|||||||
|
|
||||||
QBitArray TorrentImpl::downloadingPieces() const
|
QBitArray TorrentImpl::downloadingPieces() const
|
||||||
{
|
{
|
||||||
QBitArray result(piecesCount());
|
if (!hasMetadata())
|
||||||
|
return {};
|
||||||
|
|
||||||
std::vector<lt::partial_piece_info> queue;
|
std::vector<lt::partial_piece_info> queue;
|
||||||
m_nativeHandle.get_download_queue(queue);
|
m_nativeHandle.get_download_queue(queue);
|
||||||
|
|
||||||
|
QBitArray result {piecesCount()};
|
||||||
for (const lt::partial_piece_info &info : queue)
|
for (const lt::partial_piece_info &info : queue)
|
||||||
result.setBit(LT::toUnderlyingType(info.piece_index));
|
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.
|
// 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_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_unchecked = false;
|
||||||
|
|
||||||
m_completedFiles.fill(false);
|
m_completedFiles.fill(false);
|
||||||
@@ -1811,8 +1827,17 @@ void TorrentImpl::moveStorage(const Path &newPath, const MoveStorageContext cont
|
|||||||
{
|
{
|
||||||
if (!hasMetadata())
|
if (!hasMetadata())
|
||||||
{
|
{
|
||||||
m_savePath = newPath;
|
if (context == MoveStorageContext::ChangeSavePath)
|
||||||
m_session->handleTorrentSavePathChanged(this);
|
{
|
||||||
|
m_savePath = newPath;
|
||||||
|
m_session->handleTorrentSavePathChanged(this);
|
||||||
|
}
|
||||||
|
else if (context == MoveStorageContext::ChangeDownloadPath)
|
||||||
|
{
|
||||||
|
m_downloadPath = newPath;
|
||||||
|
m_session->handleTorrentSavePathChanged(this);
|
||||||
|
}
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -51,7 +51,7 @@
|
|||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
// Disguise as Firefox to avoid web server banning
|
// 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
|
class Net::DownloadManager::NetworkCookieJar final : public QNetworkCookieJar
|
||||||
|
|||||||
@@ -60,7 +60,9 @@ public:
|
|||||||
StalledDownloading,
|
StalledDownloading,
|
||||||
Checking,
|
Checking,
|
||||||
Moving,
|
Moving,
|
||||||
Errored
|
Errored,
|
||||||
|
|
||||||
|
_Count
|
||||||
};
|
};
|
||||||
|
|
||||||
// These mean any permutation, including no category / tag.
|
// These mean any permutation, including no category / tag.
|
||||||
|
|||||||
@@ -31,7 +31,14 @@
|
|||||||
#include <Qt>
|
#include <Qt>
|
||||||
#include <QtGlobal>
|
#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
|
#define QBT_USE_QCOLLATOR
|
||||||
#include <QCollator>
|
#include <QCollator>
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -30,7 +30,7 @@
|
|||||||
|
|
||||||
#define QBT_VERSION_MAJOR 4
|
#define QBT_VERSION_MAJOR 4
|
||||||
#define QBT_VERSION_MINOR 6
|
#define QBT_VERSION_MINOR 6
|
||||||
#define QBT_VERSION_BUGFIX 3
|
#define QBT_VERSION_BUGFIX 7
|
||||||
#define QBT_VERSION_BUILD 0
|
#define QBT_VERSION_BUILD 0
|
||||||
#define QBT_VERSION_STATUS "" // Should be empty for stable releases!
|
#define QBT_VERSION_STATUS "" // Should be empty for stable releases!
|
||||||
|
|
||||||
|
|||||||
@@ -33,6 +33,7 @@
|
|||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
|
#include <QByteArray>
|
||||||
#include <QDateTime>
|
#include <QDateTime>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
@@ -41,6 +42,7 @@
|
|||||||
#include <QPushButton>
|
#include <QPushButton>
|
||||||
#include <QScreen>
|
#include <QScreen>
|
||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
|
#include <QSize>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
#include <QVector>
|
#include <QVector>
|
||||||
@@ -157,7 +159,8 @@ namespace
|
|||||||
delta.setY(0);
|
delta.setY(0);
|
||||||
dialogGeometry.translate(delta);
|
dialogGeometry.translate(delta);
|
||||||
|
|
||||||
delta = screenGeometry.topLeft() - dialogGeometry.topLeft();
|
const QPoint frameOffset {10, 40};
|
||||||
|
delta = screenGeometry.topLeft() - dialogGeometry.topLeft() + frameOffset;
|
||||||
if (delta.x() < 0)
|
if (delta.x() < 0)
|
||||||
delta.setX(0);
|
delta.setX(0);
|
||||||
if (delta.y() < 0)
|
if (delta.y() < 0)
|
||||||
@@ -356,18 +359,28 @@ AddNewTorrentDialog::AddNewTorrentDialog(const BitTorrent::AddTorrentParams &inP
|
|||||||
m_ui->downloadPath->setMaxVisibleItems(20);
|
m_ui->downloadPath->setMaxVisibleItems(20);
|
||||||
|
|
||||||
m_ui->addToQueueTopCheckBox->setChecked(m_torrentParams.addToQueueTop.value_or(session->isAddTorrentToQueueTop()));
|
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(
|
m_ui->stopConditionComboBox->setToolTip(
|
||||||
u"<html><body><p><b>" + tr("None") + u"</b> - " + tr("No stop condition is set.") + u"</p><p><b>" +
|
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.") +
|
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.") +
|
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>");
|
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->addItem(tr("None"), QVariant::fromValue(BitTorrent::Torrent::StopCondition::None));
|
||||||
m_ui->stopConditionComboBox->setItemData(1, QVariant::fromValue(BitTorrent::Torrent::StopCondition::MetadataReceived));
|
if (!hasMetadata())
|
||||||
m_ui->stopConditionComboBox->setItemData(2, QVariant::fromValue(BitTorrent::Torrent::StopCondition::FilesChecked));
|
m_ui->stopConditionComboBox->addItem(tr("Metadata received"), QVariant::fromValue(BitTorrent::Torrent::StopCondition::MetadataReceived));
|
||||||
m_ui->stopConditionComboBox->setCurrentIndex(m_ui->stopConditionComboBox->findData(
|
m_ui->stopConditionComboBox->addItem(tr("Files checked"), QVariant::fromValue(BitTorrent::Torrent::StopCondition::FilesChecked));
|
||||||
QVariant::fromValue(m_torrentParams.stopCondition.value_or(session->torrentStopCondition()))));
|
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->stopConditionLabel->setEnabled(m_ui->startTorrentCheckBox->isChecked());
|
||||||
m_ui->stopConditionComboBox->setEnabled(m_ui->startTorrentCheckBox->isChecked());
|
m_ui->stopConditionComboBox->setEnabled(m_ui->startTorrentCheckBox->isChecked());
|
||||||
connect(m_ui->startTorrentCheckBox, &QCheckBox::toggled, this, [this](const bool checked)
|
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).
|
// Qt::Window is required to avoid showing only two dialog on top (see #12852).
|
||||||
// Also improves the general convenience of adding multiple torrents.
|
// Also improves the general convenience of adding multiple torrents.
|
||||||
if (!attached)
|
if (!attached)
|
||||||
|
{
|
||||||
dlg->setWindowFlags(Qt::Window);
|
dlg->setWindowFlags(Qt::Window);
|
||||||
|
adjustDialogGeometry(dlg, parent);
|
||||||
|
}
|
||||||
dlg->setAttribute(Qt::WA_DeleteOnClose);
|
dlg->setAttribute(Qt::WA_DeleteOnClose);
|
||||||
|
|
||||||
if (Net::DownloadManager::hasSupportedScheme(source))
|
if (Net::DownloadManager::hasSupportedScheme(source))
|
||||||
@@ -570,14 +586,9 @@ void AddNewTorrentDialog::show(const QString &source, const BitTorrent::AddTorre
|
|||||||
: dlg->loadTorrentFile(source);
|
: dlg->loadTorrentFile(source);
|
||||||
|
|
||||||
if (isLoaded)
|
if (isLoaded)
|
||||||
{
|
|
||||||
adjustDialogGeometry(dlg, parent);
|
|
||||||
dlg->QDialog::show();
|
dlg->QDialog::show();
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
|
||||||
delete dlg;
|
delete dlg;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AddNewTorrentDialog::show(const QString &source, QWidget *parent)
|
void AddNewTorrentDialog::show(const QString &source, QWidget *parent)
|
||||||
@@ -993,14 +1004,22 @@ void AddNewTorrentDialog::updateMetadata(const BitTorrent::TorrentInfo &metadata
|
|||||||
// Good to go
|
// Good to go
|
||||||
m_torrentInfo = metadata;
|
m_torrentInfo = metadata;
|
||||||
setMetadataProgressIndicator(true, tr("Parsing 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
|
// Update UI
|
||||||
setupTreeview();
|
setupTreeview();
|
||||||
setMetadataProgressIndicator(false, tr("Metadata retrieval complete"));
|
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);
|
m_ui->buttonSave->setVisible(true);
|
||||||
if (m_torrentInfo.infoHash().v2().isValid())
|
if (m_torrentInfo.infoHash().v2().isValid())
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -39,6 +39,9 @@
|
|||||||
#include "base/path.h"
|
#include "base/path.h"
|
||||||
#include "base/settingvalue.h"
|
#include "base/settingvalue.h"
|
||||||
|
|
||||||
|
class LineEdit;
|
||||||
|
class TorrentFileGuard;
|
||||||
|
|
||||||
namespace BitTorrent
|
namespace BitTorrent
|
||||||
{
|
{
|
||||||
class InfoHash;
|
class InfoHash;
|
||||||
@@ -54,9 +57,6 @@ namespace Ui
|
|||||||
class AddNewTorrentDialog;
|
class AddNewTorrentDialog;
|
||||||
}
|
}
|
||||||
|
|
||||||
class LineEdit;
|
|
||||||
class TorrentFileGuard;
|
|
||||||
|
|
||||||
class AddNewTorrentDialog final : public QDialog
|
class AddNewTorrentDialog final : public QDialog
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|||||||
@@ -261,24 +261,6 @@
|
|||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<widget class="QComboBox" name="stopConditionComboBox">
|
<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>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
|
#include <QtGlobal>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
@@ -300,11 +301,11 @@ QIcon DesktopIntegration::getSystrayIcon() const
|
|||||||
icon = UIThemeManager::instance()->getIcon(u"qbittorrent-tray-light"_s);
|
icon = UIThemeManager::instance()->getIcon(u"qbittorrent-tray-light"_s);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
#if ((QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && defined(Q_OS_UNIX) && !defined(Q_OS_MACOS))
|
#ifdef Q_OS_UNIX
|
||||||
// Workaround for invisible tray icon in KDE, https://bugreports.qt.io/browse/QTBUG-53550
|
// Workaround for invisible tray icon in KDE, https://bugreports.qt.io/browse/QTBUG-53550
|
||||||
return {icon.pixmap(32)};
|
if (qEnvironmentVariable("XDG_CURRENT_DESKTOP").compare(u"KDE", Qt::CaseInsensitive) == 0)
|
||||||
#else
|
return icon.pixmap(32);
|
||||||
return icon;
|
|
||||||
#endif
|
#endif
|
||||||
|
return icon;
|
||||||
}
|
}
|
||||||
#endif // Q_OS_MACOS
|
#endif // Q_OS_MACOS
|
||||||
|
|||||||
@@ -90,11 +90,12 @@ DownloadFromURLDialog::DownloadFromURLDialog(QWidget *parent)
|
|||||||
urls << urlString;
|
urls << urlString;
|
||||||
}
|
}
|
||||||
|
|
||||||
const QString text = urls.join(u'\n')
|
if (!urls.isEmpty())
|
||||||
+ (!urls.isEmpty() ? u"\n" : u"");
|
{
|
||||||
|
m_ui->textUrls->setText(urls.join(u'\n') + u"\n");
|
||||||
m_ui->textUrls->setText(text);
|
m_ui->textUrls->moveCursor(QTextCursor::End);
|
||||||
m_ui->textUrls->moveCursor(QTextCursor::End);
|
m_ui->buttonBox->setFocus();
|
||||||
|
}
|
||||||
|
|
||||||
if (const QSize dialogSize = m_storeDialogSize; dialogSize.isValid())
|
if (const QSize dialogSize = m_storeDialogSize; dialogSize.isValid())
|
||||||
resize(dialogSize);
|
resize(dialogSize);
|
||||||
|
|||||||
@@ -1,7 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* Bittorrent Client using Qt and libtorrent.
|
* Bittorrent Client using Qt and libtorrent.
|
||||||
* Copyright (C) 2022 Mike Tzou (Chocobo1)
|
* Copyright (C) 2024 Vladimir Golovnev <glassez@yandex.ru>
|
||||||
* Copyright (C) 2016 Eugene Shalygin
|
* Copyright (C) 2022 Mike Tzou (Chocobo1)
|
||||||
|
* Copyright (C) 2016 Eugene Shalygin
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
#include <QCompleter>
|
#include <QCompleter>
|
||||||
#include <QContextMenuEvent>
|
#include <QContextMenuEvent>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
#include <QFileIconProvider>
|
||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QFileSystemModel>
|
#include <QFileSystemModel>
|
||||||
#include <QMenu>
|
#include <QMenu>
|
||||||
@@ -160,36 +162,34 @@ QValidator::State Private::FileSystemPathValidator::validate(QString &input, int
|
|||||||
}
|
}
|
||||||
|
|
||||||
Private::FileLineEdit::FileLineEdit(QWidget *parent)
|
Private::FileLineEdit::FileLineEdit(QWidget *parent)
|
||||||
: QLineEdit {parent}
|
: QLineEdit(parent)
|
||||||
, m_completerModel {new QFileSystemModel(this)}
|
|
||||||
, m_completer {new QCompleter(this)}
|
|
||||||
{
|
{
|
||||||
m_iconProvider.setOptions(QFileIconProvider::DontUseCustomDirectoryIcons);
|
setCompleter(new QCompleter(this));
|
||||||
|
|
||||||
m_completerModel->setIconProvider(&m_iconProvider);
|
|
||||||
m_completerModel->setOptions(QFileSystemModel::DontWatchForChanges);
|
|
||||||
|
|
||||||
m_completer->setModel(m_completerModel);
|
|
||||||
setCompleter(m_completer);
|
|
||||||
|
|
||||||
connect(this, &QLineEdit::textChanged, this, &FileLineEdit::validateText);
|
connect(this, &QLineEdit::textChanged, this, &FileLineEdit::validateText);
|
||||||
}
|
}
|
||||||
|
|
||||||
Private::FileLineEdit::~FileLineEdit()
|
Private::FileLineEdit::~FileLineEdit()
|
||||||
{
|
{
|
||||||
delete m_completerModel; // has to be deleted before deleting the m_iconProvider object
|
delete m_completerModel; // has to be deleted before deleting the m_iconProvider object
|
||||||
|
delete m_iconProvider;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Private::FileLineEdit::completeDirectoriesOnly(const bool completeDirsOnly)
|
void Private::FileLineEdit::completeDirectoriesOnly(const bool completeDirsOnly)
|
||||||
{
|
{
|
||||||
const QDir::Filters filters = QDir::NoDotAndDotDot
|
m_completeDirectoriesOnly = completeDirsOnly;
|
||||||
| (completeDirsOnly ? QDir::Dirs : QDir::AllEntries);
|
if (m_completerModel)
|
||||||
m_completerModel->setFilter(filters);
|
{
|
||||||
|
const QDir::Filters filters = QDir::NoDotAndDotDot
|
||||||
|
| (completeDirsOnly ? QDir::Dirs : QDir::AllEntries);
|
||||||
|
m_completerModel->setFilter(filters);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void Private::FileLineEdit::setFilenameFilters(const QStringList &filters)
|
void Private::FileLineEdit::setFilenameFilters(const QStringList &filters)
|
||||||
{
|
{
|
||||||
m_completerModel->setNameFilters(filters);
|
m_filenameFilters = filters;
|
||||||
|
if (m_completerModel)
|
||||||
|
m_completerModel->setNameFilters(m_filenameFilters);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Private::FileLineEdit::setBrowseAction(QAction *action)
|
void Private::FileLineEdit::setBrowseAction(QAction *action)
|
||||||
@@ -223,6 +223,22 @@ void Private::FileLineEdit::keyPressEvent(QKeyEvent *e)
|
|||||||
|
|
||||||
if ((e->key() == Qt::Key_Space) && (e->modifiers() == Qt::CTRL))
|
if ((e->key() == Qt::Key_Space) && (e->modifiers() == Qt::CTRL))
|
||||||
{
|
{
|
||||||
|
if (!m_completerModel)
|
||||||
|
{
|
||||||
|
m_iconProvider = new QFileIconProvider;
|
||||||
|
m_iconProvider->setOptions(QFileIconProvider::DontUseCustomDirectoryIcons);
|
||||||
|
|
||||||
|
m_completerModel = new QFileSystemModel(this);
|
||||||
|
m_completerModel->setIconProvider(m_iconProvider);
|
||||||
|
m_completerModel->setOptions(QFileSystemModel::DontWatchForChanges);
|
||||||
|
m_completerModel->setNameFilters(m_filenameFilters);
|
||||||
|
const QDir::Filters filters = QDir::NoDotAndDotDot
|
||||||
|
| (m_completeDirectoriesOnly ? QDir::Dirs : QDir::AllEntries);
|
||||||
|
m_completerModel->setFilter(filters);
|
||||||
|
|
||||||
|
completer()->setModel(m_completerModel);
|
||||||
|
}
|
||||||
|
|
||||||
m_completerModel->setRootPath(Path(text()).data());
|
m_completerModel->setRootPath(Path(text()).data());
|
||||||
showCompletionPopup();
|
showCompletionPopup();
|
||||||
}
|
}
|
||||||
@@ -244,8 +260,8 @@ void Private::FileLineEdit::contextMenuEvent(QContextMenuEvent *event)
|
|||||||
|
|
||||||
void Private::FileLineEdit::showCompletionPopup()
|
void Private::FileLineEdit::showCompletionPopup()
|
||||||
{
|
{
|
||||||
m_completer->setCompletionPrefix(text());
|
completer()->setCompletionPrefix(text());
|
||||||
m_completer->complete();
|
completer()->complete();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Private::FileLineEdit::validateText()
|
void Private::FileLineEdit::validateText()
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Bittorrent Client using Qt and libtorrent.
|
* Bittorrent Client using Qt and libtorrent.
|
||||||
* Copyright (C) 2016 Eugene Shalygin
|
* Copyright (C) 2024 Vladimir Golovnev <glassez@yandex.ru>
|
||||||
|
* Copyright (C) 2016 Eugene Shalygin
|
||||||
*
|
*
|
||||||
* This program is free software; you can redistribute it and/or
|
* This program is free software; you can redistribute it and/or
|
||||||
* modify it under the terms of the GNU General Public License
|
* modify it under the terms of the GNU General Public License
|
||||||
@@ -29,7 +30,6 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <QComboBox>
|
#include <QComboBox>
|
||||||
#include <QFileIconProvider>
|
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
#include <QtContainerFwd>
|
#include <QtContainerFwd>
|
||||||
#include <QValidator>
|
#include <QValidator>
|
||||||
@@ -37,8 +37,8 @@
|
|||||||
#include "base/pathfwd.h"
|
#include "base/pathfwd.h"
|
||||||
|
|
||||||
class QAction;
|
class QAction;
|
||||||
class QCompleter;
|
|
||||||
class QContextMenuEvent;
|
class QContextMenuEvent;
|
||||||
|
class QFileIconProvider;
|
||||||
class QFileSystemModel;
|
class QFileSystemModel;
|
||||||
class QKeyEvent;
|
class QKeyEvent;
|
||||||
|
|
||||||
@@ -140,10 +140,11 @@ namespace Private
|
|||||||
static QString warningText(FileSystemPathValidator::TestResult result);
|
static QString warningText(FileSystemPathValidator::TestResult result);
|
||||||
|
|
||||||
QFileSystemModel *m_completerModel = nullptr;
|
QFileSystemModel *m_completerModel = nullptr;
|
||||||
QCompleter *m_completer = nullptr;
|
|
||||||
QAction *m_browseAction = nullptr;
|
QAction *m_browseAction = nullptr;
|
||||||
QAction *m_warningAction = nullptr;
|
QAction *m_warningAction = nullptr;
|
||||||
QFileIconProvider m_iconProvider;
|
QFileIconProvider *m_iconProvider = nullptr;
|
||||||
|
bool m_completeDirectoriesOnly = false;
|
||||||
|
QStringList m_filenameFilters;
|
||||||
};
|
};
|
||||||
|
|
||||||
class FileComboEdit final : public QComboBox, public IFileEditorWithCompletion
|
class FileComboEdit final : public QComboBox, public IFileEditorWithCompletion
|
||||||
|
|||||||
@@ -29,20 +29,41 @@
|
|||||||
|
|
||||||
#include "lineedit.h"
|
#include "lineedit.h"
|
||||||
|
|
||||||
|
#include <chrono>
|
||||||
|
|
||||||
#include <QAction>
|
#include <QAction>
|
||||||
#include <QKeyEvent>
|
#include <QKeyEvent>
|
||||||
|
#include <QTimer>
|
||||||
|
|
||||||
#include "base/global.h"
|
#include "base/global.h"
|
||||||
#include "uithememanager.h"
|
#include "uithememanager.h"
|
||||||
|
|
||||||
|
using namespace std::chrono_literals;
|
||||||
|
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
const std::chrono::milliseconds FILTER_INPUT_DELAY {400};
|
||||||
|
}
|
||||||
|
|
||||||
LineEdit::LineEdit(QWidget *parent)
|
LineEdit::LineEdit(QWidget *parent)
|
||||||
: QLineEdit(parent)
|
: QLineEdit(parent)
|
||||||
|
, m_delayedTextChangedTimer {new QTimer(this)}
|
||||||
{
|
{
|
||||||
auto *action = new QAction(UIThemeManager::instance()->getIcon(u"edit-find"_s), QString(), this);
|
auto *action = new QAction(UIThemeManager::instance()->getIcon(u"edit-find"_s), QString(), this);
|
||||||
addAction(action, QLineEdit::LeadingPosition);
|
addAction(action, QLineEdit::LeadingPosition);
|
||||||
|
|
||||||
setClearButtonEnabled(true);
|
setClearButtonEnabled(true);
|
||||||
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Preferred);
|
||||||
|
|
||||||
|
m_delayedTextChangedTimer->setSingleShot(true);
|
||||||
|
connect(m_delayedTextChangedTimer, &QTimer::timeout, this, [this]
|
||||||
|
{
|
||||||
|
emit textChanged(text());
|
||||||
|
});
|
||||||
|
connect(this, &QLineEdit::textChanged, this, [this]
|
||||||
|
{
|
||||||
|
m_delayedTextChangedTimer->start(FILTER_INPUT_DELAY);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
void LineEdit::keyPressEvent(QKeyEvent *event)
|
void LineEdit::keyPressEvent(QKeyEvent *event)
|
||||||
|
|||||||
@@ -31,6 +31,9 @@
|
|||||||
|
|
||||||
#include <QLineEdit>
|
#include <QLineEdit>
|
||||||
|
|
||||||
|
class QKeyEvent;
|
||||||
|
class QTimer;
|
||||||
|
|
||||||
class LineEdit final : public QLineEdit
|
class LineEdit final : public QLineEdit
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
@@ -39,6 +42,11 @@ class LineEdit final : public QLineEdit
|
|||||||
public:
|
public:
|
||||||
explicit LineEdit(QWidget *parent = nullptr);
|
explicit LineEdit(QWidget *parent = nullptr);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void textChanged(const QString &text);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void keyPressEvent(QKeyEvent *event) override;
|
void keyPressEvent(QKeyEvent *event) override;
|
||||||
|
|
||||||
|
QTimer *m_delayedTextChangedTimer = nullptr;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -57,6 +57,7 @@
|
|||||||
#include <QShortcut>
|
#include <QShortcut>
|
||||||
#include <QSplitter>
|
#include <QSplitter>
|
||||||
#include <QStatusBar>
|
#include <QStatusBar>
|
||||||
|
#include <QString>
|
||||||
#include <QtGlobal>
|
#include <QtGlobal>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
@@ -780,8 +781,11 @@ void MainWindow::saveSplitterSettings() const
|
|||||||
|
|
||||||
void MainWindow::cleanup()
|
void MainWindow::cleanup()
|
||||||
{
|
{
|
||||||
saveSettings();
|
if (!m_neverShown)
|
||||||
saveSplitterSettings();
|
{
|
||||||
|
saveSettings();
|
||||||
|
saveSplitterSettings();
|
||||||
|
}
|
||||||
|
|
||||||
// delete RSSWidget explicitly to avoid crash in
|
// delete RSSWidget explicitly to avoid crash in
|
||||||
// handleRSSUnreadCountUpdated() at application shutdown
|
// handleRSSUnreadCountUpdated() at application shutdown
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user