forked from qt-creator/qt-creator
ProjectExplorer: De-QObject-ify ToolChainFactory
As collateral damage, use a capital C in KeilToolchain*. Change-Id: If9d64de2108366546683144975d975d9d1727712 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -76,7 +76,7 @@ static ToolChain *findToolChain(Utils::FilePath &compilerPath, Core::Id lang, co
|
|||||||
AndroidToolChain::AndroidToolChain()
|
AndroidToolChain::AndroidToolChain()
|
||||||
: ClangToolChain(Constants::ANDROID_TOOLCHAIN_TYPEID)
|
: ClangToolChain(Constants::ANDROID_TOOLCHAIN_TYPEID)
|
||||||
{
|
{
|
||||||
setTypeDisplayName(AndroidToolChainFactory::tr("Android Clang"));
|
setTypeDisplayName(AndroidToolChain::tr("Android Clang"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::FilePath AndroidToolChain::ndkLocation() const
|
Utils::FilePath AndroidToolChain::ndkLocation() const
|
||||||
@@ -155,7 +155,7 @@ GccToolChain::DetectedAbisResult AndroidToolChain::detectSupportedAbis() const
|
|||||||
|
|
||||||
AndroidToolChainFactory::AndroidToolChainFactory()
|
AndroidToolChainFactory::AndroidToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Android Clang"));
|
setDisplayName(AndroidToolChain::tr("Android Clang"));
|
||||||
setSupportedToolChainType(Constants::ANDROID_TOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::ANDROID_TOOLCHAIN_TYPEID);
|
||||||
setSupportedLanguages({ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
setSupportedLanguages({ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
||||||
setToolchainConstructor([] { return new AndroidToolChain; });
|
setToolchainConstructor([] { return new AndroidToolChain; });
|
||||||
|
@@ -36,6 +36,8 @@ using ToolChainList = QList<ProjectExplorer::ToolChain *>;
|
|||||||
|
|
||||||
class AndroidToolChain : public ProjectExplorer::ClangToolChain
|
class AndroidToolChain : public ProjectExplorer::ClangToolChain
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(Android::Internal::AndroidToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
~AndroidToolChain() override;
|
~AndroidToolChain() override;
|
||||||
|
|
||||||
@@ -62,8 +64,6 @@ private:
|
|||||||
|
|
||||||
class AndroidToolChainFactory : public ProjectExplorer::ToolChainFactory
|
class AndroidToolChainFactory : public ProjectExplorer::ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
AndroidToolChainFactory();
|
AndroidToolChainFactory();
|
||||||
|
|
||||||
|
@@ -70,7 +70,7 @@ class BareMetalPluginPrivate
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
IarToolChainFactory iarToolChainFactory;
|
IarToolChainFactory iarToolChainFactory;
|
||||||
KeilToolchainFactory keilToolChainFactory;
|
KeilToolChainFactory keilToolChainFactory;
|
||||||
SdccToolChainFactory sdccToolChainFactory;
|
SdccToolChainFactory sdccToolChainFactory;
|
||||||
BareMetalDeviceFactory deviceFactory;
|
BareMetalDeviceFactory deviceFactory;
|
||||||
BareMetalRunConfigurationFactory runConfigurationFactory;
|
BareMetalRunConfigurationFactory runConfigurationFactory;
|
||||||
|
@@ -238,8 +238,7 @@ static QString buildDisplayName(Abi::Architecture arch, Core::Id language,
|
|||||||
{
|
{
|
||||||
const auto archName = Abi::toString(arch);
|
const auto archName = Abi::toString(arch);
|
||||||
const auto langName = ToolChainManager::displayNameOfLanguageId(language);
|
const auto langName = ToolChainManager::displayNameOfLanguageId(language);
|
||||||
return IarToolChain::tr("IAREW %1 (%2, %3)")
|
return IarToolChain::tr("IAREW %1 (%2, %3)").arg(version, langName, archName);
|
||||||
.arg(version, langName, archName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// IarToolChain
|
// IarToolChain
|
||||||
@@ -247,7 +246,7 @@ static QString buildDisplayName(Abi::Architecture arch, Core::Id language,
|
|||||||
IarToolChain::IarToolChain() :
|
IarToolChain::IarToolChain() :
|
||||||
ToolChain(Constants::IAREW_TOOLCHAIN_TYPEID)
|
ToolChain(Constants::IAREW_TOOLCHAIN_TYPEID)
|
||||||
{
|
{
|
||||||
setTypeDisplayName(Internal::IarToolChainFactory::tr("IAREW"));
|
setTypeDisplayName(Internal::IarToolChain::tr("IAREW"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void IarToolChain::setTargetAbi(const Abi &abi)
|
void IarToolChain::setTargetAbi(const Abi &abi)
|
||||||
@@ -416,7 +415,7 @@ FilePath IarToolChain::makeCommand(const Environment &env) const
|
|||||||
|
|
||||||
IarToolChainFactory::IarToolChainFactory()
|
IarToolChainFactory::IarToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("IAREW"));
|
setDisplayName(IarToolChain::tr("IAREW"));
|
||||||
setSupportedToolChainType(Constants::IAREW_TOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::IAREW_TOOLCHAIN_TYPEID);
|
||||||
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID,
|
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID,
|
||||||
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
||||||
|
@@ -96,8 +96,6 @@ private:
|
|||||||
|
|
||||||
class IarToolChainFactory final : public ProjectExplorer::ToolChainFactory
|
class IarToolChainFactory final : public ProjectExplorer::ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IarToolChainFactory();
|
IarToolChainFactory();
|
||||||
|
|
||||||
|
@@ -230,19 +230,19 @@ static QString buildDisplayName(Abi::Architecture arch, Core::Id language,
|
|||||||
{
|
{
|
||||||
const auto archName = Abi::toString(arch);
|
const auto archName = Abi::toString(arch);
|
||||||
const auto langName = ToolChainManager::displayNameOfLanguageId(language);
|
const auto langName = ToolChainManager::displayNameOfLanguageId(language);
|
||||||
return KeilToolchain::tr("KEIL %1 (%2, %3)")
|
return KeilToolChain::tr("KEIL %1 (%2, %3)")
|
||||||
.arg(version, langName, archName);
|
.arg(version, langName, archName);
|
||||||
}
|
}
|
||||||
|
|
||||||
// KeilToolchain
|
// KeilToolchain
|
||||||
|
|
||||||
KeilToolchain::KeilToolchain() :
|
KeilToolChain::KeilToolChain() :
|
||||||
ToolChain(Constants::KEIL_TOOLCHAIN_TYPEID)
|
ToolChain(Constants::KEIL_TOOLCHAIN_TYPEID)
|
||||||
{
|
{
|
||||||
setTypeDisplayName(Internal::KeilToolchainFactory::tr("KEIL"));
|
setTypeDisplayName(tr("KEIL"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeilToolchain::setTargetAbi(const Abi &abi)
|
void KeilToolChain::setTargetAbi(const Abi &abi)
|
||||||
{
|
{
|
||||||
if (abi == m_targetAbi)
|
if (abi == m_targetAbi)
|
||||||
return;
|
return;
|
||||||
@@ -250,17 +250,17 @@ void KeilToolchain::setTargetAbi(const Abi &abi)
|
|||||||
toolChainUpdated();
|
toolChainUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
Abi KeilToolchain::targetAbi() const
|
Abi KeilToolChain::targetAbi() const
|
||||||
{
|
{
|
||||||
return m_targetAbi;
|
return m_targetAbi;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KeilToolchain::isValid() const
|
bool KeilToolChain::isValid() const
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolChain::MacroInspectionRunner KeilToolchain::createMacroInspectionRunner() const
|
ToolChain::MacroInspectionRunner KeilToolChain::createMacroInspectionRunner() const
|
||||||
{
|
{
|
||||||
Environment env = Environment::systemEnvironment();
|
Environment env = Environment::systemEnvironment();
|
||||||
addToEnvironment(env);
|
addToEnvironment(env);
|
||||||
@@ -282,23 +282,23 @@ ToolChain::MacroInspectionRunner KeilToolchain::createMacroInspectionRunner() co
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
Macros KeilToolchain::predefinedMacros(const QStringList &cxxflags) const
|
Macros KeilToolChain::predefinedMacros(const QStringList &cxxflags) const
|
||||||
{
|
{
|
||||||
return createMacroInspectionRunner()(cxxflags).macros;
|
return createMacroInspectionRunner()(cxxflags).macros;
|
||||||
}
|
}
|
||||||
|
|
||||||
Utils::LanguageExtensions KeilToolchain::languageExtensions(const QStringList &) const
|
Utils::LanguageExtensions KeilToolChain::languageExtensions(const QStringList &) const
|
||||||
{
|
{
|
||||||
return LanguageExtension::None;
|
return LanguageExtension::None;
|
||||||
}
|
}
|
||||||
|
|
||||||
WarningFlags KeilToolchain::warningFlags(const QStringList &cxxflags) const
|
WarningFlags KeilToolChain::warningFlags(const QStringList &cxxflags) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(cxxflags)
|
Q_UNUSED(cxxflags)
|
||||||
return WarningFlags::Default;
|
return WarningFlags::Default;
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolChain::BuiltInHeaderPathsRunner KeilToolchain::createBuiltInHeaderPathsRunner(
|
ToolChain::BuiltInHeaderPathsRunner KeilToolChain::createBuiltInHeaderPathsRunner(
|
||||||
const Environment &) const
|
const Environment &) const
|
||||||
{
|
{
|
||||||
const Utils::FilePath compilerCommand = m_compilerCommand;
|
const Utils::FilePath compilerCommand = m_compilerCommand;
|
||||||
@@ -317,14 +317,14 @@ ToolChain::BuiltInHeaderPathsRunner KeilToolchain::createBuiltInHeaderPathsRunne
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
HeaderPaths KeilToolchain::builtInHeaderPaths(const QStringList &cxxFlags,
|
HeaderPaths KeilToolChain::builtInHeaderPaths(const QStringList &cxxFlags,
|
||||||
const FilePath &fileName,
|
const FilePath &fileName,
|
||||||
const Environment &env) const
|
const Environment &env) const
|
||||||
{
|
{
|
||||||
return createBuiltInHeaderPathsRunner(env)(cxxFlags, fileName.toString(), "");
|
return createBuiltInHeaderPathsRunner(env)(cxxFlags, fileName.toString(), "");
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeilToolchain::addToEnvironment(Environment &env) const
|
void KeilToolChain::addToEnvironment(Environment &env) const
|
||||||
{
|
{
|
||||||
if (!m_compilerCommand.isEmpty()) {
|
if (!m_compilerCommand.isEmpty()) {
|
||||||
const FilePath path = m_compilerCommand.parentDir();
|
const FilePath path = m_compilerCommand.parentDir();
|
||||||
@@ -332,12 +332,12 @@ void KeilToolchain::addToEnvironment(Environment &env) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IOutputParser *KeilToolchain::outputParser() const
|
IOutputParser *KeilToolChain::outputParser() const
|
||||||
{
|
{
|
||||||
return new KeilParser;
|
return new KeilParser;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVariantMap KeilToolchain::toMap() const
|
QVariantMap KeilToolChain::toMap() const
|
||||||
{
|
{
|
||||||
QVariantMap data = ToolChain::toMap();
|
QVariantMap data = ToolChain::toMap();
|
||||||
data.insert(compilerCommandKeyC, m_compilerCommand.toString());
|
data.insert(compilerCommandKeyC, m_compilerCommand.toString());
|
||||||
@@ -345,7 +345,7 @@ QVariantMap KeilToolchain::toMap() const
|
|||||||
return data;
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KeilToolchain::fromMap(const QVariantMap &data)
|
bool KeilToolChain::fromMap(const QVariantMap &data)
|
||||||
{
|
{
|
||||||
if (!ToolChain::fromMap(data))
|
if (!ToolChain::fromMap(data))
|
||||||
return false;
|
return false;
|
||||||
@@ -354,23 +354,23 @@ bool KeilToolchain::fromMap(const QVariantMap &data)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<ToolChainConfigWidget> KeilToolchain::createConfigurationWidget()
|
std::unique_ptr<ToolChainConfigWidget> KeilToolChain::createConfigurationWidget()
|
||||||
{
|
{
|
||||||
return std::make_unique<KeilToolchainConfigWidget>(this);
|
return std::make_unique<KeilToolChainConfigWidget>(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KeilToolchain::operator ==(const ToolChain &other) const
|
bool KeilToolChain::operator ==(const ToolChain &other) const
|
||||||
{
|
{
|
||||||
if (!ToolChain::operator ==(other))
|
if (!ToolChain::operator ==(other))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
const auto customTc = static_cast<const KeilToolchain *>(&other);
|
const auto customTc = static_cast<const KeilToolChain *>(&other);
|
||||||
return m_compilerCommand == customTc->m_compilerCommand
|
return m_compilerCommand == customTc->m_compilerCommand
|
||||||
&& m_targetAbi == customTc->m_targetAbi
|
&& m_targetAbi == customTc->m_targetAbi
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeilToolchain::setCompilerCommand(const FilePath &file)
|
void KeilToolChain::setCompilerCommand(const FilePath &file)
|
||||||
{
|
{
|
||||||
if (file == m_compilerCommand)
|
if (file == m_compilerCommand)
|
||||||
return;
|
return;
|
||||||
@@ -378,12 +378,12 @@ void KeilToolchain::setCompilerCommand(const FilePath &file)
|
|||||||
toolChainUpdated();
|
toolChainUpdated();
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath KeilToolchain::compilerCommand() const
|
FilePath KeilToolChain::compilerCommand() const
|
||||||
{
|
{
|
||||||
return m_compilerCommand;
|
return m_compilerCommand;
|
||||||
}
|
}
|
||||||
|
|
||||||
FilePath KeilToolchain::makeCommand(const Environment &env) const
|
FilePath KeilToolChain::makeCommand(const Environment &env) const
|
||||||
{
|
{
|
||||||
Q_UNUSED(env)
|
Q_UNUSED(env)
|
||||||
return {};
|
return {};
|
||||||
@@ -391,13 +391,13 @@ FilePath KeilToolchain::makeCommand(const Environment &env) const
|
|||||||
|
|
||||||
// KeilToolchainFactory
|
// KeilToolchainFactory
|
||||||
|
|
||||||
KeilToolchainFactory::KeilToolchainFactory()
|
KeilToolChainFactory::KeilToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("KEIL"));
|
setDisplayName(KeilToolChain::tr("KEIL"));
|
||||||
setSupportedToolChainType(Constants::KEIL_TOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::KEIL_TOOLCHAIN_TYPEID);
|
||||||
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID,
|
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID,
|
||||||
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
||||||
setToolchainConstructor([] { return new KeilToolchain; });
|
setToolchainConstructor([] { return new KeilToolChain; });
|
||||||
setUserCreatable(true);
|
setUserCreatable(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -445,7 +445,7 @@ static QString extractVersion(const QString &toolsFile, const QString §ion)
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<ToolChain *> KeilToolchainFactory::autoDetect(const QList<ToolChain *> &alreadyKnown)
|
QList<ToolChain *> KeilToolChainFactory::autoDetect(const QList<ToolChain *> &alreadyKnown)
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WIN64
|
#ifdef Q_OS_WIN64
|
||||||
static const char kRegistryNode[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\" \
|
static const char kRegistryNode[] = "HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\" \
|
||||||
@@ -492,7 +492,7 @@ QList<ToolChain *> KeilToolchainFactory::autoDetect(const QList<ToolChain *> &al
|
|||||||
return autoDetectToolchains(candidates, alreadyKnown);
|
return autoDetectToolchains(candidates, alreadyKnown);
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<ToolChain *> KeilToolchainFactory::autoDetectToolchains(
|
QList<ToolChain *> KeilToolChainFactory::autoDetectToolchains(
|
||||||
const Candidates &candidates, const QList<ToolChain *> &alreadyKnown) const
|
const Candidates &candidates, const QList<ToolChain *> &alreadyKnown) const
|
||||||
{
|
{
|
||||||
QList<ToolChain *> result;
|
QList<ToolChain *> result;
|
||||||
@@ -519,7 +519,7 @@ QList<ToolChain *> KeilToolchainFactory::autoDetectToolchains(
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
QList<ToolChain *> KeilToolchainFactory::autoDetectToolchain(
|
QList<ToolChain *> KeilToolChainFactory::autoDetectToolchain(
|
||||||
const Candidate &candidate, Core::Id language) const
|
const Candidate &candidate, Core::Id language) const
|
||||||
{
|
{
|
||||||
const auto env = Environment::systemEnvironment();
|
const auto env = Environment::systemEnvironment();
|
||||||
@@ -535,7 +535,7 @@ QList<ToolChain *> KeilToolchainFactory::autoDetectToolchain(
|
|||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto tc = new KeilToolchain;
|
const auto tc = new KeilToolChain;
|
||||||
tc->setDetection(ToolChain::AutoDetection);
|
tc->setDetection(ToolChain::AutoDetection);
|
||||||
tc->setLanguage(language);
|
tc->setLanguage(language);
|
||||||
tc->setCompilerCommand(candidate.compilerPath);
|
tc->setCompilerCommand(candidate.compilerPath);
|
||||||
@@ -549,7 +549,7 @@ QList<ToolChain *> KeilToolchainFactory::autoDetectToolchain(
|
|||||||
|
|
||||||
// KeilToolchainConfigWidget
|
// KeilToolchainConfigWidget
|
||||||
|
|
||||||
KeilToolchainConfigWidget::KeilToolchainConfigWidget(KeilToolchain *tc) :
|
KeilToolChainConfigWidget::KeilToolChainConfigWidget(KeilToolChain *tc) :
|
||||||
ToolChainConfigWidget(tc),
|
ToolChainConfigWidget(tc),
|
||||||
m_compilerCommand(new PathChooser),
|
m_compilerCommand(new PathChooser),
|
||||||
m_abiWidget(new AbiWidget)
|
m_abiWidget(new AbiWidget)
|
||||||
@@ -562,20 +562,20 @@ KeilToolchainConfigWidget::KeilToolchainConfigWidget(KeilToolchain *tc) :
|
|||||||
m_abiWidget->setEnabled(false);
|
m_abiWidget->setEnabled(false);
|
||||||
|
|
||||||
addErrorLabel();
|
addErrorLabel();
|
||||||
setFromToolchain();
|
setFromToolChain();
|
||||||
|
|
||||||
connect(m_compilerCommand, &PathChooser::rawPathChanged,
|
connect(m_compilerCommand, &PathChooser::rawPathChanged,
|
||||||
this, &KeilToolchainConfigWidget::handleCompilerCommandChange);
|
this, &KeilToolChainConfigWidget::handleCompilerCommandChange);
|
||||||
connect(m_abiWidget, &AbiWidget::abiChanged,
|
connect(m_abiWidget, &AbiWidget::abiChanged,
|
||||||
this, &ToolChainConfigWidget::dirty);
|
this, &ToolChainConfigWidget::dirty);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeilToolchainConfigWidget::applyImpl()
|
void KeilToolChainConfigWidget::applyImpl()
|
||||||
{
|
{
|
||||||
if (toolChain()->isAutoDetected())
|
if (toolChain()->isAutoDetected())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
const auto tc = static_cast<KeilToolchain *>(toolChain());
|
const auto tc = static_cast<KeilToolChain *>(toolChain());
|
||||||
const QString displayName = tc->displayName();
|
const QString displayName = tc->displayName();
|
||||||
tc->setCompilerCommand(m_compilerCommand->fileName());
|
tc->setCompilerCommand(m_compilerCommand->fileName());
|
||||||
tc->setTargetAbi(m_abiWidget->currentAbi());
|
tc->setTargetAbi(m_abiWidget->currentAbi());
|
||||||
@@ -587,34 +587,34 @@ void KeilToolchainConfigWidget::applyImpl()
|
|||||||
const auto languageVersion = ToolChain::languageVersion(tc->language(), m_macros);
|
const auto languageVersion = ToolChain::languageVersion(tc->language(), m_macros);
|
||||||
tc->predefinedMacrosCache()->insert({}, {m_macros, languageVersion});
|
tc->predefinedMacrosCache()->insert({}, {m_macros, languageVersion});
|
||||||
|
|
||||||
setFromToolchain();
|
setFromToolChain();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool KeilToolchainConfigWidget::isDirtyImpl() const
|
bool KeilToolChainConfigWidget::isDirtyImpl() const
|
||||||
{
|
{
|
||||||
const auto tc = static_cast<KeilToolchain *>(toolChain());
|
const auto tc = static_cast<KeilToolChain *>(toolChain());
|
||||||
return m_compilerCommand->fileName() != tc->compilerCommand()
|
return m_compilerCommand->fileName() != tc->compilerCommand()
|
||||||
|| m_abiWidget->currentAbi() != tc->targetAbi()
|
|| m_abiWidget->currentAbi() != tc->targetAbi()
|
||||||
;
|
;
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeilToolchainConfigWidget::makeReadOnlyImpl()
|
void KeilToolChainConfigWidget::makeReadOnlyImpl()
|
||||||
{
|
{
|
||||||
m_compilerCommand->setReadOnly(true);
|
m_compilerCommand->setReadOnly(true);
|
||||||
m_abiWidget->setEnabled(false);
|
m_abiWidget->setEnabled(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeilToolchainConfigWidget::setFromToolchain()
|
void KeilToolChainConfigWidget::setFromToolChain()
|
||||||
{
|
{
|
||||||
const QSignalBlocker blocker(this);
|
const QSignalBlocker blocker(this);
|
||||||
const auto tc = static_cast<KeilToolchain *>(toolChain());
|
const auto tc = static_cast<KeilToolChain *>(toolChain());
|
||||||
m_compilerCommand->setFileName(tc->compilerCommand());
|
m_compilerCommand->setFileName(tc->compilerCommand());
|
||||||
m_abiWidget->setAbis({}, tc->targetAbi());
|
m_abiWidget->setAbis({}, tc->targetAbi());
|
||||||
const bool haveCompiler = compilerExists(m_compilerCommand->fileName());
|
const bool haveCompiler = compilerExists(m_compilerCommand->fileName());
|
||||||
m_abiWidget->setEnabled(haveCompiler && !tc->isAutoDetected());
|
m_abiWidget->setEnabled(haveCompiler && !tc->isAutoDetected());
|
||||||
}
|
}
|
||||||
|
|
||||||
void KeilToolchainConfigWidget::handleCompilerCommandChange()
|
void KeilToolChainConfigWidget::handleCompilerCommandChange()
|
||||||
{
|
{
|
||||||
const FilePath compilerPath = m_compilerCommand->fileName();
|
const FilePath compilerPath = m_compilerCommand->fileName();
|
||||||
const bool haveCompiler = compilerExists(compilerPath);
|
const bool haveCompiler = compilerExists(compilerPath);
|
||||||
|
@@ -45,11 +45,11 @@ namespace ProjectExplorer { class AbiWidget; }
|
|||||||
namespace BareMetal {
|
namespace BareMetal {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
// KeilToolchain
|
// KeilToolChain
|
||||||
|
|
||||||
class KeilToolchain final : public ProjectExplorer::ToolChain
|
class KeilToolChain final : public ProjectExplorer::ToolChain
|
||||||
{
|
{
|
||||||
Q_DECLARE_TR_FUNCTIONS(KeilToolchain)
|
Q_DECLARE_TR_FUNCTIONS(KeilToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void setTargetAbi(const ProjectExplorer::Abi &abi);
|
void setTargetAbi(const ProjectExplorer::Abi &abi);
|
||||||
@@ -84,23 +84,21 @@ public:
|
|||||||
Utils::FilePath makeCommand(const Utils::Environment &env) const final;
|
Utils::FilePath makeCommand(const Utils::Environment &env) const final;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
KeilToolchain();
|
KeilToolChain();
|
||||||
|
|
||||||
ProjectExplorer::Abi m_targetAbi;
|
ProjectExplorer::Abi m_targetAbi;
|
||||||
Utils::FilePath m_compilerCommand;
|
Utils::FilePath m_compilerCommand;
|
||||||
|
|
||||||
friend class KeilToolchainFactory;
|
friend class KeilToolChainFactory;
|
||||||
friend class KeilToolchainConfigWidget;
|
friend class KeilToolChainConfigWidget;
|
||||||
};
|
};
|
||||||
|
|
||||||
// KeilToolchainFactory
|
// KeilToolchainFactory
|
||||||
|
|
||||||
class KeilToolchainFactory final : public ProjectExplorer::ToolChainFactory
|
class KeilToolChainFactory final : public ProjectExplorer::ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
KeilToolchainFactory();
|
KeilToolChainFactory();
|
||||||
|
|
||||||
QList<ProjectExplorer::ToolChain *> autoDetect(
|
QList<ProjectExplorer::ToolChain *> autoDetect(
|
||||||
const QList<ProjectExplorer::ToolChain *> &alreadyKnown) final;
|
const QList<ProjectExplorer::ToolChain *> &alreadyKnown) final;
|
||||||
@@ -114,20 +112,20 @@ private:
|
|||||||
|
|
||||||
// KeilToolchainConfigWidget
|
// KeilToolchainConfigWidget
|
||||||
|
|
||||||
class KeilToolchainConfigWidget final : public ProjectExplorer::ToolChainConfigWidget
|
class KeilToolChainConfigWidget final : public ProjectExplorer::ToolChainConfigWidget
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
|
|
||||||
public:
|
public:
|
||||||
explicit KeilToolchainConfigWidget(KeilToolchain *tc);
|
explicit KeilToolChainConfigWidget(KeilToolChain *tc);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void applyImpl() final;
|
void applyImpl() final;
|
||||||
void discardImpl() final { setFromToolchain(); }
|
void discardImpl() final { setFromToolChain(); }
|
||||||
bool isDirtyImpl() const final;
|
bool isDirtyImpl() const final;
|
||||||
void makeReadOnlyImpl() final;
|
void makeReadOnlyImpl() final;
|
||||||
|
|
||||||
void setFromToolchain();
|
void setFromToolChain();
|
||||||
void handleCompilerCommandChange();
|
void handleCompilerCommandChange();
|
||||||
|
|
||||||
Utils::PathChooser *m_compilerCommand = nullptr;
|
Utils::PathChooser *m_compilerCommand = nullptr;
|
||||||
|
@@ -217,7 +217,7 @@ static Utils::FilePath compilerPathFromEnvironment(const QString &compilerName)
|
|||||||
SdccToolChain::SdccToolChain() :
|
SdccToolChain::SdccToolChain() :
|
||||||
ToolChain(Constants::SDCC_TOOLCHAIN_TYPEID)
|
ToolChain(Constants::SDCC_TOOLCHAIN_TYPEID)
|
||||||
{
|
{
|
||||||
setTypeDisplayName(Internal::SdccToolChainFactory::tr("SDCC"));
|
setTypeDisplayName(Internal::SdccToolChain::tr("SDCC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void SdccToolChain::setTargetAbi(const Abi &abi)
|
void SdccToolChain::setTargetAbi(const Abi &abi)
|
||||||
@@ -368,7 +368,7 @@ FilePath SdccToolChain::makeCommand(const Environment &env) const
|
|||||||
|
|
||||||
SdccToolChainFactory::SdccToolChainFactory()
|
SdccToolChainFactory::SdccToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("SDCC"));
|
setDisplayName(SdccToolChain::tr("SDCC"));
|
||||||
setSupportedToolChainType(Constants::SDCC_TOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::SDCC_TOOLCHAIN_TYPEID);
|
||||||
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID});
|
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID});
|
||||||
setToolchainConstructor([] { return new SdccToolChain; });
|
setToolchainConstructor([] { return new SdccToolChain; });
|
||||||
|
@@ -97,8 +97,6 @@ private:
|
|||||||
|
|
||||||
class SdccToolChainFactory final : public ProjectExplorer::ToolChainFactory
|
class SdccToolChainFactory final : public ProjectExplorer::ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
SdccToolChainFactory();
|
SdccToolChainFactory();
|
||||||
|
|
||||||
|
@@ -95,8 +95,6 @@ using DevelopmentTeams = QList<DevelopmentTeamPtr>;
|
|||||||
|
|
||||||
class IosToolChainFactory : public ProjectExplorer::ToolChainFactory
|
class IosToolChainFactory : public ProjectExplorer::ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
IosToolChainFactory();
|
IosToolChainFactory();
|
||||||
|
|
||||||
|
@@ -49,7 +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"));
|
setTypeDisplayName(tr("Nim"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Abi NimToolChain::targetAbi() const
|
Abi NimToolChain::targetAbi() const
|
||||||
|
@@ -32,6 +32,8 @@ namespace Nim {
|
|||||||
|
|
||||||
class NimToolChain : public ProjectExplorer::ToolChain
|
class NimToolChain : public ProjectExplorer::ToolChain
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(Nim::NimToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NimToolChain();
|
NimToolChain();
|
||||||
explicit NimToolChain(Core::Id typeId);
|
explicit NimToolChain(Core::Id typeId);
|
||||||
|
@@ -42,7 +42,7 @@ namespace Nim {
|
|||||||
|
|
||||||
NimToolChainFactory::NimToolChainFactory()
|
NimToolChainFactory::NimToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Nim"));
|
setDisplayName(NimToolChain::tr("Nim"));
|
||||||
setSupportedToolChainType(Constants::C_NIMTOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::C_NIMTOOLCHAIN_TYPEID);
|
||||||
setSupportedLanguages({Constants::C_NIMLANGUAGE_ID});
|
setSupportedLanguages({Constants::C_NIMLANGUAGE_ID});
|
||||||
setToolchainConstructor([] { return new NimToolChain; });
|
setToolchainConstructor([] { return new NimToolChain; });
|
||||||
|
@@ -36,8 +36,6 @@ class NimToolChain;
|
|||||||
|
|
||||||
class NimToolChainFactory : public ProjectExplorer::ToolChainFactory
|
class NimToolChainFactory : public ProjectExplorer::ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
NimToolChainFactory();
|
NimToolChainFactory();
|
||||||
|
|
||||||
|
@@ -85,7 +85,7 @@ CustomToolChain::CustomToolChain() :
|
|||||||
ToolChain(Constants::CUSTOM_TOOLCHAIN_TYPEID),
|
ToolChain(Constants::CUSTOM_TOOLCHAIN_TYPEID),
|
||||||
m_outputParserId(GccParser::id())
|
m_outputParserId(GccParser::id())
|
||||||
{
|
{
|
||||||
setTypeDisplayName(Internal::CustomToolChainFactory::tr("Custom"));
|
setTypeDisplayName(tr("Custom"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Abi CustomToolChain::targetAbi() const
|
Abi CustomToolChain::targetAbi() const
|
||||||
@@ -405,7 +405,7 @@ namespace Internal {
|
|||||||
|
|
||||||
CustomToolChainFactory::CustomToolChainFactory()
|
CustomToolChainFactory::CustomToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Custom"));
|
setDisplayName(CustomToolChain::tr("Custom"));
|
||||||
setSupportedToolChainType(Constants::CUSTOM_TOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::CUSTOM_TOOLCHAIN_TYPEID);
|
||||||
setSupportsAllLanguages(true);
|
setSupportsAllLanguages(true);
|
||||||
setToolchainConstructor([] { return new CustomToolChain; });
|
setToolchainConstructor([] { return new CustomToolChain; });
|
||||||
|
@@ -135,8 +135,6 @@ namespace Internal {
|
|||||||
|
|
||||||
class CustomToolChainFactory : public ToolChainFactory
|
class CustomToolChainFactory : public ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
CustomToolChainFactory();
|
CustomToolChainFactory();
|
||||||
};
|
};
|
||||||
|
@@ -265,7 +265,7 @@ static Utils::FilePath gccInstallDir(const FilePath &path, const QStringList &en
|
|||||||
GccToolChain::GccToolChain(Core::Id typeId) :
|
GccToolChain::GccToolChain(Core::Id typeId) :
|
||||||
ToolChain(typeId)
|
ToolChain(typeId)
|
||||||
{
|
{
|
||||||
setTypeDisplayName(GccToolChainFactory::tr("GCC"));
|
setTypeDisplayName(tr("GCC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void GccToolChain::setCompilerCommand(const FilePath &path)
|
void GccToolChain::setCompilerCommand(const FilePath &path)
|
||||||
@@ -1045,7 +1045,7 @@ static Utils::FilePaths renesasRl78SearchPathsFromRegistry()
|
|||||||
|
|
||||||
GccToolChainFactory::GccToolChainFactory()
|
GccToolChainFactory::GccToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("GCC"));
|
setDisplayName(GccToolChain::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(Constants::GCC_TOOLCHAIN_TYPEID); });
|
setToolchainConstructor([] { return new GccToolChain(Constants::GCC_TOOLCHAIN_TYPEID); });
|
||||||
@@ -1472,7 +1472,7 @@ ClangToolChain::ClangToolChain() :
|
|||||||
ClangToolChain::ClangToolChain(Core::Id typeId) :
|
ClangToolChain::ClangToolChain(Core::Id typeId) :
|
||||||
GccToolChain(typeId)
|
GccToolChain(typeId)
|
||||||
{
|
{
|
||||||
setTypeDisplayName(ClangToolChainFactory::tr("Clang"));
|
setTypeDisplayName(tr("Clang"));
|
||||||
syncAutodetectedWithParentToolchains();
|
syncAutodetectedWithParentToolchains();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1639,7 +1639,7 @@ IOutputParser *ClangToolChain::outputParser() const
|
|||||||
|
|
||||||
ClangToolChainFactory::ClangToolChainFactory()
|
ClangToolChainFactory::ClangToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("Clang"));
|
setDisplayName(ClangToolChain::tr("Clang"));
|
||||||
setSupportedToolChainType(Constants::CLANG_TOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::CLANG_TOOLCHAIN_TYPEID);
|
||||||
setSupportedLanguages({Constants::CXX_LANGUAGE_ID, Constants::C_LANGUAGE_ID});
|
setSupportedLanguages({Constants::CXX_LANGUAGE_ID, Constants::C_LANGUAGE_ID});
|
||||||
setToolchainConstructor([] { return new ClangToolChain; });
|
setToolchainConstructor([] { return new ClangToolChain; });
|
||||||
@@ -1798,7 +1798,7 @@ void ClangToolChainConfigWidget::makeReadOnlyImpl()
|
|||||||
MingwToolChain::MingwToolChain() :
|
MingwToolChain::MingwToolChain() :
|
||||||
GccToolChain(Constants::MINGW_TOOLCHAIN_TYPEID)
|
GccToolChain(Constants::MINGW_TOOLCHAIN_TYPEID)
|
||||||
{
|
{
|
||||||
setTypeDisplayName(MingwToolChainFactory::tr("MinGW"));
|
setTypeDisplayName(MingwToolChain::tr("MinGW"));
|
||||||
}
|
}
|
||||||
|
|
||||||
QStringList MingwToolChain::suggestedMkspecList() const
|
QStringList MingwToolChain::suggestedMkspecList() const
|
||||||
@@ -1833,7 +1833,7 @@ FilePath MingwToolChain::makeCommand(const Environment &environment) const
|
|||||||
|
|
||||||
MingwToolChainFactory::MingwToolChainFactory()
|
MingwToolChainFactory::MingwToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("MinGW"));
|
setDisplayName(MingwToolChain::tr("MinGW"));
|
||||||
setSupportedToolChainType(Constants::MINGW_TOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::MINGW_TOOLCHAIN_TYPEID);
|
||||||
setSupportedLanguages({Constants::CXX_LANGUAGE_ID, Constants::C_LANGUAGE_ID});
|
setSupportedLanguages({Constants::CXX_LANGUAGE_ID, Constants::C_LANGUAGE_ID});
|
||||||
setToolchainConstructor([] { return new MingwToolChain; });
|
setToolchainConstructor([] { return new MingwToolChain; });
|
||||||
@@ -1873,7 +1873,7 @@ QList<ToolChain *> MingwToolChainFactory::detectForImport(const ToolChainDescrip
|
|||||||
LinuxIccToolChain::LinuxIccToolChain() :
|
LinuxIccToolChain::LinuxIccToolChain() :
|
||||||
GccToolChain(Constants::LINUXICC_TOOLCHAIN_TYPEID)
|
GccToolChain(Constants::LINUXICC_TOOLCHAIN_TYPEID)
|
||||||
{
|
{
|
||||||
setTypeDisplayName(LinuxIccToolChainFactory::tr("ICC"));
|
setTypeDisplayName(LinuxIccToolChain::tr("ICC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1914,7 +1914,7 @@ QStringList LinuxIccToolChain::suggestedMkspecList() const
|
|||||||
|
|
||||||
LinuxIccToolChainFactory::LinuxIccToolChainFactory()
|
LinuxIccToolChainFactory::LinuxIccToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("ICC"));
|
setDisplayName(LinuxIccToolChain::tr("ICC"));
|
||||||
setSupportedToolChainType(Constants::LINUXICC_TOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::LINUXICC_TOOLCHAIN_TYPEID);
|
||||||
setSupportedLanguages({Constants::CXX_LANGUAGE_ID, Constants::C_LANGUAGE_ID});
|
setSupportedLanguages({Constants::CXX_LANGUAGE_ID, Constants::C_LANGUAGE_ID});
|
||||||
setToolchainConstructor([] { return new LinuxIccToolChain; });
|
setToolchainConstructor([] { return new LinuxIccToolChain; });
|
||||||
|
@@ -66,6 +66,8 @@ inline const QStringList gccPredefinedMacrosOptions(Core::Id languageId)
|
|||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT GccToolChain : public ToolChain
|
class PROJECTEXPLORER_EXPORT GccToolChain : public ToolChain
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::GccToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GccToolChain(Core::Id typeId);
|
GccToolChain(Core::Id typeId);
|
||||||
|
|
||||||
@@ -212,6 +214,8 @@ private:
|
|||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT ClangToolChain : public GccToolChain
|
class PROJECTEXPLORER_EXPORT ClangToolChain : public GccToolChain
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::ClangToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ClangToolChain();
|
ClangToolChain();
|
||||||
explicit ClangToolChain(Core::Id typeId);
|
explicit ClangToolChain(Core::Id typeId);
|
||||||
@@ -258,6 +262,8 @@ private:
|
|||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT MingwToolChain : public GccToolChain
|
class PROJECTEXPLORER_EXPORT MingwToolChain : public GccToolChain
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::MingwToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
|
Utils::FilePath makeCommand(const Utils::Environment &environment) const override;
|
||||||
|
|
||||||
@@ -276,6 +282,8 @@ private:
|
|||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT LinuxIccToolChain : public GccToolChain
|
class PROJECTEXPLORER_EXPORT LinuxIccToolChain : public GccToolChain
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::LinuxIccToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
Utils::LanguageExtensions languageExtensions(const QStringList &cxxflags) const override;
|
Utils::LanguageExtensions languageExtensions(const QStringList &cxxflags) const override;
|
||||||
IOutputParser *outputParser() const override;
|
IOutputParser *outputParser() const override;
|
||||||
|
@@ -49,8 +49,6 @@ namespace Internal {
|
|||||||
|
|
||||||
class GccToolChainFactory : public ToolChainFactory
|
class GccToolChainFactory : public ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
GccToolChainFactory();
|
GccToolChainFactory();
|
||||||
|
|
||||||
@@ -132,8 +130,6 @@ private:
|
|||||||
|
|
||||||
class ClangToolChainFactory : public GccToolChainFactory
|
class ClangToolChainFactory : public GccToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ClangToolChainFactory();
|
ClangToolChainFactory();
|
||||||
|
|
||||||
@@ -147,8 +143,6 @@ public:
|
|||||||
|
|
||||||
class MingwToolChainFactory : public GccToolChainFactory
|
class MingwToolChainFactory : public GccToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MingwToolChainFactory();
|
MingwToolChainFactory();
|
||||||
|
|
||||||
@@ -162,8 +156,6 @@ public:
|
|||||||
|
|
||||||
class LinuxIccToolChainFactory : public GccToolChainFactory
|
class LinuxIccToolChainFactory : public GccToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
LinuxIccToolChainFactory();
|
LinuxIccToolChainFactory();
|
||||||
|
|
||||||
|
@@ -862,7 +862,7 @@ MsvcToolChain::MsvcToolChain(Core::Id typeId)
|
|||||||
: ToolChain(typeId)
|
: ToolChain(typeId)
|
||||||
{
|
{
|
||||||
setDisplayName("Microsoft Visual C++ Compiler");
|
setDisplayName("Microsoft Visual C++ Compiler");
|
||||||
setTypeDisplayName(MsvcToolChainFactory::tr("MSVC"));
|
setTypeDisplayName(tr("MSVC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void MsvcToolChain::inferWarningsForLevel(int warningLevel, WarningFlags &flags)
|
void MsvcToolChain::inferWarningsForLevel(int warningLevel, WarningFlags &flags)
|
||||||
@@ -1784,7 +1784,7 @@ ClangClToolChain::BuiltInHeaderPathsRunner ClangClToolChain::createBuiltInHeader
|
|||||||
|
|
||||||
MsvcToolChainFactory::MsvcToolChainFactory()
|
MsvcToolChainFactory::MsvcToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("MSVC"));
|
setDisplayName(MsvcToolChain::tr("MSVC"));
|
||||||
setSupportedToolChainType(Constants::MSVC_TOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::MSVC_TOOLCHAIN_TYPEID);
|
||||||
setSupportedLanguages({Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID});
|
setSupportedLanguages({Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID});
|
||||||
setToolchainConstructor([] { return new MsvcToolChain(Constants::MSVC_TOOLCHAIN_TYPEID); });
|
setToolchainConstructor([] { return new MsvcToolChain(Constants::MSVC_TOOLCHAIN_TYPEID); });
|
||||||
@@ -1966,7 +1966,7 @@ QList<ToolChain *> MsvcToolChainFactory::autoDetect(const QList<ToolChain *> &al
|
|||||||
|
|
||||||
ClangClToolChainFactory::ClangClToolChainFactory()
|
ClangClToolChainFactory::ClangClToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("clang-cl"));
|
setDisplayName(ClangClToolChain::tr("clang-cl"));
|
||||||
setSupportedLanguages({Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID});
|
setSupportedLanguages({Constants::C_LANGUAGE_ID, Constants::CXX_LANGUAGE_ID});
|
||||||
setSupportedToolChainType(Constants::CLANG_CL_TOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::CLANG_CL_TOOLCHAIN_TYPEID);
|
||||||
setToolchainConstructor([] { return new ClangClToolChain; });
|
setToolchainConstructor([] { return new ClangClToolChain; });
|
||||||
|
@@ -53,6 +53,8 @@ namespace Internal {
|
|||||||
|
|
||||||
class MsvcToolChain : public ToolChain
|
class MsvcToolChain : public ToolChain
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::MsvcToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
enum Type { WindowsSDK, VS };
|
enum Type { WindowsSDK, VS };
|
||||||
enum Platform { x86, amd64, x86_amd64, ia64, x86_ia64, arm, x86_arm, amd64_arm, amd64_x86 };
|
enum Platform { x86, amd64, x86_amd64, ia64, x86_ia64, arm, x86_arm, amd64_arm, amd64_x86 };
|
||||||
@@ -166,6 +168,8 @@ protected:
|
|||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT ClangClToolChain : public MsvcToolChain
|
class PROJECTEXPLORER_EXPORT ClangClToolChain : public MsvcToolChain
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(ProjectExplorer::Internal::ClangClToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ClangClToolChain();
|
ClangClToolChain();
|
||||||
|
|
||||||
@@ -202,8 +206,6 @@ private:
|
|||||||
|
|
||||||
class MsvcToolChainFactory : public ToolChainFactory
|
class MsvcToolChainFactory : public ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
MsvcToolChainFactory();
|
MsvcToolChainFactory();
|
||||||
|
|
||||||
@@ -218,8 +220,6 @@ public:
|
|||||||
|
|
||||||
class ClangClToolChainFactory : public ToolChainFactory
|
class ClangClToolChainFactory : public ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ClangClToolChainFactory();
|
ClangClToolChainFactory();
|
||||||
|
|
||||||
|
@@ -193,13 +193,14 @@ private:
|
|||||||
friend class ToolChainFactory;
|
friend class ToolChainFactory;
|
||||||
};
|
};
|
||||||
|
|
||||||
class PROJECTEXPLORER_EXPORT ToolChainFactory : public QObject
|
class PROJECTEXPLORER_EXPORT ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
ToolChainFactory(const ToolChainFactory &) = delete;
|
||||||
|
ToolChainFactory &operator=(const ToolChainFactory &) = delete;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
ToolChainFactory();
|
ToolChainFactory();
|
||||||
~ToolChainFactory() override;
|
virtual ~ToolChainFactory();
|
||||||
|
|
||||||
static const QList<ToolChainFactory *> allToolChainFactories();
|
static const QList<ToolChainFactory *> allToolChainFactories();
|
||||||
|
|
||||||
|
@@ -106,7 +106,7 @@ QnxToolChain::QnxToolChain()
|
|||||||
: GccToolChain(Constants::QNX_TOOLCHAIN_ID)
|
: GccToolChain(Constants::QNX_TOOLCHAIN_ID)
|
||||||
{
|
{
|
||||||
setOptionsReinterpreter(&reinterpretOptions);
|
setOptionsReinterpreter(&reinterpretOptions);
|
||||||
setTypeDisplayName(QnxToolChainFactory::tr("QCC"));
|
setTypeDisplayName(tr("QCC"));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::unique_ptr<ToolChainConfigWidget> QnxToolChain::createConfigurationWidget()
|
std::unique_ptr<ToolChainConfigWidget> QnxToolChain::createConfigurationWidget()
|
||||||
@@ -204,7 +204,7 @@ bool QnxToolChain::operator ==(const ToolChain &other) const
|
|||||||
|
|
||||||
QnxToolChainFactory::QnxToolChainFactory()
|
QnxToolChainFactory::QnxToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("QCC"));
|
setDisplayName(QnxToolChain::tr("QCC"));
|
||||||
setSupportedToolChainType(Constants::QNX_TOOLCHAIN_ID);
|
setSupportedToolChainType(Constants::QNX_TOOLCHAIN_ID);
|
||||||
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID,
|
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID,
|
||||||
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
||||||
|
@@ -33,6 +33,8 @@ namespace Internal {
|
|||||||
|
|
||||||
class QnxToolChain : public ProjectExplorer::GccToolChain
|
class QnxToolChain : public ProjectExplorer::GccToolChain
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(Qnx::Internal::QnxToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QnxToolChain();
|
QnxToolChain();
|
||||||
|
|
||||||
@@ -65,8 +67,6 @@ private:
|
|||||||
|
|
||||||
class QnxToolChainFactory : public ProjectExplorer::ToolChainFactory
|
class QnxToolChainFactory : public ProjectExplorer::ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
QnxToolChainFactory();
|
QnxToolChainFactory();
|
||||||
|
|
||||||
|
@@ -142,14 +142,14 @@ WebAssemblyToolChain::WebAssemblyToolChain() :
|
|||||||
setCompilerCommand(Utils::FilePath::fromString(command));
|
setCompilerCommand(Utils::FilePath::fromString(command));
|
||||||
setSupportedAbis({toolChainAbi()});
|
setSupportedAbis({toolChainAbi()});
|
||||||
setTargetAbi(toolChainAbi());
|
setTargetAbi(toolChainAbi());
|
||||||
const QString typeAndDisplayName = WebAssemblyToolChainFactory::tr("Emscripten Compiler");
|
const QString typeAndDisplayName = tr("Emscripten Compiler");
|
||||||
setDisplayName(typeAndDisplayName);
|
setDisplayName(typeAndDisplayName);
|
||||||
setTypeDisplayName(typeAndDisplayName);
|
setTypeDisplayName(typeAndDisplayName);
|
||||||
}
|
}
|
||||||
|
|
||||||
WebAssemblyToolChainFactory::WebAssemblyToolChainFactory()
|
WebAssemblyToolChainFactory::WebAssemblyToolChainFactory()
|
||||||
{
|
{
|
||||||
setDisplayName(tr("WebAssembly"));
|
setDisplayName(WebAssemblyToolChain::tr("WebAssembly"));
|
||||||
setSupportedToolChainType(Constants::WEBASSEMBLY_TOOLCHAIN_TYPEID);
|
setSupportedToolChainType(Constants::WEBASSEMBLY_TOOLCHAIN_TYPEID);
|
||||||
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID,
|
setSupportedLanguages({ProjectExplorer::Constants::C_LANGUAGE_ID,
|
||||||
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
ProjectExplorer::Constants::CXX_LANGUAGE_ID});
|
||||||
|
@@ -32,6 +32,8 @@ namespace Internal {
|
|||||||
|
|
||||||
class WebAssemblyToolChain final : public ProjectExplorer::ClangToolChain
|
class WebAssemblyToolChain final : public ProjectExplorer::ClangToolChain
|
||||||
{
|
{
|
||||||
|
Q_DECLARE_TR_FUNCTIONS(WebAssembly::Internal::WebAssemblyToolChain)
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void addToEnvironment(Utils::Environment &env) const override;
|
void addToEnvironment(Utils::Environment &env) const override;
|
||||||
|
|
||||||
@@ -43,8 +45,6 @@ private:
|
|||||||
|
|
||||||
class WebAssemblyToolChainFactory : public ProjectExplorer::ToolChainFactory
|
class WebAssemblyToolChainFactory : public ProjectExplorer::ToolChainFactory
|
||||||
{
|
{
|
||||||
Q_OBJECT
|
|
||||||
|
|
||||||
public:
|
public:
|
||||||
WebAssemblyToolChainFactory();
|
WebAssemblyToolChainFactory();
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user