diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-01-17 16:15:12 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-01-17 16:24:43 +0000 |
commit | b23dab3ba29586a321b99d18ec3eec46a64eddc7 (patch) | |
tree | 747ffb43c001952770d70c36bc98b7366fbda2f0 /src/plugins/cpptools/cpphoverhandler.cpp | |
parent | 47ad489b97200c66819687bee08aef47877aaa16 (diff) | |
download | qt-creator-b23dab3ba29586a321b99d18ec3eec46a64eddc7.tar.gz |
Avoid double deletion of HelpWidget when quitting application via Dock
HelpWidgets that are created to be shown in an external window, had
two different places where they were deleted:
1) When the widget was closed (due to Qt::WA_DeleteOnClose)
2) In HelpPlugin::aboutToShutdown via manual delete call
In certain circumstances (when the WebEngine backend was used)
this caused a double delete. Specifically, after opening an external
help window, and closing the MainWindow, the application did not quit
due to QTBUG-62596.
Now if the help window were left open, and the application was quit
via the macOS Dock, this caused a crash.
When the application quits, it calls the HelpPlugin::aboutToShutdown,
which deletes the HelpWidget. This in turn destroys the WebEngine
view, which destroys the underlying QQuickWidget, which destroys
a QQuickRenderControl, which calls
QQuickRenderControlPrivate::windowDestroyed, which handles all
posted QEvent::DeferredDelete events, which in turn triggers the
deletion of the same HelpWidget due to the
Qt::WA_DeleteOnClose attribute.
The solution is to remove the Qt::WA_DeleteOnClose attribute, and only
delete the external HelpWidget on shutdown, and not on CloseEvent.
Task-number: QTBUG-63945
Task-number: QTCREATORBUG-19582
Change-Id: I5b73ff7fe52e7e1259a8aa98c97c9dbedd5e3c20
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cpphoverhandler.cpp')
0 files changed, 0 insertions, 0 deletions