forked from qt-creator/qt-creator
BareMetal: Hide KeilToolChain definitions
Not needed publicly. Change-Id: I40272a26a450a10ada8e5d579dd6a2b5bd3c259a Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -10,6 +10,7 @@
|
|||||||
#include <projectexplorer/abiwidget.h>
|
#include <projectexplorer/abiwidget.h>
|
||||||
#include <projectexplorer/projectexplorerconstants.h>
|
#include <projectexplorer/projectexplorerconstants.h>
|
||||||
#include <projectexplorer/projectmacro.h>
|
#include <projectexplorer/projectmacro.h>
|
||||||
|
#include <projectexplorer/toolchainconfigwidget.h>
|
||||||
#include <projectexplorer/toolchainmanager.h>
|
#include <projectexplorer/toolchainmanager.h>
|
||||||
|
|
||||||
#include <utils/algorithm.h>
|
#include <utils/algorithm.h>
|
||||||
@@ -402,7 +403,35 @@ static void addDefaultCpuArgs(const FilePath &compiler, QStringList &extraArgs)
|
|||||||
|
|
||||||
// KeilToolchain
|
// KeilToolchain
|
||||||
|
|
||||||
KeilToolChain::KeilToolChain() :
|
class KeilToolChain;
|
||||||
|
|
||||||
|
class KeilToolChainConfigWidget final : public ToolChainConfigWidget
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
explicit KeilToolChainConfigWidget(KeilToolChain *tc);
|
||||||
|
|
||||||
|
private:
|
||||||
|
void applyImpl() final;
|
||||||
|
void discardImpl() final { setFromToolChain(); }
|
||||||
|
bool isDirtyImpl() const final;
|
||||||
|
void makeReadOnlyImpl() final;
|
||||||
|
|
||||||
|
void setFromToolChain();
|
||||||
|
void handleCompilerCommandChange();
|
||||||
|
void handlePlatformCodeGenFlagsChange();
|
||||||
|
|
||||||
|
PathChooser *m_compilerCommand = nullptr;
|
||||||
|
AbiWidget *m_abiWidget = nullptr;
|
||||||
|
QLineEdit *m_platformCodeGenFlagsLineEdit = nullptr;
|
||||||
|
Macros m_macros;
|
||||||
|
};
|
||||||
|
|
||||||
|
// KeilToolChain
|
||||||
|
|
||||||
|
class KeilToolChain final : public ToolChain
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
KeilToolChain() :
|
||||||
ToolChain(Constants::KEIL_TOOLCHAIN_TYPEID)
|
ToolChain(Constants::KEIL_TOOLCHAIN_TYPEID)
|
||||||
{
|
{
|
||||||
setTypeDisplayName(Tr::tr("KEIL"));
|
setTypeDisplayName(Tr::tr("KEIL"));
|
||||||
@@ -410,6 +439,35 @@ KeilToolChain::KeilToolChain() :
|
|||||||
setCompilerCommandKey("CompilerPath");
|
setCompilerCommandKey("CompilerPath");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
MacroInspectionRunner createMacroInspectionRunner() const final;
|
||||||
|
|
||||||
|
LanguageExtensions languageExtensions(const QStringList &cxxflags) const final;
|
||||||
|
WarningFlags warningFlags(const QStringList &cxxflags) const final;
|
||||||
|
|
||||||
|
BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner(const Environment &) const final;
|
||||||
|
void addToEnvironment(Environment &env) const final;
|
||||||
|
QList<OutputLineParser *> createOutputParsers() const final;
|
||||||
|
|
||||||
|
QVariantMap toMap() const final;
|
||||||
|
bool fromMap(const QVariantMap &data) final;
|
||||||
|
|
||||||
|
std::unique_ptr<ToolChainConfigWidget> createConfigurationWidget() final;
|
||||||
|
|
||||||
|
bool operator==(const ToolChain &other) const final;
|
||||||
|
|
||||||
|
void setExtraCodeModelFlags(const QStringList &flags);
|
||||||
|
QStringList extraCodeModelFlags() const final;
|
||||||
|
|
||||||
|
FilePath makeCommand(const Environment &env) const final;
|
||||||
|
|
||||||
|
private:
|
||||||
|
QStringList m_extraCodeModelFlags;
|
||||||
|
|
||||||
|
friend class KeilToolChainFactory;
|
||||||
|
friend class KeilToolChainConfigWidget;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
ToolChain::MacroInspectionRunner KeilToolChain::createMacroInspectionRunner() const
|
ToolChain::MacroInspectionRunner KeilToolChain::createMacroInspectionRunner() const
|
||||||
{
|
{
|
||||||
Environment env = Environment::systemEnvironment();
|
Environment env = Environment::systemEnvironment();
|
||||||
|
@@ -3,61 +3,10 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include <projectexplorer/abi.h>
|
|
||||||
#include <projectexplorer/toolchain.h>
|
#include <projectexplorer/toolchain.h>
|
||||||
#include <projectexplorer/toolchainconfigwidget.h>
|
|
||||||
|
|
||||||
QT_BEGIN_NAMESPACE
|
|
||||||
class QLineEdit;
|
|
||||||
class QPlainTextEdit;
|
|
||||||
class QPushButton;
|
|
||||||
class QTextEdit;
|
|
||||||
QT_END_NAMESPACE
|
|
||||||
|
|
||||||
namespace Utils { class PathChooser; }
|
|
||||||
|
|
||||||
namespace ProjectExplorer { class AbiWidget; }
|
|
||||||
|
|
||||||
namespace BareMetal::Internal {
|
namespace BareMetal::Internal {
|
||||||
|
|
||||||
// KeilToolChain
|
|
||||||
|
|
||||||
class KeilToolChain final : public ProjectExplorer::ToolChain
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
MacroInspectionRunner createMacroInspectionRunner() const final;
|
|
||||||
|
|
||||||
Utils::LanguageExtensions languageExtensions(const QStringList &cxxflags) const final;
|
|
||||||
Utils::WarningFlags warningFlags(const QStringList &cxxflags) const final;
|
|
||||||
|
|
||||||
BuiltInHeaderPathsRunner createBuiltInHeaderPathsRunner(
|
|
||||||
const Utils::Environment &) const final;
|
|
||||||
void addToEnvironment(Utils::Environment &env) const final;
|
|
||||||
QList<Utils::OutputLineParser *> createOutputParsers() const final;
|
|
||||||
|
|
||||||
QVariantMap toMap() const final;
|
|
||||||
bool fromMap(const QVariantMap &data) final;
|
|
||||||
|
|
||||||
std::unique_ptr<ProjectExplorer::ToolChainConfigWidget> createConfigurationWidget() final;
|
|
||||||
|
|
||||||
bool operator ==(const ToolChain &other) const final;
|
|
||||||
|
|
||||||
void setExtraCodeModelFlags(const QStringList &flags);
|
|
||||||
QStringList extraCodeModelFlags() const final;
|
|
||||||
|
|
||||||
Utils::FilePath makeCommand(const Utils::Environment &env) const final;
|
|
||||||
|
|
||||||
private:
|
|
||||||
KeilToolChain();
|
|
||||||
|
|
||||||
QStringList m_extraCodeModelFlags;
|
|
||||||
|
|
||||||
friend class KeilToolChainFactory;
|
|
||||||
friend class KeilToolChainConfigWidget;
|
|
||||||
};
|
|
||||||
|
|
||||||
// KeilToolchainFactory
|
|
||||||
|
|
||||||
class KeilToolChainFactory final : public ProjectExplorer::ToolChainFactory
|
class KeilToolChainFactory final : public ProjectExplorer::ToolChainFactory
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@@ -73,27 +22,4 @@ private:
|
|||||||
const Candidate &candidate, Utils::Id language) const;
|
const Candidate &candidate, Utils::Id language) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
// KeilToolchainConfigWidget
|
|
||||||
|
|
||||||
class KeilToolChainConfigWidget final : public ProjectExplorer::ToolChainConfigWidget
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
explicit KeilToolChainConfigWidget(KeilToolChain *tc);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void applyImpl() final;
|
|
||||||
void discardImpl() final { setFromToolChain(); }
|
|
||||||
bool isDirtyImpl() const final;
|
|
||||||
void makeReadOnlyImpl() final;
|
|
||||||
|
|
||||||
void setFromToolChain();
|
|
||||||
void handleCompilerCommandChange();
|
|
||||||
void handlePlatformCodeGenFlagsChange();
|
|
||||||
|
|
||||||
Utils::PathChooser *m_compilerCommand = nullptr;
|
|
||||||
ProjectExplorer::AbiWidget *m_abiWidget = nullptr;
|
|
||||||
QLineEdit *m_platformCodeGenFlagsLineEdit = nullptr;
|
|
||||||
ProjectExplorer::Macros m_macros;
|
|
||||||
};
|
|
||||||
|
|
||||||
} // BareMetal::Internal
|
} // BareMetal::Internal
|
||||||
|
Reference in New Issue
Block a user