Closed naglis closed 4 months ago
Yet another nice dig :star_struck: . Indeed, almost none of our end-users are affected, since updates are disabled by default in Linux. Still, this issue does not affect Ubuntu Focal only. We use Pyside2 in every Debian-based distro, and PySide2 still relies on Qt5 (e.g., see PySide2 dependencies on Debian Trixie).
Given that the gravity of the situation is kinda low, I'd not address it in this particular release. However, your fix makes sense, and we can add it in the next release.
Reproduced on Arch Linux when running on Qt5 (Qt5/PySide2 version: 5.15.13 (system-wide)) starting Dangerzone both from source (https://github.com/freedomofpress/dangerzone/commit/8cdb2d572038cda19ab2c53b61abbfb9150fe6f5) and as an installed package (version 0.6.0).
If I am not mistaken, Qt5 is only used on Ubuntu Focal and update checks are disabled by default on Linux, so the probability of users running into it is rather low.
Steps to reproduce:
settings.json
config file, setupdater_check
key totrue
to force update checks and setupdated_latest_version
key to a version that is higher than the currently installed/used Dangerzone version (e.g."0.7.0"
).hamburger_menu_update_success.svg
icon, but the "New version available" menu entry is not displayed.After a quick look at the documentation, it seems that in PySide2
QAction
is available under thePySide2.QtWidgets
namespace, whereas in PySide6 it resides underPySide6.QtGui
. IIUC there are two cases whereQAction
is used:https://github.com/freedomofpress/dangerzone/blob/8cdb2d572038cda19ab2c53b61abbfb9150fe6f5/dangerzone/gui/main_window.py#L270 https://github.com/freedomofpress/dangerzone/blob/8cdb2d572038cda19ab2c53b61abbfb9150fe6f5/dangerzone/gui/main_window.py#L291
and the issue would manifest itself if update checking is enabled and there is a new version of there were errors when checking for updates.
A potential fix could be to import
QAction
directly from the right module based on which Qt version is being used and the use theQAction(...)
name directly.