Commit 0e278e9e authored by Tobias Hunger's avatar Tobias Hunger

ProjectConfiguration: Sprinkle override and explicit over the code

Change-Id: I2aa3a32a0d30f1d122977d94d4109227dea6bbd7
Reviewed-by: default avatarNiels Weber <niels.weber@theqtcompany.com>
Reviewed-by: default avatarTobias Hunger <tobias.hunger@theqtcompany.com>
parent ca29cbfc
......@@ -54,8 +54,8 @@ public:
BundleLibrariesDeployment
};
bool fromMap(const QVariantMap &map);
QVariantMap toMap() const;
bool fromMap(const QVariantMap &map) override;
QVariantMap toMap() const override;
AndroidDeployAction deployAction() const;
......@@ -79,7 +79,7 @@ public:
bool useGradle() const;
void setUseGradle(bool b);
bool runInGuiThread() const;
bool runInGuiThread() const override;
QString buildTargetSdk() const;
void setBuildTargetSdk(const QString &sdk);
......@@ -97,10 +97,10 @@ protected:
bool keystorePassword();
bool certificatePassword();
bool init();
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
bool immutable() const { return true; }
void processFinished(int exitCode, QProcess::ExitStatus status);
bool init() override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override { return true; }
void processFinished(int exitCode, QProcess::ExitStatus status) override;
protected:
AndroidDeployAction m_deployAction;
......
......@@ -81,12 +81,12 @@ public:
ForceUnintall
};
public:
AndroidDeployQtStep(ProjectExplorer::BuildStepList *bc);
explicit AndroidDeployQtStep(ProjectExplorer::BuildStepList *bc);
bool fromMap(const QVariantMap &map);
QVariantMap toMap() const;
bool fromMap(const QVariantMap &map) override;
QVariantMap toMap() const override;
bool runInGuiThread() const;
bool runInGuiThread() const override;
UninstallType uninstallPreviousPackage();
......@@ -103,15 +103,15 @@ private:
void ctor();
void runCommand(const QString &program, const QStringList &arguments);
bool init();
void run(QFutureInterface<bool> &fi);
bool init() override;
void run(QFutureInterface<bool> &fi) override;
enum DeployResult { Success, Failure, AskUinstall };
DeployResult runDeploy(QFutureInterface<bool> &fi);
void slotAskForUninstall();
void slotSetSerialNumber(const QString &serialNumber);
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
bool immutable() const { return true; }
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override { return true; }
void processReadyReadStdOutput();
void stdOutput(const QString &line);
......
......@@ -43,8 +43,8 @@ class ANDROID_EXPORT AndroidRunConfiguration : public ProjectExplorer::RunConfig
public:
AndroidRunConfiguration(ProjectExplorer::Target *parent, Core::Id id);
QWidget *createConfigurationWidget();
Utils::OutputFormatter *createOutputFormatter() const;
QWidget *createConfigurationWidget() override;
Utils::OutputFormatter *createOutputFormatter() const override;
const QString remoteChannel() const;
protected:
......
......@@ -94,14 +94,14 @@ class AutogenStep : public ProjectExplorer::AbstractProcessStep
friend class AutogenStepConfigWidget;
public:
AutogenStep(ProjectExplorer::BuildStepList *bsl);
explicit AutogenStep(ProjectExplorer::BuildStepList *bsl);
bool init();
void run(QFutureInterface<bool> &interface);
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
bool immutable() const;
bool init() override;
void run(QFutureInterface<bool> &interface) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override;
QString additionalArguments() const;
QVariantMap toMap() const;
QVariantMap toMap() const override;
public slots:
void setAdditionalArguments(const QString &list);
......@@ -113,7 +113,7 @@ protected:
AutogenStep(ProjectExplorer::BuildStepList *bsl, AutogenStep *bs);
AutogenStep(ProjectExplorer::BuildStepList *bsl, Core::Id id);
bool fromMap(const QVariantMap &map);
bool fromMap(const QVariantMap &map) override;
private:
void ctor();
......
......@@ -94,14 +94,14 @@ class AutoreconfStep : public ProjectExplorer::AbstractProcessStep
friend class AutoreconfStepConfigWidget;
public:
AutoreconfStep(ProjectExplorer::BuildStepList *bsl);
explicit AutoreconfStep(ProjectExplorer::BuildStepList *bsl);
bool init();
void run(QFutureInterface<bool> &interface);
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
bool immutable() const;
bool init() override;
void run(QFutureInterface<bool> &interface) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override;
QString additionalArguments() const;
QVariantMap toMap() const;
QVariantMap toMap() const override;
public slots:
void setAdditionalArguments(const QString &list);
......@@ -113,7 +113,7 @@ protected:
AutoreconfStep(ProjectExplorer::BuildStepList *bsl, AutoreconfStep *bs);
AutoreconfStep(ProjectExplorer::BuildStepList *bsl, Core::Id id);
bool fromMap(const QVariantMap &map);
bool fromMap(const QVariantMap &map) override;
private:
void ctor();
......
......@@ -93,14 +93,14 @@ class ConfigureStep : public ProjectExplorer::AbstractProcessStep
friend class ConfigureStepConfigWidget;
public:
ConfigureStep(ProjectExplorer::BuildStepList *bsl);
explicit ConfigureStep(ProjectExplorer::BuildStepList *bsl);
bool init();
void run(QFutureInterface<bool> &interface);
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
bool immutable() const;
bool init() override;
void run(QFutureInterface<bool> &interface) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override;
QString additionalArguments() const;
QVariantMap toMap() const;
QVariantMap toMap() const override;
public slots:
void setAdditionalArguments(const QString &list);
......@@ -114,7 +114,7 @@ protected:
ConfigureStep(ProjectExplorer::BuildStepList *bsl, ConfigureStep *bs);
ConfigureStep(ProjectExplorer::BuildStepList *bsl, Core::Id id);
bool fromMap(const QVariantMap &map);
bool fromMap(const QVariantMap &map) override;
private:
void ctor();
......
......@@ -92,16 +92,16 @@ class MakeStep : public ProjectExplorer::AbstractProcessStep
friend class MakeStepConfigWidget;
public:
MakeStep(ProjectExplorer::BuildStepList *bsl);
explicit MakeStep(ProjectExplorer::BuildStepList *bsl);
bool init();
void run(QFutureInterface<bool> &interface);
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
bool init() override;
void run(QFutureInterface<bool> &interface) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
void setClean(bool clean);
bool immutable() const;
bool immutable() const override;
void setBuildTarget(const QString &target, bool on);
QString additionalArguments() const;
QVariantMap toMap() const;
QVariantMap toMap() const override;
public slots:
void setAdditionalArguments(const QString &list);
......@@ -113,7 +113,7 @@ protected:
MakeStep(ProjectExplorer::BuildStepList *bsl, MakeStep *bs);
MakeStep(ProjectExplorer::BuildStepList *bsl, Core::Id id);
bool fromMap(const QVariantMap &map);
bool fromMap(const QVariantMap &map) override;
private:
void ctor();
......
......@@ -44,23 +44,23 @@ class BareMetalCustomRunConfiguration : public BareMetalRunConfiguration
public:
BareMetalCustomRunConfiguration(ProjectExplorer::Target *parent);
BareMetalCustomRunConfiguration(ProjectExplorer::Target *parent,
BareMetalCustomRunConfiguration *source);
BareMetalCustomRunConfiguration *source);
bool isEnabled() const { return true; }
bool isConfigured() const;
ConfigurationState ensureConfigured(QString *errorMessage);
QWidget *createConfigurationWidget();
Utils::OutputFormatter *createOutputFormatter() const;
bool isEnabled() const override { return true; }
bool isConfigured() const override;
ConfigurationState ensureConfigured(QString *errorMessage) override;
QWidget *createConfigurationWidget() override;
Utils::OutputFormatter *createOutputFormatter() const override;
virtual QString localExecutableFilePath() const { return m_localExecutable; }
virtual QString localExecutableFilePath() const override { return m_localExecutable; }
void setLocalExecutableFilePath(const QString &executable) { m_localExecutable = executable; }
static Core::Id runConfigId();
static QString runConfigDefaultDisplayName();
bool fromMap(const QVariantMap &map);
QVariantMap toMap() const;
bool fromMap(const QVariantMap &map) override;
QVariantMap toMap() const override;
private:
QString m_localExecutable;
......
......@@ -47,16 +47,16 @@ public:
BareMetalGdbCommandsDeployStep(ProjectExplorer::BuildStepList *bsl, Core::Id id);
BareMetalGdbCommandsDeployStep(ProjectExplorer::BuildStepList *bsl,
BareMetalGdbCommandsDeployStep *other);
~BareMetalGdbCommandsDeployStep();
~BareMetalGdbCommandsDeployStep() override;
bool init();
void run(QFutureInterface<bool> &fi);
bool runInGuiThread() const { return true;}
bool init() override;
void run(QFutureInterface<bool> &fi) override;
bool runInGuiThread() const override { return true;}
bool fromMap(const QVariantMap &map);
QVariantMap toMap() const;
bool fromMap(const QVariantMap &map) override;
QVariantMap toMap() const override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
static Core::Id stepId();
static QString displayName();
......
......@@ -50,10 +50,10 @@ public:
explicit BareMetalRunConfiguration(ProjectExplorer::Target *parent, Core::Id id,
const QString &projectFilePath);
bool isEnabled() const;
QString disabledReason() const;
QWidget *createConfigurationWidget();
Utils::OutputFormatter *createOutputFormatter() const;
bool isEnabled() const override;
QString disabledReason() const override;
QWidget *createConfigurationWidget() override;
Utils::OutputFormatter *createOutputFormatter() const override;
virtual QString localExecutableFilePath() const;
QString arguments() const;
......@@ -61,7 +61,7 @@ public:
QString workingDirectory() const;
void setWorkingDirectory(const QString &wd);
QVariantMap toMap() const;
QVariantMap toMap() const override;
QString projectFilePath() const;
......@@ -73,7 +73,7 @@ signals:
protected:
BareMetalRunConfiguration(ProjectExplorer::Target *parent, BareMetalRunConfiguration *source);
bool fromMap(const QVariantMap &map);
bool fromMap(const QVariantMap &map) override;
QString defaultDisplayName();
void setDisabledReason(const QString &reason) const;
......
......@@ -57,32 +57,32 @@ class CMakeRunConfiguration : public ProjectExplorer::LocalApplicationRunConfigu
public:
CMakeRunConfiguration(ProjectExplorer::Target *parent, Core::Id id, const QString &target,
const QString &workingDirectory, const QString &title);
~CMakeRunConfiguration();
~CMakeRunConfiguration() override;
QString executable() const;
ProjectExplorer::ApplicationLauncher::Mode runMode() const;
QString workingDirectory() const;
QString commandLineArguments() const;
QWidget *createConfigurationWidget();
QString executable() const override;
ProjectExplorer::ApplicationLauncher::Mode runMode() const override;
QString workingDirectory() const override;
QString commandLineArguments() const override;
QWidget *createConfigurationWidget() override;
void setExecutable(const QString &executable);
void setBaseWorkingDirectory(const QString &workingDirectory);
QString title() const;
QVariantMap toMap() const;
QVariantMap toMap() const override;
void setEnabled(bool b);
bool isEnabled() const;
QString disabledReason() const;
bool isEnabled() const override;
QString disabledReason() const override;
signals:
void baseWorkingDirectoryChanged(const QString&);
protected:
CMakeRunConfiguration(ProjectExplorer::Target *parent, CMakeRunConfiguration *source);
virtual bool fromMap(const QVariantMap &map);
virtual bool fromMap(const QVariantMap &map) override;
QString defaultDisplayName() const;
private:
......
......@@ -55,17 +55,17 @@ class MakeStep : public ProjectExplorer::AbstractProcessStep
friend class MakeStepFactory;
public:
MakeStep(ProjectExplorer::BuildStepList *bsl);
virtual ~MakeStep();
explicit MakeStep(ProjectExplorer::BuildStepList *bsl);
~MakeStep() override;
CMakeBuildConfiguration *cmakeBuildConfiguration() const;
virtual bool init();
bool init() override;
virtual void run(QFutureInterface<bool> &fi);
void run(QFutureInterface<bool> &fi) override;
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
virtual bool immutable() const;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override;
QStringList buildTargets() const;
bool buildsBuildTarget(const QString &target) const;
......@@ -80,7 +80,7 @@ public:
void setClean(bool clean);
QVariantMap toMap() const;
QVariantMap toMap() const override;
void setUserMakeCommand(const QString &make);
QString userMakeCommand() const;
......@@ -93,16 +93,16 @@ signals:
void targetsToBuildChanged();
protected:
void processStarted();
void processFinished(int exitCode, QProcess::ExitStatus status);
void processStarted() override;
void processFinished(int exitCode, QProcess::ExitStatus status) override;
MakeStep(ProjectExplorer::BuildStepList *bsl, MakeStep *bs);
MakeStep(ProjectExplorer::BuildStepList *bsl, Core::Id id);
bool fromMap(const QVariantMap &map);
bool fromMap(const QVariantMap &map) override;
// For parsing [ 76%]
virtual void stdOutput(const QString &line);
virtual void stdOutput(const QString &line) override;
private:
void ctor();
......
......@@ -52,14 +52,14 @@ class GenericMakeStep : public ProjectExplorer::AbstractProcessStep
friend class GenericMakeStepFactory;
public:
GenericMakeStep(ProjectExplorer::BuildStepList *parent);
~GenericMakeStep();
explicit GenericMakeStep(ProjectExplorer::BuildStepList *parent);
~GenericMakeStep() override;
bool init();
void run(QFutureInterface<bool> &fi);
bool init() override;
void run(QFutureInterface<bool> &fi) override;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
bool immutable() const;
ProjectExplorer::BuildStepConfigWidget *createConfigWidget() override;
bool immutable() const override;
bool buildsTarget(const QString &target) const;
void setBuildTarget(const QString &target, bool on);
QString allArguments() const;
......@@ -68,12 +68,12 @@ public:
void setClean(bool clean);
bool isClean() const;
QVariantMap toMap() const;
QVariantMap toMap() const override;
protected:
GenericMakeStep(ProjectExplorer::BuildStepList *parent, GenericMakeStep *bs);
GenericMakeStep(ProjectExplorer::BuildStepList *parent, Core::Id id);
bool fromMap(const QVariantMap &map);
bool fromMap(const QVariantMap &map) override;
private:
void ctor();
......
......@@ -51,8 +51,8 @@ class IosBuildStep : public ProjectExplorer::AbstractProcessStep
friend class IosBuildStepFactory;
public:
IosBuildStep(ProjectExplorer::BuildStepList *parent);
~IosBuildStep();
explicit IosBuildStep(ProjectExplorer::BuildStepList *parent);
~IosBuildStep() override;
bool init() override;
void run(QFutureInterface<bool> &fi) override;
......
......@@ -64,9 +64,9 @@ public:
};
friend class IosDeployStepFactory;
IosDeployStep(ProjectExplorer::BuildStepList *bc);
explicit IosDeployStep(ProjectExplorer::BuildStepList *bc);
~IosDeployStep();
~IosDeployStep() override;
bool fromMap(const QVariantMap &map) override;
QVariantMap toMap() const override;
......
......@@ -47,7 +47,7 @@ class IosPresetBuildStep : public ProjectExplorer::AbstractProcessStep
friend class IosPresetBuildStepFactory;
public:
~IosPresetBuildStep();
~IosPresetBuildStep() override;
bool init() override;
void run(QFutureInterface<bool> &fi) override;
......
......@@ -52,11 +52,11 @@ class PROJECTEXPLORER_EXPORT AbstractProcessStep : public BuildStep
Q_OBJECT
public:
virtual ~AbstractProcessStep();
~AbstractProcessStep() override;
virtual bool init();
virtual void run(QFutureInterface<bool> &);
bool runInGuiThread() const { return true; }
bool init() override;
void run(QFutureInterface<bool> &) override;
bool runInGuiThread() const override { return true; }
ProcessParameters *processParameters() { return &m_param; }
......
......@@ -53,7 +53,7 @@ class PROJECTEXPLORER_EXPORT BuildConfiguration : public ProjectConfiguration
public:
// ctors are protected
virtual ~BuildConfiguration();
~BuildConfiguration() override;
Utils::FileName buildDirectory() const;
Utils::FileName rawBuildDirectory() const;
......@@ -75,8 +75,8 @@ public:
QList<Core::Id> knownStepLists() const;
BuildStepList *stepList(Core::Id id) const;
virtual bool fromMap(const QVariantMap &map);
virtual QVariantMap toMap() const;
bool fromMap(const QVariantMap &map) override;
QVariantMap toMap() const override;
Target *target() const;
......
......@@ -56,7 +56,7 @@ protected:
BuildStep(BuildStepList *bsl, BuildStep *bs);
public:
virtual ~BuildStep();
~BuildStep() override;
virtual bool init() = 0;
......@@ -68,8 +68,8 @@ public:
virtual bool runInGuiThread() const;
virtual void cancel();
virtual bool fromMap(const QVariantMap &map);
virtual QVariantMap toMap() const;
bool fromMap(const QVariantMap &map) override;
QVariantMap toMap() const override;
bool enabled() const;
void setEnabled(bool b);
......
......@@ -50,7 +50,7 @@ public:
BuildStepList(QObject *parent, Core::Id id);
BuildStepList(QObject *parent, BuildStepList *source);
BuildStepList(QObject *parent, const QVariantMap &data);
virtual ~BuildStepList();
~BuildStepList() override;
QList<BuildStep *> steps() const;
bool isNull() const;
......@@ -66,7 +66,7 @@ public:
Target *target() const;
virtual QVariantMap toMap() const;
virtual QVariantMap toMap() const override;
void cloneSteps(BuildStepList *source);
signals:
......@@ -76,7 +76,7 @@ signals:
void stepMoved(int from, int to);
protected:
virtual bool fromMap(const QVariantMap &map);
virtual bool fromMap(const QVariantMap &map) override;
private:
QList<BuildStep *> m_steps;
......
......@@ -52,12 +52,12 @@ class PROJECTEXPLORER_EXPORT DeployConfiguration : public ProjectConfiguration
public:
// ctors are protected
virtual ~DeployConfiguration();
~DeployConfiguration() override;
BuildStepList *stepList() const;
virtual bool fromMap(const QVariantMap &map);
virtual QVariantMap toMap() const;
bool fromMap(const QVariantMap &map) override;
QVariantMap toMap() const override;
virtual NamedWidget *createConfigWidget();
......
......@@ -47,11 +47,11 @@ public:
DeviceCheckBuildStep(BuildStepList *bsl, Core::Id id);
DeviceCheckBuildStep(BuildStepList *bsl, DeviceCheckBuildStep *bs);
bool init();
bool init() override;
void run(QFutureInterface<bool> &fi);
void run(QFutureInterface<bool> &fi) override;
BuildStepConfigWidget *createConfigWidget();
BuildStepConfigWidget *createConfigWidget() override;
static Core::Id stepId();
static QString stepDisplayName();
......
......@@ -42,7 +42,7 @@ class PROJECTEXPLORER_EXPORT LocalApplicationRunConfiguration : public RunConfig
{
Q_OBJECT
public:
~LocalApplicationRunConfiguration();
~LocalApplicationRunConfiguration() override;
virtual QString executable() const = 0;
virtual ApplicationLauncher::Mode runMode() const = 0;
......
......@@ -64,13 +64,13 @@ class ProcessStep : public AbstractProcessStep
public:
explicit ProcessStep(BuildStepList *bsl);
virtual ~ProcessStep();
~ProcessStep() override;