From 3208cbf9ab4e4f9b46d6d4d0513a8a53c5fe0424 Mon Sep 17 00:00:00 2001 From: Cristian Adam Date: Wed, 28 Aug 2024 14:26:03 +0200 Subject: [PATCH] PE: Fix empty Projects view when the project is configured Amends 64952cb511911afa4bbe2363cfa7e372aaa47e29 Fixes: QTCREATORBUG-31490 Change-Id: I94a40df908ce1c37c4458b029067501321bc4859 Reviewed-by: Orgad Shaneh --- src/plugins/projectexplorer/projectmodels.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/plugins/projectexplorer/projectmodels.cpp b/src/plugins/projectexplorer/projectmodels.cpp index 6c804a6f2bc..a979fd23117 100644 --- a/src/plugins/projectexplorer/projectmodels.cpp +++ b/src/plugins/projectexplorer/projectmodels.cpp @@ -452,10 +452,10 @@ void FlatModel::handleProjectAdded(Project *project) const FilePath &rootPath = project->rootProjectDirectory(); IVersionControl *vc = VcsManager::findVersionControlForDirectory(rootPath); - if (!vc) - return; - vc->monitorDirectory(rootPath); - connect(vc, &IVersionControl::updateFileStatus, this, &FlatModel::updateVCStatusFor); + if (vc) { + vc->monitorDirectory(rootPath); + connect(vc, &IVersionControl::updateFileStatus, this, &FlatModel::updateVCStatusFor); + } addOrRebuildProjectModel(project); }