forked from qt-creator/qt-creator
ProjectExplorer: Proliferate Utils::FilePath use
Move the .toString() uses into DeploymentData::addFilesFromDeploymentFile Change-Id: Ic9ef22da1918ca105c92f0231960dab27b0d80bb Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -1086,8 +1086,7 @@ DeploymentData CMakeBuildSystem::deploymentData() const
|
||||
if (!hasDeploymentFile)
|
||||
return result;
|
||||
|
||||
deploymentPrefix = result.addFilesFromDeploymentFile(deploymentFilePath.toString(),
|
||||
sourceDir.toString());
|
||||
deploymentPrefix = result.addFilesFromDeploymentFile(deploymentFilePath, sourceDir);
|
||||
for (const CMakeBuildTarget &ct : m_buildTargets) {
|
||||
if (ct.targetType == ExecutableType || ct.targetType == DynamicLibraryType) {
|
||||
if (!ct.executable.isEmpty()
|
||||
|
||||
@@ -460,8 +460,7 @@ void CompilationDatabaseBuildSystem::updateDeploymentData()
|
||||
const Utils::FilePath deploymentFilePath = projectDirectory()
|
||||
.pathAppended("QtCreatorDeployment.txt");
|
||||
DeploymentData deploymentData;
|
||||
deploymentData.addFilesFromDeploymentFile(deploymentFilePath.toString(),
|
||||
projectDirectory().toString());
|
||||
deploymentData.addFilesFromDeploymentFile(deploymentFilePath, projectDirectory());
|
||||
setDeploymentData(deploymentData);
|
||||
if (m_deployFileWatcher->files() != QStringList(deploymentFilePath.toString())) {
|
||||
m_deployFileWatcher->clear();
|
||||
|
||||
@@ -599,8 +599,7 @@ void GenericBuildSystem::updateDeploymentData()
|
||||
}
|
||||
if (hasDeploymentData) {
|
||||
DeploymentData deploymentData;
|
||||
deploymentData.addFilesFromDeploymentFile(deploymentFilePath.toString(),
|
||||
projectDirectory().toString());
|
||||
deploymentData.addFilesFromDeploymentFile(deploymentFilePath, projectDirectory());
|
||||
setDeploymentData(deploymentData);
|
||||
if (m_deployFileWatcher.filePaths() != FilePaths{deploymentFilePath}) {
|
||||
m_deployFileWatcher.clear();
|
||||
|
||||
@@ -48,11 +48,12 @@ bool DeploymentData::operator==(const DeploymentData &other) const
|
||||
&& m_localInstallRoot == other.m_localInstallRoot;
|
||||
}
|
||||
|
||||
QString DeploymentData::addFilesFromDeploymentFile(const QString &deploymentFilePath,
|
||||
const QString &sourceDir)
|
||||
QString DeploymentData::addFilesFromDeploymentFile(const FilePath &deploymentFilePath,
|
||||
const FilePath &sourceDir_)
|
||||
{
|
||||
const QString sourceDir = sourceDir_.toString();
|
||||
const QString sourcePrefix = sourceDir.endsWith('/') ? sourceDir : sourceDir + '/';
|
||||
QFile deploymentFile(deploymentFilePath);
|
||||
QFile deploymentFile(deploymentFilePath.toString());
|
||||
QTextStream deploymentStream;
|
||||
QString deploymentPrefix;
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ public:
|
||||
void addFile(const DeployableFile &file);
|
||||
void addFile(const Utils::FilePath &localFilePath, const QString &remoteDirectory,
|
||||
DeployableFile::Type type = DeployableFile::TypeNormal);
|
||||
QString addFilesFromDeploymentFile(const QString &deploymentFilePath, const QString &sourceDir);
|
||||
QString addFilesFromDeploymentFile(const Utils::FilePath &deploymentFilePath, const Utils::FilePath &sourceDir);
|
||||
|
||||
int fileCount() const { return m_files.count(); }
|
||||
DeployableFile fileAt(int index) const { return m_files.at(index); }
|
||||
|
||||
Reference in New Issue
Block a user