forked from qt-creator/qt-creator
ProjectTree: Add missing registration of pre-existing projects
Register pre-existing projects when opening a new Project View. This fixes missing parsing state on newly opened Project Views. Task-number: QTCREATORBUG-20058 Change-Id: I47cd4791c1b8eac7717a7ce2b35d7f35bba5826a Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -85,7 +85,9 @@ FlatModel::FlatModel(QObject *parent)
|
|||||||
connect(sm, &SessionManager::aboutToSaveSession, this, &FlatModel::saveExpandData);
|
connect(sm, &SessionManager::aboutToSaveSession, this, &FlatModel::saveExpandData);
|
||||||
connect(sm, &SessionManager::projectAdded, this, &FlatModel::handleProjectAdded);
|
connect(sm, &SessionManager::projectAdded, this, &FlatModel::handleProjectAdded);
|
||||||
connect(sm, &SessionManager::startupProjectChanged, this, [this] { layoutChanged(); });
|
connect(sm, &SessionManager::startupProjectChanged, this, [this] { layoutChanged(); });
|
||||||
rebuildModel();
|
|
||||||
|
for (Project *project : SessionManager::projects())
|
||||||
|
handleProjectAdded(project);
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariant FlatModel::data(const QModelIndex &index, int role) const
|
QVariant FlatModel::data(const QModelIndex &index, int role) const
|
||||||
|
|||||||
Reference in New Issue
Block a user