Commit 8beeb6c8 authored by Tobias Hunger's avatar Tobias Hunger
Browse files

ToolChain: Use override on toolchains and related classes



Change-Id: I5019aa3a067f54095ee21096adeb4dea6ad5dea4
Reviewed-by: default avatarDaniel Teske <daniel.teske@theqtcompany.com>
parent cbf30289
......@@ -40,25 +40,25 @@ namespace Internal {
class AndroidToolChain : public ProjectExplorer::GccToolChain
{
public:
~AndroidToolChain();
~AndroidToolChain() override;
QString type() const;
QString typeDisplayName() const;
QString type() const override;
QString typeDisplayName() const override;
bool isValid() const;
bool isValid() const override;
void addToEnvironment(Utils::Environment &env) const;
void addToEnvironment(Utils::Environment &env) const override;
bool operator ==(const ProjectExplorer::ToolChain &) const;
bool operator ==(const ProjectExplorer::ToolChain &) const override;
ProjectExplorer::ToolChainConfigWidget *configurationWidget();
virtual Utils::FileName suggestedDebugger() const;
ProjectExplorer::ToolChainConfigWidget *configurationWidget() override;
virtual Utils::FileName suggestedDebugger() const override;
Utils::FileName suggestedGdbServer() const;
QVariantMap toMap() const;
bool fromMap(const QVariantMap &data);
QList<Utils::FileName> suggestedMkspecList() const;
QString makeCommand(const Utils::Environment &environment) const;
QVariantMap toMap() const override;
bool fromMap(const QVariantMap &data) override;
QList<Utils::FileName> suggestedMkspecList() const override;
QString makeCommand(const Utils::Environment &environment) const override;
QString ndkToolChainVersion() const;
......@@ -66,7 +66,7 @@ public:
void setSecondaryToolChain(bool b);
protected:
QList<ProjectExplorer::Abi> detectSupportedAbis() const;
QList<ProjectExplorer::Abi> detectSupportedAbis() const override;
private:
explicit AndroidToolChain(const ProjectExplorer::Abi &abi, const QString &ndkToolChainVersion, Detection d);
......@@ -88,10 +88,10 @@ public:
AndroidToolChainConfigWidget(AndroidToolChain *);
private:
void applyImpl() {}
void discardImpl() {}
bool isDirtyImpl() const { return false; }
void makeReadOnlyImpl() {}
void applyImpl() override {}
void discardImpl() override {}
bool isDirtyImpl() const override { return false; }
void makeReadOnlyImpl() override {}
};
......@@ -102,9 +102,9 @@ class AndroidToolChainFactory : public ProjectExplorer::ToolChainFactory
public:
AndroidToolChainFactory();
QList<ProjectExplorer::ToolChain *> autoDetect();
bool canRestore(const QVariantMap &data);
ProjectExplorer::ToolChain *restore(const QVariantMap &data);
QList<ProjectExplorer::ToolChain *> autoDetect() override;
bool canRestore(const QVariantMap &data) override;
ProjectExplorer::ToolChain *restore(const QVariantMap &data) override;
class AndroidToolChainInformation
{
......
......@@ -47,25 +47,26 @@ public:
explicit AbstractMsvcToolChain(const QByteArray &id, Detection d, const Abi &abi, const QString& vcvarsBat);
explicit AbstractMsvcToolChain(const QByteArray &id, Detection d);
Abi targetAbi() const;
Abi targetAbi() const override;
bool isValid() const;
bool isValid() const override;
QByteArray predefinedMacros(const QStringList &cxxflags) const;
CompilerFlags compilerFlags(const QStringList &cxxflags) const;
WarningFlags warningFlags(const QStringList &cflags) const;
QList<HeaderPath> systemHeaderPaths(const QStringList &cxxflags, const Utils::FileName &sysRoot) const;
void addToEnvironment(Utils::Environment &env) const;
QByteArray predefinedMacros(const QStringList &cxxflags) const override;
CompilerFlags compilerFlags(const QStringList &cxxflags) const override;
WarningFlags warningFlags(const QStringList &cflags) const override;
QList<HeaderPath> systemHeaderPaths(const QStringList &cxxflags,
const Utils::FileName &sysRoot) const override;
void addToEnvironment(Utils::Environment &env) const override;
QString makeCommand(const Utils::Environment &environment) const;
Utils::FileName compilerCommand() const;
IOutputParser *outputParser() const;
QString makeCommand(const Utils::Environment &environment) const override;
Utils::FileName compilerCommand() const override;
IOutputParser *outputParser() const override;
bool canClone() const;
bool canClone() const override;
QString varsBat() const { return m_vcvarsBat; }
bool operator ==(const ToolChain &) const;
bool operator ==(const ToolChain &) const override;
static bool generateEnvironmentSettings(Utils::Environment &env,
const QString &batchFile,
......
......@@ -76,37 +76,38 @@ public:
OutputParserCount
};
QString type() const;
QString typeDisplayName() const;
Abi targetAbi() const;
QString type() const override;
QString typeDisplayName() const override;
Abi targetAbi() const override;
void setTargetAbi(const Abi &);
bool isValid() const;
bool isValid() const override;
QByteArray predefinedMacros(const QStringList &cxxflags) const;
CompilerFlags compilerFlags(const QStringList &cxxflags) const;
WarningFlags warningFlags(const QStringList &cxxflags) const;
QByteArray predefinedMacros(const QStringList &cxxflags) const override;
CompilerFlags compilerFlags(const QStringList &cxxflags) const override;
WarningFlags warningFlags(const QStringList &cxxflags) const override;
const QStringList &rawPredefinedMacros() const;
void setPredefinedMacros(const QStringList &list);
QList<HeaderPath> systemHeaderPaths(const QStringList &cxxFlags, const Utils::FileName &) const;
void addToEnvironment(Utils::Environment &env) const;
QList<Utils::FileName> suggestedMkspecList() const;
IOutputParser *outputParser() const;
QList<HeaderPath> systemHeaderPaths(const QStringList &cxxFlags,
const Utils::FileName &) const override;
void addToEnvironment(Utils::Environment &env) const override;
QList<Utils::FileName> suggestedMkspecList() const override;
IOutputParser *outputParser() const override;
QStringList headerPathsList() const;
void setHeaderPaths(const QStringList &list);
QVariantMap toMap() const;
bool fromMap(const QVariantMap &data);
QVariantMap toMap() const override;
bool fromMap(const QVariantMap &data) override;
ToolChainConfigWidget *configurationWidget();
ToolChainConfigWidget *configurationWidget() override;
bool operator ==(const ToolChain &) const;
bool operator ==(const ToolChain &) const override;
void setCompilerCommand(const Utils::FileName &);
Utils::FileName compilerCommand() const;
Utils::FileName compilerCommand() const override;
void setMakeCommand(const Utils::FileName &);
QString makeCommand(const Utils::Environment &environment) const;
QString makeCommand(const Utils::Environment &environment) const override;
void setCxx11Flags(const QStringList &);
const QStringList &cxx11Flags() const;
......@@ -114,7 +115,7 @@ public:
void setMkspecs(const QString &);
QString mkspecs() const;
ToolChain *clone() const;
ToolChain *clone() const override;
OutputParser outputParserType() const;
void setOutputParserType(OutputParser parser);
......@@ -154,12 +155,12 @@ class CustomToolChainFactory : public ToolChainFactory
public:
CustomToolChainFactory();
bool canCreate();
ToolChain *create();
bool canCreate() override;
ToolChain *create() override;
// Used by the ToolChainManager to restore user-generated tool chains
bool canRestore(const QVariantMap &data);
ToolChain *restore(const QVariantMap &data);
bool canRestore(const QVariantMap &data) override;
ToolChain *restore(const QVariantMap &data) override;
protected:
virtual CustomToolChain *createToolChain(bool autoDetect);
......@@ -186,10 +187,10 @@ private slots:
void openCustomParserSettingsDialog();
protected:
void applyImpl();
void discardImpl() { setFromToolchain(); }
bool isDirtyImpl() const;
void makeReadOnlyImpl();
void applyImpl() override;
void discardImpl() override { setFromToolchain(); }
bool isDirtyImpl() const override;
void makeReadOnlyImpl() override;
void setFromToolchain();
......
......@@ -58,40 +58,41 @@ class PROJECTEXPLORER_EXPORT GccToolChain : public ToolChain
{
public:
GccToolChain(const QByteArray &id, Detection d);
QString type() const;
QString typeDisplayName() const;
Abi targetAbi() const;
QString type() const override;
QString typeDisplayName() const override;
Abi targetAbi() const override;
QString version() const;
QList<Abi> supportedAbis() const;
void setTargetAbi(const Abi &);
bool isValid() const;
bool isValid() const override;
QByteArray predefinedMacros(const QStringList &cxxflags) const;
CompilerFlags compilerFlags(const QStringList &cxxflags) const;
WarningFlags warningFlags(const QStringList &cflags) const;
QByteArray predefinedMacros(const QStringList &cxxflags) const override;
CompilerFlags compilerFlags(const QStringList &cxxflags) const override;
WarningFlags warningFlags(const QStringList &cflags) const override;
QList<HeaderPath> systemHeaderPaths(const QStringList &cxxflags, const Utils::FileName &sysRoot) const;
void addToEnvironment(Utils::Environment &env) const;
QString makeCommand(const Utils::Environment &environment) const;
QList<Utils::FileName> suggestedMkspecList() const;
IOutputParser *outputParser() const;
QList<HeaderPath> systemHeaderPaths(const QStringList &cxxflags,
const Utils::FileName &sysRoot) const override;
void addToEnvironment(Utils::Environment &env) const override;
QString makeCommand(const Utils::Environment &environment) const override;
QList<Utils::FileName> suggestedMkspecList() const override;
IOutputParser *outputParser() const override;
QVariantMap toMap() const;
bool fromMap(const QVariantMap &data);
QVariantMap toMap() const override;
bool fromMap(const QVariantMap &data) override;
ToolChainConfigWidget *configurationWidget();
ToolChainConfigWidget *configurationWidget() override;
bool operator ==(const ToolChain &) const;
bool operator ==(const ToolChain &) const override;
void resetToolChain(const Utils::FileName &);
Utils::FileName compilerCommand() const;
Utils::FileName compilerCommand() const override;
void setPlatformCodeGenFlags(const QStringList &);
QStringList platformCodeGenFlags() const;
void setPlatformLinkerFlags(const QStringList &);
QStringList platformLinkerFlags() const;
ToolChain *clone() const;
ToolChain *clone() const override;
static void addCommandPathToEnvironment(const Utils::FileName &command, Utils::Environment &env);
......@@ -162,22 +163,22 @@ class PROJECTEXPLORER_EXPORT ClangToolChain : public GccToolChain
{
public:
explicit ClangToolChain(Detection d);
QString type() const;
QString typeDisplayName() const;
QString makeCommand(const Utils::Environment &environment) const;
QString type() const override;
QString typeDisplayName() const override;
QString makeCommand(const Utils::Environment &environment) const override;
CompilerFlags compilerFlags(const QStringList &cxxflags) const;
WarningFlags warningFlags(const QStringList &cflags) const;
CompilerFlags compilerFlags(const QStringList &cxxflags) const override;
WarningFlags warningFlags(const QStringList &cflags) const override;
IOutputParser *outputParser() const;
IOutputParser *outputParser() const override;
ToolChain *clone() const;
ToolChain *clone() const override;
QList<Utils::FileName> suggestedMkspecList() const;
void addToEnvironment(Utils::Environment &env) const;
QList<Utils::FileName> suggestedMkspecList() const override;
void addToEnvironment(Utils::Environment &env) const override;
protected:
virtual CompilerFlags defaultCompilerFlags() const;
virtual CompilerFlags defaultCompilerFlags() const override;
private:
friend class Internal::ClangToolChainFactory;
......@@ -191,13 +192,13 @@ private:
class PROJECTEXPLORER_EXPORT MingwToolChain : public GccToolChain
{
public:
QString type() const;
QString typeDisplayName() const;
QString makeCommand(const Utils::Environment &environment) const;
QString type() const override;
QString typeDisplayName() const override;
QString makeCommand(const Utils::Environment &environment) const override;
ToolChain *clone() const;
ToolChain *clone() const override;
QList<Utils::FileName> suggestedMkspecList() const;
QList<Utils::FileName> suggestedMkspecList() const override;
private:
explicit MingwToolChain(Detection d);
......@@ -213,15 +214,15 @@ private:
class PROJECTEXPLORER_EXPORT LinuxIccToolChain : public GccToolChain
{
public:
QString type() const;
QString typeDisplayName() const;
QString type() const override;
QString typeDisplayName() const override;
CompilerFlags compilerFlags(const QStringList &cxxflags) const;
IOutputParser *outputParser() const;
CompilerFlags compilerFlags(const QStringList &cxxflags) const override;
IOutputParser *outputParser() const override;
ToolChain *clone() const;
ToolChain *clone() const override;
QList<Utils::FileName> suggestedMkspecList() const;
QList<Utils::FileName> suggestedMkspecList() const override;
private:
explicit LinuxIccToolChain(Detection d);
......
......@@ -60,29 +60,29 @@ public:
MsvcToolChain(const QString &name, const Abi &abi,
const QString &varsBat, const QString &varsBatArg, Detection d = ManualDetection);
bool isValid() const;
QList<Utils::FileName> suggestedMkspecList() const;
bool isValid() const override;
QList<Utils::FileName> suggestedMkspecList() const override;
static MsvcToolChain *readFromMap(const QVariantMap &data);
QString type() const;
QString typeDisplayName() const;
QString type() const override;
QString typeDisplayName() const override;
QVariantMap toMap() const;
bool fromMap(const QVariantMap &data);
QVariantMap toMap() const override;
bool fromMap(const QVariantMap &data) override;
ToolChainConfigWidget *configurationWidget();
ToolChainConfigWidget *configurationWidget() override;
ToolChain *clone() const;
ToolChain *clone() const override;
QString varsBatArg() const { return m_varsBatArg; }
bool operator == (const ToolChain &) const;
bool operator == (const ToolChain &) const override;
protected:
Utils::Environment readEnvironmentSetting(Utils::Environment& env) const;
Utils::Environment readEnvironmentSetting(Utils::Environment& env) const override;
QByteArray msvcPredefinedMacros(const QStringList cxxflags,
const Utils::Environment &env) const;
const Utils::Environment &env) const override;
private:
MsvcToolChain();
......@@ -101,11 +101,11 @@ class MsvcToolChainFactory : public ToolChainFactory
public:
MsvcToolChainFactory();
QList<ToolChain *> autoDetect();
QList<ToolChain *> autoDetect() override;
bool canRestore(const QVariantMap &data);
ToolChain *restore(const QVariantMap &data)
{ return MsvcToolChain::readFromMap(data); }
bool canRestore(const QVariantMap &data) override;
ToolChain *restore(const QVariantMap &data) override
{ return MsvcToolChain::readFromMap(data); }
ToolChainConfigWidget *configurationWidget(ToolChain *);
static QString vcVarsBatFor(const QString &basePath, const QString &toolchainName);
......@@ -126,10 +126,10 @@ public:
MsvcToolChainConfigWidget(ToolChain *);
private:
void applyImpl() {}
void discardImpl() { setFromToolChain(); }
bool isDirtyImpl() const { return false; }
void makeReadOnlyImpl() {}
void applyImpl() override {}
void discardImpl() override { setFromToolChain(); }
bool isDirtyImpl() const override { return false; }
void makeReadOnlyImpl() override {}
void setFromToolChain();
......
......@@ -51,27 +51,28 @@ public:
const QString &libPath,
Detection d = ManualDetection);
QList<Utils::FileName> suggestedMkspecList() const;
QList<Utils::FileName> suggestedMkspecList() const override;
static WinCEToolChain *readFromMap(const QVariantMap &data);
QString type() const;
QString typeDisplayName() const;
QString type() const override;
QString typeDisplayName() const override;
QString ceVer() const;
QVariantMap toMap() const;
bool fromMap(const QVariantMap &data);
QVariantMap toMap() const override;
bool fromMap(const QVariantMap &data) override;
ToolChainConfigWidget *configurationWidget();
ToolChainConfigWidget *configurationWidget() override;
ToolChain *clone() const;
ToolChain *clone() const override;
static QString autoDetectCdbDebugger(QStringList *checkedDirectories = 0);
bool operator ==(const ToolChain &other) const;
bool operator ==(const ToolChain &other) const override;
protected:
Utils::Environment readEnvironmentSetting(Utils::Environment& env) const;
Utils::Environment readEnvironmentSetting(Utils::Environment& env) const override;
private:
WinCEToolChain();
......@@ -94,10 +95,10 @@ public:
WinCEToolChainConfigWidget(ToolChain *);
private:
void applyImpl() {}
void discardImpl() { }
bool isDirtyImpl() const {return false;}
void makeReadOnlyImpl() {}
void applyImpl() override { }
void discardImpl() override { }
bool isDirtyImpl() const override { return false; }
void makeReadOnlyImpl() override { }
};
class WinCEToolChainFactory : public ToolChainFactory
......@@ -107,10 +108,10 @@ class WinCEToolChainFactory : public ToolChainFactory
public:
WinCEToolChainFactory();
QList<ToolChain *> autoDetect();
QList<ToolChain *> autoDetect() override;
bool canRestore(const QVariantMap &data);
ToolChain *restore(const QVariantMap &data);
bool canRestore(const QVariantMap &data) override;
ToolChain *restore(const QVariantMap &data) override;
ToolChainConfigWidget *configurationWidget(ToolChain *);
......
......@@ -44,24 +44,24 @@ class QnxToolChain : public ProjectExplorer::GccToolChain
public:
explicit QnxToolChain(Detection d);
QString type() const;
QString typeDisplayName() const;
QString type() const override;
QString typeDisplayName() const override;
ProjectExplorer::ToolChainConfigWidget *configurationWidget();
ProjectExplorer::ToolChainConfigWidget *configurationWidget() override;
void addToEnvironment(Utils::Environment &env) const;
QList<Utils::FileName> suggestedMkspecList() const;
void addToEnvironment(Utils::Environment &env) const override;
QList<Utils::FileName> suggestedMkspecList() const override;
QVariantMap toMap() const;
bool fromMap(const QVariantMap &data);
QVariantMap toMap() const override;
bool fromMap(const QVariantMap &data) override;
QString ndkPath() const;
void setNdkPath(const QString &ndkPath);
protected:
virtual QList<ProjectExplorer::Abi> detectSupportedAbis() const;
virtual QList<ProjectExplorer::Abi> detectSupportedAbis() const override;
QStringList reinterpretOptions(const QStringList &args) const;
QStringList reinterpretOptions(const QStringList &args) const override;
private:
QString m_ndkPath;
......@@ -78,11 +78,11 @@ class QnxToolChainFactory : public ProjectExplorer::ToolChainFactory
public:
QnxToolChainFactory();
bool canRestore(const QVariantMap &data);
ProjectExplorer::ToolChain *restore(const QVariantMap &data);
bool canRestore(const QVariantMap &data) override;
ProjectExplorer::ToolChain *restore(const QVariantMap &data) override;
bool canCreate();
ProjectExplorer::ToolChain *create();
bool canCreate() override;
ProjectExplorer::ToolChain *create() override;
};
//----------------------------------------------------------------------------
......@@ -97,10 +97,10 @@ public:
QnxToolChainConfigWidget(QnxToolChain *tc);
private:
void applyImpl();
void discardImpl();
bool isDirtyImpl() const;
void makeReadOnlyImpl() {}
void applyImpl() override;
void discardImpl() override;
bool isDirtyImpl() const override;
void makeReadOnlyImpl() override { }
Utils::PathChooser *m_compilerCommand;
Utils::PathChooser *m_ndkPath;
......
Markdown is supported
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