forked from qt-creator/qt-creator
Session: Delay deletion of projects till all signals are processed
Delay actual deletion of projects till all signals related to the removal event (incl. the startupProjectChanged signal) are handled. Change-Id: I8e2c8db49f732b80234a3cfa81d73f17c8d02608 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -754,11 +754,12 @@ void SessionManager::removeProjects(const QList<Project *> &remove)
|
||||
d->m_projectFileCache.remove(pro);
|
||||
emit m_instance->projectRemoved(pro);
|
||||
FolderNavigationWidgetFactory::removeRootDirectory(projectFolderId(pro));
|
||||
delete pro;
|
||||
}
|
||||
|
||||
if (changeStartupProject)
|
||||
setStartupProject(hasProjects() ? projects().first() : nullptr);
|
||||
|
||||
qDeleteAll(remove);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user