Commit 6510a749 authored by Friedemann Kleint's avatar Friedemann Kleint
Browse files

ProjectExplorer: Move ToolChainType enumeration into separate Header.

Acked-By: dt
parent 34e2e491
......@@ -34,6 +34,7 @@
#include "cmaketarget.h"
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/buildsteplist.h>
#include <utils/qtcassert.h>
......@@ -102,11 +103,11 @@ QString CMakeBuildConfiguration::buildDirectory() const
return m_buildDirectory;
}
ProjectExplorer::ToolChain::ToolChainType CMakeBuildConfiguration::toolChainType() const
ProjectExplorer::ToolChainType CMakeBuildConfiguration::toolChainType() const
{
if (m_toolChain)
return m_toolChain->type();
return ProjectExplorer::ToolChain::UNKNOWN;
return ProjectExplorer::ToolChain_UNKNOWN;
}
ProjectExplorer::ToolChain *CMakeBuildConfiguration::toolChain() const
......
......@@ -31,7 +31,11 @@
#define CMAKEBUILDCONFIGURATION_H
#include <projectexplorer/buildconfiguration.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchaintype.h>
namespace ProjectExplorer {
class ToolChain;
}
namespace CMakeProjectManager {
namespace Internal {
......@@ -52,7 +56,7 @@ public:
virtual QString buildDirectory() const;
ProjectExplorer::ToolChain::ToolChainType toolChainType() const;
ProjectExplorer::ToolChainType toolChainType() const;
ProjectExplorer::ToolChain *toolChain() const;
void setBuildDirectory(const QString &buildDirectory);
......
......@@ -42,6 +42,7 @@
#include <projectexplorer/buildenvironmentwidget.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/buildmanager.h>
#include <projectexplorer/toolchain.h>
#include <cpptools/cppmodelmanagerinterface.h>
#include <extensionsystem/pluginmanager.h>
#include <designer/formwindoweditor.h>
......
......@@ -39,7 +39,6 @@
#include <projectexplorer/project.h>
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/filewatcher.h>
#include <projectexplorer/buildconfiguration.h>
#include <coreplugin/ifile.h>
......
......@@ -305,11 +305,11 @@ void CMakeRunConfiguration::setUserEnvironmentChanges(const QList<Utils::Environ
}
}
ProjectExplorer::ToolChain::ToolChainType CMakeRunConfiguration::toolChainType() const
ProjectExplorer::ToolChainType CMakeRunConfiguration::toolChainType() const
{
CMakeBuildConfiguration *bc = activeBuildConfiguration();
if (!bc)
return ProjectExplorer::ToolChain::UNKNOWN;
return ProjectExplorer::ToolChain_UNKNOWN;
return bc->toolChainType();
}
......
......@@ -79,7 +79,7 @@ public:
QString dumperLibrary() const;
QStringList dumperLibraryLocations() const;
ProjectExplorer::ToolChain::ToolChainType toolChainType() const;
ProjectExplorer::ToolChainType toolChainType() const;
QVariantMap toMap() const;
......
......@@ -35,6 +35,7 @@
#include "cmakebuildconfiguration.h"
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/gnumakeparser.h>
......
......@@ -1741,14 +1741,14 @@ void addCdbOptionPages(QList<Core::IOptionsPage *> *opts)
bool checkCdbConfiguration(int toolChainI, QString *errorMsg, QString *settingsPage)
{
const ProjectExplorer::ToolChain::ToolChainType toolChain = static_cast<ProjectExplorer::ToolChain::ToolChainType>(toolChainI);
const ProjectExplorer::ToolChainType toolChain = static_cast<ProjectExplorer::ToolChainType>(toolChainI);
switch (toolChain) {
case ProjectExplorer::ToolChain::MinGW: // Do our best
case ProjectExplorer::ToolChain::MSVC:
case ProjectExplorer::ToolChain::WINCE:
case ProjectExplorer::ToolChain::OTHER:
case ProjectExplorer::ToolChain::UNKNOWN:
case ProjectExplorer::ToolChain::INVALID:
case ProjectExplorer::ToolChain_MinGW: // Do our best
case ProjectExplorer::ToolChain_MSVC:
case ProjectExplorer::ToolChain_WINCE:
case ProjectExplorer::ToolChain_OTHER:
case ProjectExplorer::ToolChain_UNKNOWN:
case ProjectExplorer::ToolChain_INVALID:
break;
default:
//: %1 is something like "GCCE" or "Intel C++ Compiler (Linux)" (see ToolChain context)
......
......@@ -108,7 +108,7 @@ void DebuggerSettings::readSettings(QSettings *settings)
if (predefinedGdb.isEmpty()) {
m_gdbBinaryToolChainMap.insert(binary, toolChain);
} else {
const QString toolChainName = ProjectExplorer::ToolChain::toolChainName(static_cast<ProjectExplorer::ToolChain::ToolChainType>(toolChain));
const QString toolChainName = ProjectExplorer::ToolChain::toolChainName(static_cast<ProjectExplorer::ToolChainType>(toolChain));
const QString msg =
QString::fromLatin1("An inconsistency has been encountered in the Ini-file '%1':\n"
"Skipping gdb binary '%2' for toolchain '%3' as '%4' is already configured for it.").
......@@ -121,10 +121,10 @@ void DebuggerSettings::readSettings(QSettings *settings)
#ifdef Q_OS_UNIX
if (m_gdbBinaryToolChainMap.isEmpty()) {
const QString gdb = QLatin1String("gdb");
m_gdbBinaryToolChainMap.insert(gdb, ProjectExplorer::ToolChain::GCC);
m_gdbBinaryToolChainMap.insert(gdb, ProjectExplorer::ToolChain::LINUX_ICC);
m_gdbBinaryToolChainMap.insert(gdb, ProjectExplorer::ToolChain::OTHER);
m_gdbBinaryToolChainMap.insert(gdb, ProjectExplorer::ToolChain::UNKNOWN);
m_gdbBinaryToolChainMap.insert(gdb, ProjectExplorer::ToolChain_GCC);
m_gdbBinaryToolChainMap.insert(gdb, ProjectExplorer::ToolChain_LINUX_ICC);
m_gdbBinaryToolChainMap.insert(gdb, ProjectExplorer::ToolChain_OTHER);
m_gdbBinaryToolChainMap.insert(gdb, ProjectExplorer::ToolChain_UNKNOWN);
}
#endif
}
......
......@@ -54,7 +54,7 @@
#include <coreplugin/progressmanager/futureprogress.h>
#include <projectexplorer/debugginghelper.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchaintype.h>
#include <qt4projectmanager/qt4projectmanagerconstants.h>
......@@ -112,7 +112,7 @@ DebuggerStartParameters::DebuggerStartParameters() :
qmlServerPort(0),
useServerStartScript(false),
connParams(SshConnectionParameters::NoProxy),
toolChainType(ToolChain::UNKNOWN),
toolChainType(ToolChain_UNKNOWN),
startMode(NoStartMode),
executableUid(0)
{}
......
......@@ -99,7 +99,7 @@
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/session.h>
#include <projectexplorer/target.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchaintype.h>
#include <texteditor/basetexteditor.h>
#include <texteditor/basetextmark.h>
......@@ -1796,7 +1796,7 @@ void DebuggerPluginPrivate::startExternalApplication()
// Fixme: 1 of 3 testing hacks.
if (!sp.processArgs.isEmpty()
&& (sp.processArgs.front() == _("@tcf@") || sp.processArgs.front() == _("@sym@")))
sp.toolChainType = ToolChain::RVCT_ARMV5;
sp.toolChainType = ProjectExplorer::ToolChain_RVCT_ARMV5;
if (RunControl *rc = m_debuggerRunControlFactory->create(sp))
......@@ -1921,7 +1921,7 @@ void DebuggerPluginPrivate::startRemoteApplication()
sp.displayName = dlg.localExecutable();
sp.debuggerCommand = dlg.debugger(); // Override toolchain-detection.
if (!sp.debuggerCommand.isEmpty())
sp.toolChainType = ToolChain::INVALID;
sp.toolChainType = ProjectExplorer::ToolChain_INVALID;
sp.startMode = AttachToRemote;
sp.useServerStartScript = dlg.useServerStartScript();
sp.serverStartScript = dlg.serverStartScript();
......
......@@ -47,6 +47,7 @@
#include <projectexplorer/debugginghelper.h>
#include <projectexplorer/project.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/projectexplorer.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <projectexplorer/target.h>
......@@ -104,7 +105,7 @@ bool checkCdbConfiguration(int, QString *, QString *) { return false; }
static QString toolChainName(int toolChainType)
{
return ToolChain::toolChainName(ToolChain::ToolChainType(toolChainType));
return ToolChain::toolChainName(ProjectExplorer::ToolChainType(toolChainType));
}
......@@ -312,25 +313,25 @@ const DebuggerStartParameters &DebuggerRunControl::startParameters() const
static DebuggerEngineType engineForToolChain(int toolChainType)
{
switch (toolChainType) {
case ProjectExplorer::ToolChain::LINUX_ICC:
case ProjectExplorer::ToolChain::MinGW:
case ProjectExplorer::ToolChain::GCC:
case ProjectExplorer::ToolChain::WINSCW: // S60
case ProjectExplorer::ToolChain::GCCE:
case ProjectExplorer::ToolChain::RVCT_ARMV5:
case ProjectExplorer::ToolChain::RVCT_ARMV6:
case ProjectExplorer::ToolChain::RVCT_ARMV5_GNUPOC:
case ProjectExplorer::ToolChain::GCCE_GNUPOC:
case ProjectExplorer::ToolChain::GCC_MAEMO:
case ProjectExplorer::ToolChain_LINUX_ICC:
case ProjectExplorer::ToolChain_MinGW:
case ProjectExplorer::ToolChain_GCC:
case ProjectExplorer::ToolChain_WINSCW: // S60
case ProjectExplorer::ToolChain_GCCE:
case ProjectExplorer::ToolChain_RVCT_ARMV5:
case ProjectExplorer::ToolChain_RVCT_ARMV6:
case ProjectExplorer::ToolChain_RVCT_ARMV5_GNUPOC:
case ProjectExplorer::ToolChain_GCCE_GNUPOC:
case ProjectExplorer::ToolChain_GCC_MAEMO:
return GdbEngineType;
case ProjectExplorer::ToolChain::MSVC:
case ProjectExplorer::ToolChain::WINCE:
case ProjectExplorer::ToolChain_MSVC:
case ProjectExplorer::ToolChain_WINCE:
return CdbEngineType;
case ProjectExplorer::ToolChain::OTHER:
case ProjectExplorer::ToolChain::UNKNOWN:
case ProjectExplorer::ToolChain::INVALID:
case ProjectExplorer::ToolChain_OTHER:
case ProjectExplorer::ToolChain_UNKNOWN:
case ProjectExplorer::ToolChain_INVALID:
default:
break;
}
......@@ -377,7 +378,7 @@ DebuggerEngineType DebuggerRunControl::engineForExecutable(unsigned enabledEngin
// We need the CDB debugger in order to be able to debug VS
// executables
if (checkDebugConfiguration(ToolChain::MSVC, &d->m_errorMessage, 0, &d->m_settingsIdHint)) {
if (checkDebugConfiguration(ProjectExplorer::ToolChain_MSVC, &d->m_errorMessage, 0, &d->m_settingsIdHint)) {
if (enabledEngineTypes & CdbEngineType)
return CdbEngineType;
d->m_errorMessage = msgEngineNotAvailable("Cdb Engine");
......@@ -547,19 +548,19 @@ bool DebuggerRunControl::checkDebugConfiguration(int toolChain,
return success;
switch(toolChain) {
case ProjectExplorer::ToolChain::GCC:
case ProjectExplorer::ToolChain::LINUX_ICC:
case ProjectExplorer::ToolChain::MinGW:
case ProjectExplorer::ToolChain::WINCE: // S60
case ProjectExplorer::ToolChain::WINSCW:
case ProjectExplorer::ToolChain::GCCE:
case ProjectExplorer::ToolChain::RVCT_ARMV5:
case ProjectExplorer::ToolChain::RVCT_ARMV6:
case ProjectExplorer::ToolChain_GCC:
case ProjectExplorer::ToolChain_LINUX_ICC:
case ProjectExplorer::ToolChain_MinGW:
case ProjectExplorer::ToolChain_WINCE: // S60
case ProjectExplorer::ToolChain_WINSCW:
case ProjectExplorer::ToolChain_GCCE:
case ProjectExplorer::ToolChain_RVCT_ARMV5:
case ProjectExplorer::ToolChain_RVCT_ARMV6:
success = checkGdbConfiguration(toolChain, errorMessage, settingsPage);
if (!success)
*errorMessage += msgEngineNotAvailable("Gdb");
break;
case ProjectExplorer::ToolChain::MSVC:
case ProjectExplorer::ToolChain_MSVC:
success = checkCdbConfiguration(toolChain, errorMessage, settingsPage);
if (!success) {
*errorMessage += msgEngineNotAvailable("Cdb");
......
......@@ -67,29 +67,29 @@ static QList<int> allGdbToolChains()
QList<int> rc;
rc
#ifdef Q_OS_UNIX
<< ProjectExplorer::ToolChain::GCC
<< ProjectExplorer::ToolChain::LINUX_ICC
<< ProjectExplorer::ToolChain_GCC
<< ProjectExplorer::ToolChain_LINUX_ICC
#endif
#ifdef Q_OS_WIN
<< ProjectExplorer::ToolChain::MinGW
<< ProjectExplorer::ToolChain::WINSCW
<< ProjectExplorer::ToolChain::GCCE
<< ProjectExplorer::ToolChain::RVCT_ARMV5
<< ProjectExplorer::ToolChain::RVCT_ARMV6
<< ProjectExplorer::ToolChain_MinGW
<< ProjectExplorer::ToolChain_WINSCW
<< ProjectExplorer::ToolChain_GCCE
<< ProjectExplorer::ToolChain_RVCT_ARMV5
<< ProjectExplorer::ToolChain_RVCT_ARMV6
#endif
<< ProjectExplorer::ToolChain::GCC_MAEMO
<< ProjectExplorer::ToolChain_GCC_MAEMO
#ifdef Q_OS_UNIX
<< ProjectExplorer::ToolChain::GCCE_GNUPOC
<< ProjectExplorer::ToolChain::RVCT_ARMV5_GNUPOC
<< ProjectExplorer::ToolChain_GCCE_GNUPOC
<< ProjectExplorer::ToolChain_RVCT_ARMV5_GNUPOC
#endif
<< ProjectExplorer::ToolChain::OTHER
<< ProjectExplorer::ToolChain::UNKNOWN;
<< ProjectExplorer::ToolChain_OTHER
<< ProjectExplorer::ToolChain_UNKNOWN;
return rc;
}
static inline QString toolChainName(int tc)
{
return ProjectExplorer::ToolChain::toolChainName(static_cast<ProjectExplorer::ToolChain::ToolChainType>(tc));
return ProjectExplorer::ToolChain::toolChainName(static_cast<ProjectExplorer::ToolChainType>(tc));
}
namespace Debugger {
......@@ -424,28 +424,28 @@ ToolChainSelectorWidget::ToolChainSelectorWidget(QWidget *parent) :
// Group checkboxes into categories
foreach(int tc, allGdbToolChains()) {
switch (tc) {
case ProjectExplorer::ToolChain::GCC:
case ProjectExplorer::ToolChain::LINUX_ICC:
case ProjectExplorer::ToolChain::MinGW:
case ProjectExplorer::ToolChain::OTHER:
case ProjectExplorer::ToolChain::UNKNOWN:
case ProjectExplorer::ToolChain_GCC:
case ProjectExplorer::ToolChain_LINUX_ICC:
case ProjectExplorer::ToolChain_MinGW:
case ProjectExplorer::ToolChain_OTHER:
case ProjectExplorer::ToolChain_UNKNOWN:
desktopLayout->addWidget(createToolChainCheckBox(tc));
break;
case ProjectExplorer::ToolChain::MSVC:
case ProjectExplorer::ToolChain::WINCE:
case ProjectExplorer::ToolChain_MSVC:
case ProjectExplorer::ToolChain_WINCE:
break;
case ProjectExplorer::ToolChain::WINSCW:
case ProjectExplorer::ToolChain::GCCE:
case ProjectExplorer::ToolChain::RVCT_ARMV5:
case ProjectExplorer::ToolChain::RVCT_ARMV6:
case ProjectExplorer::ToolChain::GCCE_GNUPOC:
case ProjectExplorer::ToolChain::RVCT_ARMV5_GNUPOC:
case ProjectExplorer::ToolChain_WINSCW:
case ProjectExplorer::ToolChain_GCCE:
case ProjectExplorer::ToolChain_RVCT_ARMV5:
case ProjectExplorer::ToolChain_RVCT_ARMV6:
case ProjectExplorer::ToolChain_GCCE_GNUPOC:
case ProjectExplorer::ToolChain_RVCT_ARMV5_GNUPOC:
symbianLayout->addWidget(createToolChainCheckBox(tc));
break;
case ProjectExplorer::ToolChain::GCC_MAEMO:
case ProjectExplorer::ToolChain_GCC_MAEMO:
maemoLayout->addWidget(createToolChainCheckBox(tc));
break;
case ProjectExplorer::ToolChain::INVALID:
case ProjectExplorer::ToolChain_INVALID:
break;
}
}
......
......@@ -1722,7 +1722,7 @@ int GdbEngine::currentFrame() const
static inline QString msgNoBinaryForToolChain(int tc)
{
const ProjectExplorer::ToolChain::ToolChainType toolChain = static_cast<ProjectExplorer::ToolChain::ToolChainType>(tc);
const ProjectExplorer::ToolChainType toolChain = static_cast<ProjectExplorer::ToolChainType>(tc);
const QString toolChainName = ProjectExplorer::ToolChain::toolChainName(toolChain);
return GdbEngine::tr("There is no gdb binary available for '%1'").arg(toolChainName);
}
......@@ -1737,12 +1737,12 @@ AbstractGdbAdapter *GdbEngine::createAdapter()
const DebuggerStartParameters &sp = startParameters();
//qDebug() << "CREATE ADAPTER: " << sp.toolChainType;
switch (sp.toolChainType) {
case ProjectExplorer::ToolChain::WINSCW: // S60
case ProjectExplorer::ToolChain::GCCE:
case ProjectExplorer::ToolChain::RVCT_ARMV5:
case ProjectExplorer::ToolChain::RVCT_ARMV6:
case ProjectExplorer::ToolChain::RVCT_ARMV5_GNUPOC:
case ProjectExplorer::ToolChain::GCCE_GNUPOC:
case ProjectExplorer::ToolChain_WINSCW: // S60
case ProjectExplorer::ToolChain_GCCE:
case ProjectExplorer::ToolChain_RVCT_ARMV5:
case ProjectExplorer::ToolChain_RVCT_ARMV6:
case ProjectExplorer::ToolChain_RVCT_ARMV5_GNUPOC:
case ProjectExplorer::ToolChain_GCCE_GNUPOC:
// fixme: 1 of 3 testing hacks
if (sp.processArgs.size() >= 5 && sp.processArgs.at(0) == _("@tcf@"))
return new TcfTrkGdbAdapter(this);
......
......@@ -34,7 +34,7 @@
#include <utils/qtcassert.h>
#include <utils/fancymainwindow.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchaintype.h>
#include <QtCore/QFileInfo>
#include <QtGui/QMessageBox>
......@@ -69,14 +69,14 @@ RemoteGdbServerAdapter::RemoteGdbServerAdapter(GdbEngine *engine, int toolChainT
AbstractGdbAdapter::DumperHandling RemoteGdbServerAdapter::dumperHandling() const
{
switch (m_toolChainType) {
case ProjectExplorer::ToolChain::MinGW:
case ProjectExplorer::ToolChain::MSVC:
case ProjectExplorer::ToolChain::WINCE:
case ProjectExplorer::ToolChain::WINSCW:
case ProjectExplorer::ToolChain::GCCE:
case ProjectExplorer::ToolChain::RVCT_ARMV5:
case ProjectExplorer::ToolChain::RVCT_ARMV6:
case ProjectExplorer::ToolChain::GCC_MAEMO:
case ProjectExplorer::ToolChain_MinGW:
case ProjectExplorer::ToolChain_MSVC:
case ProjectExplorer::ToolChain_WINCE:
case ProjectExplorer::ToolChain_WINSCW:
case ProjectExplorer::ToolChain_GCCE:
case ProjectExplorer::ToolChain_RVCT_ARMV5:
case ProjectExplorer::ToolChain_RVCT_ARMV6:
case ProjectExplorer::ToolChain_GCC_MAEMO:
return DumperLoadedByGdb;
default:
break;
......@@ -189,7 +189,7 @@ void RemoteGdbServerAdapter::setupInferior()
// This has to be issued before 'target remote'. On pre-7.0 the
// command is not present and will result in ' No symbol table is
// loaded. Use the "file" command.' as gdb tries to set the
// loaded. Use the "file" command.' as gdb tries to set the
// value of a variable with name 'target-async'.
//
// Testing with -list-target-features which was introduced at
......
......@@ -34,6 +34,7 @@
#include "generictarget.h"
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <utils/qtcassert.h>
......
......@@ -330,7 +330,7 @@ void GenericProject::setIncludePaths(const QStringList &includePaths)
QByteArray GenericProject::defines() const
{ return m_defines; }
void GenericProject::setToolChainType(ProjectExplorer::ToolChain::ToolChainType type)
void GenericProject::setToolChainType(ProjectExplorer::ToolChainType type)
{
using namespace ProjectExplorer;
......@@ -339,23 +339,23 @@ void GenericProject::setToolChainType(ProjectExplorer::ToolChain::ToolChainType
delete m_toolChain;
m_toolChain = 0;
if (type == ToolChain::MinGW) {
if (type == ToolChain_MinGW) {
const QLatin1String qmake_cxx("g++"); // ### FIXME
const QString mingwDirectory; // ### FIXME
m_toolChain = ToolChain::createMinGWToolChain(qmake_cxx, mingwDirectory);
} else if (type == ToolChain::MSVC) {
} else if (type == ToolChain_MSVC) {
const QString msvcVersion; // ### FIXME
m_toolChain = ToolChain::createMSVCToolChain(msvcVersion, false);
} else if (type == ToolChain::WINCE) {
} else if (type == ToolChain_WINCE) {
const QString msvcVersion, wincePlatform; // ### FIXME
m_toolChain = ToolChain::createWinCEToolChain(msvcVersion, wincePlatform);
} else if (type == ToolChain::GCC) {
} else if (type == ToolChain_GCC) {
const QLatin1String qmake_cxx("g++"); // ### FIXME
m_toolChain = ToolChain::createGccToolChain(qmake_cxx);
} else if (type == ToolChain::LINUX_ICC) {
} else if (type == ToolChain_LINUX_ICC) {
m_toolChain = ToolChain::createLinuxIccToolChain();
}
}
......@@ -365,7 +365,7 @@ ProjectExplorer::ToolChain *GenericProject::toolChain() const
return m_toolChain;
}
ProjectExplorer::ToolChain::ToolChainType GenericProject::toolChainType() const
ProjectExplorer::ToolChainType GenericProject::toolChainType() const
{ return m_toolChainType; }
QString GenericProject::displayName() const
......@@ -452,8 +452,8 @@ bool GenericProject::fromMap(const QVariantMap &map)
if (targets().isEmpty())
addTarget(targetFactory()->create(this, QLatin1String(GENERIC_DESKTOP_TARGET_ID)));
ToolChain::ToolChainType type =
static_cast<ProjectExplorer::ToolChain::ToolChainType>
ToolChainType type =
static_cast<ProjectExplorer::ToolChainType>
(map.value(QLatin1String(TOOLCHAIN_KEY), 0).toInt());
setToolChainType(type);
......@@ -488,8 +488,8 @@ GenericBuildSettingsWidget::GenericBuildSettingsWidget(GenericProject *project)
using namespace ProjectExplorer;
int index = 0;
int selectedIndex = -1;
foreach (ToolChain::ToolChainType tc, ToolChain::supportedToolChains()) {
toolChainChooser->addItem(ToolChain::toolChainName(tc), QVariant::fromValue<ToolChain::ToolChainType>(tc));
foreach (ToolChainType tc, ToolChain::supportedToolChains()) {
toolChainChooser->addItem(ToolChain::toolChainName(tc), QVariant::fromValue<ToolChainType>(tc));
if (m_project->toolChainType() == tc)
selectedIndex = index;
++index;
......@@ -522,7 +522,7 @@ void GenericBuildSettingsWidget::toolChainSelected(int index)
using namespace ProjectExplorer;
QComboBox *toolChainChooser = qobject_cast<QComboBox*>(sender());
ToolChain::ToolChainType type = toolChainChooser->itemData(index).value<ToolChain::ToolChainType>();
ToolChainType type = toolChainChooser->itemData(index).value<ToolChainType>();
m_project->setToolChainType(type);
}
......
......@@ -38,7 +38,7 @@
#include <projectexplorer/projectnodes.h>
#include <projectexplorer/target.h>
#include <projectexplorer/buildstep.h>
#include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchaintype.h>
#include <projectexplorer/buildconfiguration.h>
#include <coreplugin/ifile.h>
......@@ -48,6 +48,10 @@ namespace Utils {
class PathChooser;
}
namespace ProjectExplorer {
class ToolChain;
}
namespace GenericProjectManager {
namespace Internal {
class GenericBuildConfiguration;
......@@ -106,8 +110,8 @@ public:
QStringList projectIncludePaths() const;
QStringList files() const;
QStringList generated() const;
ProjectExplorer::ToolChain::ToolChainType toolChainType() const;
void setToolChainType(ProjectExplorer::ToolChain::ToolChainType type);
ProjectExplorer::ToolChainType toolChainType() const;
void setToolChainType(ProjectExplorer::ToolChainType type);
QVariantMap toMap() const;
......@@ -139,7 +143,7 @@ private:
GenericProjectNode *m_rootNode;
ProjectExplorer::ToolChain *m_toolChain;
ProjectExplorer::ToolChain::ToolChainType m_toolChainType;
ProjectExplorer::ToolChainType m_toolChainType;
QFuture<void> m_codeModelFuture;
};
......
......@@ -30,7 +30,7 @@
#ifndef APPLICATIONRUNCONFIGURATION_H
#define APPLICATIONRUNCONFIGURATION_H
#include <projectexplorer/toolchain.h>
#include <projectexplorer/toolchaintype.h>
#include "runconfiguration.h"
#include "applicationlauncher.h"
......@@ -58,7 +58,7 @@ public:
virtual Utils::Environment environment() const = 0;
virtual QString dumperLibrary() const = 0;
virtual QStringList dumperLibraryLocations() const = 0;
virtual ProjectExplorer::ToolChain::ToolChainType toolChainType() const = 0;
virtual ProjectExplorer::ToolChainType toolChainType() const = 0;
protected:
explicit LocalApplicationRunConfiguration(Target *target, const QString &id);
......
......@@ -29,6 +29,7 @@
#include "customexecutablerunconfiguration.h"
#include "customexecutableconfigurationwidget.h"
#include "toolchaintype.h"