Qt, Qt5: check Icon.Handle instead of Icon.HandleAllocated which returns false inside internalUpdate(). Possible part of issue #33821

git-svn-id: trunk@58122 -
This commit is contained in:
zeljko 2018-06-04 12:17:30 +00:00
parent 06dc766bc5
commit b00f803221
2 changed files with 3 additions and 3 deletions

View File

@ -315,7 +315,7 @@ begin
SystemTrayIcon.setIcon(TQtImage(ATrayIcon.Icon.BitmapHandle).AsIcon)
else
// normal
if (ATrayIcon.Icon.HandleAllocated) then
if (ATrayIcon.Icon.Handle <> 0) then
SystemTrayIcon.setIcon(TQtIcon(ATrayIcon.Icon.Handle).Handle)
else
begin

View File

@ -274,7 +274,7 @@ begin
IconH := nil
else
IconH := TQtIcon(ATrayIcon.Icon.Handle).Handle;
SystemTrayIcon := TQtSystemTrayIcon.Create(IconH);
SystemTrayIcon.FTrayIcon := ATrayIcon;
@ -314,7 +314,7 @@ begin
SystemTrayIcon.setIcon(TQtImage(ATrayIcon.Icon.BitmapHandle).AsIcon)
else
// normal
if (ATrayIcon.Icon.HandleAllocated) then
if (ATrayIcon.Icon.Handle <> 0) then
SystemTrayIcon.setIcon(TQtIcon(ATrayIcon.Icon.Handle).Handle)
else
begin