Unification of desktop run configurations, step 1

First step, move {DesktopQt,Qbs,CMake}RunConfiguration{,Factory}
into the same new files.

This only moves down to QtSupport, not ProjectExplorer, as there
are in all three cases direct dependencies on QtSupport. Long term
I would expect them to move further down.

Change-Id: Ib16b19df7f3f642ed7f7db89a1f6904601d976ba
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
hjk
2019-08-06 16:50:30 +02:00
parent 2521023627
commit 07a918c89a
26 changed files with 412 additions and 606 deletions

View File

@@ -30,7 +30,6 @@
#include "cmakeparser.h"
#include "cmakeprojectconstants.h"
#include "cmakeproject.h"
#include "cmakerunconfiguration.h"
#include "cmaketool.h"
#include <projectexplorer/buildsteplist.h>
@@ -105,11 +104,6 @@ CMakeBuildConfiguration *CMakeBuildStep::cmakeBuildConfiguration() const
return static_cast<CMakeBuildConfiguration *>(buildConfiguration());
}
CMakeRunConfiguration *CMakeBuildStep::targetsActiveRunConfiguration() const
{
return qobject_cast<CMakeRunConfiguration *>(target()->activeRunConfiguration());
}
void CMakeBuildStep::handleBuildTargetChanges(bool success)
{
if (!success)
@@ -169,7 +163,7 @@ bool CMakeBuildStep::init()
canInit = false;
}
CMakeRunConfiguration *rc = targetsActiveRunConfiguration();
RunConfiguration *rc = target()->activeRunConfiguration();
if (isCurrentExecutableTarget(m_buildTarget) && (!rc || rc->buildKey().isEmpty())) {
emit addTask(Task(Task::Error,
QCoreApplication::translate("ProjectExplorer::Task",
@@ -347,7 +341,7 @@ void CMakeBuildStep::setToolArguments(const QString &list)
m_toolArguments = list;
}
Utils::CommandLine CMakeBuildStep::cmakeCommand(CMakeRunConfiguration *rc) const
Utils::CommandLine CMakeBuildStep::cmakeCommand(RunConfiguration *rc) const
{
CMakeTool *tool = CMakeKitAspect::cmakeTool(target()->kit());