diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-04-13 10:54:06 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-14 03:16:48 +1200 |
commit | 88ed5bf05054a3a4b2313cec81e6756279e6bdb1 (patch) | |
tree | 6cb2fe00c1c393645e7aac99387f9f807190d376 /dives/TestDiveDivingLog5.08allmetric.zip | |
parent | 17e7cc048feee5f5b46a4ea3932e2e6500ec5e58 (diff) | |
download | subsurface-88ed5bf05054a3a4b2313cec81e6756279e6bdb1.tar.gz |
Desktop: destroy maintab before destructing mainwindow
Apparently, in some Qt-versions the destructor of the base class
calls hide on child-objects (according to Qt's object hierarchy).
This is obviously called after the derived class has been destructed.
In a concrete case, the base class of the destructed MainWindow
would hide the TabDiveSite object. That would reset the filtering
if a dive site was selected, which would indirectly access the
MainWindow, which is already partially destroyed.
Therefore, destroy the MainTab before destroying the MainWindow.
Do this by keeping it as a std::unique_ptr subobject. Thus, it
will be destroyed before the MainWindow and remove itself from
Qt's object hierarchy.
Reported-by: Dirk Hohndel <dirk@hohndel.org>
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'dives/TestDiveDivingLog5.08allmetric.zip')
0 files changed, 0 insertions, 0 deletions