You've already forked qBittorrent
mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-10-14 11:52:15 +02:00
Compare commits
18 Commits
release-4.
...
release-4.
Author | SHA1 | Date | |
---|---|---|---|
![]() |
4a56c3f5df | ||
![]() |
b1e2e511bb | ||
![]() |
ac1fd66f05 | ||
![]() |
6431fe5f73 | ||
![]() |
c31931324d | ||
![]() |
f1d78563af | ||
![]() |
99b5983143 | ||
![]() |
c1e8849b40 | ||
![]() |
330f20171f | ||
![]() |
b53eadaec8 | ||
![]() |
26d78f6462 | ||
![]() |
9890bb7501 | ||
![]() |
c7daaf95fc | ||
![]() |
b760f37093 | ||
![]() |
7f5271ae7c | ||
![]() |
1130bf300a | ||
![]() |
3f142360ed | ||
![]() |
af07a98784 |
13
Changelog
13
Changelog
@@ -1,3 +1,16 @@
|
||||
Mon Aug 22 2022 - sledgehammer999 <sledgehammer999@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 <sledgehammer999@qbittorrent.org> - v4.4.3.1
|
||||
- BUGFIX: Fix broken translations (sledgehammer999)
|
||||
|
||||
|
20
configure
vendored
20
configure
vendored
@@ -1,6 +1,6 @@
|
||||
#! /bin/sh
|
||||
# Guess values for system-dependent variables and create Makefiles.
|
||||
# Generated by GNU Autoconf 2.71 for qbittorrent v4.4.3.1.
|
||||
# Generated by GNU Autoconf 2.71 for qbittorrent v4.4.4.
|
||||
#
|
||||
# Report bugs to <bugs.qbittorrent.org>.
|
||||
#
|
||||
@@ -611,8 +611,8 @@ MAKEFLAGS=
|
||||
# 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 @@ if test "$ac_init_help" = "long"; then
|
||||
# Omit some internal or obsolete options to make the list less imposing.
|
||||
# This message is too long to be a string in the A/UX 3.1 sh.
|
||||
cat <<_ACEOF
|
||||
\`configure' configures qbittorrent v4.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 @@ fi
|
||||
|
||||
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 @@ fi
|
||||
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 @@ cat >config.log <<_ACEOF
|
||||
This file contains any messages produced by compilers while
|
||||
running configure, to aid debugging if configure makes a mistake.
|
||||
|
||||
It was created by qbittorrent $as_me v4.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 @@ fi
|
||||
|
||||
# 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 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
|
||||
# report actual input values of CONFIG_FILES etc. instead of their
|
||||
# values after options handling.
|
||||
ac_log="
|
||||
This file was extended by qbittorrent $as_me v4.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 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
|
||||
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
|
||||
ac_cs_config='$ac_cs_config_escaped'
|
||||
ac_cs_version="\\
|
||||
qbittorrent config.status v4.4.3.1
|
||||
qbittorrent config.status v4.4.4
|
||||
configured by $0, generated by GNU Autoconf 2.71,
|
||||
with options \\"\$ac_cs_config\\"
|
||||
|
||||
|
@@ -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=""}
|
||||
|
2
dist/mac/Info.plist
vendored
2
dist/mac/Info.plist
vendored
@@ -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>
|
||||
|
@@ -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>
|
||||
|
10
dist/windows/installer-translations/italian.nsi
vendored
10
dist/windows/installer-translations/italian.nsi
vendored
@@ -19,9 +19,9 @@ LangString inst_pathlimit ${LANG_ITALIAN} "Disabilita limite lunghezza percorsi
|
||||
;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_firewallinfo ${LANG_ITALIAN} "Rimozione regola dal firewall di
|
||||
;LangString remove_cache ${LANG_ENGLISH} "Remove torrents and cached data"
|
||||
LangString remove_cache ${LANG_ITALIAN} "Rimuovi torrent e dati nella cache"
|
||||
;LangString uninst_warning ${LANG_ENGLISH} "qBittorrent is running. Please close the application before uninstalling."
|
||||
LangString uninst_warning ${LANG_ITALIAN} "qBittorrent è in esecuzione. 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:"
|
||||
|
18
dist/windows/installer-translations/korean.nsi
vendored
18
dist/windows/installer-translations/korean.nsi
vendored
@@ -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_magnet ${LANG_KOREAN} "qBittorrent로 자석 링크 열기"
|
||||
;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 inst_uninstall_link_description ${LANG_KOREAN} "qBittorrent 삭제"
|
||||
;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"
|
||||
|
54
dist/windows/installer-translations/latvian.nsi
vendored
54
dist/windows/installer-translations/latvian.nsi
vendored
@@ -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:"
|
||||
|
@@ -15,23 +15,23 @@ LangString inst_magnet ${LANG_PORTUGUESE} "Abrir ligações magnet com o qBittor
|
||||
;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_files ${LANG_PORTUGUESE} "Remover ficheiros"
|
||||
;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_conf ${LANG_PORTUGUESE} "Remover ficheiros de configuração"
|
||||
;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:"
|
||||
|
4
dist/windows/options.nsi
vendored
4
dist/windows/options.nsi
vendored
@@ -28,7 +28,7 @@ XPStyle on
|
||||
!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 "LegalCopyright" "Copyright ©2006-2022 The qBittorrent project"
|
||||
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
|
||||
|
@@ -220,7 +220,9 @@ void Application::setMemoryWorkingSetLimit(const int size)
|
||||
return;
|
||||
|
||||
m_storeMemoryWorkingSetLimit = size;
|
||||
#ifdef QBT_USES_LIBTORRENT2
|
||||
applyMemoryWorkingSetLimit();
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -621,7 +623,7 @@ void Application::processParams(const QStringList ¶ms)
|
||||
|
||||
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 @@ void Application::shutdownCleanup(QSessionManager &manager)
|
||||
}
|
||||
#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
|
||||
|
@@ -126,7 +126,7 @@ private slots:
|
||||
#endif
|
||||
|
||||
private:
|
||||
#ifdef Q_OS_WIN
|
||||
#if (defined(Q_OS_WIN) && defined(QBT_USES_LIBTORRENT2))
|
||||
void applyMemoryWorkingSetLimit();
|
||||
#endif
|
||||
void initializeTranslation();
|
||||
|
@@ -1335,7 +1335,7 @@ void Session::loadLTSettings(lt::settings_pack &settingsPack)
|
||||
|
||||
// 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 @@ void Session::applyOSMemoryPriority() const
|
||||
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 @@ void Session::applyOSMemoryPriority() const
|
||||
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 @@ void Session::startUpTorrents()
|
||||
}
|
||||
}
|
||||
|
||||
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))
|
||||
{
|
||||
|
@@ -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 @@ void DownloadHandlerImpl::processFinishedDownload()
|
||||
}
|
||||
|
||||
// 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())
|
||||
{
|
||||
|
@@ -123,8 +123,12 @@ namespace
|
||||
|
||||
// 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);
|
||||
|
||||
|
@@ -556,7 +556,7 @@ void Parser::parse(const QByteArray &feedData)
|
||||
// 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 @@ void Parser::parse_impl(const QByteArray &feedData)
|
||||
}
|
||||
|
||||
emit finished(m_result);
|
||||
m_result.articles.clear(); // clear articles only
|
||||
m_result.articles.clear();
|
||||
m_result.error.clear();
|
||||
m_articleIDs.clear();
|
||||
}
|
||||
|
||||
|
@@ -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
|
||||
|
@@ -204,8 +204,10 @@ target_link_libraries(qbt_gui
|
||||
|
||||
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
|
||||
)
|
||||
|
@@ -62,9 +62,11 @@ namespace
|
||||
// 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,7 +200,9 @@ void AdvancedSettings::saveAdvancedSettings()
|
||||
}
|
||||
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());
|
||||
@@ -443,6 +447,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
||||
+ ' ' + 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"));
|
||||
@@ -451,6 +456,7 @@ void AdvancedSettings::loadAdvancedSettings()
|
||||
addRow(MEMORY_WORKING_SET_LIMIT, (tr("Physical memory (RAM) usage limit")
|
||||
+ ' ' + makeLink("https://wikipedia.org/wiki/Working_set", "(?)"))
|
||||
, &m_spinBoxMemoryWorkingSetLimit);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Async IO threads
|
||||
|
@@ -82,8 +82,10 @@ private:
|
||||
// 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;
|
||||
|
@@ -169,12 +169,14 @@ win32|macx {
|
||||
|
||||
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 {
|
||||
|
@@ -104,7 +104,15 @@ namespace MacUtils
|
||||
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];
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
, 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 @@ MainWindow::MainWindow(QWidget *parent)
|
||||
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 @@ bool MainWindow::isNotificationsEnabled() const
|
||||
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 @@ void MainWindow::showNotificationBalloon(const QString &title, const QString &ms
|
||||
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 @@ void MainWindow::createTrayIcon(const int retries)
|
||||
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();
|
||||
|
@@ -71,6 +71,11 @@ namespace Ui
|
||||
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 @@ private:
|
||||
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)
|
||||
|
74
src/gui/notifications/dbusnotificationsinterface.cpp
Normal file
74
src/gui/notifications/dbusnotificationsinterface.cpp
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2022 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* 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);
|
||||
}
|
64
src/gui/notifications/dbusnotificationsinterface.h
Normal file
64
src/gui/notifications/dbusnotificationsinterface.h
Normal file
@@ -0,0 +1,64 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2022 Vladimir Golovnev <glassez@yandex.ru>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* 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);
|
||||
};
|
93
src/gui/notifications/dbusnotifier.cpp
Normal file
93
src/gui/notifications/dbusnotifier.cpp
Normal file
@@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2022 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2006 Christophe Dumez <chris@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);
|
||||
}
|
56
src/gui/notifications/dbusnotifier.h
Normal file
56
src/gui/notifications/dbusnotifier.h
Normal file
@@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Bittorrent Client using Qt and libtorrent.
|
||||
* Copyright (C) 2022 Vladimir Golovnev <glassez@yandex.ru>
|
||||
* Copyright (C) 2006 Christophe Dumez <chris@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;
|
||||
};
|
@@ -282,7 +282,7 @@ void PiecesBar::showToolTip(const QHelpEvent *e)
|
||||
|
||||
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>";
|
||||
|
@@ -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()
|
||||
{
|
||||
}
|
@@ -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
|
@@ -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>
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user