From ec430787e5aa1f24d678c6b62244eb33f3725112 Mon Sep 17 00:00:00 2001 From: hjk Date: Fri, 14 Oct 2022 14:23:25 +0200 Subject: [PATCH] CMake: More FilePath in Deployment data Change-Id: I898a621a34558a28d4688a33aeb9bb9148df6901 Reviewed-by: Cristian Adam --- .../cmakeprojectmanager/cmakebuildsystem.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp index d2239ccaa9e..7c3db2c7403 100644 --- a/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp +++ b/src/plugins/cmakeprojectmanager/cmakebuildsystem.cpp @@ -1093,28 +1093,28 @@ DeploymentData CMakeBuildSystem::deploymentData() const { DeploymentData result; - QDir sourceDir = project()->projectDirectory().toString(); - QDir buildDir = buildConfiguration()->buildDirectory().toString(); + FilePath sourceDir = project()->projectDirectory(); + FilePath buildDir = buildConfiguration()->buildDirectory(); QString deploymentPrefix; - QString deploymentFilePath = sourceDir.filePath("QtCreatorDeployment.txt"); + FilePath deploymentFilePath = sourceDir.pathAppended("QtCreatorDeployment.txt"); - bool hasDeploymentFile = QFileInfo::exists(deploymentFilePath); + bool hasDeploymentFile = deploymentFilePath.exists(); if (!hasDeploymentFile) { - deploymentFilePath = buildDir.filePath("QtCreatorDeployment.txt"); - hasDeploymentFile = QFileInfo::exists(deploymentFilePath); + deploymentFilePath = buildDir.pathAppended("QtCreatorDeployment.txt"); + hasDeploymentFile = deploymentFilePath.exists(); } if (!hasDeploymentFile) return result; - deploymentPrefix = result.addFilesFromDeploymentFile(deploymentFilePath, - sourceDir.absolutePath()); + deploymentPrefix = result.addFilesFromDeploymentFile(deploymentFilePath.toString(), + sourceDir.toString()); for (const CMakeBuildTarget &ct : m_buildTargets) { if (ct.targetType == ExecutableType || ct.targetType == DynamicLibraryType) { if (!ct.executable.isEmpty() && result.deployableForLocalFile(ct.executable).localFilePath() != ct.executable) { result.addFile(ct.executable, - deploymentPrefix + buildDir.relativeFilePath(ct.executable.toFileInfo().dir().path()), + deploymentPrefix + buildDir.relativeChildPath(ct.executable).toString(), DeployableFile::TypeExecutable); } }