forked from qt-creator/qt-creator
LanguageClient: fix memory leak
When removing actions from a widget the action is not magically deleted, so manually delete the language client toolbar action of the editor after the last client was shutdown. Change-Id: I6a5a079d4a44724f92d291040925df73f7eb747b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -213,6 +213,7 @@ void updateEditorToolBar(Core::IEditor *editor)
|
||||
} else {
|
||||
widget->toolBar()->removeAction(action);
|
||||
actions.remove(widget);
|
||||
delete action;
|
||||
}
|
||||
} else if (client) {
|
||||
const QIcon icon = Utils::Icon({{":/languageclient/images/languageclient.png",
|
||||
|
Reference in New Issue
Block a user