summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Stenger <christian.stenger@qt.io>2017-03-27 12:08:30 +0200
committerChristian Stenger <christian.stenger@qt.io>2017-03-28 05:06:43 +0000
commita65ce0fe5b53d99225e3ac75bec556536efe1198 (patch)
tree5752afdcb202dbd02dfcca340c1ba8071714c670
parentd2c3cff407bd035e525c8b772cc9993d5e1cf015 (diff)
downloadqt-creator-a65ce0fe5b53d99225e3ac75bec556536efe1198.tar.gz
CMakePM: Fix assignment of build system target
Additionally rename formerly used variable to better express what it is for. Change-Id: I6ecf6a5ac30bc411b41a1de3629a27f8882a0a28 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp14
-rw-r--r--src/plugins/cmakeprojectmanager/cmakerunconfiguration.h5
2 files changed, 11 insertions, 8 deletions
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
index ea018e1126..1205953c8b 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.cpp
@@ -62,7 +62,8 @@ const char TITLE_KEY[] = "CMakeProjectManager.CMakeRunConfiguation.Title";
CMakeRunConfiguration::CMakeRunConfiguration(Target *parent, Core::Id id, const QString &target,
const Utils::FileName &workingDirectory, const QString &title) :
RunConfiguration(parent, id),
- m_buildTarget(target),
+ m_buildSystemTarget(target),
+ m_executable(target),
m_title(title)
{
addExtraAspect(new LocalEnvironmentAspect(this, LocalEnvironmentAspect::BaseEnvironmentModifier()));
@@ -78,7 +79,8 @@ CMakeRunConfiguration::CMakeRunConfiguration(Target *parent, Core::Id id, const
CMakeRunConfiguration::CMakeRunConfiguration(Target *parent, CMakeRunConfiguration *source) :
RunConfiguration(parent, source),
- m_buildTarget(source->m_buildTarget),
+ m_buildSystemTarget(source->m_buildSystemTarget),
+ m_executable(source->m_executable),
m_title(source->m_title),
m_enabled(source->m_enabled)
{
@@ -93,7 +95,7 @@ void CMakeRunConfiguration::ctor()
Runnable CMakeRunConfiguration::runnable() const
{
StandardRunnable r;
- r.executable = m_buildTarget;
+ r.executable = m_executable;
r.commandLineArguments = extraAspect<ArgumentsAspect>()->arguments();
r.workingDirectory = extraAspect<WorkingDirectoryAspect>()->workingDirectory().toString();
r.environment = extraAspect<LocalEnvironmentAspect>()->environment();
@@ -103,9 +105,9 @@ Runnable CMakeRunConfiguration::runnable() const
QString CMakeRunConfiguration::baseWorkingDirectory() const
{
- const QString exe = m_buildTarget;
+ const QString exe = m_executable;
if (!exe.isEmpty())
- return QFileInfo(m_buildTarget).absolutePath();
+ return QFileInfo(m_executable).absolutePath();
return QString();
}
@@ -116,7 +118,7 @@ QString CMakeRunConfiguration::title() const
void CMakeRunConfiguration::setExecutable(const QString &executable)
{
- m_buildTarget = executable;
+ m_executable = executable;
}
void CMakeRunConfiguration::setBaseWorkingDirectory(const Utils::FileName &wd)
diff --git a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
index b89c23ffc4..02ed4df607 100644
--- a/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
+++ b/src/plugins/cmakeprojectmanager/cmakerunconfiguration.h
@@ -56,7 +56,7 @@ public:
bool isEnabled() const override;
QString disabledReason() const override;
- QString buildSystemTarget() const final { return m_buildTarget; }
+ QString buildSystemTarget() const final { return m_buildSystemTarget; }
protected:
CMakeRunConfiguration(ProjectExplorer::Target *parent, CMakeRunConfiguration *source);
@@ -67,7 +67,8 @@ private:
QString baseWorkingDirectory() const;
void ctor();
- QString m_buildTarget;
+ const QString m_buildSystemTarget;
+ QString m_executable;
QString m_title;
bool m_enabled = true;
};