forked from qt-creator/qt-creator
Avoid some memory leaks at shutdown
StatusBarManager needs to delete its contexts when dropping them, QActions should be parented, and in ProjectWindow we can save an allocation. Change-Id: Idee075d4f2ce8014f22f73453987d1ab6539cf18 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
@@ -162,7 +162,7 @@ void WindowList::addWindow(QWidget *window)
|
||||
m_windows.append(window);
|
||||
Id id = Id("QtCreator.Window.").withSuffix(m_windows.size());
|
||||
m_windowActionIds.append(id);
|
||||
auto action = new QAction(window->windowTitle(), 0);
|
||||
auto action = new QAction(window->windowTitle(), ActionManager::instance());
|
||||
m_windowActions.append(action);
|
||||
QObject::connect(action, &QAction::triggered, [action]() { WindowList::activateWindow(action); });
|
||||
action->setCheckable(true);
|
||||
|
||||
Reference in New Issue
Block a user