summaryrefslogtreecommitdiff
path: root/vcl/qt5
diff options
context:
space:
mode:
authorJan-Marek Glogowski <jan-marek.glogowski@extern.cib.de>2019-11-18 16:04:24 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2019-11-19 12:48:03 +0100
commita00bdc999344db34d5926dc77ed5ca895295b0ee (patch)
treec1fc41c69e6a62e021467b601423fd5143e5fd28 /vcl/qt5
parent325005697155853891ce4f23e7349931e748d7e7 (diff)
tdf#128434 correctly release fonts in destructors
This adds ReleaseFonts() calls to all destructors of SalGraphics and TextRenderImpl derivated classes, which implement SetFont. During destruction a base class can't call into derivated classes, as these are already destructed, so we have to spread these calls manually. Change-Id: Ia57db04f7df665e5205212ce512119e2f60e3379 Reviewed-on: https://gerrit.libreoffice.org/82967 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit f8e1f8652255cadd80a991aa3e059ee631b333b8) Reviewed-on: https://gerrit.libreoffice.org/83149
Diffstat (limited to 'vcl/qt5')
-rw-r--r--vcl/qt5/Qt5Graphics.cxx11
1 files changed, 1 insertions, 10 deletions
diff --git a/vcl/qt5/Qt5Graphics.cxx b/vcl/qt5/Qt5Graphics.cxx
index 5192f0b42416..8228699a2602 100644
--- a/vcl/qt5/Qt5Graphics.cxx
+++ b/vcl/qt5/Qt5Graphics.cxx
@@ -44,16 +44,7 @@ Qt5Graphics::Qt5Graphics( Qt5Frame *pFrame, QImage *pQImage )
m_pWidgetDraw.reset(new Qt5Graphics_Controls());
}
-Qt5Graphics::~Qt5Graphics()
-{
- // release the text styles
- for (int i = 0; i < MAX_FALLBACK; ++i)
- {
- if (!m_pTextStyle[i])
- break;
- m_pTextStyle[i].clear();
- }
-}
+Qt5Graphics::~Qt5Graphics() { ReleaseFonts(); }
void Qt5Graphics::ChangeQImage(QImage* pQImage)
{