forked from qt-creator/qt-creator
ProjectExplorer: Use data member for ToolChain::typeDisplayName
Change-Id: Ia78ea3f8628b759706c5b024d687d917b203ec4d Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -72,13 +72,14 @@ static ToolChain *findToolChain(Utils::FilePath &compilerPath, Core::Id lang, co
|
|||||||
return tc;
|
return tc;
|
||||||
}
|
}
|
||||||
|
|
||||||
AndroidToolChain::~AndroidToolChain() = default;
|
AndroidToolChain::AndroidToolChain()
|
||||||
|
: ClangToolChain(Constants::ANDROID_TOOLCHAIN_TYPEID)
|
||||||
QString AndroidToolChain::typeDisplayName() const
|
|
||||||
{
|
{
|
||||||
return AndroidToolChainFactory::tr("Android Clang");
|
setTypeDisplayName(AndroidToolChainFactory::tr("Android Clang"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
AndroidToolChain::~AndroidToolChain() = default;
|
||||||
|
|
||||||
bool AndroidToolChain::isValid() const
|
bool AndroidToolChain::isValid() const
|
||||||
{
|
{
|
||||||
return ClangToolChain::isValid()
|
return ClangToolChain::isValid()
|
||||||
@@ -211,12 +212,5 @@ ToolChainList AndroidToolChainFactory::autodetectToolChainsForNdk(const ToolChai
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
// for fromMap
|
|
||||||
AndroidToolChain::AndroidToolChain()
|
|
||||||
: ClangToolChain(Constants::ANDROID_TOOLCHAIN_TYPEID)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
} // namespace Android
|
} // namespace Android
|
||||||
|
@@ -37,7 +37,6 @@ class AndroidToolChain : public ProjectExplorer::ClangToolChain
|
|||||||
public:
|
public:
|
||||||
~AndroidToolChain() override;
|
~AndroidToolChain() override;
|
||||||
|
|
||||||
QString typeDisplayName() const override;
|
|
||||||
bool isValid() const override;
|
bool isValid() const override;
|
||||||
void addToEnvironment(Utils::Environment &env) const override;
|
void addToEnvironment(Utils::Environment &env) const override;
|
||||||
|
|
||||||
|
@@ -224,11 +224,8 @@ static QString buildDisplayName(Abi::Architecture arch, Core::Id language,
|
|||||||
|
|
||||||
IarToolChain::IarToolChain() :
|
IarToolChain::IarToolChain() :
|
||||||
ToolChain(Constants::IAREW_TOOLCHAIN_TYPEID)
|
ToolChain(Constants::IAREW_TOOLCHAIN_TYPEID)
|
||||||
{ }
|
|
||||||
|
|
||||||
QString IarToolChain::typeDisplayName() const
|
|
||||||
{
|
{
|
||||||
return Internal::IarToolChainFactory::tr("IAREW");
|
setTypeDisplayName(Internal::IarToolChainFactory::tr("IAREW"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void IarToolChain::setTargetAbi(const Abi &abi)
|
void IarToolChain::setTargetAbi(const Abi &abi)
|
||||||
|
@@ -52,8 +52,6 @@ class IarToolChain final : public ProjectExplorer::ToolChain
|
|||||||
Q_DECLARE_TR_FUNCTIONS(IarToolChain)
|
Q_DECLARE_TR_FUNCTIONS(IarToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QString typeDisplayName() const final;
|
|
||||||
|
|
||||||
void setTargetAbi(const ProjectExplorer::Abi &abi);
|
void setTargetAbi(const ProjectExplorer::Abi &abi);
|
||||||
ProjectExplorer::Abi targetAbi() const final;
|
ProjectExplorer::Abi targetAbi() const final;
|
||||||
|
|
||||||
|
@@ -238,11 +238,8 @@ static QString buildDisplayName(Abi::Architecture arch, Core::Id language,
|
|||||||
|
|
||||||
KeilToolchain::KeilToolchain() :
|
KeilToolchain::KeilToolchain() :
|
||||||
ToolChain(Constants::KEIL_TOOLCHAIN_TYPEID)
|
ToolChain(Constants::KEIL_TOOLCHAIN_TYPEID)
|
||||||
{ }
|
|
||||||
|
|
||||||
QString KeilToolchain::typeDisplayName() const
|
|
||||||
{
|
{
|
||||||
return Internal::KeilToolchainFactory::tr("KEIL");
|
setTypeDisplayName(Internal::KeilToolchainFactory::tr("KEIL"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeilToolchain::setTargetAbi(const Abi &abi)
|
void KeilToolchain::setTargetAbi(const Abi &abi)
|
||||||
|
@@ -52,8 +52,6 @@ class KeilToolchain final : public ProjectExplorer::ToolChain
|
|||||||
Q_DECLARE_TR_FUNCTIONS(KeilToolchain)
|
Q_DECLARE_TR_FUNCTIONS(KeilToolchain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QString typeDisplayName() const final;
|
|
||||||
|
|
||||||
void setTargetAbi(const ProjectExplorer::Abi &abi);
|
void setTargetAbi(const ProjectExplorer::Abi &abi);
|
||||||
ProjectExplorer::Abi targetAbi() const final;
|
ProjectExplorer::Abi targetAbi() const final;
|
||||||
|
|
||||||
|
@@ -212,11 +212,8 @@ static Utils::FilePath compilerPathFromEnvironment(const QString &compilerName)
|
|||||||
|
|
||||||
SdccToolChain::SdccToolChain() :
|
SdccToolChain::SdccToolChain() :
|
||||||
ToolChain(Constants::SDCC_TOOLCHAIN_TYPEID)
|
ToolChain(Constants::SDCC_TOOLCHAIN_TYPEID)
|
||||||
{ }
|
|
||||||
|
|
||||||
QString SdccToolChain::typeDisplayName() const
|
|
||||||
{
|
{
|
||||||
return Internal::SdccToolChainFactory::tr("SDCC");
|
setTypeDisplayName(Internal::SdccToolChainFactory::tr("SDCC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SdccToolChain::setTargetAbi(const Abi &abi)
|
void SdccToolChain::setTargetAbi(const Abi &abi)
|
||||||
|
@@ -52,8 +52,6 @@ class SdccToolChain final : public ProjectExplorer::ToolChain
|
|||||||
Q_DECLARE_TR_FUNCTIONS(SdccToolChain)
|
Q_DECLARE_TR_FUNCTIONS(SdccToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QString typeDisplayName() const final;
|
|
||||||
|
|
||||||
void setTargetAbi(const ProjectExplorer::Abi &abi);
|
void setTargetAbi(const ProjectExplorer::Abi &abi);
|
||||||
ProjectExplorer::Abi targetAbi() const final;
|
ProjectExplorer::Abi targetAbi() const final;
|
||||||
|
|
||||||
|
@@ -49,19 +49,7 @@ NimToolChain::NimToolChain(Core::Id typeId)
|
|||||||
, m_version(std::make_tuple(-1,-1,-1))
|
, m_version(std::make_tuple(-1,-1,-1))
|
||||||
{
|
{
|
||||||
setLanguage(Constants::C_NIMLANGUAGE_ID);
|
setLanguage(Constants::C_NIMLANGUAGE_ID);
|
||||||
}
|
setTypeDisplayName(NimToolChainFactory::tr("Nim"));
|
||||||
|
|
||||||
NimToolChain::NimToolChain(const NimToolChain &other)
|
|
||||||
: ToolChain(other.typeId())
|
|
||||||
, m_compilerCommand(other.m_compilerCommand)
|
|
||||||
, m_version(other.m_version)
|
|
||||||
{
|
|
||||||
setLanguage(Constants::C_NIMLANGUAGE_ID);
|
|
||||||
}
|
|
||||||
|
|
||||||
QString NimToolChain::typeDisplayName() const
|
|
||||||
{
|
|
||||||
return NimToolChainFactory::tr("Nim");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Abi NimToolChain::targetAbi() const
|
Abi NimToolChain::targetAbi() const
|
||||||
|
@@ -36,7 +36,6 @@ public:
|
|||||||
NimToolChain();
|
NimToolChain();
|
||||||
explicit NimToolChain(Core::Id typeId);
|
explicit NimToolChain(Core::Id typeId);
|
||||||
|
|
||||||
QString typeDisplayName() const override;
|
|
||||||
ProjectExplorer::Abi targetAbi() const override;
|
ProjectExplorer::Abi targetAbi() const override;
|
||||||
bool isValid() const override;
|
bool isValid() const override;
|
||||||
|
|
||||||
@@ -62,8 +61,6 @@ public:
|
|||||||
static bool parseVersion(const Utils::FilePath &path, std::tuple<int, int, int> &version);
|
static bool parseVersion(const Utils::FilePath &path, std::tuple<int, int, int> &version);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
NimToolChain(const NimToolChain &other);
|
|
||||||
|
|
||||||
Utils::FilePath m_compilerCommand;
|
Utils::FilePath m_compilerCommand;
|
||||||
std::tuple<int, int, int> m_version;
|
std::tuple<int, int, int> m_version;
|
||||||
};
|
};
|
||||||
|
@@ -84,11 +84,8 @@ static const char warningExampleKeyC[] = "ProjectExplorer.CustomToolChain.Warnin
|
|||||||
CustomToolChain::CustomToolChain() :
|
CustomToolChain::CustomToolChain() :
|
||||||
ToolChain(Constants::CUSTOM_TOOLCHAIN_TYPEID),
|
ToolChain(Constants::CUSTOM_TOOLCHAIN_TYPEID),
|
||||||
m_outputParserId(GccParser::id())
|
m_outputParserId(GccParser::id())
|
||||||
{ }
|
|
||||||
|
|
||||||
QString CustomToolChain::typeDisplayName() const
|
|
||||||
{
|
{
|
||||||
return Internal::CustomToolChainFactory::tr("Custom");
|
setTypeDisplayName(Internal::CustomToolChainFactory::tr("Custom"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Abi CustomToolChain::targetAbi() const
|
Abi CustomToolChain::targetAbi() const
|
||||||
|
@@ -65,7 +65,6 @@ public:
|
|||||||
QString displayName; ///< A translateable name to show in the user interface
|
QString displayName; ///< A translateable name to show in the user interface
|
||||||
};
|
};
|
||||||
|
|
||||||
QString typeDisplayName() const override;
|
|
||||||
Abi targetAbi() const override;
|
Abi targetAbi() const override;
|
||||||
void setTargetAbi(const Abi &);
|
void setTargetAbi(const Abi &);
|
||||||
|
|
||||||
|
@@ -232,13 +232,11 @@ static QString gccVersion(const FilePath &path, const QStringList &env)
|
|||||||
// GccToolChain
|
// GccToolChain
|
||||||
// --------------------------------------------------------------------------
|
// --------------------------------------------------------------------------
|
||||||
|
|
||||||
GccToolChain::GccToolChain() :
|
|
||||||
GccToolChain(Constants::GCC_TOOLCHAIN_TYPEID)
|
|
||||||
{ }
|
|
||||||
|
|
||||||
GccToolChain::GccToolChain(Core::Id typeId) :
|
GccToolChain::GccToolChain(Core::Id typeId) :
|
||||||
ToolChain(typeId)
|
ToolChain(typeId)
|
||||||
{ }
|
{
|
||||||
|
setTypeDisplayName(GccToolChainFactory::tr("GCC"));
|
||||||
|
}
|
||||||
|
|
||||||
void GccToolChain::setCompilerCommand(const FilePath &path)
|
void GccToolChain::setCompilerCommand(const FilePath &path)
|
||||||
{
|
{
|
||||||
@@ -289,11 +287,6 @@ LanguageExtensions GccToolChain::defaultLanguageExtensions() const
|
|||||||
return LanguageExtension::Gnu;
|
return LanguageExtension::Gnu;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString GccToolChain::typeDisplayName() const
|
|
||||||
{
|
|
||||||
return GccToolChainFactory::tr("GCC");
|
|
||||||
}
|
|
||||||
|
|
||||||
Abi GccToolChain::targetAbi() const
|
Abi GccToolChain::targetAbi() const
|
||||||
{
|
{
|
||||||
return m_targetAbi;
|
return m_targetAbi;
|
||||||
@@ -867,7 +860,7 @@ GccToolChainFactory::GccToolChainFactory()
|
|||||||
setDisplayName(tr("GCC"));
|
setDisplayName(tr("GCC"));
|
||||||
setSupportedToolChainType(Constants::GCC_TOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::GCC_TOOLCHAIN_TYPEID);
|
||||||
setSupportedLanguages({Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID});
|
setSupportedLanguages({Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID});
|
||||||
setToolchainConstructor([] { return new GccToolChain; });
|
setToolchainConstructor([] { return new GccToolChain(Constants::GCC_TOOLCHAIN_TYPEID); });
|
||||||
setUserCreatable(true);
|
setUserCreatable(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1265,14 +1258,14 @@ void ClangToolChain::syncAutodetectedWithParentToolchains()
|
|||||||
}
|
}
|
||||||
|
|
||||||
ClangToolChain::ClangToolChain() :
|
ClangToolChain::ClangToolChain() :
|
||||||
GccToolChain(Constants::CLANG_TOOLCHAIN_TYPEID)
|
ClangToolChain(Constants::CLANG_TOOLCHAIN_TYPEID)
|
||||||
{
|
{
|
||||||
syncAutodetectedWithParentToolchains();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ClangToolChain::ClangToolChain(Core::Id typeId) :
|
ClangToolChain::ClangToolChain(Core::Id typeId) :
|
||||||
GccToolChain(typeId)
|
GccToolChain(typeId)
|
||||||
{
|
{
|
||||||
|
setTypeDisplayName(ClangToolChainFactory::tr("Clang"));
|
||||||
syncAutodetectedWithParentToolchains();
|
syncAutodetectedWithParentToolchains();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1282,11 +1275,6 @@ ClangToolChain::~ClangToolChain()
|
|||||||
QObject::disconnect(m_mingwToolchainAddedConnection);
|
QObject::disconnect(m_mingwToolchainAddedConnection);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ClangToolChain::typeDisplayName() const
|
|
||||||
{
|
|
||||||
return ClangToolChainFactory::tr("Clang");
|
|
||||||
}
|
|
||||||
|
|
||||||
FilePath ClangToolChain::makeCommand(const Environment &environment) const
|
FilePath ClangToolChain::makeCommand(const Environment &environment) const
|
||||||
{
|
{
|
||||||
const QStringList makes
|
const QStringList makes
|
||||||
@@ -1594,11 +1582,8 @@ void ClangToolChainConfigWidget::makeReadOnlyImpl()
|
|||||||
|
|
||||||
MingwToolChain::MingwToolChain() :
|
MingwToolChain::MingwToolChain() :
|
||||||
GccToolChain(Constants::MINGW_TOOLCHAIN_TYPEID)
|
GccToolChain(Constants::MINGW_TOOLCHAIN_TYPEID)
|
||||||
{ }
|
|
||||||
|
|
||||||
QString MingwToolChain::typeDisplayName() const
|
|
||||||
{
|
{
|
||||||
return MingwToolChainFactory::tr("MinGW");
|
setTypeDisplayName(MingwToolChainFactory::tr("MinGW"));
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList MingwToolChain::suggestedMkspecList() const
|
QStringList MingwToolChain::suggestedMkspecList() const
|
||||||
@@ -1673,11 +1658,8 @@ QList<ToolChain *> MingwToolChainFactory::autoDetect(const FilePath &compilerPat
|
|||||||
|
|
||||||
LinuxIccToolChain::LinuxIccToolChain() :
|
LinuxIccToolChain::LinuxIccToolChain() :
|
||||||
GccToolChain(Constants::LINUXICC_TOOLCHAIN_TYPEID)
|
GccToolChain(Constants::LINUXICC_TOOLCHAIN_TYPEID)
|
||||||
{ }
|
|
||||||
|
|
||||||
QString LinuxIccToolChain::typeDisplayName() const
|
|
||||||
{
|
{
|
||||||
return LinuxIccToolChainFactory::tr("Linux ICC");
|
setTypeDisplayName(LinuxIccToolChainFactory::tr("Linux ICC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -68,7 +68,7 @@ class PROJECTEXPLORER_EXPORT GccToolChain : public ToolChain
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GccToolChain(Core::Id typeId);
|
GccToolChain(Core::Id typeId);
|
||||||
QString typeDisplayName() const override;
|
|
||||||
Abi targetAbi() const override;
|
Abi targetAbi() const override;
|
||||||
QString originalTargetTriple() const override;
|
QString originalTargetTriple() const override;
|
||||||
QString version() const;
|
QString version() const;
|
||||||
@@ -174,8 +174,6 @@ protected:
|
|||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
explicit GccToolChain();
|
|
||||||
|
|
||||||
void updateSupportedAbis() const;
|
void updateSupportedAbis() const;
|
||||||
static QStringList gccPrepareArguments(const QStringList &flags,
|
static QStringList gccPrepareArguments(const QStringList &flags,
|
||||||
const QString &sysRoot,
|
const QString &sysRoot,
|
||||||
@@ -214,7 +212,6 @@ public:
|
|||||||
explicit ClangToolChain(Core::Id typeId);
|
explicit ClangToolChain(Core::Id typeId);
|
||||||
~ClangToolChain() override;
|
~ClangToolChain() override;
|
||||||
|
|
||||||
QString typeDisplayName() const override;
|
|
||||||
Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
|
Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
|
||||||
|
|
||||||
Utils::LanguageExtensions languageExtensions(const QStringList &cxxflags) const override;
|
Utils::LanguageExtensions languageExtensions(const QStringList &cxxflags) const override;
|
||||||
@@ -256,7 +253,6 @@ private:
|
|||||||
class PROJECTEXPLORER_EXPORT MingwToolChain : public GccToolChain
|
class PROJECTEXPLORER_EXPORT MingwToolChain : public GccToolChain
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QString typeDisplayName() const override;
|
|
||||||
Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
|
Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
|
||||||
|
|
||||||
QStringList suggestedMkspecList() const override;
|
QStringList suggestedMkspecList() const override;
|
||||||
@@ -275,8 +271,6 @@ private:
|
|||||||
class PROJECTEXPLORER_EXPORT LinuxIccToolChain : public GccToolChain
|
class PROJECTEXPLORER_EXPORT LinuxIccToolChain : public GccToolChain
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QString typeDisplayName() const override;
|
|
||||||
|
|
||||||
Utils::LanguageExtensions languageExtensions(const QStringList &cxxflags) const override;
|
Utils::LanguageExtensions languageExtensions(const QStringList &cxxflags) const override;
|
||||||
IOutputParser *outputParser() const override;
|
IOutputParser *outputParser() const override;
|
||||||
|
|
||||||
|
@@ -847,6 +847,7 @@ MsvcToolChain::MsvcToolChain(Core::Id typeId)
|
|||||||
: ToolChain(typeId)
|
: ToolChain(typeId)
|
||||||
{
|
{
|
||||||
setDisplayName("Microsoft Visual C++ Compiler");
|
setDisplayName("Microsoft Visual C++ Compiler");
|
||||||
|
setTypeDisplayName(MsvcToolChainFactory::tr("MSVC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MsvcToolChain::inferWarningsForLevel(int warningLevel, WarningFlags &flags)
|
void MsvcToolChain::inferWarningsForLevel(int warningLevel, WarningFlags &flags)
|
||||||
@@ -902,11 +903,6 @@ QString MsvcToolChain::originalTargetTriple() const
|
|||||||
: QLatin1String("i686-pc-windows-msvc");
|
: QLatin1String("i686-pc-windows-msvc");
|
||||||
}
|
}
|
||||||
|
|
||||||
QString MsvcToolChain::typeDisplayName() const
|
|
||||||
{
|
|
||||||
return MsvcToolChainFactory::tr("MSVC");
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList MsvcToolChain::suggestedMkspecList() const
|
QStringList MsvcToolChain::suggestedMkspecList() const
|
||||||
{
|
{
|
||||||
// "win32-msvc" is the common MSVC mkspec introduced in Qt 5.8.1
|
// "win32-msvc" is the common MSVC mkspec introduced in Qt 5.8.1
|
||||||
@@ -1651,6 +1647,7 @@ ClangClToolChain::ClangClToolChain()
|
|||||||
: MsvcToolChain(Constants::CLANG_CL_TOOLCHAIN_TYPEID)
|
: MsvcToolChain(Constants::CLANG_CL_TOOLCHAIN_TYPEID)
|
||||||
{
|
{
|
||||||
setDisplayName("clang-cl");
|
setDisplayName("clang-cl");
|
||||||
|
setTypeDisplayName(QCoreApplication::translate("ProjectExplorer::ClangToolChainFactory", "Clang"));
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ClangClToolChain::isValid() const
|
bool ClangClToolChain::isValid() const
|
||||||
@@ -1671,11 +1668,6 @@ Utils::FilePath ClangClToolChain::compilerCommand() const
|
|||||||
return Utils::FilePath::fromString(m_clangPath);
|
return Utils::FilePath::fromString(m_clangPath);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString ClangClToolChain::typeDisplayName() const
|
|
||||||
{
|
|
||||||
return QCoreApplication::translate("ProjectExplorer::ClangToolChainFactory", "Clang");
|
|
||||||
}
|
|
||||||
|
|
||||||
QStringList ClangClToolChain::suggestedMkspecList() const
|
QStringList ClangClToolChain::suggestedMkspecList() const
|
||||||
{
|
{
|
||||||
const QString mkspec = "win32-clang-" + Abi::toString(targetAbi().osFlavor());
|
const QString mkspec = "win32-clang-" + Abi::toString(targetAbi().osFlavor());
|
||||||
|
@@ -70,8 +70,6 @@ public:
|
|||||||
|
|
||||||
QStringList suggestedMkspecList() const override;
|
QStringList suggestedMkspecList() const override;
|
||||||
|
|
||||||
QString typeDisplayName() const override;
|
|
||||||
|
|
||||||
QVariantMap toMap() const override;
|
QVariantMap toMap() const override;
|
||||||
bool fromMap(const QVariantMap &data) override;
|
bool fromMap(const QVariantMap &data) override;
|
||||||
|
|
||||||
@@ -170,7 +168,6 @@ public:
|
|||||||
ClangClToolChain();
|
ClangClToolChain();
|
||||||
|
|
||||||
bool isValid() const override;
|
bool isValid() const override;
|
||||||
QString typeDisplayName() const override;
|
|
||||||
QStringList suggestedMkspecList() const override;
|
QStringList suggestedMkspecList() const override;
|
||||||
void addToEnvironment(Utils::Environment &env) const override;
|
void addToEnvironment(Utils::Environment &env) const override;
|
||||||
Utils::FilePath compilerCommand() const override;
|
Utils::FilePath compilerCommand() const override;
|
||||||
|
@@ -70,6 +70,7 @@ public:
|
|||||||
QByteArray m_id;
|
QByteArray m_id;
|
||||||
QSet<Core::Id> m_supportedLanguages;
|
QSet<Core::Id> m_supportedLanguages;
|
||||||
mutable QString m_displayName;
|
mutable QString m_displayName;
|
||||||
|
QString m_typeDisplayName;
|
||||||
Core::Id m_typeId;
|
Core::Id m_typeId;
|
||||||
Core::Id m_language;
|
Core::Id m_language;
|
||||||
Detection m_detection = ToolChain::UninitializedDetection;
|
Detection m_detection = ToolChain::UninitializedDetection;
|
||||||
@@ -257,6 +258,16 @@ void ToolChain::setDetection(ToolChain::Detection de)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
QString ToolChain::typeDisplayName() const
|
||||||
|
{
|
||||||
|
return d->m_typeDisplayName;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ToolChain::setTypeDisplayName(const QString &typeName)
|
||||||
|
{
|
||||||
|
d->m_typeDisplayName = typeName;
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
Used by the tool chain manager to load user-generated tool chains.
|
Used by the tool chain manager to load user-generated tool chains.
|
||||||
|
|
||||||
|
@@ -101,8 +101,10 @@ public:
|
|||||||
virtual QStringList suggestedMkspecList() const;
|
virtual QStringList suggestedMkspecList() const;
|
||||||
|
|
||||||
Core::Id typeId() const;
|
Core::Id typeId() const;
|
||||||
virtual QString typeDisplayName() const = 0;
|
QString typeDisplayName() const;
|
||||||
|
|
||||||
virtual Abi targetAbi() const = 0;
|
virtual Abi targetAbi() const = 0;
|
||||||
|
|
||||||
virtual ProjectExplorer::Abis supportedAbis() const;
|
virtual ProjectExplorer::Abis supportedAbis() const;
|
||||||
virtual QString originalTargetTriple() const { return QString(); }
|
virtual QString originalTargetTriple() const { return QString(); }
|
||||||
virtual QStringList extraCodeModelFlags() const { return QStringList(); }
|
virtual QStringList extraCodeModelFlags() const { return QStringList(); }
|
||||||
@@ -163,6 +165,8 @@ public:
|
|||||||
protected:
|
protected:
|
||||||
explicit ToolChain(Core::Id typeId);
|
explicit ToolChain(Core::Id typeId);
|
||||||
|
|
||||||
|
void setTypeDisplayName(const QString &typeName);
|
||||||
|
|
||||||
const MacrosCache &predefinedMacrosCache() const;
|
const MacrosCache &predefinedMacrosCache() const;
|
||||||
const HeaderPathsCache &headerPathsCache() const;
|
const HeaderPathsCache &headerPathsCache() const;
|
||||||
|
|
||||||
|
@@ -299,21 +299,19 @@ const char TestToolChainType[] = "TestToolChainType";
|
|||||||
class TTC : public ToolChain
|
class TTC : public ToolChain
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TTC() : ToolChain(TestToolChainType) {}
|
TTC(const QByteArray &t = {}, bool v = true) :
|
||||||
|
|
||||||
TTC(const QByteArray &t, bool v = true) :
|
|
||||||
ToolChain(TestToolChainType),
|
ToolChain(TestToolChainType),
|
||||||
token(t),
|
token(t),
|
||||||
m_valid(v)
|
m_valid(v)
|
||||||
{
|
{
|
||||||
m_toolChains.append(this);
|
m_toolChains.append(this);
|
||||||
setLanguage(Constants::CXX_LANGUAGE_ID);
|
setLanguage(Constants::CXX_LANGUAGE_ID);
|
||||||
|
setTypeDisplayName("Test Tool Chain");
|
||||||
}
|
}
|
||||||
|
|
||||||
static QList<TTC *> toolChains();
|
static QList<TTC *> toolChains();
|
||||||
static bool hasToolChains() { return !m_toolChains.isEmpty(); }
|
static bool hasToolChains() { return !m_toolChains.isEmpty(); }
|
||||||
|
|
||||||
QString typeDisplayName() const override { return QString("Test Tool Chain"); }
|
|
||||||
Abi targetAbi() const override { return Abi::hostAbi(); }
|
Abi targetAbi() const override { return Abi::hostAbi(); }
|
||||||
bool isValid() const override { return m_valid; }
|
bool isValid() const override { return m_valid; }
|
||||||
MacroInspectionRunner createMacroInspectionRunner() const override { return MacroInspectionRunner(); }
|
MacroInspectionRunner createMacroInspectionRunner() const override { return MacroInspectionRunner(); }
|
||||||
|
@@ -103,11 +103,7 @@ QnxToolChain::QnxToolChain()
|
|||||||
: GccToolChain(Constants::QNX_TOOLCHAIN_ID)
|
: GccToolChain(Constants::QNX_TOOLCHAIN_ID)
|
||||||
{
|
{
|
||||||
setOptionsReinterpreter(&reinterpretOptions);
|
setOptionsReinterpreter(&reinterpretOptions);
|
||||||
}
|
setTypeDisplayName(QnxToolChainFactory::tr("QCC"));
|
||||||
|
|
||||||
QString QnxToolChain::typeDisplayName() const
|
|
||||||
{
|
|
||||||
return QnxToolChainFactory::tr("QCC");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<ToolChainConfigWidget> QnxToolChain::createConfigurationWidget()
|
std::unique_ptr<ToolChainConfigWidget> QnxToolChain::createConfigurationWidget()
|
||||||
|
@@ -36,8 +36,6 @@ class QnxToolChain : public ProjectExplorer::GccToolChain
|
|||||||
public:
|
public:
|
||||||
QnxToolChain();
|
QnxToolChain();
|
||||||
|
|
||||||
QString typeDisplayName() const override;
|
|
||||||
|
|
||||||
std::unique_ptr<ProjectExplorer::ToolChainConfigWidget> createConfigurationWidget() override;
|
std::unique_ptr<ProjectExplorer::ToolChainConfigWidget> createConfigurationWidget() override;
|
||||||
|
|
||||||
void addToEnvironment(Utils::Environment &env) const override;
|
void addToEnvironment(Utils::Environment &env) const override;
|
||||||
|
Reference in New Issue
Block a user