summaryrefslogtreecommitdiff
path: root/sfx2/inc/templatedlg.hxx
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2025-01-18 19:51:44 +0100
committerMichael Weghorn <m.weghorn@posteo.de>2025-01-19 21:35:31 +0100
commitb3601746facd15e6c54cb5061c77d6fbad6591cc (patch)
treee87c4d680301090f5930fe7f557e0a8724a6f938 /sfx2/inc/templatedlg.hxx
parent1052f5cd508a33c4cea3a89d16f03b53ebe18b40 (diff)
tdf#130857 qt weld: Delete unused image label object HEADmaster
QLabel objects created for "GtkImage" objects in .ui file that are used to set button images are not displayed by themselves, so unconditionally mark them for deletion once the image data has been taken over to the button. (See also use of `aImagesToBeRemoved` in the VclBuilder ctor for how images used for button images are deleted there.) This is also no problem if the image is used for multiple buttons inside of the dialog because QtBuilder::deleteObject calls QObject::deleteLater, i.e. doesn't delete the object immediately, but schedules it for deletion once control returns to the event loop, so reusing it is still safe until then. Deleting the QLabel object only if it has no parent isn't sufficient, because even labels created for "GtkImage" objects that are top-levels within the corresponding dialog (or other .ui file) still have the dialog's parent widget set as the parent. Without this commit, a copy paste icon would be shown on the left hand side of the Writer window after opening and closing the "Help" -> "About LibreOffice" dialog (which has a button that has such an icon set. Change-Id: I40aaaa1af700b4ab0adfdc7a1c04103dfcab7c52 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180469 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'sfx2/inc/templatedlg.hxx')
0 files changed, 0 insertions, 0 deletions