Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qbittorrent for openSUSE:Factory checked in at 2022-08-24 15:11:17 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qbittorrent (Old) and /work/SRC/openSUSE:Factory/.qbittorrent.new.2083 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qbittorrent" Wed Aug 24 15:11:17 2022 rev:103 rq:998882 version:4.4.4 Changes: -------- --- /work/SRC/openSUSE:Factory/qbittorrent/qbittorrent.changes 2022-05-25 20:36:13.768367234 +0200 +++ /work/SRC/openSUSE:Factory/.qbittorrent.new.2083/qbittorrent.changes 2022-08-24 15:11:36.364530164 +0200 @@ -1,0 +2,17 @@ +Tue Aug 23 15:57:35 UTC 2022 - Luigi Baldoni <aloi...@gmx.com> + +- Update to version 4.4.4. + * Improve D-Bus notifications handling + Bug fixes: + * Correctly handle data decompression with Qt 6.3 + * Fix wrong file names displayed in tooltip + * Fix incorrect "max outgoing port" setting + * Make working set limit available only on libtorrent 2.0.x + builds + * Try to recover missing tags + RSS: + * Clear RSS parsing error after use + Web API: + * Set HTTP method restriction on WebAPI actions + +------------------------------------------------------------------- Old: ---- qbittorrent-4.4.3.1.tar.xz qbittorrent-4.4.3.1.tar.xz.asc New: ---- qbittorrent-4.4.4.tar.xz qbittorrent-4.4.4.tar.xz.asc ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qbittorrent.spec ++++++ --- /var/tmp/diff_new_pack.RsHOQ6/_old 2022-08-24 15:11:37.272531040 +0200 +++ /var/tmp/diff_new_pack.RsHOQ6/_new 2022-08-24 15:11:37.276531044 +0200 @@ -18,7 +18,7 @@ Name: qbittorrent -Version: 4.4.3.1 +Version: 4.4.4 Release: 0 Summary: A BitTorrent client in Qt License: GPL-2.0-or-later ++++++ qbittorrent-4.4.3.1.tar.xz -> qbittorrent-4.4.4.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/Changelog new/qbittorrent-4.4.4/Changelog --- old/qbittorrent-4.4.3.1/Changelog 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/Changelog 2022-08-22 14:45:31.000000000 +0200 @@ -1,3 +1,16 @@ +Mon Aug 22 2022 - sledgehammer999 <sledgehammer...@qbittorrent.org> - v4.4.4 + - BUGFIX: Correctly handle data decompression with Qt 6.3 (brvphoenix) + - BUGFIX: Fix wrong file names displayed in tooltip (Chocobo1) + - BUGFIX: Fix incorrect "max outgoing port" setting (glassez) + - BUGFIX: Make working set limit available only on libtorrent 2.0.x builds (summer) + - BUGFIX: Try to recover missing tags (summer) + - RSS: Clear RSS parsing error after use (glassez) + - WEBAPI: Set HTTP method restriction on WebAPI actions (Chocobo1) + - WINDOWS: Work around application stuttering on Windows (Chocobo1) + - WINDOWS: NSIS: Update Portuguese, Italian, Korean, Latvian translations(Blackspirits, bovirus, Minseo Lee, Coool) + - LINUX: Improve D-Bus notifications handling (glassez) + - MACOS: Open destination folders on macOS in separate thread (Nick Korotysh) + Tue May 24 2022 - sledgehammer999 <sledgehammer...@qbittorrent.org> - v4.4.3.1 - BUGFIX: Fix broken translations (sledgehammer999) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/configure new/qbittorrent-4.4.4/configure --- old/qbittorrent-4.4.3.1/configure 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/configure 2022-08-22 14:45:31.000000000 +0200 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for qbittorrent v4.4.3.1. +# Generated by GNU Autoconf 2.71 for qbittorrent v4.4.4. # # Report bugs to <bugs.qbittorrent.org>. # @@ -611,8 +611,8 @@ # Identity of this package. PACKAGE_NAME='qbittorrent' PACKAGE_TARNAME='qbittorrent' -PACKAGE_VERSION='v4.4.3.1' -PACKAGE_STRING='qbittorrent v4.4.3.1' +PACKAGE_VERSION='v4.4.4' +PACKAGE_STRING='qbittorrent v4.4.4' PACKAGE_BUGREPORT='bugs.qbittorrent.org' PACKAGE_URL='https://www.qbittorrent.org/' @@ -1329,7 +1329,7 @@ # 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.4.3.1 to adapt to many kinds of systems. +\`configure' configures qbittorrent v4.4.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1400,7 +1400,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of qbittorrent v4.4.3.1:";; + short | recursive ) echo "Configuration of qbittorrent v4.4.4:";; esac cat <<\_ACEOF @@ -1533,7 +1533,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -qbittorrent configure v4.4.3.1 +qbittorrent configure v4.4.4 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1648,7 +1648,7 @@ 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.4.3.1, which was +It was created by qbittorrent $as_me v4.4.4, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -4779,7 +4779,7 @@ # Define the identity of the package. PACKAGE='qbittorrent' - VERSION='v4.4.3.1' + VERSION='v4.4.4' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -7254,7 +7254,7 @@ # 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.4.3.1, which was +This file was extended by qbittorrent $as_me v4.4.4, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -7314,7 +7314,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -qbittorrent config.status v4.4.3.1 +qbittorrent config.status v4.4.4 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/configure.ac new/qbittorrent-4.4.4/configure.ac --- old/qbittorrent-4.4.3.1/configure.ac 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/configure.ac 2022-08-22 14:45:31.000000000 +0200 @@ -1,4 +1,4 @@ -AC_INIT([qbittorrent], [v4.4.3.1], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/]) +AC_INIT([qbittorrent], [v4.4.4], [bugs.qbittorrent.org], [], [https://www.qbittorrent.org/]) AC_CONFIG_AUX_DIR([build-aux]) AC_CONFIG_MACRO_DIR([m4]) : ${CFLAGS=""} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/dist/mac/Info.plist new/qbittorrent-4.4.4/dist/mac/Info.plist --- old/qbittorrent-4.4.3.1/dist/mac/Info.plist 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/dist/mac/Info.plist 2022-08-22 14:45:31.000000000 +0200 @@ -55,7 +55,7 @@ <key>CFBundlePackageType</key> <string>APPL</string> <key>CFBundleShortVersionString</key> - <string>4.4.3</string> + <string>4.4.4</string> <key>CFBundleExecutable</key> <string>${EXECUTABLE_NAME}</string> <key>CFBundleIdentifier</key> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/dist/unix/org.qbittorrent.qBittorrent.appdata.xml new/qbittorrent-4.4.4/dist/unix/org.qbittorrent.qBittorrent.appdata.xml --- old/qbittorrent-4.4.3.1/dist/unix/org.qbittorrent.qBittorrent.appdata.xml 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/dist/unix/org.qbittorrent.qBittorrent.appdata.xml 2022-08-22 14:45:31.000000000 +0200 @@ -74,6 +74,6 @@ <url type="translate">https://github.com/qbittorrent/qBittorrent/wiki/How-to-translate-qBittorrent</url> <content_rating type="oars-1.1"/> <releases> - <release version="4.4.3.1" date="2022-05-24"/> + <release version="4.4.4" date="2022-08-22"/> </releases> </component> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/dist/windows/installer-translations/italian.nsi new/qbittorrent-4.4.4/dist/windows/installer-translations/italian.nsi --- old/qbittorrent-4.4.3.1/dist/windows/installer-translations/italian.nsi 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/dist/windows/installer-translations/italian.nsi 2022-08-22 14:45:31.000000000 +0200 @@ -19,9 +19,9 @@ ;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule" LangString inst_firewallinfo ${LANG_ITALIAN} "Aggiunta regola al firewall di Windows" ;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing." -LangString inst_warning ${LANG_ITALIAN} "qBittorrent ?? in esecuzione. Chiudilo prima di procedere con l'installazione." +LangString inst_warning ${LANG_ITALIAN} "qBittorrent ?? in esecuzione.$\r$\nChiudilo prima di procedere con l'installazione." ;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact." -LangString inst_uninstall_question ${LANG_ITALIAN} "La versione attuale verr?? disinstallata. Le impostazioni utente e i torrent rimarranno invariati." +LangString inst_uninstall_question ${LANG_ITALIAN} "La versione attuale verr?? disinstallata.$\r$\nLe impostazioni utente e i torrent rimarranno invariati." ;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version." LangString inst_unist ${LANG_ITALIAN} "Disinstallazione versione precedente." ;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent." @@ -53,8 +53,8 @@ ;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data" LangString remove_cache ${LANG_ITALIAN} "Rimuovi torrent e dati nella cache" ;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling." -LangString uninst_warning ${LANG_ITALIAN} "qBittorrent ?? in esecuzione. Chiudilo prima di procedere con la disinstallazione." +LangString uninst_warning ${LANG_ITALIAN} "qBittorrent ?? in esecuzione.$\r$\nChiudilo prima di procedere con la disinstallazione." ;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:" -LangString uninst_tor_warn ${LANG_ITALIAN} "Associazione file .torrent non rimossa. File associati con:" +LangString uninst_tor_warn ${LANG_ITALIAN} "Associazione file .torrent non rimossa.$\r$\nFile associati con:" ;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:" -LangString uninst_mag_warn ${LANG_ITALIAN} "Associazione file magnet non rimossa. File associati con:" +LangString uninst_mag_warn ${LANG_ITALIAN} "Associazione file magnet non rimossa.$\r$\nFile associati con:" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/dist/windows/installer-translations/korean.nsi new/qbittorrent-4.4.4/dist/windows/installer-translations/korean.nsi --- old/qbittorrent-4.4.3.1/dist/windows/installer-translations/korean.nsi 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/dist/windows/installer-translations/korean.nsi 2022-08-22 14:45:31.000000000 +0200 @@ -1,11 +1,11 @@ ;Installer strings ;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)" -LangString inst_qbt_req ${LANG_KOREAN} "qBittorrent (?????????)" +LangString inst_qbt_req ${LANG_KOREAN} "qBittorrent (??????)" ;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut" -LangString inst_dekstop ${LANG_KOREAN} "???????????? ???????????? ?????????" +LangString inst_dekstop ${LANG_KOREAN} "???????????? ?????? ?????? ?????????" ;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut" -LangString inst_startmenu ${LANG_KOREAN} "?????? ?????? ???????????? ?????????" +LangString inst_startmenu ${LANG_KOREAN} "?????? ?????? ?????? ?????? ?????????" ;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up" LangString inst_startup ${LANG_KOREAN} "Windows ?????? ??? qBittorrent ??????" ;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent" @@ -15,23 +15,23 @@ ;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule" LangString inst_firewall ${LANG_KOREAN} "Windows ????????? ?????? ??????" ;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)" -LangString inst_pathlimit ${LANG_KOREAN} "Windows ?????? ?????? ?????? ????????????(260??? MAX_PATH ??????, Windows 10 1607 ?????? ??????)" +LangString inst_pathlimit ${LANG_KOREAN} "Windows ?????? ?????? ?????? ???????????? (260??? MAX_PATH ??????, Windows 10 1607 ?????? ??????)" ;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule" LangString inst_firewallinfo ${LANG_KOREAN} "Windows ????????? ?????? ???????????? ???" ;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing." LangString inst_warning ${LANG_KOREAN} "qBittorrent??? ?????? ????????????. ???????????? ?????? ?????? ??????????????? ???????????????." ;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact." -LangString inst_uninstall_question ${LANG_KOREAN} "?????? ????????? ???????????????. ????????? ????????? ???????????? ????????? ???????????????." +LangString inst_uninstall_question ${LANG_KOREAN} "?????? ????????? ???????????????. ????????? ????????? ???????????? ????????? ???????????????." ;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version." -LangString inst_unist ${LANG_KOREAN} "?????? ????????? ???????????? ????????????." +LangString inst_unist ${LANG_KOREAN} "?????? ????????? ???????????? ????????????." ;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent." LangString launch_qbt ${LANG_KOREAN} "qBittorrent??? ???????????????." ;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions." -LangString inst_requires_64bit ${LANG_KOREAN} "??? ?????? ??????????????? 64?????? ???????????? ??????????????? ???????????????." +LangString inst_requires_64bit ${LANG_KOREAN} "??? ?????? ??????????????? 64?????? Windows ??????????????? ???????????????." ;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7." LangString inst_requires_win7 ${LANG_KOREAN} "??? qBittorrent ???????????? Windows 7 ????????? ???????????????." ;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent" -LangString inst_uninstall_link_description ${LANG_KOREAN} "qBittorrent ??????" +LangString inst_uninstall_link_description ${LANG_KOREAN} "qBittorrent ??????" ;------------------------------------ ;Uninstaller strings @@ -39,7 +39,7 @@ ;LangString remove_files ${LANG_ENGLISH} "Remove files" LangString remove_files ${LANG_KOREAN} "?????? ??????" ;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts" -LangString remove_shortcuts ${LANG_KOREAN} "???????????? ??????" +LangString remove_shortcuts ${LANG_KOREAN} "?????? ?????? ??????" ;LangString remove_associations ${LANG_ENGLISH} "Remove file associations" LangString remove_associations ${LANG_KOREAN} "?????? ?????? ??????" ;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/dist/windows/installer-translations/latvian.nsi new/qbittorrent-4.4.4/dist/windows/installer-translations/latvian.nsi --- old/qbittorrent-4.4.3.1/dist/windows/installer-translations/latvian.nsi 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/dist/windows/installer-translations/latvian.nsi 2022-08-22 14:45:31.000000000 +0200 @@ -1,60 +1,60 @@ ;Installer strings ;LangString inst_qbt_req ${LANG_ENGLISH} "qBittorrent (required)" -LangString inst_qbt_req ${LANG_LATVIAN} "qBittorrent (required)" +LangString inst_qbt_req ${LANG_LATVIAN} "qBittorrent (nepiecie??ams)" ;LangString inst_dekstop ${LANG_ENGLISH} "Create Desktop Shortcut" -LangString inst_dekstop ${LANG_LATVIAN} "Create Desktop Shortcut" +LangString inst_dekstop ${LANG_LATVIAN} "Izveidot sa??sni uz darbvirsmas" ;LangString inst_startmenu ${LANG_ENGLISH} "Create Start Menu Shortcut" -LangString inst_startmenu ${LANG_LATVIAN} "Create Start Menu Shortcut" +LangString inst_startmenu ${LANG_LATVIAN} "Izveidot izv??lnes S??kt sa??snes" ;LangString inst_startup ${LANG_ENGLISH} "Start qBittorrent on Windows start up" -LangString inst_startup ${LANG_LATVIAN} "Start qBittorrent on Windows start up" +LangString inst_startup ${LANG_LATVIAN} "Start??t qBittorrent Windows start????anas laik??" ;LangString inst_torrent ${LANG_ENGLISH} "Open .torrent files with qBittorrent" -LangString inst_torrent ${LANG_LATVIAN} "Open .torrent files with qBittorrent" +LangString inst_torrent ${LANG_LATVIAN} "Atv??rt .torrent failus ar qBittorrent" ;LangString inst_magnet ${LANG_ENGLISH} "Open magnet links with qBittorrent" -LangString inst_magnet ${LANG_LATVIAN} "Open magnet links with qBittorrent" +LangString inst_magnet ${LANG_LATVIAN} "Atv??rt magn??tu saites ar qBittorrent" ;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule" -LangString inst_firewall ${LANG_LATVIAN} "Add Windows Firewall rule" +LangString inst_firewall ${LANG_LATVIAN} "Pievienot Windows ugunsm??ra noteikumu" ;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)" -LangString inst_pathlimit ${LANG_LATVIAN} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)" +LangString inst_pathlimit ${LANG_LATVIAN} "Atsp??jot Windows ce??a garuma ierobe??ojumu (260 rakstz??mju MAX_PATH ierobe??ojums, nepiecie??ams Windows 10 1607 vai jaun??ka versija)" ;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule" -LangString inst_firewallinfo ${LANG_LATVIAN} "Adding Windows Firewall rule" +LangString inst_firewallinfo ${LANG_LATVIAN} "Windows ugunsm??ra noteikumu pievieno??ana" ;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing." -LangString inst_warning ${LANG_LATVIAN} "qBittorrent is running. Please close the application before installing." +LangString inst_warning ${LANG_LATVIAN} "qBittorrent darbojas. L??dzu, aizveriet programmu pirms instal????anas." ;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact." -LangString inst_uninstall_question ${LANG_LATVIAN} "Current version will be uninstalled. User settings and torrents will remain intact." +LangString inst_uninstall_question ${LANG_LATVIAN} "Pa??reiz??j?? versija tiks atinstal??ta. Lietot??ju iestat??jumi un torrenti paliks neskarti." ;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version." -LangString inst_unist ${LANG_LATVIAN} "Uninstalling previous version." +LangString inst_unist ${LANG_LATVIAN} "Iepriek????j??s versijas atinstal????ana." ;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent." -LangString launch_qbt ${LANG_LATVIAN} "Launch qBittorrent." +LangString launch_qbt ${LANG_LATVIAN} "Palaist qBittorrent." ;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions." -LangString inst_requires_64bit ${LANG_LATVIAN} "This installer works only in 64-bit Windows versions." +LangString inst_requires_64bit ${LANG_LATVIAN} "???? instal????anas programma darbojas tikai 64 bitu Windows versij??s." ;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7." -LangString inst_requires_win7 ${LANG_LATVIAN} "This qBittorrent version requires at least Windows 7." +LangString inst_requires_win7 ${LANG_LATVIAN} "??ai qBittorrent versijai ir nepiecie??ama vismaz Windows 7." ;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent" -LangString inst_uninstall_link_description ${LANG_LATVIAN} "Uninstall qBittorrent" +LangString inst_uninstall_link_description ${LANG_LATVIAN} "Atinstal??t qBittorrent" ;------------------------------------ ;Uninstaller strings ;LangString remove_files ${LANG_ENGLISH} "Remove files" -LangString remove_files ${LANG_LATVIAN} "Remove files" +LangString remove_files ${LANG_LATVIAN} "Dz???? failus" ;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts" -LangString remove_shortcuts ${LANG_LATVIAN} "Remove shortcuts" +LangString remove_shortcuts ${LANG_LATVIAN} "Dz???? sa??snes" ;LangString remove_associations ${LANG_ENGLISH} "Remove file associations" -LangString remove_associations ${LANG_LATVIAN} "Remove file associations" +LangString remove_associations ${LANG_LATVIAN} "No??em failu asoci??cijas" ;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys" -LangString remove_registry ${LANG_LATVIAN} "Remove registry keys" +LangString remove_registry ${LANG_LATVIAN} "Dz???? re??istra atsl??gas" ;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files" -LangString remove_conf ${LANG_LATVIAN} "Remove configuration files" +LangString remove_conf ${LANG_LATVIAN} "Dz???? konfigur??cijas failus" ;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule" -LangString remove_firewall ${LANG_LATVIAN} "Remove Windows Firewall rule" +LangString remove_firewall ${LANG_LATVIAN} "Dz??st Windows ugunsm??ra noteikumu" ;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule" -LangString remove_firewallinfo ${LANG_LATVIAN} "Removing Windows Firewall rule" +LangString remove_firewallinfo ${LANG_LATVIAN} "Dz???? Windows ugunsm??ra noteikumu" ;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data" -LangString remove_cache ${LANG_LATVIAN} "Remove torrents and cached data" +LangString remove_cache ${LANG_LATVIAN} "Dz???? torrentus un ke??atmi??as datus" ;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling." -LangString uninst_warning ${LANG_LATVIAN} "qBittorrent is running. Please close the application before uninstalling." +LangString uninst_warning ${LANG_LATVIAN} "qBittorrent darbojas. L??dzu, aizveriet programmu pirms atinstal????anas." ;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:" -LangString uninst_tor_warn ${LANG_LATVIAN} "Not removing .torrent association. It is associated with:" +LangString uninst_tor_warn ${LANG_LATVIAN} "Netiek dz??sta .torrent asoci??cija. T?? ir saist??ta ar:" ;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:" -LangString uninst_mag_warn ${LANG_LATVIAN} "Not removing magnet association. It is associated with:" +LangString uninst_mag_warn ${LANG_LATVIAN} "Netiek dz??sta magn??ta asoci??cija. T?? ir saist??ta ar:" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/dist/windows/installer-translations/portuguese.nsi new/qbittorrent-4.4.4/dist/windows/installer-translations/portuguese.nsi --- old/qbittorrent-4.4.3.1/dist/windows/installer-translations/portuguese.nsi 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/dist/windows/installer-translations/portuguese.nsi 2022-08-22 14:45:31.000000000 +0200 @@ -15,23 +15,23 @@ ;LangString inst_firewall ${LANG_ENGLISH} "Add Windows Firewall rule" LangString inst_firewall ${LANG_PORTUGUESE} "Adicionar regra ?? firewall do Windows" ;LangString inst_pathlimit ${LANG_ENGLISH} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)" -LangString inst_pathlimit ${LANG_PORTUGUESE} "Disable Windows path length limit (260 character MAX_PATH limitation, requires Windows 10 1607 or later)" +LangString inst_pathlimit ${LANG_PORTUGUESE} "Desativar o limite do tamanho do caminho do Windows (limita????o de MAX_PATH de 260 caracteres, requer o Windows 10 1607 ou superior)" ;LangString inst_firewallinfo ${LANG_ENGLISH} "Adding Windows Firewall rule" -LangString inst_firewallinfo ${LANG_PORTUGUESE} "Adicionando regra ?? firewall do Windows" +LangString inst_firewallinfo ${LANG_PORTUGUESE} "A adicionar regra ?? firewall do Windows" ;LangString inst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before installing." -LangString inst_warning ${LANG_PORTUGUESE} "O qBittorrent est?? a ser executado. Feche a aplica????o antes de instalar esta vers??o." +LangString inst_warning ${LANG_PORTUGUESE} "O qBittorrent est?? a ser executado. Por favor, feche a aplica????o antes de instalar esta vers??o." ;LangString inst_uninstall_question ${LANG_ENGLISH} "Current version will be uninstalled. User settings and torrents will remain intact." -LangString inst_uninstall_question ${LANG_PORTUGUESE} "Uma antiga instala????o foi encontrada.Essa mesma ser?? desinstalada sem apagar as defini????es do usu??rio." +LangString inst_uninstall_question ${LANG_PORTUGUESE} "A vers??o atual ser?? desinstalada. As defini????es do utilizador e os torrents permanecer??o intactas." ;LangString inst_unist ${LANG_ENGLISH} "Uninstalling previous version." LangString inst_unist ${LANG_PORTUGUESE} "A desinstalar vers??o anterior." ;LangString launch_qbt ${LANG_ENGLISH} "Launch qBittorrent." LangString launch_qbt ${LANG_PORTUGUESE} "Iniciar qBittorrent." ;LangString inst_requires_64bit ${LANG_ENGLISH} "This installer works only in 64-bit Windows versions." -LangString inst_requires_64bit ${LANG_PORTUGUESE} "This installer works only in 64-bit Windows versions." +LangString inst_requires_64bit ${LANG_PORTUGUESE} "Este instalador funciona apenas em vers??es Windows de 64 bits." ;LangString inst_requires_win7 ${LANG_ENGLISH} "This qBittorrent version requires at least Windows 7." -LangString inst_requires_win7 ${LANG_PORTUGUESE} "This qBittorrent version requires at least Windows 7." +LangString inst_requires_win7 ${LANG_PORTUGUESE} "Esta vers??o qBittorrent requer pelo menos o Windows 7." ;LangString inst_uninstall_link_description ${LANG_ENGLISH} "Uninstall qBittorrent" -LangString inst_uninstall_link_description ${LANG_PORTUGUESE} "Uninstall qBittorrent" +LangString inst_uninstall_link_description ${LANG_PORTUGUESE} "Desinstalar qBittorrent" ;------------------------------------ ;Uninstaller strings @@ -41,7 +41,7 @@ ;LangString remove_shortcuts ${LANG_ENGLISH} "Remove shortcuts" LangString remove_shortcuts ${LANG_PORTUGUESE} "Remover atalhos" ;LangString remove_associations ${LANG_ENGLISH} "Remove file associations" -LangString remove_associations ${LANG_PORTUGUESE} "Remove associa????o de ficheiros" +LangString remove_associations ${LANG_PORTUGUESE} "Remover associa????o de ficheiros" ;LangString remove_registry ${LANG_ENGLISH} "Remove registry keys" LangString remove_registry ${LANG_PORTUGUESE} "Remover chaves de registo" ;LangString remove_conf ${LANG_ENGLISH} "Remove configuration files" @@ -49,12 +49,12 @@ ;LangString remove_firewall ${LANG_ENGLISH} "Remove Windows Firewall rule" LangString remove_firewall ${LANG_PORTUGUESE} "Remover regra da firewall do Windows" ;LangString remove_firewallinfo ${LANG_ENGLISH} "Removing Windows Firewall rule" -LangString remove_firewallinfo ${LANG_PORTUGUESE} "Removendo regra da firewall do Windows" +LangString remove_firewallinfo ${LANG_PORTUGUESE} "A remover regra da firewall do Windows" ;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data" LangString remove_cache ${LANG_PORTUGUESE} "Remover torrents e dados guardados" ;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling." -LangString uninst_warning ${LANG_PORTUGUESE} "O qBittorrent est?? a ser executado. Feche a aplica????o antes de desinstalar esta vers??o." +LangString uninst_warning ${LANG_PORTUGUESE} "O qBittorrent est?? a ser executado. Por favor, feche a aplica????o antes de desinstalar esta vers??o." ;LangString uninst_tor_warn ${LANG_ENGLISH} "Not removing .torrent association. It is associated with:" -LangString uninst_tor_warn ${LANG_PORTUGUESE} "Associa????o .torrent n??o removida. Ficheiros associados a:" +LangString uninst_tor_warn ${LANG_PORTUGUESE} "N??o pode remover a associa????o do .torrent. Est?? associado a:" ;LangString uninst_mag_warn ${LANG_ENGLISH} "Not removing magnet association. It is associated with:" -LangString uninst_mag_warn ${LANG_PORTUGUESE} "Associa????o magnet n?? removida. Liga????es associadas a:" +LangString uninst_mag_warn ${LANG_PORTUGUESE} "N??o pode remover a associa????o do magnet. Est?? associado a:" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/dist/windows/options.nsi new/qbittorrent-4.4.4/dist/windows/options.nsi --- old/qbittorrent-4.4.3.1/dist/windows/options.nsi 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/dist/windows/options.nsi 2022-08-22 14:45:31.000000000 +0200 @@ -28,7 +28,7 @@ !define CSIDL_LOCALAPPDATA '0x1C' ;Local Application Data path ; Program specific -!define PROG_VERSION "4.4.3.1" +!define PROG_VERSION "4.4.4" !define MUI_FINISHPAGE_RUN !define MUI_FINISHPAGE_RUN_FUNCTION PageFinishRun @@ -55,7 +55,7 @@ VIAddVersionKey "FileDescription" "qBittorrent - A Bittorrent Client" VIAddVersionKey "FileVersion" "${PROG_VERSION}" -VIProductVersion "${PROG_VERSION}" +VIProductVersion "${PROG_VERSION}.0" ; The default installation directory. It changes depending if we install in the 64bit dir or not. ; A caveat of this is if a user has installed a 32bit version and then runs the 64bit installer diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/app/application.cpp new/qbittorrent-4.4.4/src/app/application.cpp --- old/qbittorrent-4.4.3.1/src/app/application.cpp 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/app/application.cpp 2022-08-22 14:45:31.000000000 +0200 @@ -220,7 +220,9 @@ return; m_storeMemoryWorkingSetLimit = size; +#ifdef QBT_USES_LIBTORRENT2 applyMemoryWorkingSetLimit(); +#endif } #endif @@ -621,7 +623,7 @@ int Application::exec(const QStringList ¶ms) { -#ifdef Q_OS_WIN +#if (defined(Q_OS_WIN) && defined(QBT_USES_LIBTORRENT2)) applyMemoryWorkingSetLimit(); #endif @@ -794,7 +796,7 @@ } #endif -#ifdef Q_OS_WIN +#if (defined(Q_OS_WIN) && defined(QBT_USES_LIBTORRENT2)) void Application::applyMemoryWorkingSetLimit() { const SIZE_T UNIT_SIZE = 1024 * 1024; // MiB diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/app/application.h new/qbittorrent-4.4.4/src/app/application.h --- old/qbittorrent-4.4.3.1/src/app/application.h 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/app/application.h 2022-08-22 14:45:31.000000000 +0200 @@ -126,7 +126,7 @@ #endif private: -#ifdef Q_OS_WIN +#if (defined(Q_OS_WIN) && defined(QBT_USES_LIBTORRENT2)) void applyMemoryWorkingSetLimit(); #endif void initializeTranslation(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/base/bittorrent/session.cpp new/qbittorrent-4.4.4/src/base/bittorrent/session.cpp --- old/qbittorrent-4.4.3.1/src/base/bittorrent/session.cpp 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/base/bittorrent/session.cpp 2022-08-22 14:45:31.000000000 +0200 @@ -1335,7 +1335,7 @@ // Outgoing ports settingsPack.set_int(lt::settings_pack::outgoing_port, outgoingPortsMin()); - settingsPack.set_int(lt::settings_pack::num_outgoing_ports, outgoingPortsMax() - outgoingPortsMin() + 1); + settingsPack.set_int(lt::settings_pack::num_outgoing_ports, (outgoingPortsMax() - outgoingPortsMin())); // UPnP lease duration settingsPack.set_int(lt::settings_pack::upnp_lease_duration, UPnPLeaseDuration()); // Type of service @@ -3061,6 +3061,11 @@ if (!setProcessInformation) // only available on Windows >= 8 return; + using SETTHREADINFORMATION = BOOL (WINAPI *)(HANDLE, THREAD_INFORMATION_CLASS, LPVOID, DWORD); + const auto setThreadInformation = Utils::Misc::loadWinAPI<SETTHREADINFORMATION>("Kernel32.dll", "SetThreadInformation"); + if (!setThreadInformation) // only available on Windows >= 8 + return; + #if (_WIN32_WINNT < _WIN32_WINNT_WIN8) // this dummy struct is required to compile successfully when targeting older Windows version struct MEMORY_PRIORITY_INFORMATION @@ -3097,6 +3102,11 @@ break; } setProcessInformation(::GetCurrentProcess(), ProcessMemoryPriority, &prioInfo, sizeof(prioInfo)); + + // To avoid thrashing/sluggishness of the app, set "main event loop" thread to normal memory priority + // which is higher/equal than other threads + prioInfo.MemoryPriority = MEMORY_PRIORITY_NORMAL; + setThreadInformation(::GetCurrentThread(), ThreadMemoryPriority, &prioInfo, sizeof(prioInfo)); } #endif @@ -4527,6 +4537,24 @@ } } + Algorithm::removeIf(resumeData.tags, [this, &torrentID](const QString &tag) + { + if (hasTag(tag)) + return false; + + if (addTag(tag)) + { + LogMsg(tr("Detected inconsistent data: tag is missing from the configuration file." + " Tag will be recovered." + " Torrent: \"%1\". Tag: \"%2\"").arg(torrentID.toString(), tag), Log::WARNING); + return false; + } + + LogMsg(tr("Detected inconsistent data: invalid tag. Torrent: \"%1\". Tag: \"%2\"") + .arg(torrentID.toString(), tag), Log::WARNING); + return true; + }); + qDebug() << "Starting up torrent" << torrentID.toString() << "..."; if (!loadTorrent(resumeData)) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/base/net/downloadhandlerimpl.cpp new/qbittorrent-4.4.4/src/base/net/downloadhandlerimpl.cpp --- old/qbittorrent-4.4.3.1/src/base/net/downloadhandlerimpl.cpp 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/base/net/downloadhandlerimpl.cpp 2022-08-22 14:45:31.000000000 +0200 @@ -34,10 +34,13 @@ #include "base/3rdparty/expected.hpp" #include "base/utils/fs.h" -#include "base/utils/gzip.h" #include "base/utils/io.h" #include "base/utils/misc.h" +#ifdef QT_NO_COMPRESS +#include "base/utils/gzip.h" +#endif + const int MAX_REDIRECTIONS = 20; // the common value for web browsers namespace @@ -121,9 +124,13 @@ } // Success +#ifdef QT_NO_COMPRESS m_result.data = (m_reply->rawHeader("Content-Encoding") == "gzip") ? Utils::Gzip::decompress(m_reply->readAll()) : m_reply->readAll(); +#else + m_result.data = m_reply->readAll(); +#endif if (m_downloadRequest.saveToFile()) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/base/net/downloadmanager.cpp new/qbittorrent-4.4.4/src/base/net/downloadmanager.cpp --- old/qbittorrent-4.4.3.1/src/base/net/downloadmanager.cpp 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/base/net/downloadmanager.cpp 2022-08-22 14:45:31.000000000 +0200 @@ -123,8 +123,12 @@ // Spoof HTTP Referer to allow adding torrent link from Torcache/KickAssTorrents request.setRawHeader("Referer", request.url().toEncoded().data()); - // Accept gzip +#ifdef QT_NO_COMPRESS + // The macro "QT_NO_COMPRESS" defined in QT will disable the zlib releated features + // and reply data auto-decompression in QT will also be disabled. But we can support + // gzip encoding and manually decompress the reply data. request.setRawHeader("Accept-Encoding", "gzip"); +#endif // Qt doesn't support Magnet protocol so we need to handle redirections manually request.setAttribute(QNetworkRequest::RedirectPolicyAttribute, QNetworkRequest::ManualRedirectPolicy); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/base/rss/rss_parser.cpp new/qbittorrent-4.4.4/src/base/rss/rss_parser.cpp --- old/qbittorrent-4.4.3.1/src/base/rss/rss_parser.cpp 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/base/rss/rss_parser.cpp 2022-08-22 14:45:31.000000000 +0200 @@ -556,7 +556,7 @@ // read and create items from a rss document void Parser::parse_impl(const QByteArray &feedData) { - QXmlStreamReader xml(feedData); + QXmlStreamReader xml {feedData}; XmlStreamEntityResolver resolver; xml.setEntityResolver(&resolver); bool foundChannel = false; @@ -603,7 +603,8 @@ } emit finished(m_result); - m_result.articles.clear(); // clear articles only + m_result.articles.clear(); + m_result.error.clear(); m_articleIDs.clear(); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/base/version.h.in new/qbittorrent-4.4.4/src/base/version.h.in --- old/qbittorrent-4.4.3.1/src/base/version.h.in 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/base/version.h.in 2022-08-22 14:45:31.000000000 +0200 @@ -30,8 +30,8 @@ #define QBT_VERSION_MAJOR 4 #define QBT_VERSION_MINOR 4 -#define QBT_VERSION_BUGFIX 3 -#define QBT_VERSION_BUILD 1 +#define QBT_VERSION_BUGFIX 4 +#define QBT_VERSION_BUILD 0 #define QBT_VERSION_STATUS "" // Should be empty for stable releases! #define QBT__STRINGIFY(x) #x diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/CMakeLists.txt new/qbittorrent-4.4.4/src/gui/CMakeLists.txt --- old/qbittorrent-4.4.3.1/src/gui/CMakeLists.txt 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/gui/CMakeLists.txt 2022-08-22 14:45:31.000000000 +0200 @@ -204,8 +204,10 @@ if (DBUS) target_sources(qbt_gui PRIVATE - qtnotify/notifications.h - qtnotify/notifications.cpp + notifications/dbusnotifier.h + notifications/dbusnotifier.cpp + notifications/dbusnotificationsinterface.h + notifications/dbusnotificationsinterface.cpp powermanagement/powermanagement_x11.h powermanagement/powermanagement_x11.cpp ) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/advancedsettings.cpp new/qbittorrent-4.4.4/src/gui/advancedsettings.cpp --- old/qbittorrent-4.4.3.1/src/gui/advancedsettings.cpp 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/gui/advancedsettings.cpp 2022-08-22 14:45:31.000000000 +0200 @@ -62,9 +62,11 @@ // qBittorrent section QBITTORRENT_HEADER, RESUME_DATA_STORAGE, +#if (defined(Q_OS_WIN) && defined(QBT_USES_LIBTORRENT2)) + MEMORY_WORKING_SET_LIMIT, +#endif #if defined(Q_OS_WIN) OS_MEMORY_PRIORITY, - MEMORY_WORKING_SET_LIMIT, #endif // network interface NETWORK_IFACE, @@ -198,8 +200,10 @@ } session->setOSMemoryPriority(prio); +#ifdef QBT_USES_LIBTORRENT2 static_cast<Application *>(QCoreApplication::instance())->setMemoryWorkingSetLimit(m_spinBoxMemoryWorkingSetLimit.value()); #endif +#endif // Async IO threads session->setAsyncIOThreads(m_spinBoxAsyncIOThreads.value()); #ifdef QBT_USES_LIBTORRENT2 @@ -443,6 +447,7 @@ + ' ' + makeLink("https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/ns-processthreadsapi-memory_priority_information", "(?)")) , &m_comboBoxOSMemoryPriority); +#ifdef QBT_USES_LIBTORRENT2 m_spinBoxMemoryWorkingSetLimit.setMinimum(1); m_spinBoxMemoryWorkingSetLimit.setMaximum(std::numeric_limits<int>::max()); m_spinBoxMemoryWorkingSetLimit.setSuffix(tr(" MiB")); @@ -452,6 +457,7 @@ + ' ' + makeLink("https://wikipedia.org/wiki/Working_set", "(?)")) , &m_spinBoxMemoryWorkingSetLimit); #endif +#endif // Async IO threads m_spinBoxAsyncIOThreads.setMinimum(1); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/advancedsettings.h new/qbittorrent-4.4.4/src/gui/advancedsettings.h --- old/qbittorrent-4.4.3.1/src/gui/advancedsettings.h 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/gui/advancedsettings.h 2022-08-22 14:45:31.000000000 +0200 @@ -82,8 +82,10 @@ // OS dependent settings #if defined(Q_OS_WIN) QComboBox m_comboBoxOSMemoryPriority; +#ifdef QBT_USES_LIBTORRENT2 QSpinBox m_spinBoxMemoryWorkingSetLimit; #endif +#endif #ifndef Q_OS_MACOS QCheckBox m_checkBoxIconsInMenusEnabled; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/gui.pri new/qbittorrent-4.4.4/src/gui/gui.pri --- old/qbittorrent-4.4.3.1/src/gui/gui.pri 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/gui/gui.pri 2022-08-22 14:45:31.000000000 +0200 @@ -169,12 +169,14 @@ unix:!macx:dbus { HEADERS += \ - $$PWD/powermanagement/powermanagement_x11.h \ - $$PWD/qtnotify/notifications.h + $$PWD/notifications/dbusnotifier.h \ + $$PWD/notifications/dbusnotificationsinterface.h \ + $$PWD/powermanagement/powermanagement_x11.h SOURCES += \ - $$PWD/powermanagement/powermanagement_x11.cpp \ - $$PWD/qtnotify/notifications.cpp + $$PWD/notifications/dbusnotifier.cpp \ + $$PWD/notifications/dbusnotificationsinterface.cpp \ + $$PWD/powermanagement/powermanagement_x11.cpp } macx { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/macutilities.mm new/qbittorrent-4.4.4/src/gui/macutilities.mm --- old/qbittorrent-4.4.3.1/src/gui/macutilities.mm 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/gui/macutilities.mm 2022-08-22 14:45:31.000000000 +0200 @@ -104,7 +104,15 @@ for (const auto &path : pathsList) [pathURLs addObject:[NSURL fileURLWithPath:path.toNSString()]]; - [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:pathURLs]; + // In some unknown way, the next line affects Qt's main loop causing the crash + // in QApplication::exec() on processing next event after this call. + // Even crash doesn't happen exactly after this call, it will happen on + // application exit. Call stack and disassembly are the same in all cases. + // But running it in another thread (aka in background) solves the issue. + dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^ + { + [[NSWorkspace sharedWorkspace] activateFileViewerSelectingURLs:pathURLs]; + }); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/mainwindow.cpp new/qbittorrent-4.4.4/src/gui/mainwindow.cpp --- old/qbittorrent-4.4.3.1/src/gui/mainwindow.cpp 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/gui/mainwindow.cpp 2022-08-22 14:45:31.000000000 +0200 @@ -48,9 +48,8 @@ #include <QtGlobal> #include <QTimer> -#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB) -#include <QDBusConnection> -#include "qtnotify/notifications.h" +#ifdef QBT_USES_CUSTOMDBUSNOTIFICATIONS +#include "notifications/dbusnotifier.h" #endif #include "base/bittorrent/session.h" @@ -128,7 +127,7 @@ , m_storeNotificationEnabled(NOTIFICATIONS_SETTINGS_KEY("Enabled")) , m_storeNotificationTorrentAdded(NOTIFICATIONS_SETTINGS_KEY("TorrentAdded")) , m_storeExecutionLogTypes(EXECUTIONLOG_SETTINGS_KEY("Types"), Log::MsgType::ALL) -#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB) +#ifdef QBT_USES_CUSTOMDBUSNOTIFICATIONS , m_storeNotificationTimeOut(NOTIFICATIONS_SETTINGS_KEY("Timeout")) #endif { @@ -182,6 +181,14 @@ m_ui->actionLock->setVisible(true); }); +#ifdef QBT_USES_CUSTOMDBUSNOTIFICATIONS + if (isNotificationsEnabled()) + { + m_notifier = new DBusNotifier(this); + connect(m_notifier, &DBusNotifier::messageClicked, this, &MainWindow::balloonClicked); + } +#endif + // Creating Bittorrent session updateAltSpeedsBtn(BitTorrent::Session::instance()->isAltGlobalSpeedLimitEnabled()); @@ -508,9 +515,25 @@ return m_storeNotificationEnabled.get(true); } -void MainWindow::setNotificationsEnabled(bool value) +void MainWindow::setNotificationsEnabled(const bool value) { + if (m_storeNotificationEnabled == value) + return; + m_storeNotificationEnabled = value; + +#ifdef QBT_USES_CUSTOMDBUSNOTIFICATIONS + if (value) + { + m_notifier = new DBusNotifier(this); + connect(m_notifier, &DBusNotifier::messageClicked, this, &MainWindow::balloonClicked); + } + else + { + delete m_notifier; + m_notifier = nullptr; + } +#endif } bool MainWindow::isTorrentAddedNotificationsEnabled() const @@ -1646,27 +1669,8 @@ if (!isNotificationsEnabled()) return; -#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB) - OrgFreedesktopNotificationsInterface notifications(QLatin1String("org.freedesktop.Notifications") - , QLatin1String("/org/freedesktop/Notifications") - , QDBusConnection::sessionBus()); - - // Testing for 'notifications.isValid()' isn't helpful here. - // If the notification daemon is configured to run 'as needed' - // the above check can be false if the daemon wasn't started - // by another application. In this case DBus will be able to - // start the notification daemon and complete our request. Such - // a daemon is xfce4-notifyd, DBus autostarts it and after - // some inactivity shuts it down. Other DEs, like GNOME, choose - // to start their daemons at the session startup and have it sit - // idling for the whole session. - const QVariantMap hints {{QLatin1String("desktop-entry"), QLatin1String("org.qbittorrent.qBittorrent")}}; - QDBusPendingReply<uint> reply = notifications.Notify(QLatin1String("qBittorrent"), 0 - , QLatin1String("qbittorrent"), title, msg, {}, hints, getNotificationTimeout()); - - reply.waitForFinished(); - if (!reply.isError()) - return; +#ifdef QBT_USES_CUSTOMDBUSNOTIFICATIONS + m_notifier->showMessage(title, msg, getNotificationTimeout()); #elif defined(Q_OS_MACOS) MacUtils::displayNotification(title, msg); #else @@ -1713,7 +1717,9 @@ m_systrayIcon->setContextMenu(m_trayIconMenu); connect(m_systrayIcon, &QSystemTrayIcon::activated, this, &MainWindow::toggleVisibility); +#ifndef QBT_USES_CUSTOMDBUSNOTIFICATIONS connect(m_systrayIcon, &QSystemTrayIcon::messageClicked, this, &MainWindow::balloonClicked); +#endif m_systrayIcon->show(); emit systemTrayIconCreated(); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/mainwindow.h new/qbittorrent-4.4.4/src/gui/mainwindow.h --- old/qbittorrent-4.4.3.1/src/gui/mainwindow.h 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/gui/mainwindow.h 2022-08-22 14:45:31.000000000 +0200 @@ -71,6 +71,11 @@ class MainWindow; } +#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB) +#define QBT_USES_CUSTOMDBUSNOTIFICATIONS +class DBusNotifier; +#endif + class MainWindow final : public QMainWindow { Q_OBJECT @@ -261,8 +266,9 @@ SettingValue<bool> m_storeNotificationTorrentAdded; CachedSettingValue<Log::MsgTypes> m_storeExecutionLogTypes; -#if (defined(Q_OS_UNIX) && !defined(Q_OS_MACOS)) && defined(QT_DBUS_LIB) +#ifdef QBT_USES_CUSTOMDBUSNOTIFICATIONS SettingValue<int> m_storeNotificationTimeOut; + DBusNotifier *m_notifier = nullptr; #endif #if defined(Q_OS_WIN) || defined(Q_OS_MACOS) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/notifications/dbusnotificationsinterface.cpp new/qbittorrent-4.4.4/src/gui/notifications/dbusnotificationsinterface.cpp --- old/qbittorrent-4.4.3.1/src/gui/notifications/dbusnotificationsinterface.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/qbittorrent-4.4.4/src/gui/notifications/dbusnotificationsinterface.cpp 2022-08-22 14:45:31.000000000 +0200 @@ -0,0 +1,74 @@ +/* + * Bittorrent Client using Qt and libtorrent. + * Copyright (C) 2022 Vladimir Golovnev <glas...@yandex.ru> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * In addition, as a special exception, the copyright holders give permission to + * link this program with the OpenSSL project's "OpenSSL" library (or with + * modified versions of it that use the same license as the "OpenSSL" library), + * and distribute the linked executables. You must obey the GNU General Public + * License in all respects for all of the code used other than "OpenSSL". If you + * modify file(s), you may extend this exception to your version of the file(s), + * but you are not obligated to do so. If you do not wish to do so, delete this + * exception statement from your version. + */ + +#include "dbusnotificationsinterface.h" + +#include <QDBusConnection> +#include <QString> +#include <QVariant> + +DBusNotificationsInterface::DBusNotificationsInterface(const QString &service + , const QString &path, const QDBusConnection &connection, QObject *parent) + : QDBusAbstractInterface(service, path, DBUS_INTERFACE_NAME, connection, parent) +{ +} + +QDBusPendingReply<QStringList> DBusNotificationsInterface::getCapabilities() +{ + return asyncCall(QLatin1String("GetCapabilities")); +} + +QDBusPendingReply<QString, QString, QString, QString> DBusNotificationsInterface::getServerInformation() +{ + return asyncCall(QLatin1String("GetServerInformation")); +} + +QDBusReply<QString> DBusNotificationsInterface::getServerInformation(QString &vendor, QString &version, QString &specVersion) +{ + const QDBusMessage reply = call(QDBus::Block, QLatin1String("GetServerInformation")); + if ((reply.type() == QDBusMessage::ReplyMessage) && (reply.arguments().count() == 4)) + { + vendor = qdbus_cast<QString>(reply.arguments().at(1)); + version = qdbus_cast<QString>(reply.arguments().at(2)); + specVersion = qdbus_cast<QString>(reply.arguments().at(3)); + } + + return reply; +} + +QDBusPendingReply<uint> DBusNotificationsInterface::notify(const QString &appName + , const uint id, const QString &icon, const QString &summary, const QString &body + , const QStringList &actions, const QVariantMap &hints, const int timeout) +{ + return asyncCall(QLatin1String("Notify"), appName, id, icon, summary, body, actions, hints, timeout); +} + +QDBusPendingReply<> DBusNotificationsInterface::closeNotification(const uint id) +{ + return asyncCall(QLatin1String("CloseNotification"), id); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/notifications/dbusnotificationsinterface.h new/qbittorrent-4.4.4/src/gui/notifications/dbusnotificationsinterface.h --- old/qbittorrent-4.4.3.1/src/gui/notifications/dbusnotificationsinterface.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qbittorrent-4.4.4/src/gui/notifications/dbusnotificationsinterface.h 2022-08-22 14:45:31.000000000 +0200 @@ -0,0 +1,64 @@ +/* + * Bittorrent Client using Qt and libtorrent. + * Copyright (C) 2022 Vladimir Golovnev <glas...@yandex.ru> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * In addition, as a special exception, the copyright holders give permission to + * link this program with the OpenSSL project's "OpenSSL" library (or with + * modified versions of it that use the same license as the "OpenSSL" library), + * and distribute the linked executables. You must obey the GNU General Public + * License in all respects for all of the code used other than "OpenSSL". If you + * modify file(s), you may extend this exception to your version of the file(s), + * but you are not obligated to do so. If you do not wish to do so, delete this + * exception statement from your version. + */ + +#pragma once + +#include <QDBusAbstractInterface> +#include <QDBusPendingReply> +#include <QDBusReply> +#include <QStringList> + +class QDBusConnection; +class QString; +class QVariant; + +class DBusNotificationsInterface final : public QDBusAbstractInterface +{ + Q_OBJECT + Q_DISABLE_COPY_MOVE(DBusNotificationsInterface) + +public: + inline static const char DBUS_INTERFACE_NAME[] = "org.freedesktop.Notifications"; + + DBusNotificationsInterface(const QString &service, const QString &path + , const QDBusConnection &connection, QObject *parent = nullptr); + +public slots: + QDBusPendingReply<QStringList> getCapabilities(); + QDBusPendingReply<QString, QString, QString, QString> getServerInformation(); + QDBusReply<QString> getServerInformation(QString &vendor, QString &version, QString &specVersion); + QDBusPendingReply<uint> notify(const QString &appName + , uint id, const QString &icon, const QString &summary, const QString &body + , const QStringList &actions, const QVariantMap &hints, int timeout); + QDBusPendingReply<> closeNotification(uint id); + +signals: + // Signal names must exactly match the ones from corresponding D-Bus interface + void ActionInvoked(uint id, const QString &action); + void NotificationClosed(uint id, uint reason); +}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/notifications/dbusnotifier.cpp new/qbittorrent-4.4.4/src/gui/notifications/dbusnotifier.cpp --- old/qbittorrent-4.4.3.1/src/gui/notifications/dbusnotifier.cpp 1970-01-01 01:00:00.000000000 +0100 +++ new/qbittorrent-4.4.4/src/gui/notifications/dbusnotifier.cpp 2022-08-22 14:45:31.000000000 +0200 @@ -0,0 +1,93 @@ +/* + * Bittorrent Client using Qt and libtorrent. + * Copyright (C) 2022 Vladimir Golovnev <glas...@yandex.ru> + * Copyright (C) 2006 Christophe Dumez <ch...@qbittorrent.org> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * In addition, as a special exception, the copyright holders give permission to + * link this program with the OpenSSL project's "OpenSSL" library (or with + * modified versions of it that use the same license as the "OpenSSL" library), + * and distribute the linked executables. You must obey the GNU General Public + * License in all respects for all of the code used other than "OpenSSL". If you + * modify file(s), you may extend this exception to your version of the file(s), + * but you are not obligated to do so. If you do not wish to do so, delete this + * exception statement from your version. + */ + +#include "dbusnotifier.h" + +#include <QDBusConnection> +#include <QDBusPendingCallWatcher> +#include <QDBusPendingReply> + +#include "dbusnotificationsinterface.h" + +DBusNotifier::DBusNotifier(QObject *parent) + : QObject(parent) + , m_notificationsInterface {new DBusNotificationsInterface(QLatin1String("org.freedesktop.Notifications") + , QLatin1String("/org/freedesktop/Notifications"), QDBusConnection::sessionBus(), this)} +{ + // Testing for 'DBusNotificationsInterface::isValid()' isn't helpful here. + // If the notification daemon is configured to run 'as needed' + // the above check can be false if the daemon wasn't started + // by another application. In this case DBus will be able to + // start the notification daemon and complete our request. Such + // a daemon is xfce4-notifyd, DBus autostarts it and after + // some inactivity shuts it down. Other DEs, like GNOME, choose + // to start their daemons at the session startup and have it sit + // idling for the whole session. + + connect(m_notificationsInterface, &DBusNotificationsInterface::ActionInvoked, this, &DBusNotifier::onActionInvoked); + connect(m_notificationsInterface, &DBusNotificationsInterface::NotificationClosed, this, &DBusNotifier::onNotificationClosed); +} + +void DBusNotifier::showMessage(const QString &title, const QString &message, const int timeout) +{ + // Assign "default" action to notification to make it clickable + const QStringList actions {QLatin1String("default"), {}}; + const QVariantMap hints {{QLatin1String("desktop-entry"), QLatin1String("org.qbittorrent.qBittorrent")}}; + const QDBusPendingReply<uint> reply = m_notificationsInterface->notify(QLatin1String("qBittorrent"), 0 + , QLatin1String("qbittorrent"), title, message, actions, hints, timeout); + auto *watcher = new QDBusPendingCallWatcher(reply, this); + connect(watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *self) + { + const QDBusPendingReply<uint> reply = *self; + if (!reply.isError()) + { + const uint messageID = reply.value(); + m_activeMessages.insert(messageID); + } + + self->deleteLater(); + }); +} + +void DBusNotifier::onActionInvoked(const uint messageID, const QString &action) +{ + Q_UNUSED(action); + + // Check whether the notification is sent by qBittorrent + // to avoid reacting to unrelated notifictions + if (m_activeMessages.contains(messageID)) + emit messageClicked(); +} + +void DBusNotifier::onNotificationClosed(const uint messageID, const uint reason) +{ + Q_UNUSED(reason); + + m_activeMessages.remove(messageID); +} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/notifications/dbusnotifier.h new/qbittorrent-4.4.4/src/gui/notifications/dbusnotifier.h --- old/qbittorrent-4.4.3.1/src/gui/notifications/dbusnotifier.h 1970-01-01 01:00:00.000000000 +0100 +++ new/qbittorrent-4.4.4/src/gui/notifications/dbusnotifier.h 2022-08-22 14:45:31.000000000 +0200 @@ -0,0 +1,56 @@ +/* + * Bittorrent Client using Qt and libtorrent. + * Copyright (C) 2022 Vladimir Golovnev <glas...@yandex.ru> + * Copyright (C) 2006 Christophe Dumez <ch...@qbittorrent.org> + * + * This program is free software; you can redistribute it and/or + * modify it under the terms of the GNU General Public License + * as published by the Free Software Foundation; either version 2 + * of the License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + * + * In addition, as a special exception, the copyright holders give permission to + * link this program with the OpenSSL project's "OpenSSL" library (or with + * modified versions of it that use the same license as the "OpenSSL" library), + * and distribute the linked executables. You must obey the GNU General Public + * License in all respects for all of the code used other than "OpenSSL". If you + * modify file(s), you may extend this exception to your version of the file(s), + * but you are not obligated to do so. If you do not wish to do so, delete this + * exception statement from your version. + */ + +#pragma once + +#include <QObject> +#include <QSet> + +class DBusNotificationsInterface; + +class DBusNotifier final : public QObject +{ + Q_OBJECT + Q_DISABLE_COPY_MOVE(DBusNotifier) + +public: + explicit DBusNotifier(QObject *parent = nullptr); + + void showMessage(const QString &title, const QString &message, int timeout); + +signals: + void messageClicked(); + +private: + void onActionInvoked(uint messageID, const QString &action); + void onNotificationClosed(uint messageID, uint reason); + + DBusNotificationsInterface *m_notificationsInterface = nullptr; + QSet<uint> m_activeMessages; +}; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/properties/piecesbar.cpp new/qbittorrent-4.4.4/src/gui/properties/piecesbar.cpp --- old/qbittorrent-4.4.3.1/src/gui/properties/piecesbar.cpp 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/gui/properties/piecesbar.cpp 2022-08-22 14:45:31.000000000 +0200 @@ -282,7 +282,7 @@ for (int f : files) { - const QString filePath {torrentInfo.filePath(f)}; + const QString filePath {m_torrent->filePath(f)}; renderer(Utils::Misc::friendlyUnit(torrentInfo.fileSize(f)), filePath); } stream << "</body></html>"; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/qtnotify/notifications.cpp new/qbittorrent-4.4.4/src/gui/qtnotify/notifications.cpp --- old/qbittorrent-4.4.3.1/src/gui/qtnotify/notifications.cpp 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/gui/qtnotify/notifications.cpp 1970-01-01 01:00:00.000000000 +0100 @@ -1,25 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp -p notifications.h:notifications.cpp notifications.xml - * - * qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd. - * - * This is an auto-generated file. - * This file may have been hand-edited. Look for HAND-EDIT comments - * before re-generating it. - */ - -#include "notifications.h" - -/* - * Implementation of interface class OrgFreedesktopNotificationsInterface - */ - -OrgFreedesktopNotificationsInterface::OrgFreedesktopNotificationsInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent) - : QDBusAbstractInterface(service, path, staticInterfaceName(), connection, parent) -{ -} - -OrgFreedesktopNotificationsInterface::~OrgFreedesktopNotificationsInterface() -{ -} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/qtnotify/notifications.h new/qbittorrent-4.4.4/src/gui/qtnotify/notifications.h --- old/qbittorrent-4.4.3.1/src/gui/qtnotify/notifications.h 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/gui/qtnotify/notifications.h 1970-01-01 01:00:00.000000000 +0100 @@ -1,84 +0,0 @@ -/* - * This file was generated by qdbusxml2cpp version 0.8 - * Command line was: qdbusxml2cpp -p notifications.h:notifications.cpp notifications.xml - * - * qdbusxml2cpp is Copyright (C) 2020 The Qt Company Ltd. - * - * This is an auto-generated file. - * Do not edit! All changes made to it will be lost. - */ - -#ifndef NOTIFICATIONS_H -#define NOTIFICATIONS_H - -#include <QtCore/QObject> -#include <QtCore/QByteArray> -#include <QtCore/QList> -#include <QtCore/QMap> -#include <QtCore/QString> -#include <QtCore/QStringList> -#include <QtCore/QVariant> -#include <QtDBus/QtDBus> - -/* - * Proxy class for interface org.freedesktop.Notifications - */ -class OrgFreedesktopNotificationsInterface: public QDBusAbstractInterface -{ - Q_OBJECT -public: - static inline const char *staticInterfaceName() - { return "org.freedesktop.Notifications"; } - -public: - OrgFreedesktopNotificationsInterface(const QString &service, const QString &path, const QDBusConnection &connection, QObject *parent = nullptr); - - ~OrgFreedesktopNotificationsInterface(); - -public Q_SLOTS: // METHODS - inline QDBusPendingReply<> CloseNotification(uint id) - { - QList<QVariant> argumentList; - argumentList << QVariant::fromValue(id); - return asyncCallWithArgumentList(QStringLiteral("CloseNotification"), argumentList); - } - - inline QDBusPendingReply<QStringList> GetCapabilities() - { - QList<QVariant> argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetCapabilities"), argumentList); - } - - inline QDBusPendingReply<QString, QString, QString, QString> GetServerInformation() - { - QList<QVariant> argumentList; - return asyncCallWithArgumentList(QStringLiteral("GetServerInformation"), argumentList); - } - inline QDBusReply<QString> GetServerInformation(QString &return_vendor, QString &return_version, QString &return_spec_version) - { - QList<QVariant> argumentList; - QDBusMessage reply = callWithArgumentList(QDBus::Block, QStringLiteral("GetServerInformation"), argumentList); - if (reply.type() == QDBusMessage::ReplyMessage && reply.arguments().count() == 4) { - return_vendor = qdbus_cast<QString>(reply.arguments().at(1)); - return_version = qdbus_cast<QString>(reply.arguments().at(2)); - return_spec_version = qdbus_cast<QString>(reply.arguments().at(3)); - } - return reply; - } - - inline QDBusPendingReply<uint> Notify(const QString &app_name, uint id, const QString &icon, const QString &summary, const QString &body, const QStringList &actions, const QVariantMap &hints, int timeout) - { - QList<QVariant> argumentList; - argumentList << QVariant::fromValue(app_name) << QVariant::fromValue(id) << QVariant::fromValue(icon) << QVariant::fromValue(summary) << QVariant::fromValue(body) << QVariant::fromValue(actions) << QVariant::fromValue(hints) << QVariant::fromValue(timeout); - return asyncCallWithArgumentList(QStringLiteral("Notify"), argumentList); - } - -Q_SIGNALS: // SIGNALS -}; - -namespace org { - namespace freedesktop { - typedef ::OrgFreedesktopNotificationsInterface Notifications; - } -} -#endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/gui/qtnotify/notifications.xml new/qbittorrent-4.4.4/src/gui/qtnotify/notifications.xml --- old/qbittorrent-4.4.3.1/src/gui/qtnotify/notifications.xml 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/gui/qtnotify/notifications.xml 1970-01-01 01:00:00.000000000 +0100 @@ -1,30 +0,0 @@ -<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" -"http://www.freedesktop.org/standards/dbus/1.0/introspect.dtd"> -<node> - <interface name="org.freedesktop.Notifications"> - <method name="GetServerInformation"> - <arg name="return_name" type="s" direction="out"/> - <arg name="return_vendor" type="s" direction="out"/> - <arg name="return_version" type="s" direction="out"/> - <arg name="return_spec_version" type="s" direction="out"/> - </method> - <method name="GetCapabilities"> - <arg name="return_caps" type="as" direction="out"/> - </method> - <method name="CloseNotification"> - <arg name="id" type="u" direction="in"/> - </method> - <method name="Notify"> - <arg name="app_name" type="s" direction="in"/> - <arg name="id" type="u" direction="in"/> - <arg name="icon" type="s" direction="in"/> - <arg name="summary" type="s" direction="in"/> - <arg name="body" type="s" direction="in"/> - <arg name="actions" type="as" direction="in"/> - <arg name="hints" type="a{sv}" direction="in"/> - <annotation name="org.qtproject.QtDBus.QtTypeName.In6" value="QVariantMap"/> - <arg name="timeout" type="i" direction="in"/> - <arg name="return_id" type="u" direction="out"/> - </method> - </interface> -</node> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/webui/webapplication.cpp new/qbittorrent-4.4.4/src/webui/webapplication.cpp --- old/qbittorrent-4.4.3.1/src/webui/webapplication.cpp 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/webui/webapplication.cpp 2022-08-22 14:45:31.000000000 +0200 @@ -276,6 +276,20 @@ if (!session() && !isPublicAPI(scope, action)) throw ForbiddenHTTPError(); + // Filter HTTP methods + const auto allowedMethodIter = m_allowedMethod.find({scope, action}); + if (allowedMethodIter == m_allowedMethod.end()) + { + // by default allow both GET, POST methods + if ((m_request.method != Http::METHOD_GET) && (m_request.method != Http::METHOD_POST)) + throw MethodNotAllowedHTTPError(); + } + else + { + if (*allowedMethodIter != m_request.method) + throw MethodNotAllowedHTTPError(); + } + DataMap data; for (const Http::UploadedFile &torrent : request().files) data[torrent.filename] = torrent.data; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qbittorrent-4.4.3.1/src/webui/webapplication.h new/qbittorrent-4.4.4/src/webui/webapplication.h --- old/qbittorrent-4.4.3.1/src/webui/webapplication.h 2022-05-24 22:10:49.000000000 +0200 +++ new/qbittorrent-4.4.4/src/webui/webapplication.h 2022-08-22 14:45:31.000000000 +0200 @@ -28,6 +28,8 @@ #pragma once +#include <utility> + #include <QDateTime> #include <QElapsedTimer> #include <QHash> @@ -130,6 +132,20 @@ QHash<QString, APIController *> m_apiControllers; QSet<QString> m_publicAPIs; + const QHash<std::pair<QString, QString>, QString> m_allowedMethod = + { + // <<controller name, action name>, HTTP method> + // TODO: this list is incomplete + {{QLatin1String("app"), QLatin1String("setPreferences")}, Http::METHOD_POST}, + {{QLatin1String("app"), QLatin1String("shutdown")}, Http::METHOD_POST}, + {{QLatin1String("auth"), QLatin1String("login")}, Http::METHOD_POST}, + {{QLatin1String("auth"), QLatin1String("logout")}, Http::METHOD_POST}, + {{QLatin1String("rss"), QLatin1String("addFeed")}, Http::METHOD_POST}, + {{QLatin1String("search"), QLatin1String("installPlugin")}, Http::METHOD_POST}, + {{QLatin1String("torrents"), QLatin1String("add")}, Http::METHOD_POST}, + {{QLatin1String("torrents"), QLatin1String("addPeers")}, Http::METHOD_POST}, + {{QLatin1String("torrents"), QLatin1String("addTrackers")}, Http::METHOD_POST} + }; bool m_isAltUIUsed = false; QString m_rootFolder;