From 3894dbfa6562566b09dbabe7bb34193c78af00a5 Mon Sep 17 00:00:00 2001 From: Christian Kandeler Date: Thu, 6 Feb 2020 16:41:19 +0100 Subject: [PATCH] ProjectExplorer: Make DeploymentData::addFile() do what its name says The check that was done in there was problematic for two reasons: - It encoded a policy that a file could not be deployed to more than one target path, which might not always be true. - It made the function unexpectedly expensive, resulting in quadratic behavior for repeated calls. This resulted in noticeable UI lag when loading larger projects. It's the caller's responsibility to prevent duplicates. Task-number: QTCREATORBUG-18533 Change-Id: I33a328b14f95fe84b3c1041d4b74d645946250bb Reviewed-by: hjk --- src/plugins/projectexplorer/deploymentdata.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/plugins/projectexplorer/deploymentdata.cpp b/src/plugins/projectexplorer/deploymentdata.cpp index 816a311d703..1d9943ae59a 100644 --- a/src/plugins/projectexplorer/deploymentdata.cpp +++ b/src/plugins/projectexplorer/deploymentdata.cpp @@ -40,12 +40,6 @@ void DeploymentData::setLocalInstallRoot(const Utils::FilePath &installRoot) void DeploymentData::addFile(const DeployableFile &file) { - for (int i = 0; i < m_files.size(); ++i) { - if (m_files.at(i).localFilePath() == file.localFilePath()) { - m_files[i] = file; - return; - } - } m_files << file; }