toolchain: fix enum naming style

Reviewed-By: Tobias Hunger
This commit is contained in:
hjk
2011-02-23 16:47:08 +01:00
parent 3331aea7da
commit a8ae618d75
24 changed files with 267 additions and 264 deletions

View File

@@ -408,10 +408,10 @@ void CMakeRunPage::initializePage()
foreach (ProjectExplorer::ToolChain *tc, tcs) { foreach (ProjectExplorer::ToolChain *tc, tcs) {
ProjectExplorer::Abi targetAbi = tc->targetAbi(); ProjectExplorer::Abi targetAbi = tc->targetAbi();
QVariant tcVariant = qVariantFromValue(static_cast<void *>(tc)); QVariant tcVariant = qVariantFromValue(static_cast<void *>(tc));
if (targetAbi.os() == ProjectExplorer::Abi::Windows) { if (targetAbi.os() == ProjectExplorer::Abi::WindowsOS) {
if (targetAbi.osFlavor() == ProjectExplorer::Abi::Windows_msvc) if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMsvcFlavor)
m_generatorComboBox->addItem(tr("NMake Generator (%1)").arg(tc->displayName()), tcVariant); m_generatorComboBox->addItem(tr("NMake Generator (%1)").arg(tc->displayName()), tcVariant);
else if (targetAbi.osFlavor() == ProjectExplorer::Abi::Windows_msys) else if (targetAbi.osFlavor() == ProjectExplorer::Abi::WindowsMSysFlavor)
m_generatorComboBox->addItem(tr("MinGW Generator (%1)").arg(tc->displayName()), tcVariant); m_generatorComboBox->addItem(tr("MinGW Generator (%1)").arg(tc->displayName()), tcVariant);
else else
continue; continue;
@@ -449,8 +449,8 @@ void CMakeRunPage::runCMake()
CMakeManager *cmakeManager = m_cmakeWizard->cmakeManager(); CMakeManager *cmakeManager = m_cmakeWizard->cmakeManager();
QString generator = QLatin1String("-GCodeBlocks - Unix Makefiles"); QString generator = QLatin1String("-GCodeBlocks - Unix Makefiles");
if (tc->targetAbi().os() == ProjectExplorer::Abi::Windows) { if (tc->targetAbi().os() == ProjectExplorer::Abi::WindowsOS) {
if (tc->targetAbi().osFlavor() == ProjectExplorer::Abi::Windows_msvc) if (tc->targetAbi().osFlavor() == ProjectExplorer::Abi::WindowsMsvcFlavor)
generator = QLatin1String("-GCodeBlocks - NMake Makefiles"); generator = QLatin1String("-GCodeBlocks - NMake Makefiles");
else else
generator = QLatin1String("-GCodeBlocks - MinGW Makefiles"); generator = QLatin1String("-GCodeBlocks - MinGW Makefiles");

View File

@@ -299,7 +299,7 @@ static inline bool validMode(DebuggerStartMode sm)
return true; return true;
} }
static inline QString msgCdbDisabled(const ProjectExplorer::Abi &abi) static inline QString msgCdbDisabled(const Abi &abi)
{ {
return CdbEngine::tr("The CDB debug engine required for %1 is currently disabled."). return CdbEngine::tr("The CDB debug engine required for %1 is currently disabled.").
arg(abi.toString()); arg(abi.toString());
@@ -337,11 +337,11 @@ bool isCdbEngineEnabled()
#endif #endif
} }
ConfigurationCheck checkCdbConfiguration(const ProjectExplorer::Abi &abi) ConfigurationCheck checkCdbConfiguration(const Abi &abi)
{ {
ConfigurationCheck check; ConfigurationCheck check;
if (abi.binaryFormat() == ProjectExplorer::Abi::Format_PE if (abi.binaryFormat() == Abi::PEFormat
&& abi.osFlavor() != ProjectExplorer::Abi::Windows_msys) { && abi.osFlavor() != Abi::WindowsMSysFlavor) {
if (!isCdbEngineEnabled()) { if (!isCdbEngineEnabled()) {
check.errorMessage = msgCdbDisabled(abi); check.errorMessage = msgCdbDisabled(abi);
check.settingsPage = CdbOptionsPage::settingsId(); check.settingsPage = CdbOptionsPage::settingsId();
@@ -637,11 +637,11 @@ bool CdbEngine::launchCDB(const DebuggerStartParameters &sp, QString *errorMessa
// Determine binary (force MSVC), extension lib name and path to use // Determine binary (force MSVC), extension lib name and path to use
// The extension is passed as relative name with the path variable set // The extension is passed as relative name with the path variable set
//(does not work with absolute path names) //(does not work with absolute path names)
ProjectExplorer::Abi abi = sp.toolChainAbi; Abi abi = sp.toolChainAbi;
if (abi.osFlavor() == ProjectExplorer::Abi::UNKNOWN_OSFLAVOUR || abi.osFlavor() == ProjectExplorer::Abi::Windows_msys) if (abi.osFlavor() == Abi::UnknownFlavor
abi = ProjectExplorer::Abi(abi.architecture(), abi.os(), || abi.osFlavor() == Abi::WindowsMSysFlavor)
ProjectExplorer::Abi::Windows_msvc, abi = Abi(abi.architecture(), abi.os(), Abi::WindowsMsvcFlavor,
abi.binaryFormat(), abi.wordWidth()); abi.binaryFormat(), abi.wordWidth());
const QString executable = debuggerCore()->debuggerForAbi(abi); const QString executable = debuggerCore()->debuggerForAbi(abi);
if (executable.isEmpty()) { if (executable.isEmpty()) {
*errorMessage = tr("There is no CDB executable specified."); *errorMessage = tr("There is no CDB executable specified.");

View File

@@ -1354,7 +1354,7 @@ void DebuggerPluginPrivate::startExternalApplication()
// Fixme: 1 of 3 testing hacks. // Fixme: 1 of 3 testing hacks.
if (sp.processArgs.startsWith(__("@tcf@ ")) || sp.processArgs.startsWith(__("@sym@ "))) if (sp.processArgs.startsWith(__("@tcf@ ")) || sp.processArgs.startsWith(__("@sym@ ")))
// Set up an ARM Symbian Abi // Set up an ARM Symbian Abi
sp.toolChainAbi = Abi(Abi::ARM, Abi::Symbian, Abi::Symbian_device, Abi::Format_ELF, false); sp.toolChainAbi = Abi(Abi::ArmArchitecture, Abi::SymbianOS, Abi::SymbianDeviceFlavor, Abi::ElfFormat, false);
if (dlg.breakAtMain()) { if (dlg.breakAtMain()) {
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
@@ -1438,9 +1438,9 @@ void DebuggerPluginPrivate::startRemoteCdbSession()
DebuggerStartParameters sp; DebuggerStartParameters sp;
Abi hostAbi = Abi::hostAbi(); Abi hostAbi = Abi::hostAbi();
sp.toolChainAbi = ProjectExplorer::Abi(hostAbi.architecture(), sp.toolChainAbi = ProjectExplorer::Abi(hostAbi.architecture(),
ProjectExplorer::Abi::Windows, ProjectExplorer::Abi::WindowsOS,
ProjectExplorer::Abi::Windows_msvc, ProjectExplorer::Abi::WindowsMsvcFlavor,
ProjectExplorer::Abi::Format_PE, ProjectExplorer::Abi::PEFormat,
true); true);
sp.startMode = AttachToRemote; sp.startMode = AttachToRemote;
StartRemoteCdbDialog dlg(mainWindow()); StartRemoteCdbDialog dlg(mainWindow());

View File

@@ -167,9 +167,9 @@ DebuggerEngineType DebuggerRunControlPrivate::engineForExecutable
// executables. // executables.
Abi hostAbi = Abi::hostAbi(); Abi hostAbi = Abi::hostAbi();
ConfigurationCheck check = checkDebugConfiguration(Abi(hostAbi.architecture(), ConfigurationCheck check = checkDebugConfiguration(Abi(hostAbi.architecture(),
Abi::Windows, Abi::WindowsOS,
hostAbi.osFlavor(), hostAbi.osFlavor(),
Abi::Format_PE, Abi::PEFormat,
hostAbi.wordWidth())); hostAbi.wordWidth()));
if (!check) { if (!check) {
m_errorMessage = check.errorMessage; m_errorMessage = check.errorMessage;
@@ -224,16 +224,16 @@ DebuggerEngineType DebuggerRunControlPrivate::engineForMode
static DebuggerEngineType engineForToolChain(const Abi &toolChain) static DebuggerEngineType engineForToolChain(const Abi &toolChain)
{ {
switch (toolChain.binaryFormat()) { switch (toolChain.binaryFormat()) {
case Abi::Format_ELF: case Abi::ElfFormat:
case Abi::Format_Mach_O: case Abi::MachOFormat:
#ifdef WITH_LLDB #ifdef WITH_LLDB
// lldb override // lldb override
if (Core::ICore::instance()->settings()->value("LLDB/enabled").toBool()) if (Core::ICore::instance()->settings()->value("LLDB/enabled").toBool())
return LldbEngineType; return LldbEngineType;
#endif #endif
return GdbEngineType; return GdbEngineType;
case Abi::Format_PE: case Abi::PEFormat:
if (toolChain.osFlavor() == Abi::Windows_msys) if (toolChain.osFlavor() == Abi::WindowsMSysFlavor)
return GdbEngineType; return GdbEngineType;
return CdbEngineType; return CdbEngineType;
default: default:
@@ -385,9 +385,9 @@ ConfigurationCheck checkDebugConfiguration(const Abi &abi)
if (!(debuggerCore()->activeLanguages() & CppLanguage)) if (!(debuggerCore()->activeLanguages() & CppLanguage))
return result; return result;
if (abi.binaryFormat() == Abi::Format_ELF || if (abi.binaryFormat() == Abi::ElfFormat ||
abi.binaryFormat() == Abi::Format_Mach_O || abi.binaryFormat() == Abi::MachOFormat ||
(abi.binaryFormat() == Abi::Format_PE && abi.osFlavor() == Abi::Windows_msys)) { (abi.binaryFormat() == Abi::PEFormat && abi.osFlavor() == Abi::WindowsMSysFlavor)) {
if (debuggerCore()->debuggerForAbi(abi).isEmpty()) { if (debuggerCore()->debuggerForAbi(abi).isEmpty()) {
result.errorMessage = msgNoBinaryForToolChain(abi); result.errorMessage = msgNoBinaryForToolChain(abi);
if (!result.errorMessage.isEmpty()) if (!result.errorMessage.isEmpty())
@@ -395,8 +395,8 @@ ConfigurationCheck checkDebugConfiguration(const Abi &abi)
result.errorMessage += QLatin1Char(' ') + msgEngineNotAvailable("Gdb"); result.errorMessage += QLatin1Char(' ') + msgEngineNotAvailable("Gdb");
result.settingsPage = _(Constants::DEBUGGER_COMMON_SETTINGS_ID); result.settingsPage = _(Constants::DEBUGGER_COMMON_SETTINGS_ID);
} }
} else if (abi.binaryFormat() == Abi::Format_PE } else if (abi.binaryFormat() == Abi::PEFormat
&& abi.osFlavor() != Abi::Windows_msys) { && abi.osFlavor() != Abi::WindowsMSysFlavor) {
result = checkCdbConfiguration(abi); result = checkCdbConfiguration(abi);
if (!result) { if (!result) {
if (!result.errorMessage.isEmpty()) if (!result.errorMessage.isEmpty())

View File

@@ -102,6 +102,8 @@
#endif #endif
#include <ctype.h> #include <ctype.h>
using namespace ProjectExplorer;
namespace Debugger { namespace Debugger {
namespace Internal { namespace Internal {
@@ -1805,7 +1807,7 @@ QString msgNoBinaryForToolChain(const ProjectExplorer::Abi &tc)
AbstractGdbAdapter *GdbEngine::createAdapter() AbstractGdbAdapter *GdbEngine::createAdapter()
{ {
const DebuggerStartParameters &sp = startParameters(); const DebuggerStartParameters &sp = startParameters();
if (sp.toolChainAbi.os() == ProjectExplorer::Abi::Symbian) { if (sp.toolChainAbi.os() == ProjectExplorer::Abi::SymbianOS) {
// FIXME: 1 of 3 testing hacks. // FIXME: 1 of 3 testing hacks.
if (sp.debugClient == DebuggerStartParameters::DebugClientCoda) if (sp.debugClient == DebuggerStartParameters::DebugClientCoda)
return new CodaGdbAdapter(this); return new CodaGdbAdapter(this);
@@ -4208,13 +4210,14 @@ bool GdbEngine::startGdb(const QStringList &args, const QString &gdb,
const DebuggerStartParameters &sp = startParameters(); const DebuggerStartParameters &sp = startParameters();
m_gdb = QString::fromLocal8Bit(qgetenv("QTC_DEBUGGER_PATH")); m_gdb = QString::fromLocal8Bit(qgetenv("QTC_DEBUGGER_PATH"));
if (m_gdb.isEmpty() && sp.startMode != StartRemoteGdb) { if (m_gdb.isEmpty() && sp.startMode != StartRemoteGdb) {
// We want the MinGW gdb also in case we got started using some compatible ABI. // We want the MinGW gdb also in case we got started using
ProjectExplorer::Abi abi = startParameters().toolChainAbi; // some compatible ABI.
if (abi.os() == ProjectExplorer::Abi::Windows) { Abi abi = startParameters().toolChainAbi;
if (abi.osFlavor() == ProjectExplorer::Abi::UNKNOWN_OSFLAVOUR || abi.osFlavor() == ProjectExplorer::Abi::Windows_msvc) if (abi.os() == Abi::WindowsOS) {
abi = ProjectExplorer::Abi(abi.architecture(), abi.os(), if (abi.osFlavor() == Abi::UnknownFlavor
ProjectExplorer::Abi::Windows_msys, || abi.osFlavor() == Abi::WindowsMsvcFlavor)
abi.binaryFormat(), abi.wordWidth()); abi = Abi(abi.architecture(), abi.os(), Abi::WindowsMSysFlavor,
abi.binaryFormat(), abi.wordWidth());
} }
m_gdb = debuggerCore()->debuggerForAbi(abi); m_gdb = debuggerCore()->debuggerForAbi(abi);
} }

View File

@@ -77,9 +77,9 @@ RemoteGdbServerAdapter::RemoteGdbServerAdapter(GdbEngine *engine,
AbstractGdbAdapter::DumperHandling RemoteGdbServerAdapter::dumperHandling() const AbstractGdbAdapter::DumperHandling RemoteGdbServerAdapter::dumperHandling() const
{ {
if (m_abi.os() == ProjectExplorer::Abi::Symbian if (m_abi.os() == ProjectExplorer::Abi::SymbianOS
|| m_abi.os() == ProjectExplorer::Abi::Windows || m_abi.os() == ProjectExplorer::Abi::WindowsOS
|| m_abi.binaryFormat() == ProjectExplorer::Abi::Format_ELF) || m_abi.binaryFormat() == ProjectExplorer::Abi::ElfFormat)
return DumperLoadedByGdb; return DumperLoadedByGdb;
return DumperLoadedByGdbPreload; return DumperLoadedByGdbPreload;
} }

View File

@@ -42,113 +42,113 @@
namespace ProjectExplorer { namespace ProjectExplorer {
Abi::Abi(const Architecture &a, const OS &o, Abi::Abi(const Architecture &a, const OS &o,
const OSFlavour &of, const BinaryFormat &f, unsigned char w) : const OSFlavor &of, const BinaryFormat &f, unsigned char w) :
m_architecture(a), m_os(o), m_osFlavor(of), m_binaryFormat(f), m_wordWidth(w) m_architecture(a), m_os(o), m_osFlavor(of), m_binaryFormat(f), m_wordWidth(w)
{ {
switch (m_os) { switch (m_os) {
case ProjectExplorer::Abi::UNKNOWN_OS: case ProjectExplorer::Abi::UnknownOS:
m_osFlavor = UNKNOWN_OSFLAVOUR; m_osFlavor = UnknownFlavor;
break; break;
case ProjectExplorer::Abi::Linux: case ProjectExplorer::Abi::LinuxOS:
if (m_osFlavor < Linux_generic || m_osFlavor > Linux_meego) if (m_osFlavor < GenericLinuxFlavor || m_osFlavor > MeegoLinuxFlavor)
m_osFlavor = UNKNOWN_OSFLAVOUR; m_osFlavor = UnknownFlavor;
break; break;
case ProjectExplorer::Abi::Mac: case ProjectExplorer::Abi::MacOS:
if (m_osFlavor < Mac_generic || m_osFlavor > Mac_generic) if (m_osFlavor < GenericMacFlavor || m_osFlavor > GenericMacFlavor)
m_osFlavor = UNKNOWN_OSFLAVOUR; m_osFlavor = UnknownFlavor;
break; break;
case ProjectExplorer::Abi::Symbian: case ProjectExplorer::Abi::SymbianOS:
if (m_osFlavor < Symbian_device || m_osFlavor > Symbian_emulator) if (m_osFlavor < SymbianDeviceFlavor || m_osFlavor > SymbianEmulatorFlavor)
m_osFlavor = UNKNOWN_OSFLAVOUR; m_osFlavor = UnknownFlavor;
break; break;
case ProjectExplorer::Abi::UNIX: case ProjectExplorer::Abi::UnixOS:
if (m_osFlavor < Unix_generic || m_osFlavor > Unix_generic) if (m_osFlavor < GenericUnixFlavor || m_osFlavor > GenericUnixFlavor)
m_osFlavor = UNKNOWN_OSFLAVOUR; m_osFlavor = UnknownFlavor;
break; break;
case ProjectExplorer::Abi::Windows: case ProjectExplorer::Abi::WindowsOS:
if (m_osFlavor < Windows_msvc || m_osFlavor > Windows_ce) if (m_osFlavor < WindowsMsvcFlavor || m_osFlavor > WindowsCEFlavor)
m_osFlavor = UNKNOWN_OSFLAVOUR; m_osFlavor = UnknownFlavor;
break; break;
} }
} }
Abi::Abi(const QString &abiString) : Abi::Abi(const QString &abiString) :
m_architecture(UNKNOWN_ARCHITECTURE), m_os(UNKNOWN_OS), m_architecture(UnknownArchitecture), m_os(UnknownOS),
m_osFlavor(UNKNOWN_OSFLAVOUR), m_binaryFormat(UNKNOWN_FORMAT), m_wordWidth(0) m_osFlavor(UnknownFlavor), m_binaryFormat(UnknownFormat), m_wordWidth(0)
{ {
QStringList abiParts = abiString.split(QLatin1Char('-')); QStringList abiParts = abiString.split(QLatin1Char('-'));
if (abiParts.count() >= 1) { if (abiParts.count() >= 1) {
if (abiParts.at(0) == QLatin1String("unknown")) if (abiParts.at(0) == QLatin1String("unknown"))
m_architecture = UNKNOWN_ARCHITECTURE; m_architecture = UnknownArchitecture;
else if (abiParts.at(0) == QLatin1String("arm")) else if (abiParts.at(0) == QLatin1String("arm"))
m_architecture = ARM; m_architecture = ArmArchitecture;
else if (abiParts.at(0) == QLatin1String("x86")) else if (abiParts.at(0) == QLatin1String("x86"))
m_architecture = x86; m_architecture = X86Architecture;
else if (abiParts.at(0) == QLatin1String("mips")) else if (abiParts.at(0) == QLatin1String("mips"))
m_architecture = Mips; m_architecture = MipsArcitecture;
else if (abiParts.at(0) == QLatin1String("ppc")) else if (abiParts.at(0) == QLatin1String("ppc"))
m_architecture = PowerPC; m_architecture = PowerPCArchitecture;
else if (abiParts.at(0) == QLatin1String("itanium")) else if (abiParts.at(0) == QLatin1String("itanium"))
m_architecture = Itanium; m_architecture = ItaniumArchitecture;
else else
return; return;
} }
if (abiParts.count() >= 2) { if (abiParts.count() >= 2) {
if (abiParts.at(1) == QLatin1String("unknown")) if (abiParts.at(1) == QLatin1String("unknown"))
m_os = UNKNOWN_OS; m_os = UnknownOS;
else if (abiParts.at(1) == QLatin1String("linux")) else if (abiParts.at(1) == QLatin1String("linux"))
m_os = Linux; m_os = LinuxOS;
else if (abiParts.at(1) == QLatin1String("macos")) else if (abiParts.at(1) == QLatin1String("macos"))
m_os = Mac; m_os = MacOS;
else if (abiParts.at(1) == QLatin1String("symbian")) else if (abiParts.at(1) == QLatin1String("symbian"))
m_os = Symbian; m_os = SymbianOS;
else if (abiParts.at(1) == QLatin1String("unix")) else if (abiParts.at(1) == QLatin1String("unix"))
m_os = UNIX; m_os = UnixOS;
else if (abiParts.at(1) == QLatin1String("windows")) else if (abiParts.at(1) == QLatin1String("windows"))
m_os = Windows; m_os = WindowsOS;
else else
return; return;
} }
if (abiParts.count() >= 3) { if (abiParts.count() >= 3) {
if (abiParts.at(2) == QLatin1String("unknown")) if (abiParts.at(2) == QLatin1String("unknown"))
m_osFlavor = UNKNOWN_OSFLAVOUR; m_osFlavor = UnknownFlavor;
else if (abiParts.at(2) == QLatin1String("generic") && m_os == Linux) else if (abiParts.at(2) == QLatin1String("generic") && m_os == LinuxOS)
m_osFlavor = Linux_generic; m_osFlavor = GenericLinuxFlavor;
else if (abiParts.at(2) == QLatin1String("maemo") && m_os == Linux) else if (abiParts.at(2) == QLatin1String("maemo") && m_os == LinuxOS)
m_osFlavor = Linux_maemo; m_osFlavor = MaemoLinuxFlavor;
else if (abiParts.at(2) == QLatin1String("meego") && m_os == Linux) else if (abiParts.at(2) == QLatin1String("meego") && m_os == LinuxOS)
m_osFlavor = Linux_meego; m_osFlavor = MeegoLinuxFlavor;
else if (abiParts.at(2) == QLatin1String("generic") && m_os == Mac) else if (abiParts.at(2) == QLatin1String("generic") && m_os == MacOS)
m_osFlavor = Mac_generic; m_osFlavor = GenericMacFlavor;
else if (abiParts.at(2) == QLatin1String("device") && m_os == Symbian) else if (abiParts.at(2) == QLatin1String("device") && m_os == SymbianOS)
m_osFlavor = Symbian_device; m_osFlavor = SymbianDeviceFlavor;
else if (abiParts.at(2) == QLatin1String("emulator") && m_os == Symbian) else if (abiParts.at(2) == QLatin1String("emulator") && m_os == SymbianOS)
m_osFlavor = Symbian_emulator; m_osFlavor = SymbianEmulatorFlavor;
else if (abiParts.at(2) == QLatin1String("generic") && m_os == UNIX) else if (abiParts.at(2) == QLatin1String("generic") && m_os == UnixOS)
m_osFlavor = Unix_generic; m_osFlavor = GenericUnixFlavor;
else if (abiParts.at(2) == QLatin1String("msvc") && m_os == Windows) else if (abiParts.at(2) == QLatin1String("msvc") && m_os == WindowsOS)
m_osFlavor = Windows_msvc; m_osFlavor = WindowsMsvcFlavor;
else if (abiParts.at(2) == QLatin1String("msys") && m_os == Windows) else if (abiParts.at(2) == QLatin1String("msys") && m_os == WindowsOS)
m_osFlavor = Windows_msys; m_osFlavor = WindowsMSysFlavor;
else if (abiParts.at(2) == QLatin1String("ce") && m_os == Windows) else if (abiParts.at(2) == QLatin1String("ce") && m_os == WindowsOS)
m_osFlavor = Windows_ce; m_osFlavor = WindowsCEFlavor;
else else
return; return;
} }
if (abiParts.count() >= 4) { if (abiParts.count() >= 4) {
if (abiParts.at(3) == QLatin1String("unknown")) if (abiParts.at(3) == QLatin1String("unknown"))
m_binaryFormat = UNKNOWN_FORMAT; m_binaryFormat = UnknownFormat;
else if (abiParts.at(3) == QLatin1String("elf")) else if (abiParts.at(3) == QLatin1String("elf"))
m_binaryFormat = Format_ELF; m_binaryFormat = ElfFormat;
else if (abiParts.at(3) == QLatin1String("pe")) else if (abiParts.at(3) == QLatin1String("pe"))
m_binaryFormat = Format_PE; m_binaryFormat = PEFormat;
else if (abiParts.at(3) == QLatin1String("mach_o")) else if (abiParts.at(3) == QLatin1String("mach_o"))
m_binaryFormat = Format_Mach_O; m_binaryFormat = MachOFormat;
else if (abiParts.at(3) == QLatin1String("qml_rt")) else if (abiParts.at(3) == QLatin1String("qml_rt"))
m_binaryFormat = Format_Runtime_QML; m_binaryFormat = RuntimeQmlFormat;
else else
return; return;
} }
@@ -191,36 +191,36 @@ bool Abi::operator == (const Abi &other) const
bool Abi::isCompatibleWith(const Abi &other) const bool Abi::isCompatibleWith(const Abi &other) const
{ {
return (architecture() == other.architecture() || other.architecture() == Abi::UNKNOWN_ARCHITECTURE) return (architecture() == other.architecture() || other.architecture() == Abi::UnknownArchitecture)
&& (os() == other.os() || other.os() == Abi::UNKNOWN_OS) && (os() == other.os() || other.os() == Abi::UnknownOS)
&& (osFlavor() == other.osFlavor() || other.osFlavor() == Abi::UNKNOWN_OSFLAVOUR) && (osFlavor() == other.osFlavor() || other.osFlavor() == Abi::UnknownFlavor)
&& (binaryFormat() == other.binaryFormat() || other.binaryFormat() == Abi::UNKNOWN_FORMAT) && (binaryFormat() == other.binaryFormat() || other.binaryFormat() == Abi::UnknownFormat)
&& ((wordWidth() == other.wordWidth() && wordWidth() != 0) || other.wordWidth() == 0); && ((wordWidth() == other.wordWidth() && wordWidth() != 0) || other.wordWidth() == 0);
} }
bool Abi::isValid() const bool Abi::isValid() const
{ {
return m_architecture != UNKNOWN_ARCHITECTURE return m_architecture != UnknownArchitecture
&& m_os != UNKNOWN_OS && m_os != UnknownOS
&& m_osFlavor != UNKNOWN_OSFLAVOUR && m_osFlavor != UnknownFlavor
&& m_binaryFormat != UNKNOWN_FORMAT && m_binaryFormat != UnknownFormat
&& m_wordWidth != 0; && m_wordWidth != 0;
} }
QString Abi::toString(const Architecture &a) QString Abi::toString(const Architecture &a)
{ {
switch (a) { switch (a) {
case ARM: case ArmArchitecture:
return QLatin1String("arm"); return QLatin1String("arm");
case x86: case X86Architecture:
return QLatin1String("x86"); return QLatin1String("x86");
case Mips: case MipsArcitecture:
return QLatin1String("mips"); return QLatin1String("mips");
case PowerPC: case PowerPCArchitecture:
return QLatin1String("ppc"); return QLatin1String("ppc");
case Itanium: case ItaniumArchitecture:
return QLatin1String("itanium"); return QLatin1String("itanium");
case UNKNOWN_ARCHITECTURE: // fall through! case UnknownArchitecture: // fall through!
default: default:
return QLatin1String("unknown"); return QLatin1String("unknown");
} }
@@ -229,48 +229,48 @@ QString Abi::toString(const Architecture &a)
QString Abi::toString(const OS &o) QString Abi::toString(const OS &o)
{ {
switch (o) { switch (o) {
case Linux: case LinuxOS:
return QLatin1String("linux"); return QLatin1String("linux");
case Mac: case MacOS:
return QLatin1String("macos"); return QLatin1String("macos");
case Symbian: case SymbianOS:
return QLatin1String("symbian"); return QLatin1String("symbian");
case UNIX: case UnixOS:
return QLatin1String("unix"); return QLatin1String("unix");
case Windows: case WindowsOS:
return QLatin1String("windows"); return QLatin1String("windows");
case UNKNOWN_OS: // fall through! case UnknownOS: // fall through!
default: default:
return QLatin1String("unknown"); return QLatin1String("unknown");
}; };
} }
QString Abi::toString(const OSFlavour &of) QString Abi::toString(const OSFlavor &of)
{ {
switch (of) { switch (of) {
case ProjectExplorer::Abi::Linux_generic: case ProjectExplorer::Abi::GenericLinuxFlavor:
return QLatin1String("generic"); return QLatin1String("generic");
case ProjectExplorer::Abi::Linux_maemo: case ProjectExplorer::Abi::MaemoLinuxFlavor:
return QLatin1String("maemo"); return QLatin1String("maemo");
case ProjectExplorer::Abi::Linux_harmattan: case ProjectExplorer::Abi::HarmattanLinuxFlavor:
return QLatin1String("harmattan"); return QLatin1String("harmattan");
case ProjectExplorer::Abi::Linux_meego: case ProjectExplorer::Abi::MeegoLinuxFlavor:
return QLatin1String("meego"); return QLatin1String("meego");
case ProjectExplorer::Abi::Mac_generic: case ProjectExplorer::Abi::GenericMacFlavor:
return QLatin1String("generic"); return QLatin1String("generic");
case ProjectExplorer::Abi::Symbian_device: case ProjectExplorer::Abi::SymbianDeviceFlavor:
return QLatin1String("device"); return QLatin1String("device");
case ProjectExplorer::Abi::Symbian_emulator: case ProjectExplorer::Abi::SymbianEmulatorFlavor:
return QLatin1String("emulator"); return QLatin1String("emulator");
case ProjectExplorer::Abi::Unix_generic: case ProjectExplorer::Abi::GenericUnixFlavor:
return QLatin1String("generic"); return QLatin1String("generic");
case ProjectExplorer::Abi::Windows_msvc: case ProjectExplorer::Abi::WindowsMsvcFlavor:
return QLatin1String("msvc"); return QLatin1String("msvc");
case ProjectExplorer::Abi::Windows_msys: case ProjectExplorer::Abi::WindowsMSysFlavor:
return QLatin1String("msys"); return QLatin1String("msys");
case ProjectExplorer::Abi::Windows_ce: case ProjectExplorer::Abi::WindowsCEFlavor:
return QLatin1String("ce"); return QLatin1String("ce");
case ProjectExplorer::Abi::UNKNOWN_OSFLAVOUR: // fall throught! case ProjectExplorer::Abi::UnknownFlavor: // fall throught!
default: default:
return QLatin1String("unknown"); return QLatin1String("unknown");
} }
@@ -279,15 +279,15 @@ QString Abi::toString(const OSFlavour &of)
QString Abi::toString(const BinaryFormat &bf) QString Abi::toString(const BinaryFormat &bf)
{ {
switch (bf) { switch (bf) {
case Format_ELF: case ElfFormat:
return QLatin1String("elf"); return QLatin1String("elf");
case Format_PE: case PEFormat:
return QLatin1String("pe"); return QLatin1String("pe");
case Format_Mach_O: case MachOFormat:
return QLatin1String("mach_o"); return QLatin1String("mach_o");
case Format_Runtime_QML: case RuntimeQmlFormat:
return QLatin1String("qml_rt"); return QLatin1String("qml_rt");
case UNKNOWN_FORMAT: // fall through! case UnknownFormat: // fall through!
default: default:
return QLatin1String("unknown"); return QLatin1String("unknown");
} }
@@ -304,22 +304,22 @@ QString Abi::toString(int w)
Abi Abi::hostAbi() Abi Abi::hostAbi()
{ {
Architecture arch = QTC_CPU; // define set by qmake Architecture arch = QTC_CPU; // define set by qmake
OS os = UNKNOWN_OS; OS os = UnknownOS;
OSFlavour subos = UNKNOWN_OSFLAVOUR; OSFlavor subos = UnknownFlavor;
BinaryFormat format = UNKNOWN_FORMAT; BinaryFormat format = UnknownFormat;
#if defined (Q_OS_WIN) #if defined (Q_OS_WIN)
os = Windows; os = WindowsOS;
subos = Windows_msvc; subos = WindowsMsvcFlavor;
format = Format_PE; format = PEFormat;
#elif defined (Q_OS_LINUX) #elif defined (Q_OS_LINUX)
os = Linux; os = LinuxOS;
subos = Linux_generic; subos = GenericLinuxFlavor;
format = Format_ELF; format = ElfFormat;
#elif defined (Q_OS_MAC) #elif defined (Q_OS_MAC)
os = Mac; os = MacOS;
subos = Mac_generic; subos = GenericMacFlavor;
format = Format_Mach_O; format = MachOFormat;
#endif #endif
return Abi(arch, os, subos, format, QSysInfo::WordSize); return Abi(arch, os, subos, format, QSysInfo::WordSize);
@@ -328,15 +328,15 @@ Abi Abi::hostAbi()
static Abi macAbiForCpu(quint32 type) { static Abi macAbiForCpu(quint32 type) {
switch (type) { switch (type) {
case 7: // CPU_TYPE_X86, CPU_TYPE_I386 case 7: // CPU_TYPE_X86, CPU_TYPE_I386
return Abi(Abi::x86, Abi::Mac, Abi::Mac_generic, Abi::Format_Mach_O, 32); return Abi(Abi::X86Architecture, Abi::MacOS, Abi::GenericMacFlavor, Abi::MachOFormat, 32);
case 0x01000000 + 7: // CPU_TYPE_X86_64 case 0x01000000 + 7: // CPU_TYPE_X86_64
return Abi(Abi::x86, Abi::Mac, Abi::Mac_generic, Abi::Format_Mach_O, 64); return Abi(Abi::X86Architecture, Abi::MacOS, Abi::GenericMacFlavor, Abi::MachOFormat, 64);
case 18: // CPU_TYPE_POWERPC case 18: // CPU_TYPE_POWERPC
return Abi(Abi::PowerPC, Abi::Mac, Abi::Mac_generic, Abi::Format_Mach_O, 32); return Abi(Abi::PowerPCArchitecture, Abi::MacOS, Abi::GenericMacFlavor, Abi::MachOFormat, 32);
case 0x01000000 + 18: // CPU_TYPE_POWERPC64 case 0x01000000 + 18: // CPU_TYPE_POWERPC64
return Abi(Abi::PowerPC, Abi::Mac, Abi::Mac_generic, Abi::Format_Mach_O, 32); return Abi(Abi::PowerPCArchitecture, Abi::MacOS, Abi::GenericMacFlavor, Abi::MachOFormat, 32);
case 12: // CPU_TYPE_ARM case 12: // CPU_TYPE_ARM
return Abi(Abi::ARM, Abi::Mac, Abi::Mac_generic, Abi::Format_Mach_O, 32); return Abi(Abi::ArmArchitecture, Abi::MacOS, Abi::GenericMacFlavor, Abi::MachOFormat, 32);
default: default:
return Abi(); return Abi();
} }
@@ -363,22 +363,22 @@ QList<Abi> Abi::abisOfBinary(const QString &path)
quint16 machine = (data.at(19) << 8) + data.at(18); quint16 machine = (data.at(19) << 8) + data.at(18);
switch (machine) { switch (machine) {
case 3: // EM_386 case 3: // EM_386
result.append(Abi(Abi::x86, Abi::Linux, Abi::Linux_generic, Abi::Format_ELF, 32)); result.append(Abi(Abi::X86Architecture, Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 32));
break; break;
case 8: // EM_MIPS case 8: // EM_MIPS
result.append(Abi(Abi::Mips, Abi::Linux, Abi::Linux_generic, Abi::Format_ELF, 32)); result.append(Abi(Abi::MipsArcitecture, Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 32));
break; break;
case 20: // EM_PPC case 20: // EM_PPC
result.append(Abi(Abi::PowerPC, Abi::Linux, Abi::Linux_generic, Abi::Format_ELF, 32)); result.append(Abi(Abi::PowerPCArchitecture, Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 32));
break; break;
case 21: // EM_PPC64 case 21: // EM_PPC64
result.append(Abi(Abi::PowerPC, Abi::Linux, Abi::Linux_generic, Abi::Format_ELF, 64)); result.append(Abi(Abi::PowerPCArchitecture, Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 64));
break; break;
case 62: // EM_X86_64 case 62: // EM_X86_64
result.append(Abi(Abi::x86, Abi::Linux, Abi::Linux_generic, Abi::Format_ELF, 64)); result.append(Abi(Abi::X86Architecture, Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 64));
break; break;
case 50: // EM_IA_64 case 50: // EM_IA_64
result.append(Abi(Abi::Itanium, Abi::Linux, Abi::Linux_generic, Abi::Format_ELF, 64)); result.append(Abi(Abi::ItaniumArchitecture, Abi::LinuxOS, Abi::GenericLinuxFlavor, Abi::ElfFormat, 64));
break; break;
default: default:
;; ;;
@@ -412,13 +412,13 @@ QList<Abi> Abi::abisOfBinary(const QString &path)
quint16 machine = (data.at(pePos + 5) << 8) + data.at(pePos + 4); quint16 machine = (data.at(pePos + 5) << 8) + data.at(pePos + 4);
switch (machine) { switch (machine) {
case 0x8664: // x86_64 case 0x8664: // x86_64
result.append(Abi(Abi::x86, Abi::Windows, Abi::Windows_msvc, Abi::Format_PE, 64)); result.append(Abi(Abi::X86Architecture, Abi::WindowsOS, Abi::WindowsMsvcFlavor, Abi::PEFormat, 64));
break; break;
case 0x014c: // i386 case 0x014c: // i386
result.append(Abi(Abi::x86, Abi::Windows, Abi::Windows_msvc, Abi::Format_PE, 32)); result.append(Abi(Abi::X86Architecture, Abi::WindowsOS, Abi::WindowsMsvcFlavor, Abi::PEFormat, 32));
break; break;
case 0x0200: // ia64 case 0x0200: // ia64
result.append(Abi(Abi::Itanium, Abi::Windows, Abi::Windows_msvc, Abi::Format_PE, 64)); result.append(Abi(Abi::ItaniumArchitecture, Abi::WindowsOS, Abi::WindowsMsvcFlavor, Abi::PEFormat, 64));
break; break;
} }
} }

View File

@@ -48,63 +48,63 @@ class PROJECTEXPLORER_EXPORT Abi
{ {
public: public:
enum Architecture { enum Architecture {
UNKNOWN_ARCHITECTURE, UnknownArchitecture,
ARM, ArmArchitecture,
x86, X86Architecture,
Itanium, ItaniumArchitecture,
Mips, MipsArcitecture,
PowerPC PowerPCArchitecture
}; };
enum OS { enum OS {
UNKNOWN_OS, UnknownOS,
Linux, LinuxOS,
Mac, MacOS,
Symbian, SymbianOS,
UNIX, UnixOS,
Windows WindowsOS
}; };
enum OSFlavour { enum OSFlavor {
UNKNOWN_OSFLAVOUR, UnknownFlavor,
// Linux // Linux
Linux_generic, GenericLinuxFlavor,
Linux_harmattan, HarmattanLinuxFlavor,
Linux_maemo, MaemoLinuxFlavor,
Linux_meego, MeegoLinuxFlavor,
// Mac // Mac
Mac_generic, GenericMacFlavor,
// Symbian // Symbian
Symbian_device, SymbianDeviceFlavor,
Symbian_emulator, SymbianEmulatorFlavor,
// Unix // Unix
Unix_generic, GenericUnixFlavor,
// Windows // Windows
Windows_msvc, WindowsMsvcFlavor,
Windows_msys, WindowsMSysFlavor,
Windows_ce WindowsCEFlavor
}; };
enum BinaryFormat { enum BinaryFormat {
UNKNOWN_FORMAT, UnknownFormat,
Format_ELF, ElfFormat,
Format_Mach_O, MachOFormat,
Format_PE, PEFormat,
Format_Runtime_QML RuntimeQmlFormat
}; };
Abi() : Abi() :
m_architecture(UNKNOWN_ARCHITECTURE), m_os(UNKNOWN_OS), m_architecture(UnknownArchitecture), m_os(UnknownOS),
m_osFlavor(UNKNOWN_OSFLAVOUR), m_binaryFormat(UNKNOWN_FORMAT), m_wordWidth(0) m_osFlavor(UnknownFlavor), m_binaryFormat(UnknownFormat), m_wordWidth(0)
{ } { }
Abi(const Architecture &a, const OS &o, Abi(const Architecture &a, const OS &o,
const OSFlavour &so, const BinaryFormat &f, unsigned char w); const OSFlavor &so, const BinaryFormat &f, unsigned char w);
Abi(const QString &abiString); Abi(const QString &abiString);
bool operator == (const Abi &other) const; bool operator == (const Abi &other) const;
@@ -114,7 +114,7 @@ public:
Architecture architecture() const { return m_architecture; } Architecture architecture() const { return m_architecture; }
OS os() const { return m_os; } OS os() const { return m_os; }
OSFlavour osFlavor() const { return m_osFlavor; } OSFlavor osFlavor() const { return m_osFlavor; }
BinaryFormat binaryFormat() const { return m_binaryFormat; } BinaryFormat binaryFormat() const { return m_binaryFormat; }
unsigned char wordWidth() const { return m_wordWidth; } unsigned char wordWidth() const { return m_wordWidth; }
@@ -122,7 +122,7 @@ public:
static QString toString(const Architecture &a); static QString toString(const Architecture &a);
static QString toString(const OS &o); static QString toString(const OS &o);
static QString toString(const OSFlavour &of); static QString toString(const OSFlavor &of);
static QString toString(const BinaryFormat &bf); static QString toString(const BinaryFormat &bf);
static QString toString(int w); static QString toString(int w);
@@ -132,7 +132,7 @@ public:
private: private:
Architecture m_architecture; Architecture m_architecture;
OS m_os; OS m_os;
OSFlavour m_osFlavor; OSFlavor m_osFlavor;
BinaryFormat m_binaryFormat; BinaryFormat m_binaryFormat;
unsigned char m_wordWidth; unsigned char m_wordWidth;
}; };

View File

@@ -165,10 +165,10 @@ static ProjectExplorer::Abi guessGccAbi(const QString &m)
QStringList parts = machine.split(QRegExp("[ /-]")); QStringList parts = machine.split(QRegExp("[ /-]"));
ProjectExplorer::Abi::Architecture arch = ProjectExplorer::Abi::UNKNOWN_ARCHITECTURE; ProjectExplorer::Abi::Architecture arch = ProjectExplorer::Abi::UnknownArchitecture;
ProjectExplorer::Abi::OS os = ProjectExplorer::Abi::UNKNOWN_OS; ProjectExplorer::Abi::OS os = ProjectExplorer::Abi::UnknownOS;
ProjectExplorer::Abi::OSFlavour flavor = ProjectExplorer::Abi::UNKNOWN_OSFLAVOUR; ProjectExplorer::Abi::OSFlavor flavor = ProjectExplorer::Abi::UnknownFlavor;
ProjectExplorer::Abi::BinaryFormat format = ProjectExplorer::Abi::UNKNOWN_FORMAT; ProjectExplorer::Abi::BinaryFormat format = ProjectExplorer::Abi::UnknownFormat;
int width = 0; int width = 0;
int unknownCount = 0; int unknownCount = 0;
@@ -178,40 +178,40 @@ static ProjectExplorer::Abi guessGccAbi(const QString &m)
continue; continue;
} else if (p == QLatin1String("i386") || p == QLatin1String("i486") || p == QLatin1String("i586") } else if (p == QLatin1String("i386") || p == QLatin1String("i486") || p == QLatin1String("i586")
|| p == QLatin1String("i686") || p == QLatin1String("x86")) { || p == QLatin1String("i686") || p == QLatin1String("x86")) {
arch = ProjectExplorer::Abi::x86; arch = ProjectExplorer::Abi::X86Architecture;
width = 32; width = 32;
} else if (p == QLatin1String("arm")) { } else if (p == QLatin1String("arm")) {
arch = ProjectExplorer::Abi::ARM; arch = ProjectExplorer::Abi::ArmArchitecture;
width = 32; width = 32;
} else if (p == QLatin1String("x86_64")) { } else if (p == QLatin1String("x86_64")) {
arch = ProjectExplorer::Abi::x86; arch = ProjectExplorer::Abi::X86Architecture;
width = 64; width = 64;
} else if (p == QLatin1String("w64")) { } else if (p == QLatin1String("w64")) {
width = 64; width = 64;
} else if (p == QLatin1String("linux")) { } else if (p == QLatin1String("linux")) {
os = ProjectExplorer::Abi::Linux; os = ProjectExplorer::Abi::LinuxOS;
flavor = ProjectExplorer::Abi::Linux_generic; flavor = ProjectExplorer::Abi::GenericLinuxFlavor;
format = ProjectExplorer::Abi::Format_ELF; format = ProjectExplorer::Abi::ElfFormat;
} else if (p == QLatin1String("symbianelf")) { } else if (p == QLatin1String("symbianelf")) {
os = ProjectExplorer::Abi::Symbian; os = ProjectExplorer::Abi::SymbianOS;
flavor = ProjectExplorer::Abi::Symbian_device; flavor = ProjectExplorer::Abi::SymbianDeviceFlavor;
format = ProjectExplorer::Abi::Format_ELF; format = ProjectExplorer::Abi::ElfFormat;
width = 32; width = 32;
} else if (p == QLatin1String("mingw32")) { } else if (p == QLatin1String("mingw32")) {
arch = ProjectExplorer::Abi::x86; arch = ProjectExplorer::Abi::X86Architecture;
os = ProjectExplorer::Abi::Windows; os = ProjectExplorer::Abi::WindowsOS;
flavor = ProjectExplorer::Abi::Windows_msys; flavor = ProjectExplorer::Abi::WindowsMSysFlavor;
format = ProjectExplorer::Abi::Format_PE; format = ProjectExplorer::Abi::PEFormat;
if (width == 0) if (width == 0)
width = 32; width = 32;
} else if (p == QLatin1String("apple")) { } else if (p == QLatin1String("apple")) {
os = ProjectExplorer::Abi::Mac; os = ProjectExplorer::Abi::MacOS;
flavor = ProjectExplorer::Abi::Mac_generic; flavor = ProjectExplorer::Abi::GenericMacFlavor;
format = ProjectExplorer::Abi::Format_Mach_O; format = ProjectExplorer::Abi::MachOFormat;
} else if (p == QLatin1String("darwin10")) { } else if (p == QLatin1String("darwin10")) {
width = 64; width = 64;
} else if (p == QLatin1String("gnueabi")) { } else if (p == QLatin1String("gnueabi")) {
format = ProjectExplorer::Abi::Format_ELF; format = ProjectExplorer::Abi::ElfFormat;
} else { } else {
++unknownCount; ++unknownCount;
} }

View File

@@ -286,7 +286,7 @@ MsvcToolChain::MsvcToolChain(Type type, const QString &name, Platform platform,
m_varsBat(varsBat), m_varsBat(varsBat),
m_varsBatArg(varsBatArg), m_varsBatArg(varsBatArg),
m_is64bit(true), m_is64bit(true),
m_architecture(Abi::x86) m_architecture(Abi::X86Architecture)
{ {
Q_ASSERT(!name.isEmpty()); Q_ASSERT(!name.isEmpty());
Q_ASSERT(!m_varsBat.isEmpty()); Q_ASSERT(!m_varsBat.isEmpty());
@@ -298,7 +298,7 @@ MsvcToolChain::MsvcToolChain(Type type, const QString &name, Platform platform,
m_is64bit = false; m_is64bit = false;
break; break;
case ProjectExplorer::Internal::MsvcToolChain::ia64: case ProjectExplorer::Internal::MsvcToolChain::ia64:
m_architecture = Abi::Itanium; m_architecture = Abi::ItaniumArchitecture;
break; break;
case ProjectExplorer::Internal::MsvcToolChain::s64: case ProjectExplorer::Internal::MsvcToolChain::s64:
case ProjectExplorer::Internal::MsvcToolChain::amd64: case ProjectExplorer::Internal::MsvcToolChain::amd64:
@@ -318,7 +318,7 @@ QString MsvcToolChain::typeName() const
Abi MsvcToolChain::targetAbi() const Abi MsvcToolChain::targetAbi() const
{ {
return Abi(m_architecture, Abi::Windows, Abi::Windows_msvc, Abi::Format_PE, m_is64bit ? 64 : 32); return Abi(m_architecture, Abi::WindowsOS, Abi::WindowsMsvcFlavor, Abi::PEFormat, m_is64bit ? 64 : 32);
} }
bool MsvcToolChain::isValid() const bool MsvcToolChain::isValid() const

View File

@@ -229,7 +229,7 @@ RESOURCES += projectexplorer.qrc
!isEmpty($$(QTC_CPU)) { !isEmpty($$(QTC_CPU)) {
DEFINES += QTC_CPU=$$(QTC_CPU) DEFINES += QTC_CPU=$$(QTC_CPU)
} else { } else {
DEFINES += QTC_CPU=x86 DEFINES += QTC_CPU=X86Architecture
} }
DEFINES += PROJECTEXPLORER_LIBRARY DEFINES += PROJECTEXPLORER_LIBRARY

View File

@@ -291,7 +291,7 @@ ProjectExplorer::Abi QmlProjectRunConfiguration::abi() const
{ {
ProjectExplorer::Abi hostAbi = ProjectExplorer::Abi::hostAbi(); ProjectExplorer::Abi hostAbi = ProjectExplorer::Abi::hostAbi();
return ProjectExplorer::Abi(hostAbi.architecture(), hostAbi.os(), hostAbi.osFlavor(), return ProjectExplorer::Abi(hostAbi.architecture(), hostAbi.os(), hostAbi.osFlavor(),
ProjectExplorer::Abi::Format_Runtime_QML, hostAbi.wordWidth()); ProjectExplorer::Abi::RuntimeQmlFormat, hostAbi.wordWidth());
} }
QVariantMap QmlProjectRunConfiguration::toMap() const QVariantMap QmlProjectRunConfiguration::toMap() const

View File

@@ -84,8 +84,8 @@ DebuggingHelperBuildTask::DebuggingHelperBuildTask(QtVersion *version, Tools too
ProjectExplorer::ToolChain *tc = tcList.at(0); ProjectExplorer::ToolChain *tc = tcList.at(0);
tc->addToEnvironment(m_environment); tc->addToEnvironment(m_environment);
if (tc->targetAbi().os() == ProjectExplorer::Abi::Linux if (tc->targetAbi().os() == ProjectExplorer::Abi::LinuxOS
&& ProjectExplorer::Abi::hostAbi().os() == ProjectExplorer::Abi::Windows) && ProjectExplorer::Abi::hostAbi().os() == ProjectExplorer::Abi::WindowsOS)
m_target = QLatin1String("-unix"); m_target = QLatin1String("-unix");
m_qmakeCommand = version->qmakeCommand(); m_qmakeCommand = version->qmakeCommand();
m_makeCommand = tc->makeCommand(); m_makeCommand = tc->makeCommand();

View File

@@ -89,8 +89,8 @@ LibraryDetailsController::LibraryDetailsController(
// if its toolchain is maemo behave the same as we would be on linux // if its toolchain is maemo behave the same as we would be on linux
if (qt4BuildConfiguration if (qt4BuildConfiguration
&& qt4BuildConfiguration->toolChain() && qt4BuildConfiguration->toolChain()
&& (qt4BuildConfiguration->toolChain()->targetAbi().osFlavor() == ProjectExplorer::Abi::Linux_harmattan && (qt4BuildConfiguration->toolChain()->targetAbi().osFlavor() == ProjectExplorer::Abi::HarmattanLinuxFlavour
|| qt4BuildConfiguration->toolChain()->targetAbi().osFlavor() == ProjectExplorer::Abi::Linux_maemo)) || qt4BuildConfiguration->toolChain()->targetAbi().osFlavor() == ProjectExplorer::Abi::MaemoLinuxFlavour))
m_creatorPlatform = CreatorLinux; m_creatorPlatform = CreatorLinux;
#endif #endif

View File

@@ -174,7 +174,7 @@ bool MakeStep::init()
// but for now this is the least invasive change // but for now this is the least invasive change
if (toolchain if (toolchain
&& toolchain->targetAbi().binaryFormat() != ProjectExplorer::Abi::Format_PE && toolchain->targetAbi().binaryFormat() != ProjectExplorer::Abi::PEFormat
&& m_makeCmd.isEmpty()) && m_makeCmd.isEmpty())
Utils::QtcProcess::addArg(&args, QLatin1String("-w")); Utils::QtcProcess::addArg(&args, QLatin1String("-w"));
@@ -303,7 +303,7 @@ void MakeStepConfigWidget::updateDetails()
QString args = m_makeStep->userArguments(); QString args = m_makeStep->userArguments();
ProjectExplorer::ToolChain *toolChain = bc->toolChain(); ProjectExplorer::ToolChain *toolChain = bc->toolChain();
if (toolChain if (toolChain
&& toolChain->targetAbi().binaryFormat() != ProjectExplorer::Abi::Format_PE && toolChain->targetAbi().binaryFormat() != ProjectExplorer::Abi::PEFormat
&& m_makeStep->m_makeCmd.isEmpty()) && m_makeStep->m_makeCmd.isEmpty())
Utils::QtcProcess::addArg(&args, QLatin1String("-w")); Utils::QtcProcess::addArg(&args, QLatin1String("-w"));
param.setArguments(args); param.setArguments(args);

View File

@@ -157,8 +157,8 @@ QStringList QMakeStep::moreArguments()
QStringList arguments; QStringList arguments;
#if defined(Q_OS_WIN) || defined(Q_OS_MAC) #if defined(Q_OS_WIN) || defined(Q_OS_MAC)
ProjectExplorer::ToolChain *tc = bc->toolChain(); ProjectExplorer::ToolChain *tc = bc->toolChain();
if (tc && (tc->targetAbi().osFlavor() == ProjectExplorer::Abi::Linux_harmattan if (tc && (tc->targetAbi().osFlavor() == ProjectExplorer::Abi::HarmattanLinuxFlavour
|| tc->targetAbi().osFlavor() == ProjectExplorer::Abi::Linux_maemo)) || tc->targetAbi().osFlavor() == ProjectExplorer::Abi::MaemoLinuxFlavour))
arguments << QLatin1String("-unix"); arguments << QLatin1String("-unix");
#endif #endif
if (!bc->qtVersion()->supportsShadowBuilds()) { if (!bc->qtVersion()->supportsShadowBuilds()) {

View File

@@ -176,13 +176,13 @@ void MaemoToolChain::setQtVersionId(int id)
QtVersion *version = QtVersionManager::instance()->version(id); QtVersion *version = QtVersionManager::instance()->version(id);
Q_ASSERT(version); Q_ASSERT(version);
ProjectExplorer::Abi::OSFlavour flavour = ProjectExplorer::Abi::Linux_harmattan; ProjectExplorer::Abi::OSFlavor flavour = ProjectExplorer::Abi::HarmattanLinuxFlavor;
if (MaemoGlobal::isValidMaemo5QtVersion(version)) if (MaemoGlobal::isValidMaemo5QtVersion(version))
flavour = ProjectExplorer::Abi::Linux_maemo; flavour = ProjectExplorer::Abi::MaemoLinuxFlavor;
else if (MaemoGlobal::isValidHarmattanQtVersion(version)) else if (MaemoGlobal::isValidHarmattanQtVersion(version))
flavour = ProjectExplorer::Abi::Linux_harmattan; flavour = ProjectExplorer::Abi::HarmattanLinuxFlavor;
else if (MaemoGlobal::isValidMeegoQtVersion(version)) else if (MaemoGlobal::isValidMeegoQtVersion(version))
flavour = ProjectExplorer::Abi::Linux_meego; flavour = ProjectExplorer::Abi::MeegoLinuxFlavor;
else else
return; return;

View File

@@ -150,10 +150,10 @@ QList<ProjectExplorer::ToolChain *> GcceToolChainFactory::autoDetect()
GcceToolChain *tc = new GcceToolChain(true); GcceToolChain *tc = new GcceToolChain(true);
tc->setCompilerPath(fullPath); tc->setCompilerPath(fullPath);
tc->setDisplayName(tr("GCCE (%1)").arg(gcceVersion(fullPath))); tc->setDisplayName(tr("GCCE (%1)").arg(gcceVersion(fullPath)));
if (tc->targetAbi() == ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, if (tc->targetAbi() == ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture,
ProjectExplorer::Abi::Symbian, ProjectExplorer::Abi::SymbianOS,
ProjectExplorer::Abi::Symbian_device, ProjectExplorer::Abi::SymbianDeviceFlavor,
ProjectExplorer::Abi::Format_ELF, ProjectExplorer::Abi::ElfFormat,
32)) 32))
result.append(tc); result.append(tc);
} }

View File

@@ -147,8 +147,8 @@ QString RvctToolChain::typeName() const
ProjectExplorer::Abi RvctToolChain::targetAbi() const ProjectExplorer::Abi RvctToolChain::targetAbi() const
{ {
return ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, ProjectExplorer::Abi::Symbian, return ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture, ProjectExplorer::Abi::SymbianOS,
ProjectExplorer::Abi::Symbian_device, ProjectExplorer::Abi::Format_ELF, ProjectExplorer::Abi::SymbianDeviceFlavor, ProjectExplorer::Abi::ElfFormat,
32); 32);
} }

View File

@@ -298,7 +298,7 @@ QString S60DeviceRunConfiguration::localExecutableFileName() const
return QString(); return QString();
const ProjectExplorer::Abi hostAbi = ProjectExplorer::Abi::hostAbi(); const ProjectExplorer::Abi hostAbi = ProjectExplorer::Abi::hostAbi();
if (hostAbi.os() == ProjectExplorer::Abi::Linux) { if (hostAbi.os() == ProjectExplorer::Abi::LinuxOS) {
return executableFromPackageUnix(ti.buildDir + QLatin1Char('/') + ti.target + QLatin1String("_template.pkg")); return executableFromPackageUnix(ti.buildDir + QLatin1Char('/') + ti.target + QLatin1String("_template.pkg"));
} }

View File

@@ -154,7 +154,7 @@ S60Manager::~S60Manager()
QString S60Manager::platform(const ProjectExplorer::ToolChain *tc) QString S60Manager::platform(const ProjectExplorer::ToolChain *tc)
{ {
if (!tc || tc->targetAbi().os() == ProjectExplorer::Abi::Symbian) if (!tc || tc->targetAbi().os() == ProjectExplorer::Abi::SymbianOS)
return QString(); return QString();
QString target = tc->defaultMakeTarget(); QString target = tc->defaultMakeTarget();
return target.right(target.lastIndexOf(QLatin1Char('-'))); return target.right(target.lastIndexOf(QLatin1Char('-')));

View File

@@ -140,9 +140,9 @@ QString WinscwToolChain::typeName() const
ProjectExplorer::Abi WinscwToolChain::targetAbi() const ProjectExplorer::Abi WinscwToolChain::targetAbi() const
{ {
return ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, ProjectExplorer::Abi::Symbian, return ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture, ProjectExplorer::Abi::SymbianOS,
ProjectExplorer::Abi::Symbian_emulator, ProjectExplorer::Abi::SymbianEmulatorFlavor,
ProjectExplorer::Abi::Format_ELF, false); ProjectExplorer::Abi::ElfFormat, false);
} }
bool WinscwToolChain::isValid() const bool WinscwToolChain::isValid() const

View File

@@ -671,7 +671,7 @@ void QtOptionsPageWidget::showEnvironmentPage(QTreeWidgetItem *item)
ProjectExplorer::Abi qtAbi = qtVersion->qtAbis().at(0); ProjectExplorer::Abi qtAbi = qtVersion->qtAbis().at(0);
if (qtAbi.os() == ProjectExplorer::Abi::Symbian) { if (qtAbi.os() == ProjectExplorer::Abi::SymbianOS) {
makeS60Visible(true); makeS60Visible(true);
m_versionUi->s60SDKPath->setPath(QDir::toNativeSeparators(m_versions.at(index)->s60SDKDirectory())); m_versionUi->s60SDKPath->setPath(QDir::toNativeSeparators(m_versions.at(index)->s60SDKDirectory()));
m_versionUi->sbsV2Path->setPath(m_versions.at(index)->sbsV2Directory()); m_versionUi->sbsV2Path->setPath(m_versions.at(index)->sbsV2Directory());

View File

@@ -1496,36 +1496,36 @@ void QtVersion::updateAbiAndMkspec() const
// Evaluate all the information we have: // Evaluate all the information we have:
if (!ce_sdk.isEmpty() && !ce_arch.isEmpty()) { if (!ce_sdk.isEmpty() && !ce_arch.isEmpty()) {
// Treat windows CE as desktop. // Treat windows CE as desktop.
m_abis.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, ProjectExplorer::Abi::Windows, m_abis.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture, ProjectExplorer::Abi::WindowsOS,
ProjectExplorer::Abi::Windows_ce, ProjectExplorer::Abi::Format_PE, false)); ProjectExplorer::Abi::WindowsCEFlavor, ProjectExplorer::Abi::PEFormat, false));
m_targetIds.insert(Constants::DESKTOP_TARGET_ID); m_targetIds.insert(Constants::DESKTOP_TARGET_ID);
} else if (makefileGenerator == QLatin1String("SYMBIAN_ABLD") || } else if (makefileGenerator == QLatin1String("SYMBIAN_ABLD") ||
makefileGenerator == QLatin1String("SYMBIAN_SBSV2") || makefileGenerator == QLatin1String("SYMBIAN_SBSV2") ||
makefileGenerator == QLatin1String("SYMBIAN_UNIX")) { makefileGenerator == QLatin1String("SYMBIAN_UNIX")) {
m_isBuildUsingSbsV2 = (makefileGenerator == QLatin1String("SYMBIAN_SBSV2")); m_isBuildUsingSbsV2 = (makefileGenerator == QLatin1String("SYMBIAN_SBSV2"));
if (S60Manager::instance()) { if (S60Manager::instance()) {
m_abis.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, ProjectExplorer::Abi::Symbian, m_abis.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture, ProjectExplorer::Abi::SymbianOS,
ProjectExplorer::Abi::UNKNOWN_OSFLAVOUR, ProjectExplorer::Abi::UnknownFlavor,
ProjectExplorer::Abi::Format_ELF, ProjectExplorer::Abi::ElfFormat,
32)); 32));
m_targetIds.insert(QLatin1String(Constants::S60_DEVICE_TARGET_ID)); m_targetIds.insert(QLatin1String(Constants::S60_DEVICE_TARGET_ID));
m_targetIds.insert(QLatin1String(Constants::S60_EMULATOR_TARGET_ID)); m_targetIds.insert(QLatin1String(Constants::S60_EMULATOR_TARGET_ID));
} }
} else if (MaemoGlobal::isValidMaemo5QtVersion(this)) { } else if (MaemoGlobal::isValidMaemo5QtVersion(this)) {
m_abis.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, ProjectExplorer::Abi::Linux, m_abis.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture, ProjectExplorer::Abi::LinuxOS,
ProjectExplorer::Abi::Linux_maemo, ProjectExplorer::Abi::Format_ELF, ProjectExplorer::Abi::MaemoLinuxFlavor, ProjectExplorer::Abi::ElfFormat,
32)); 32));
m_targetIds.insert(QLatin1String(Constants::MAEMO5_DEVICE_TARGET_ID)); m_targetIds.insert(QLatin1String(Constants::MAEMO5_DEVICE_TARGET_ID));
} else if (MaemoGlobal::isValidHarmattanQtVersion(this)) { } else if (MaemoGlobal::isValidHarmattanQtVersion(this)) {
m_abis.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, ProjectExplorer::Abi::Linux, m_abis.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture, ProjectExplorer::Abi::LinuxOS,
ProjectExplorer::Abi::Linux_harmattan, ProjectExplorer::Abi::HarmattanLinuxFlavor,
ProjectExplorer::Abi::Format_ELF, ProjectExplorer::Abi::ElfFormat,
32)); 32));
m_targetIds.insert(QLatin1String(Constants::HARMATTAN_DEVICE_TARGET_ID)); m_targetIds.insert(QLatin1String(Constants::HARMATTAN_DEVICE_TARGET_ID));
} else if (MaemoGlobal::isValidMeegoQtVersion(this)) { } else if (MaemoGlobal::isValidMeegoQtVersion(this)) {
m_abis.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ARM, ProjectExplorer::Abi::Linux, m_abis.append(ProjectExplorer::Abi(ProjectExplorer::Abi::ArmArchitecture, ProjectExplorer::Abi::LinuxOS,
ProjectExplorer::Abi::Linux_meego, ProjectExplorer::Abi::MeegoLinuxFlavor,
ProjectExplorer::Abi::Format_ELF, 32)); ProjectExplorer::Abi::ElfFormat, 32));
m_targetIds.insert(QLatin1String(Constants::MEEGO_DEVICE_TARGET_ID)); m_targetIds.insert(QLatin1String(Constants::MEEGO_DEVICE_TARGET_ID));
} else if (qmakeCXX.contains("g++") } else if (qmakeCXX.contains("g++")
|| qmakeCXX == "cl" || qmakeCXX == "icl" // intel cl || qmakeCXX == "cl" || qmakeCXX == "icl" // intel cl
@@ -1536,7 +1536,7 @@ void QtVersion::updateAbiAndMkspec() const
QList<ProjectExplorer::Abi> tmp = m_abis; QList<ProjectExplorer::Abi> tmp = m_abis;
m_abis.clear(); m_abis.clear();
foreach (const ProjectExplorer::Abi &abi, tmp) foreach (const ProjectExplorer::Abi &abi, tmp)
m_abis.append(ProjectExplorer::Abi(abi.architecture(), abi.os(), ProjectExplorer::Abi::Windows_msys, m_abis.append(ProjectExplorer::Abi(abi.architecture(), abi.os(), ProjectExplorer::Abi::WindowsMSysFlavour,
abi.binaryFormat(), abi.wordWidth())); abi.binaryFormat(), abi.wordWidth()));
} }
#endif #endif
@@ -1644,7 +1644,7 @@ void QtVersion::addToEnvironment(Utils::Environment &env) const
env.prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/tools"))); // e.g. make.exe env.prependOrSetPath(epocDir.filePath(QLatin1String("epoc32/tools"))); // e.g. make.exe
// Windows only: // Windows only:
if (ProjectExplorer::Abi::hostAbi().os() == ProjectExplorer::Abi::Windows) { if (ProjectExplorer::Abi::hostAbi().os() == ProjectExplorer::Abi::WindowsOS) {
QString winDir = QLatin1String(qgetenv("WINDIR")); QString winDir = QLatin1String(qgetenv("WINDIR"));
if (!winDir.isEmpty()) if (!winDir.isEmpty())
env.prependOrSetPath(QDir(winDir).filePath(QLatin1String("system32"))); env.prependOrSetPath(QDir(winDir).filePath(QLatin1String("system32")));
@@ -1864,7 +1864,7 @@ bool QtVersion::supportsBinaryDebuggingHelper() const
{ {
if (!isValid()) if (!isValid())
return false; return false;
return qtAbis().at(0).os() != ProjectExplorer::Abi::Symbian; return qtAbis().at(0).os() != ProjectExplorer::Abi::SymbianOS;
} }
bool QtVersion::hasDocumentation() const bool QtVersion::hasDocumentation() const