void AbiWidget::setCustomAbi(const Abi ¤t) { bool blocked = blockSignals(true); d->m_architectureComboBox->setCurrentIndex(static_cast<int>(current.architecture())); d->m_osComboBox->setCurrentIndex(static_cast<int>(current.os())); osChanged(); for (int i = 0; i < d->m_osFlavorComboBox->count(); ++i) { if (d->m_osFlavorComboBox->itemData(i).toInt() == current.osFlavor()) { d->m_osFlavorComboBox->setCurrentIndex(i); break; } } d->m_binaryFormatComboBox->setCurrentIndex(static_cast<int>(current.binaryFormat())); for (int i = 0; i < d->m_wordWidthComboBox->count(); ++i) { if (d->m_wordWidthComboBox->itemData(i).toInt() == current.wordWidth()) { d->m_wordWidthComboBox->setCurrentIndex(i); break; } } if (d->isCustom()) d->m_abi->setItemData(0, current.toString()); blockSignals(blocked); emit abiChanged(); }
bool Abi::isCompatibleWith(const Abi &other) const { bool isCompat = (architecture() == other.architecture() || other.architecture() == Abi::UnknownArchitecture) && (os() == other.os() || other.os() == Abi::UnknownOS) && (osFlavor() == other.osFlavor() || other.osFlavor() == Abi::UnknownFlavor) && (binaryFormat() == other.binaryFormat() || other.binaryFormat() == Abi::UnknownFormat) && ((wordWidth() == other.wordWidth() && wordWidth() != 0) || other.wordWidth() == 0); // *-linux-generic-* is compatible with *-linux-* (both ways): This is for the benefit of // people building Qt themselves using e.g. a meego toolchain. // // We leave it to the specific targets to catch filter out the tool chains that do not // work for them. if (!isCompat && (architecture() == other.architecture() || other.architecture() == Abi::UnknownArchitecture) && ((os() == other.os()) && (os() == LinuxOS)) && (osFlavor() == GenericLinuxFlavor || other.osFlavor() == GenericLinuxFlavor) && (binaryFormat() == other.binaryFormat() || other.binaryFormat() == Abi::UnknownFormat) && ((wordWidth() == other.wordWidth() && wordWidth() != 0) || other.wordWidth() == 0)) isCompat = true; return isCompat; }
void AbiWidget::setCustomAbi(const Abi ¤t) { d->m_architectureComboBox->setCurrentIndex(static_cast<int>(current.architecture())); d->m_osComboBox->setCurrentIndex(static_cast<int>(current.os())); osChanged(); for (int i = 0; i < d->m_osFlavorComboBox->count(); ++i) { if (d->m_osFlavorComboBox->itemData(i).toInt() == current.osFlavor()) { d->m_osFlavorComboBox->setCurrentIndex(i); break; } } d->m_binaryFormatComboBox->setCurrentIndex(static_cast<int>(current.binaryFormat())); for (int i = 0; i < d->m_wordWidthComboBox->count(); ++i) { if (d->m_wordWidthComboBox->itemData(i).toInt() == current.wordWidth()) { d->m_wordWidthComboBox->setCurrentIndex(i); break; } } }
MsvcToolChain::MsvcToolChain(const QString &name, const Abi &abi, const QString &varsBat, const QString &varsBatArg, bool autodetect) : ToolChain(QLatin1String(Constants::MSVC_TOOLCHAIN_ID), autodetect), m_varsBat(varsBat), m_varsBatArg(varsBatArg), m_lastEnvironment(Utils::Environment::systemEnvironment()), m_abi(abi) { Q_ASSERT(!name.isEmpty()); Q_ASSERT(!m_varsBat.isEmpty()); Q_ASSERT(QFileInfo(m_varsBat).exists()); Q_ASSERT(abi.os() == Abi::WindowsOS); Q_ASSERT(abi.binaryFormat() == Abi::PEFormat); Q_ASSERT(abi.osFlavor() != Abi::WindowsMSysFlavor); setId(QString::fromLatin1("%1:%2.%3.%4").arg(Constants::MSVC_TOOLCHAIN_ID).arg(m_varsBat) .arg(m_varsBatArg).arg(m_debuggerCommand)); setDisplayName(name); }