diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp | 2 | ||||
-rw-r--r-- | src/plugins/projectexplorer/deploymentdata.cpp | 8 | ||||
-rw-r--r-- | src/plugins/projectexplorer/target.cpp | 1 |
3 files changed, 9 insertions, 2 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp index f7cfa7f33f..d782c26d4e 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildconfiguration.cpp @@ -237,7 +237,7 @@ DeploymentData CMakeBuildConfiguration::deploymentData() const for (const CMakeBuildTarget &ct : m_buildTargets) { if (ct.targetType == ExecutableType || ct.targetType == DynamicLibraryType) { if (!ct.executable.isEmpty() - && !result.deployableForLocalFile(ct.executable.toString()).isValid()) { + && result.deployableForLocalFile(ct.executable.toString()).localFilePath() != ct.executable) { result.addFile(ct.executable.toString(), deploymentPrefix + buildDir.relativeFilePath(ct.executable.toFileInfo().dir().path()), DeployableFile::TypeExecutable); diff --git a/src/plugins/projectexplorer/deploymentdata.cpp b/src/plugins/projectexplorer/deploymentdata.cpp index acb8878de6..aa24a3ff3c 100644 --- a/src/plugins/projectexplorer/deploymentdata.cpp +++ b/src/plugins/projectexplorer/deploymentdata.cpp @@ -57,9 +57,15 @@ void DeploymentData::addFile(const QString &localFilePath, const QString &remote DeployableFile DeploymentData::deployableForLocalFile(const QString &localFilePath) const { - return Utils::findOrDefault(m_files, [&localFilePath](const DeployableFile &d) { + const DeployableFile f = Utils::findOrDefault(m_files, [&localFilePath](const DeployableFile &d) { return d.localFilePath().toString() == localFilePath; }); + if (f.isValid()) + return f; + const QString localFileName = QFileInfo(localFilePath).fileName(); + return Utils::findOrDefault(m_files, [&localFileName](const DeployableFile &d) { + return d.localFilePath().toFileInfo().fileName() == localFileName; + }); } bool DeploymentData::operator==(const DeploymentData &other) const diff --git a/src/plugins/projectexplorer/target.cpp b/src/plugins/projectexplorer/target.cpp index 44be607065..8ff05c7141 100644 --- a/src/plugins/projectexplorer/target.cpp +++ b/src/plugins/projectexplorer/target.cpp @@ -337,6 +337,7 @@ void Target::setDeploymentData(const DeploymentData &deploymentData) if (d->m_deploymentData != deploymentData) { d->m_deploymentData = deploymentData; emit deploymentDataChanged(); + emit applicationTargetsChanged(); } } |