forked from qt-creator/qt-creator
ProjectExplorer: Use setup function for CustomToolChain
Change-Id: I05eeaad0914285c31928e9fad126b27ad78a0fa6 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#include "projectexplorerconstants.h"
|
||||
#include "projectexplorertr.h"
|
||||
#include "projectmacro.h"
|
||||
#include "toolchain.h"
|
||||
#include "toolchainconfigwidget.h"
|
||||
|
||||
#include <utils/algorithm.h>
|
||||
@@ -555,17 +556,24 @@ std::unique_ptr<ToolchainConfigWidget> CustomToolChain::createConfigurationWidge
|
||||
return std::make_unique<CustomToolChainConfigWidget>(this);
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------------
|
||||
// CustomToolChainFactory
|
||||
// --------------------------------------------------------------------------
|
||||
|
||||
CustomToolchainFactory::CustomToolchainFactory()
|
||||
class CustomToolchainFactory final : public ToolchainFactory
|
||||
{
|
||||
setDisplayName(Tr::tr("Custom"));
|
||||
setSupportedToolchainType(Constants::CUSTOM_TOOLCHAIN_TYPEID);
|
||||
setSupportsAllLanguages(true);
|
||||
setToolchainConstructor([] { return new CustomToolChain; });
|
||||
setUserCreatable(true);
|
||||
public:
|
||||
CustomToolchainFactory()
|
||||
{
|
||||
setDisplayName(Tr::tr("Custom"));
|
||||
setSupportedToolchainType(Constants::CUSTOM_TOOLCHAIN_TYPEID);
|
||||
setSupportsAllLanguages(true);
|
||||
setToolchainConstructor([] { return new CustomToolChain; });
|
||||
setUserCreatable(true);
|
||||
}
|
||||
};
|
||||
|
||||
void setupCustomToolchain()
|
||||
{
|
||||
static CustomToolchainFactory theCustomToolchainFactory;
|
||||
}
|
||||
|
||||
} // ProjectExplorer::Internal
|
||||
|
@@ -3,14 +3,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "toolchain.h"
|
||||
|
||||
namespace ProjectExplorer::Internal {
|
||||
|
||||
class CustomToolchainFactory : public ToolchainFactory
|
||||
{
|
||||
public:
|
||||
CustomToolchainFactory();
|
||||
};
|
||||
void setupCustomToolchain();
|
||||
|
||||
} // ProjectExplorer::Interna;
|
||||
|
@@ -647,8 +647,6 @@ public:
|
||||
WinDebugInterface m_winDebugInterface;
|
||||
#endif
|
||||
|
||||
CustomToolchainFactory m_customToolChainFactory;
|
||||
|
||||
DesktopDeviceFactory m_desktopDeviceFactory;
|
||||
|
||||
ToolChainOptionsPage m_toolChainOptionsPage;
|
||||
@@ -818,6 +816,7 @@ bool ProjectExplorerPlugin::initialize(const QStringList &arguments, QString *er
|
||||
setupGccToolchains();
|
||||
setupMsvcToolchain();
|
||||
setupClangClToolchain();
|
||||
setupCustomToolchain();
|
||||
|
||||
setupProjectTreeWidgetFactory();
|
||||
|
||||
|
Reference in New Issue
Block a user