summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer
diff options
context:
space:
mode:
authorhjk <hjk@qt.io>2021-09-13 12:55:01 +0200
committerhjk <hjk@qt.io>2021-09-14 03:28:48 +0000
commitcb4f75426d49fed6d9d134d0688aeaf70f71e52d (patch)
treea0dc544d376e992bf19594d59a4ea4022fd53684 /src/plugins/projectexplorer
parente65827c04a6b1feed619a674bf0c9a116994c7e5 (diff)
downloadqt-creator-cb4f75426d49fed6d9d134d0688aeaf70f71e52d.tar.gz
ProjectExplorer: Remove one constructor overload of DeployableFile
Change-Id: I87e444349129e9370b5fec505444723d36e21448 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Diffstat (limited to 'src/plugins/projectexplorer')
-rw-r--r--src/plugins/projectexplorer/deployablefile.cpp4
-rw-r--r--src/plugins/projectexplorer/deployablefile.h2
-rw-r--r--src/plugins/projectexplorer/deployconfiguration.cpp4
-rw-r--r--src/plugins/projectexplorer/deploymentdata.cpp6
-rw-r--r--src/plugins/projectexplorer/deploymentdata.h2
-rw-r--r--src/plugins/projectexplorer/deploymentdataview.cpp4
6 files changed, 10 insertions, 12 deletions
diff --git a/src/plugins/projectexplorer/deployablefile.cpp b/src/plugins/projectexplorer/deployablefile.cpp
index d8ea6cd33a..78fbcb165e 100644
--- a/src/plugins/projectexplorer/deployablefile.cpp
+++ b/src/plugins/projectexplorer/deployablefile.cpp
@@ -33,10 +33,6 @@ using namespace Utils;
namespace ProjectExplorer {
-DeployableFile::DeployableFile(const QString &localFilePath, const QString &remoteDir, Type type)
- : m_localFilePath(FilePath::fromUserInput(localFilePath)), m_remoteDir(remoteDir), m_type(type)
-{ }
-
DeployableFile::DeployableFile(const FilePath &localFilePath, const QString &remoteDir, Type type)
: m_localFilePath(localFilePath), m_remoteDir(remoteDir), m_type(type)
{ }
diff --git a/src/plugins/projectexplorer/deployablefile.h b/src/plugins/projectexplorer/deployablefile.h
index b1a6c6a1d6..4709206b16 100644
--- a/src/plugins/projectexplorer/deployablefile.h
+++ b/src/plugins/projectexplorer/deployablefile.h
@@ -43,8 +43,6 @@ public:
};
DeployableFile() = default;
- DeployableFile(const QString &m_localFilePath, const QString &m_remoteDir,
- Type type = TypeNormal);
DeployableFile(const Utils::FilePath &localFilePath, const QString &remoteDir,
Type type = TypeNormal);
diff --git a/src/plugins/projectexplorer/deployconfiguration.cpp b/src/plugins/projectexplorer/deployconfiguration.cpp
index d4187da115..df10a32310 100644
--- a/src/plugins/projectexplorer/deployconfiguration.cpp
+++ b/src/plugins/projectexplorer/deployconfiguration.cpp
@@ -35,6 +35,8 @@
#include <utils/algorithm.h>
+using namespace Utils;
+
namespace ProjectExplorer {
const char BUILD_STEP_LIST_COUNT[] = "ProjectExplorer.BuildConfiguration.BuildStepListCount";
@@ -107,7 +109,7 @@ bool DeployConfiguration::fromMap(const QVariantMap &map)
m_usesCustomDeploymentData = map.value(USES_DEPLOYMENT_DATA, false).toBool();
const QVariantMap deployData = map.value(DEPLOYMENT_DATA).toMap();
for (auto it = deployData.begin(); it != deployData.end(); ++it)
- m_customDeploymentData.addFile(it.key(), it.value().toString());
+ m_customDeploymentData.addFile(FilePath::fromString(it.key()), it.value().toString());
return true;
}
diff --git a/src/plugins/projectexplorer/deploymentdata.cpp b/src/plugins/projectexplorer/deploymentdata.cpp
index 4d4aec4a12..7c2c60ab5d 100644
--- a/src/plugins/projectexplorer/deploymentdata.cpp
+++ b/src/plugins/projectexplorer/deploymentdata.cpp
@@ -31,6 +31,8 @@
#include <QFileInfo>
#include <QTextStream>
+using namespace Utils;
+
namespace ProjectExplorer {
void DeploymentData::setLocalInstallRoot(const Utils::FilePath &installRoot)
@@ -43,7 +45,7 @@ void DeploymentData::addFile(const DeployableFile &file)
m_files << file;
}
-void DeploymentData::addFile(const QString &localFilePath, const QString &remoteDirectory,
+void DeploymentData::addFile(const FilePath &localFilePath, const QString &remoteDirectory,
DeployableFile::Type type)
{
addFile(DeployableFile(localFilePath, remoteDirectory, type));
@@ -94,7 +96,7 @@ QString DeploymentData::addFilesFromDeploymentFile(const QString &deploymentFile
QString targetFile = line.mid(splitPoint + 1);
if (QFileInfo(targetFile).isRelative())
targetFile.prepend(deploymentPrefix);
- addFile(sourceFile, targetFile);
+ addFile(FilePath::fromString(sourceFile), targetFile);
}
}
return deploymentPrefix;
diff --git a/src/plugins/projectexplorer/deploymentdata.h b/src/plugins/projectexplorer/deploymentdata.h
index ad4209330e..9a5ae43a63 100644
--- a/src/plugins/projectexplorer/deploymentdata.h
+++ b/src/plugins/projectexplorer/deploymentdata.h
@@ -54,7 +54,7 @@ public:
Utils::FilePath localInstallRoot() const { return m_localInstallRoot; }
void addFile(const DeployableFile &file);
- void addFile(const QString &localFilePath, const QString &remoteDirectory,
+ void addFile(const Utils::FilePath &localFilePath, const QString &remoteDirectory,
DeployableFile::Type type = DeployableFile::TypeNormal);
QString addFilesFromDeploymentFile(const QString &deploymentFilePath, const QString &sourceDir);
diff --git a/src/plugins/projectexplorer/deploymentdataview.cpp b/src/plugins/projectexplorer/deploymentdataview.cpp
index f3fcc072b4..689c351125 100644
--- a/src/plugins/projectexplorer/deploymentdataview.cpp
+++ b/src/plugins/projectexplorer/deploymentdataview.cpp
@@ -74,9 +74,9 @@ public:
if (role != Qt::EditRole)
return false;
if (column == 0)
- file = DeployableFile(data.toString(), file.remoteDirectory());
+ file = DeployableFile(FilePath::fromVariant(data), file.remoteDirectory());
else if (column == 1)
- file = DeployableFile(file.localFilePath().toString(), data.toString());
+ file = DeployableFile(file.localFilePath(), data.toString());
return true;
}