aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTobias Hunger <tobias.hunger@qt.io>2018-03-14 13:48:22 +0100
committerTobias Hunger <tobias.hunger@qt.io>2018-03-16 15:45:18 +0000
commit62007d922c78175235d887a473eddf865b25bc39 (patch)
tree1801ef9547a6da8e79892a5807fb8573463fc147
parentf4b13dc77ce1839b5cbc69ab52b63f69f3cd8dd2 (diff)
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>
-rw-r--r--src/plugins/projectexplorer/projectmodels.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp
index bbecd98b80..c2371ffa86 100644
--- a/src/plugins/projectexplorer/projectmodels.cpp
+++ b/src/plugins/projectexplorer/projectmodels.cpp
@@ -85,7 +85,9 @@ FlatModel::FlatModel(QObject *parent)
connect(sm, &SessionManager::aboutToSaveSession, this, &FlatModel::saveExpandData);
connect(sm, &SessionManager::projectAdded, this, &FlatModel::handleProjectAdded);
connect(sm, &SessionManager::startupProjectChanged, this, [this] { layoutChanged(); });
- rebuildModel();
+
+ for (Project *project : SessionManager::projects())
+ handleProjectAdded(project);
}
QVariant FlatModel::data(const QModelIndex &index, int role) const