Commit b03c3ef8 authored by hjk's avatar hjk
Browse files

ProjectExplorer: Use covariant return types for aspect creation



... and cloning.  Most aspects already did, it does no harm, might
save a cast later, so follow suit.

Change-Id: Id6275806657b723d4352a4b772b220cb9a2d9a5f
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent 5d63c06e
......@@ -62,12 +62,12 @@ TerminalAspect::TerminalAspect(RunConfiguration *runConfig, const QString &key,
setId("TerminalAspect");
}
IRunConfigurationAspect *TerminalAspect::create(RunConfiguration *runConfig) const
TerminalAspect *TerminalAspect::create(RunConfiguration *runConfig) const
{
return new TerminalAspect(runConfig, m_key, false, false);
}
IRunConfigurationAspect *TerminalAspect::clone(RunConfiguration *runConfig) const
TerminalAspect *TerminalAspect::clone(RunConfiguration *runConfig) const
{
return new TerminalAspect(runConfig, m_key, m_useTerminal, m_userSet);
}
......@@ -134,12 +134,12 @@ WorkingDirectoryAspect::WorkingDirectoryAspect(RunConfiguration *runConfig, cons
setId("WorkingDirectoryAspect");
}
IRunConfigurationAspect *WorkingDirectoryAspect::create(RunConfiguration *runConfig) const
WorkingDirectoryAspect *WorkingDirectoryAspect::create(RunConfiguration *runConfig) const
{
return new WorkingDirectoryAspect(runConfig, m_key);
}
IRunConfigurationAspect *WorkingDirectoryAspect::clone(RunConfiguration *runConfig) const
WorkingDirectoryAspect *WorkingDirectoryAspect::clone(RunConfiguration *runConfig) const
{
return new WorkingDirectoryAspect(runConfig, m_key, m_workingDirectory);
}
......@@ -235,12 +235,12 @@ void ArgumentsAspect::toMap(QVariantMap &map) const
map.insert(m_key, m_arguments);
}
IRunConfigurationAspect *ArgumentsAspect::create(RunConfiguration *runConfig) const
ArgumentsAspect *ArgumentsAspect::create(RunConfiguration *runConfig) const
{
return new ArgumentsAspect(runConfig, m_key);
}
IRunConfigurationAspect *ArgumentsAspect::clone(RunConfiguration *runConfig) const
ArgumentsAspect *ArgumentsAspect::clone(RunConfiguration *runConfig) const
{
return new ArgumentsAspect(runConfig, m_key, m_arguments);
}
......@@ -295,12 +295,12 @@ void ExecutableAspect::toMap(QVariantMap &map) const
map.insert(m_key, m_executable);
}
IRunConfigurationAspect *ExecutableAspect::create(RunConfiguration *runConfig) const
ExecutableAspect *ExecutableAspect::create(RunConfiguration *runConfig) const
{
return new ExecutableAspect(runConfig, m_key);
}
IRunConfigurationAspect *ExecutableAspect::clone(RunConfiguration *runConfig) const
ExecutableAspect *ExecutableAspect::clone(RunConfiguration *runConfig) const
{
return new ExecutableAspect(runConfig, m_key, m_executable);
}
......
......@@ -54,8 +54,8 @@ class PROJECTEXPLORER_EXPORT TerminalAspect : public IRunConfigurationAspect
public:
explicit TerminalAspect(RunConfiguration *rc, const QString &key, bool useTerminal = false, bool userSet = false);
IRunConfigurationAspect *create(RunConfiguration *runConfig) const override;
IRunConfigurationAspect *clone(RunConfiguration *runConfig) const override;
TerminalAspect *create(RunConfiguration *runConfig) const override;
TerminalAspect *clone(RunConfiguration *runConfig) const override;
void addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout) override;
......@@ -85,8 +85,8 @@ class PROJECTEXPLORER_EXPORT WorkingDirectoryAspect : public IRunConfigurationAs
public:
explicit WorkingDirectoryAspect(RunConfiguration *runConfig, const QString &key, const QString &dir = QString());
IRunConfigurationAspect *create(RunConfiguration *runConfig) const override;
IRunConfigurationAspect *clone(RunConfiguration *runConfig) const override;
WorkingDirectoryAspect *create(RunConfiguration *runConfig) const override;
WorkingDirectoryAspect *clone(RunConfiguration *runConfig) const override;
void addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout) override;
......@@ -111,8 +111,8 @@ class PROJECTEXPLORER_EXPORT ArgumentsAspect : public IRunConfigurationAspect
public:
explicit ArgumentsAspect(RunConfiguration *runConfig, const QString &key, const QString &arguments = QString());
IRunConfigurationAspect *create(RunConfiguration *runConfig) const override;
IRunConfigurationAspect *clone(RunConfiguration *runConfig) const override;
ArgumentsAspect *create(RunConfiguration *runConfig) const override;
ArgumentsAspect *clone(RunConfiguration *runConfig) const override;
void addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout) override;
......@@ -137,8 +137,8 @@ class PROJECTEXPLORER_EXPORT ExecutableAspect : public IRunConfigurationAspect
public:
explicit ExecutableAspect(RunConfiguration *runConfig, const QString &key, const QString &executable = QString());
IRunConfigurationAspect *create(RunConfiguration *runConfig) const override;
IRunConfigurationAspect *clone(RunConfiguration *runConfig) const override;
ExecutableAspect *create(RunConfiguration *runConfig) const override;
ExecutableAspect *clone(RunConfiguration *runConfig) const override;
void addToMainConfigurationWidget(QWidget *parent, QFormLayout *layout) override;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment