GenericProject: Set deployment data, if available

We use the same approach as for CMake, namely the
QtCreatorDeployment.txt file.

Fixes: QTCREATORBUG-19202
Change-Id: I50605b8236b26f0c911e2448330019e94753af19
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Christian Kandeler
2018-11-14 10:23:47 +01:00
parent 73b1a765f3
commit 1950b38668
4 changed files with 53 additions and 2 deletions

View File

@@ -28,6 +28,7 @@
#include <utils/algorithm.h>
#include <QFile>
#include <QFileInfo>
#include <QTextStream>
namespace ProjectExplorer {
@@ -87,7 +88,13 @@ QString DeploymentData::addFilesFromDeploymentFile(const QString &deploymentFile
if (!line.contains(':'))
continue;
QStringList file = line.split(':');
addFile(sourcePrefix + file.at(0), deploymentPrefix + file.at(1));
QString sourceFile = file.at(0);
if (QFileInfo(sourceFile).isRelative())
sourceFile.prepend(sourcePrefix);
QString targetFile = file.at(1);
if (QFileInfo(targetFile).isRelative())
targetFile.prepend(deploymentPrefix);
addFile(sourceFile, targetFile);
}
}
return deploymentPrefix;