Fix setting SysTrayIcon visible after explicitly hiding it

After hiding the QSystemTrayIcon explicitly with .setVisible(false)
resetting visibility with .setVisible(true) does not generate NIM_MODIFY
message and thus preventing the tray icon from being visible again.

Fixes: QTBUG-118133
Pick-to: 6.6 6.5
Change-Id: Ic2b1d0f293c92fec7ec697b2fe3d1da9fd0d0e44
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Timothée Keller <timothee.keller@qt.io>
bb10
Wladimir Leuschner 2023-10-17 14:25:25 +02:00
parent b63045477e
commit 77e0e7c414
1 changed files with 0 additions and 2 deletions

View File

@ -164,8 +164,6 @@ void QWindowsSystemTrayIcon::cleanup()
void QWindowsSystemTrayIcon::updateIcon(const QIcon &icon)
{
qCDebug(lcQpaTrayIcon) << __FUNCTION__ << '(' << icon << ')' << this;
if (icon.cacheKey() == m_icon.cacheKey())
return;
m_icon = icon;
const HICON hIconToDestroy = createIcon(icon);
if (ensureInstalled())