summaryrefslogtreecommitdiff
path: root/vcl/inc
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2019-06-21 01:49:59 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2019-06-21 12:43:13 +0200
commitf0c9b93e5bc7976dea5de4a49be87cc9892941a7 (patch)
tree2e8e759726c60450e8951fdaed0331faa183adc0 /vcl/inc
parentf270bd15fed87a9cb0f8dfa73b34c617d66f59c2 (diff)
tdf#126020 Qt5 delete orphan Qt5ObjectWindows
The Qt5ObjectWindow is "adopted" by Qt5Frame's QWidget, which is needed for the correct display. But since the Qt5Object is itself a child of the Qt5Frame, it'll be deleted before the Qt5Frame, which keeps the Qt5ObjectWindows alive. But the Qt5ObjectWindows child relies on the Qt5Object parent, so reap it, when the real parent is destructed. And just in case the Qt5Frame will delete the QWidget with the child while the Qt5Object is still alive, update the pointer to the child on its destruction. Change-Id: I563ddc2294b7b1651f56abdde75319c7455dd9b7 Reviewed-on: https://gerrit.libreoffice.org/74482 Tested-by: Jenkins Reviewed-by: Aleksei Nikiforov <darktemplar@basealt.ru>
Diffstat (limited to 'vcl/inc')
-rw-r--r--vcl/inc/qt5/Qt5Object.hxx3
1 files changed, 1 insertions, 2 deletions
diff --git a/vcl/inc/qt5/Qt5Object.hxx b/vcl/inc/qt5/Qt5Object.hxx
index 6bfdd81b0327..c6dce6e944be 100644
--- a/vcl/inc/qt5/Qt5Object.hxx
+++ b/vcl/inc/qt5/Qt5Object.hxx
@@ -33,8 +33,6 @@ class Qt5Object : public QObject, public SalObject
{
Q_OBJECT
- friend class Qt5OpenGLContext;
-
SystemEnvData m_aSystemData;
Qt5Frame* m_pParent;
QWidget* m_pQWidget; // main widget, container
@@ -43,6 +41,7 @@ class Qt5Object : public QObject, public SalObject
public:
Qt5Object(Qt5Frame* pParent, bool bShow);
+ ~Qt5Object() override;
Qt5Frame* frame() const { return m_pParent; }
QWidget* widget() const { return m_pQWidget; }