forked from qt-creator/qt-creator
LanguageClient::updateEditorToolBar() contained the static hashes that were keeping raw pointers to different objects. However, the lifetime of these objects wasn't controlled, so it could happen that we were operating on dangling pointers. In fact, like in the bugreport, some text editor widget could have been deleted (together with his outline action), while later another one (coincidently with the same address) could have appeared. The old mapped widget still pointed to the removed action so we crash. Instead of keeping a static hashes we attach the custom child object to the widget and keep there QPointers to all objects we are interested in. Fixes: QTCREATORBUG-26588 Change-Id: I335d9848ea85372baf3328772f0a249cee242dcd Reviewed-by: David Schulz <david.schulz@qt.io>
13 KiB
13 KiB