Commit 890c1906 authored by hjk's avatar hjk

ProjectExplorer: Re-organize RunConfiguration constructors

The idea is to massage the setup in a way to make implementation
of new configurations less error prone by identifying recurring patterns
and sharing repetitive code that tends to be forgotten (see Android cloning).

The former two lines of constructors (owner-and-id, owner-and-source)
are split into a simple, shared, constructor and new setId() and
copyFrom() functions.

The change is mostly mechanical, some multiple calls to fromMap
have been removed, though, some consts added.

Otherwise, to keep the patch small it temporarily introduces two
helper templates in IRunConfigurationFactory. Also, setId() signatures
have not been unified yet. These won't be needed in the final setup.

Change-Id: I8c0734496caae744a9883fe6d92c1d8f8e0234ea
Reviewed-by: default avatarhjk <hjk@qt.io>
parent 4710e6b4
...@@ -45,13 +45,8 @@ const char amStartArgsKey[] = "Android.AmStartArgsKey"; ...@@ -45,13 +45,8 @@ const char amStartArgsKey[] = "Android.AmStartArgsKey";
const char preStartShellCmdsKey[] = "Android.PreStartShellCmdListKey"; const char preStartShellCmdsKey[] = "Android.PreStartShellCmdListKey";
const char postFinishShellCmdsKey[] = "Android.PostFinishShellCmdListKey"; const char postFinishShellCmdsKey[] = "Android.PostFinishShellCmdListKey";
AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, Core::Id id) AndroidRunConfiguration::AndroidRunConfiguration(Target *target)
: RunConfiguration(parent, id) : RunConfiguration(target)
{
}
AndroidRunConfiguration::AndroidRunConfiguration(Target *parent, AndroidRunConfiguration *source)
: RunConfiguration(parent, source)
{ {
} }
......
...@@ -29,17 +29,13 @@ ...@@ -29,17 +29,13 @@
#include <projectexplorer/runconfiguration.h> #include <projectexplorer/runconfiguration.h>
QT_BEGIN_NAMESPACE
class QToolButton;
QT_END_NAMESPACE
namespace Android { namespace Android {
class ANDROID_EXPORT AndroidRunConfiguration : public ProjectExplorer::RunConfiguration class ANDROID_EXPORT AndroidRunConfiguration : public ProjectExplorer::RunConfiguration
{ {
Q_OBJECT Q_OBJECT
public: public:
AndroidRunConfiguration(ProjectExplorer::Target *parent, Core::Id id); explicit AndroidRunConfiguration(ProjectExplorer::Target *target);
QWidget *createConfigurationWidget() override; QWidget *createConfigurationWidget() override;
Utils::OutputFormatter *createOutputFormatter() const override; Utils::OutputFormatter *createOutputFormatter() const override;
...@@ -51,15 +47,12 @@ public: ...@@ -51,15 +47,12 @@ public:
const QStringList &preStartShellCommands() const; const QStringList &preStartShellCommands() const;
const QStringList &postFinishShellCommands() const; const QStringList &postFinishShellCommands() const;
protected:
AndroidRunConfiguration(ProjectExplorer::Target *parent, AndroidRunConfiguration *source);
private: private:
// FIXME: This appears to miss a copyFrom() implementation.
void setPreStartShellCommands(const QStringList &cmdList); void setPreStartShellCommands(const QStringList &cmdList);
void setPostFinishShellCommands(const QStringList &cmdList); void setPostFinishShellCommands(const QStringList &cmdList);
void setAmStartExtraArgs(const QStringList &args); void setAmStartExtraArgs(const QStringList &args);
private:
QStringList m_amStartExtraArgs; QStringList m_amStartExtraArgs;
QStringList m_preStartShellCommands; QStringList m_preStartShellCommands;
QStringList m_postFinishShellCommands; QStringList m_postFinishShellCommands;
......
...@@ -47,8 +47,9 @@ class TestRunConfiguration : public ProjectExplorer::RunConfiguration ...@@ -47,8 +47,9 @@ class TestRunConfiguration : public ProjectExplorer::RunConfiguration
public: public:
TestRunConfiguration(ProjectExplorer::Target *parent, TestConfiguration *config) TestRunConfiguration(ProjectExplorer::Target *parent, TestConfiguration *config)
: ProjectExplorer::RunConfiguration(parent, "AutoTest.TestRunConfig") : ProjectExplorer::RunConfiguration(parent)
{ {
initialize("AutoTest.TestRunConfig");
setDefaultDisplayName(tr("AutoTest Debug")); setDefaultDisplayName(tr("AutoTest Debug"));
// disable QmlDebugger that is enabled by default // disable QmlDebugger that is enabled by default
......
...@@ -113,15 +113,19 @@ private: ...@@ -113,15 +113,19 @@ private:
}; };
BareMetalCustomRunConfiguration::BareMetalCustomRunConfiguration(ProjectExplorer::Target *parent) BareMetalCustomRunConfiguration::BareMetalCustomRunConfiguration(ProjectExplorer::Target *parent)
: BareMetalRunConfiguration(parent, runConfigId(), QString()) : BareMetalRunConfiguration(parent)
{ {
} }
BareMetalCustomRunConfiguration::BareMetalCustomRunConfiguration(ProjectExplorer::Target *parent, void BareMetalCustomRunConfiguration::initialize()
BareMetalCustomRunConfiguration *source)
: BareMetalRunConfiguration(parent, source)
, m_localExecutable(source->m_localExecutable)
{ {
BareMetalRunConfiguration::initialize(runConfigId(), QString());
}
void BareMetalCustomRunConfiguration::copyFrom(const BareMetalCustomRunConfiguration *source)
{
BareMetalRunConfiguration::copyFrom(source);
m_localExecutable = source->m_localExecutable;
} }
bool BareMetalCustomRunConfiguration::isConfigured() const bool BareMetalCustomRunConfiguration::isConfigured() const
......
...@@ -36,9 +36,10 @@ class BareMetalCustomRunConfiguration : public BareMetalRunConfiguration ...@@ -36,9 +36,10 @@ class BareMetalCustomRunConfiguration : public BareMetalRunConfiguration
{ {
Q_OBJECT Q_OBJECT
public: public:
BareMetalCustomRunConfiguration(ProjectExplorer::Target *parent); explicit BareMetalCustomRunConfiguration(ProjectExplorer::Target *parent);
BareMetalCustomRunConfiguration(ProjectExplorer::Target *parent,
BareMetalCustomRunConfiguration *source); void initialize();
void copyFrom(const BareMetalCustomRunConfiguration *source);
bool isConfigured() const override; bool isConfigured() const override;
ConfigurationState ensureConfigured(QString *errorMessage) override; ConfigurationState ensureConfigured(QString *errorMessage) override;
......
...@@ -45,34 +45,33 @@ const char ProFileKey[] = "Qt4ProjectManager.MaemoRunConfiguration.ProFile"; ...@@ -45,34 +45,33 @@ const char ProFileKey[] = "Qt4ProjectManager.MaemoRunConfiguration.ProFile";
const char WorkingDirectoryKey[] = "BareMetal.RunConfig.WorkingDirectory"; const char WorkingDirectoryKey[] = "BareMetal.RunConfig.WorkingDirectory";
BareMetalRunConfiguration::BareMetalRunConfiguration(Target *parent, BareMetalRunConfiguration *other) BareMetalRunConfiguration::BareMetalRunConfiguration(Target *target)
: RunConfiguration(parent, other), : RunConfiguration(target)
m_projectFilePath(other->m_projectFilePath),
m_workingDirectory(other->m_workingDirectory)
{ {
init(); addExtraAspect(new ArgumentsAspect(this, "Qt4ProjectManager.MaemoRunConfiguration.Arguments"));
connect(target, &Target::deploymentDataChanged,
this, &BareMetalRunConfiguration::handleBuildSystemDataUpdated);
connect(target, &Target::applicationTargetsChanged,
this, &BareMetalRunConfiguration::handleBuildSystemDataUpdated);
connect(target, &Target::kitChanged,
this, &BareMetalRunConfiguration::handleBuildSystemDataUpdated); // Handles device changes, etc.
} }
BareMetalRunConfiguration::BareMetalRunConfiguration(Target *parent, void BareMetalRunConfiguration::copyFrom(const BareMetalRunConfiguration *other)
const Core::Id id,
const QString &projectFilePath)
: RunConfiguration(parent, id),
m_projectFilePath(projectFilePath)
{ {
addExtraAspect(new ArgumentsAspect(this, QLatin1String("Qt4ProjectManager.MaemoRunConfiguration.Arguments"))); RunConfiguration::copyFrom(other);
init(); m_projectFilePath = other->m_projectFilePath;
m_workingDirectory = other->m_workingDirectory;
setDefaultDisplayName(defaultDisplayName());
} }
void BareMetalRunConfiguration::init() void BareMetalRunConfiguration::initialize(const Core::Id id, const QString &projectFilePath)
{ {
setDefaultDisplayName(defaultDisplayName()); RunConfiguration::initialize(id);
m_projectFilePath = projectFilePath;
connect(target(), &Target::deploymentDataChanged, setDefaultDisplayName(defaultDisplayName());
this, &BareMetalRunConfiguration::handleBuildSystemDataUpdated);
connect(target(), &Target::applicationTargetsChanged,
this, &BareMetalRunConfiguration::handleBuildSystemDataUpdated);
connect(target(), &Target::kitChanged,
this, &BareMetalRunConfiguration::handleBuildSystemDataUpdated); // Handles device changes, etc.
} }
QWidget *BareMetalRunConfiguration::createConfigurationWidget() QWidget *BareMetalRunConfiguration::createConfigurationWidget()
......
...@@ -37,12 +37,11 @@ class BareMetalRunConfiguration : public ProjectExplorer::RunConfiguration ...@@ -37,12 +37,11 @@ class BareMetalRunConfiguration : public ProjectExplorer::RunConfiguration
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY(BareMetalRunConfiguration) Q_DISABLE_COPY(BareMetalRunConfiguration)
friend class BareMetalRunConfigurationFactory; friend class ProjectExplorer::IRunConfigurationFactory;
friend class BareMetalRunConfigurationWidget; friend class BareMetalRunConfigurationWidget;
public: public:
explicit BareMetalRunConfiguration(ProjectExplorer::Target *parent, Core::Id id, explicit BareMetalRunConfiguration(ProjectExplorer::Target *target);
const QString &projectFilePath);
QWidget *createConfigurationWidget() override; QWidget *createConfigurationWidget() override;
Utils::OutputFormatter *createOutputFormatter() const override; Utils::OutputFormatter *createOutputFormatter() const override;
...@@ -65,13 +64,13 @@ signals: ...@@ -65,13 +64,13 @@ signals:
void targetInformationChanged() const; void targetInformationChanged() const;
protected: protected:
BareMetalRunConfiguration(ProjectExplorer::Target *parent, BareMetalRunConfiguration *source);
bool fromMap(const QVariantMap &map) override; bool fromMap(const QVariantMap &map) override;
QString defaultDisplayName(); QString defaultDisplayName();
void initialize(Core::Id id, const QString &projectFilePath);
void copyFrom(const BareMetalRunConfiguration *source);
private: private:
void handleBuildSystemDataUpdated(); void handleBuildSystemDataUpdated();
void init();
QString m_projectFilePath; QString m_projectFilePath;
QString m_workingDirectory; QString m_workingDirectory;
......
...@@ -107,7 +107,7 @@ RunConfiguration *BareMetalRunConfigurationFactory::doCreate(Target *parent, Cor ...@@ -107,7 +107,7 @@ RunConfiguration *BareMetalRunConfigurationFactory::doCreate(Target *parent, Cor
{ {
if (id == BareMetalCustomRunConfiguration::runConfigId()) if (id == BareMetalCustomRunConfiguration::runConfigId())
return new BareMetalCustomRunConfiguration(parent); return new BareMetalCustomRunConfiguration(parent);
return new BareMetalRunConfiguration(parent, id, pathFromId(id)); return createHelper<BareMetalRunConfiguration>(parent, id, pathFromId(id));
} }
RunConfiguration *BareMetalRunConfigurationFactory::doRestore(Target *parent, const QVariantMap &map) RunConfiguration *BareMetalRunConfigurationFactory::doRestore(Target *parent, const QVariantMap &map)
...@@ -120,10 +120,9 @@ RunConfiguration *BareMetalRunConfigurationFactory::doRestore(Target *parent, co ...@@ -120,10 +120,9 @@ RunConfiguration *BareMetalRunConfigurationFactory::doRestore(Target *parent, co
RunConfiguration *BareMetalRunConfigurationFactory::clone(Target *parent, RunConfiguration *source) RunConfiguration *BareMetalRunConfigurationFactory::clone(Target *parent, RunConfiguration *source)
{ {
QTC_ASSERT(canClone(parent, source), return 0); QTC_ASSERT(canClone(parent, source), return 0);
if (BareMetalCustomRunConfiguration *old = qobject_cast<BareMetalCustomRunConfiguration *>(source)) if (qobject_cast<BareMetalCustomRunConfiguration *>(source))
return new BareMetalCustomRunConfiguration(parent, old); return cloneHelper<BareMetalCustomRunConfiguration>(parent, source);
BareMetalRunConfiguration *old = static_cast<BareMetalRunConfiguration*>(source); return cloneHelper<BareMetalRunConfiguration>(parent, source);
return new BareMetalRunConfiguration(parent,old);
} }
bool BareMetalRunConfigurationFactory::canHandle(const Target *target) const bool BareMetalRunConfigurationFactory::canHandle(const Target *target) const
......
...@@ -71,8 +71,9 @@ class DummyRunConfiguration : public RunConfiguration ...@@ -71,8 +71,9 @@ class DummyRunConfiguration : public RunConfiguration
public: public:
DummyRunConfiguration(Target *parent) DummyRunConfiguration(Target *parent)
: RunConfiguration(parent, "ClangStaticAnalyzer.DummyRunConfig") : RunConfiguration(parent)
{ {
initialize("ClangStaticAnalyzer.DummyRunConfig");
setDefaultDisplayName(tr("Clang Static Analyzer")); setDefaultDisplayName(tr("Clang Static Analyzer"));
} }
......
...@@ -60,35 +60,36 @@ const char CMAKE_RC_PREFIX[] = "CMakeProjectManager.CMakeRunConfiguration."; ...@@ -60,35 +60,36 @@ const char CMAKE_RC_PREFIX[] = "CMakeProjectManager.CMakeRunConfiguration.";
const char TITLE_KEY[] = "CMakeProjectManager.CMakeRunConfiguation.Title"; const char TITLE_KEY[] = "CMakeProjectManager.CMakeRunConfiguation.Title";
} // namespace } // namespace
CMakeRunConfiguration::CMakeRunConfiguration(Target *parent, Core::Id id, const QString &target, CMakeRunConfiguration::CMakeRunConfiguration(Target *target)
const Utils::FileName &workingDirectory, const QString &title) : : RunConfiguration(target)
RunConfiguration(parent, id),
m_buildSystemTarget(target),
m_executable(target),
m_title(title)
{ {
addExtraAspect(new LocalEnvironmentAspect(this, LocalEnvironmentAspect::BaseEnvironmentModifier())); addExtraAspect(new LocalEnvironmentAspect(this, LocalEnvironmentAspect::BaseEnvironmentModifier()));
addExtraAspect(new ArgumentsAspect(this, QStringLiteral("CMakeProjectManager.CMakeRunConfiguration.Arguments"))); addExtraAspect(new ArgumentsAspect(this, "CMakeProjectManager.CMakeRunConfiguration.Arguments"));
addExtraAspect(new TerminalAspect(this, QStringLiteral("CMakeProjectManager.CMakeRunConfiguration.UseTerminal"))); addExtraAspect(new TerminalAspect(this, "CMakeProjectManager.CMakeRunConfiguration.UseTerminal"));
addExtraAspect(new WorkingDirectoryAspect(this, "CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"));
auto wd = new WorkingDirectoryAspect(this, QStringLiteral("CMakeProjectManager.CMakeRunConfiguration.UserWorkingDirectory"));
wd->setDefaultWorkingDirectory(workingDirectory);
addExtraAspect(wd);
ctor();
} }
CMakeRunConfiguration::CMakeRunConfiguration(Target *parent, CMakeRunConfiguration *source) : void CMakeRunConfiguration::initialize(Core::Id id, const QString &target,
RunConfiguration(parent, source), const Utils::FileName &workingDirectory, const QString &title)
m_buildSystemTarget(source->m_buildSystemTarget),
m_executable(source->m_executable),
m_title(source->m_title)
{ {
ctor(); RunConfiguration::initialize(id);
m_buildSystemTarget = target;
m_executable = target;
m_title = title;
extraAspect<WorkingDirectoryAspect>()->setDefaultWorkingDirectory(workingDirectory);
setDefaultDisplayName(defaultDisplayName());
} }
void CMakeRunConfiguration::ctor() void CMakeRunConfiguration::copyFrom(const CMakeRunConfiguration *source)
{ {
RunConfiguration::copyFrom(source);
m_buildSystemTarget = source->m_buildSystemTarget;
m_executable = source->m_executable;
m_title = source->m_title;
setDefaultDisplayName(defaultDisplayName()); setDefaultDisplayName(defaultDisplayName());
} }
...@@ -256,7 +257,7 @@ RunConfiguration *CMakeRunConfigurationFactory::doCreate(Target *parent, Core::I ...@@ -256,7 +257,7 @@ RunConfiguration *CMakeRunConfigurationFactory::doCreate(Target *parent, Core::I
CMakeProject *project = static_cast<CMakeProject *>(parent->project()); CMakeProject *project = static_cast<CMakeProject *>(parent->project());
const QString title(buildTargetFromId(id)); const QString title(buildTargetFromId(id));
const CMakeBuildTarget &ct = project->buildTargetForTitle(title); const CMakeBuildTarget &ct = project->buildTargetForTitle(title);
return new CMakeRunConfiguration(parent, id, title, ct.workingDirectory, ct.title); return createHelper<CMakeRunConfiguration>(parent, id, title, ct.workingDirectory, ct.title);
} }
bool CMakeRunConfigurationFactory::canClone(Target *parent, RunConfiguration *source) const bool CMakeRunConfigurationFactory::canClone(Target *parent, RunConfiguration *source) const
...@@ -270,8 +271,7 @@ RunConfiguration *CMakeRunConfigurationFactory::clone(Target *parent, RunConfigu ...@@ -270,8 +271,7 @@ RunConfiguration *CMakeRunConfigurationFactory::clone(Target *parent, RunConfigu
{ {
if (!canClone(parent, source)) if (!canClone(parent, source))
return 0; return 0;
CMakeRunConfiguration *crc(static_cast<CMakeRunConfiguration *>(source)); return cloneHelper<CMakeRunConfiguration>(parent, source);
return new CMakeRunConfiguration(parent, crc);
} }
bool CMakeRunConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const bool CMakeRunConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const
...@@ -284,7 +284,7 @@ bool CMakeRunConfigurationFactory::canRestore(Target *parent, const QVariantMap ...@@ -284,7 +284,7 @@ bool CMakeRunConfigurationFactory::canRestore(Target *parent, const QVariantMap
RunConfiguration *CMakeRunConfigurationFactory::doRestore(Target *parent, const QVariantMap &map) RunConfiguration *CMakeRunConfigurationFactory::doRestore(Target *parent, const QVariantMap &map)
{ {
const Core::Id id = idFromMap(map); const Core::Id id = idFromMap(map);
return new CMakeRunConfiguration(parent, id, buildTargetFromId(id), Utils::FileName(), QString()); return createHelper<CMakeRunConfiguration>(parent, id, buildTargetFromId(id), Utils::FileName(), QString());
} }
QString CMakeRunConfigurationFactory::buildTargetFromId(Core::Id id) QString CMakeRunConfigurationFactory::buildTargetFromId(Core::Id id)
......
...@@ -35,11 +35,10 @@ class CMakeRunConfiguration : public ProjectExplorer::RunConfiguration ...@@ -35,11 +35,10 @@ class CMakeRunConfiguration : public ProjectExplorer::RunConfiguration
{ {
Q_OBJECT Q_OBJECT
friend class CMakeRunConfigurationWidget; friend class CMakeRunConfigurationWidget;
friend class CMakeRunConfigurationFactory; friend class ProjectExplorer::IRunConfigurationFactory;
public: public:
CMakeRunConfiguration(ProjectExplorer::Target *parent, Core::Id id, const QString &target, explicit CMakeRunConfiguration(ProjectExplorer::Target *target);
const Utils::FileName &workingDirectory, const QString &title);
ProjectExplorer::Runnable runnable() const override; ProjectExplorer::Runnable runnable() const override;
QWidget *createConfigurationWidget() override; QWidget *createConfigurationWidget() override;
...@@ -55,18 +54,19 @@ public: ...@@ -55,18 +54,19 @@ public:
QString buildSystemTarget() const final { return m_buildSystemTarget; } QString buildSystemTarget() const final { return m_buildSystemTarget; }
protected: private:
CMakeRunConfiguration(ProjectExplorer::Target *parent, CMakeRunConfiguration *source); void initialize(Core::Id id, const QString &target,
const Utils::FileName &workingDirectory, const QString &title);
void copyFrom(const CMakeRunConfiguration *source);
bool fromMap(const QVariantMap &map) override; bool fromMap(const QVariantMap &map) override;
QString defaultDisplayName() const; QString defaultDisplayName() const;
void updateEnabledState() final; void updateEnabledState() final;
private:
QString baseWorkingDirectory() const; QString baseWorkingDirectory() const;
void ctor();
const QString m_buildSystemTarget; QString m_buildSystemTarget;
QString m_executable; QString m_executable;
QString m_title; QString m_title;
}; };
......
...@@ -502,7 +502,7 @@ Project::RestoreResult GenericProject::fromMap(const QVariantMap &map, QString * ...@@ -502,7 +502,7 @@ Project::RestoreResult GenericProject::fromMap(const QVariantMap &map, QString *
continue; continue;
} }
if (!t->activeRunConfiguration()) if (!t->activeRunConfiguration())
t->addRunConfiguration(new CustomExecutableRunConfiguration(t)); t->addRunConfiguration(IRunConfigurationFactory::createHelper<CustomExecutableRunConfiguration>(t));
} }
m_activeTarget = activeTarget(); m_activeTarget = activeTarget();
......
...@@ -94,28 +94,32 @@ private: ...@@ -94,28 +94,32 @@ private:
QComboBox *m_deviceTypeComboBox; QComboBox *m_deviceTypeComboBox;
}; };
IosRunConfiguration::IosRunConfiguration(Target *parent, Core::Id id, const FileName &path) IosRunConfiguration::IosRunConfiguration(Target *target)
: RunConfiguration(parent, id) : RunConfiguration(target)
, m_profilePath(path)
{ {
addExtraAspect(new ArgumentsAspect(this, QLatin1String("Ios.run_arguments"))); addExtraAspect(new ArgumentsAspect(this, "Ios.run_arguments"));
init();
connect(DeviceManager::instance(), &DeviceManager::updated,
this, &IosRunConfiguration::deviceChanges);
connect(KitManager::instance(), &KitManager::kitsChanged,
this, &IosRunConfiguration::deviceChanges);
} }
IosRunConfiguration::IosRunConfiguration(Target *parent, IosRunConfiguration *source)
: RunConfiguration(parent, source) void IosRunConfiguration::initialize(Core::Id id, const FileName &path)
, m_profilePath(source->m_profilePath)
{ {
init(); RunConfiguration::initialize(id);
m_profilePath = path;
updateDisplayNames();
} }
void IosRunConfiguration::init() void IosRunConfiguration::copyFrom(const IosRunConfiguration *source)
{ {
RunConfiguration::copyFrom(source);
m_profilePath = source->m_profilePath;
updateDisplayNames(); updateDisplayNames();
connect(DeviceManager::instance(), &DeviceManager::updated,
this, &IosRunConfiguration::deviceChanges);
connect(KitManager::instance(), &KitManager::kitsChanged,
this, &IosRunConfiguration::deviceChanges);
} }
void IosRunConfiguration::deviceChanges() { void IosRunConfiguration::deviceChanges() {
......
...@@ -44,10 +44,9 @@ class IosRunConfigurationWidget; ...@@ -44,10 +44,9 @@ class IosRunConfigurationWidget;
class IosRunConfiguration : public ProjectExplorer::RunConfiguration class IosRunConfiguration : public ProjectExplorer::RunConfiguration
{ {
Q_OBJECT Q_OBJECT
friend class IosRunConfigurationFactory;
public: public:
IosRunConfiguration(ProjectExplorer::Target *parent, Core::Id id, const Utils::FileName &path); explicit IosRunConfiguration(ProjectExplorer::Target *target);
QWidget *createConfigurationWidget() override; QWidget *createConfigurationWidget() override;
Utils::OutputFormatter *createOutputFormatter() const override; Utils::OutputFormatter *createOutputFormatter() const override;
...@@ -67,15 +66,15 @@ public: ...@@ -67,15 +66,15 @@ public:
QString buildSystemTarget() const final; QString buildSystemTarget() const final;
protected:
IosRunConfiguration(ProjectExplorer::Target *parent, IosRunConfiguration *source);
signals: signals:
void localExecutableChanged(); void localExecutableChanged();
private: private:
friend class ProjectExplorer::IRunConfigurationFactory;
void initialize(Core::Id id, const Utils::FileName &path);
void copyFrom(const IosRunConfiguration *source);
void deviceChanges(); void deviceChanges();
void init();
friend class IosRunConfigurationWidget; friend class IosRunConfigurationWidget;
void updateDisplayNames(); void updateDisplayNames();
void updateEnabledState() final; void updateEnabledState() final;
......
...@@ -108,8 +108,7 @@ RunConfiguration *IosRunConfigurationFactory::clone(Target *parent, RunConfigura ...@@ -108,8 +108,7 @@ RunConfiguration *IosRunConfigurationFactory::clone(Target *parent, RunConfigura
if (!canClone(parent, source)) if (!canClone(parent, source))
return 0; return 0;