diff options
author | Jarek Kobus <jaroslaw.kobus@qt.io> | 2021-06-29 16:56:12 +0200 |
---|---|---|
committer | Jarek Kobus <jaroslaw.kobus@qt.io> | 2021-06-30 11:41:34 +0000 |
commit | 6a142dfd95ab497c1fe247cd4289affa13444577 (patch) | |
tree | 616e3790fac56afd8de973bd716cee98a029401d /src/plugins/cpptools/cpptoolsplugin.cpp | |
parent | 4a8c222c183f2576975593f7cf7d756f8cb0aa03 (diff) | |
download | qt-creator-6a142dfd95ab497c1fe247cd4289affa13444577.tar.gz |
Fix the "Cannot remove a null widget" warning
After the 867c0b8d8a53974074b1fff5b132f3ae9f150066 got integrated
into qtbase, Qt started issuing a warning on Creator shutdown.
The reason is that mode's widget might be deleted before the
mode's destruction. Deleting the mode's widget removes it automatically
from the contained stacked layout of the mode manager. This
means that the indices inside the stacked layout and those inside
the ModeManager's d->m_modes list are now out of sync.
FancyTabWidget::removeTab() can't find the right widget for the
passed index now or returns wrong widget for it.
The fix is to remove removeMode() method (and in turn some more
unused now). The context objects don't need to be removed on
shutdown, and the remaining mode's widgets will be deleted
by Qt itself when the main windows is destroyed.
Fixes: QTCREATORBUG-25925
Change-Id: I70c2773eea2984c5d06ce3bf71a4271b267efbe0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cpptoolsplugin.cpp')
0 files changed, 0 insertions, 0 deletions