本文整理汇总了C++中ToolChain::typeId方法的典型用法代码示例。如果您正苦于以下问题:C++ ToolChain::typeId方法的具体用法?C++ ToolChain::typeId怎么用?C++ ToolChain::typeId使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ToolChain
的用法示例。
在下文中一共展示了ToolChain::typeId方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: defaultArguments
QStringList IosBuildStep::defaultArguments() const
{
QStringList res;
Kit *kit = target()->kit();
ToolChain *tc = ToolChainKitInformation::toolChain(kit);
switch (target()->activeBuildConfiguration()->buildType()) {
case BuildConfiguration::Debug :
res << QLatin1String("-configuration") << QLatin1String("Debug");
break;
case BuildConfiguration::Release :
res << QLatin1String("-configuration") << QLatin1String("Release");
break;
case BuildConfiguration::Unknown :
break;
default:
qCWarning(iosLog) << "IosBuildStep had an unknown buildType "
<< target()->activeBuildConfiguration()->buildType();
}
if (tc->typeId() == ProjectExplorer::Constants::GCC_TOOLCHAIN_TYPEID
|| tc->typeId() == ProjectExplorer::Constants::CLANG_TOOLCHAIN_TYPEID) {
GccToolChain *gtc = static_cast<GccToolChain *>(tc);
res << gtc->platformCodeGenFlags();
}
if (!SysRootKitInformation::sysRoot(kit).isEmpty())
res << QLatin1String("-sdk") << SysRootKitInformation::sysRoot(kit).toString();
res << QLatin1String("SYMROOT=") + IosManager::resDirForTarget(target());
return res;
}
示例2: autoDetect
FileName AndroidGdbServerKitInformation::autoDetect(Kit *kit)
{
ToolChain *tc = ToolChainKitInformation::toolChain(kit);
if (!tc || tc->typeId() != Constants::ANDROID_TOOLCHAIN_ID)
return FileName();
AndroidToolChain *atc = static_cast<AndroidToolChain *>(tc);
return atc->suggestedGdbServer();
}
示例3: typeId
bool ToolChain::operator == (const ToolChain &tc) const
{
if (this == &tc)
return true;
// We ignore displayname
return typeId() == tc.typeId() && isAutoDetected() == tc.isAutoDetected();
}
示例4: isAndroidKit
bool AndroidGdbServerKitInformation::isAndroidKit(const Kit *kit)
{
QtSupport::BaseQtVersion *qt = QtSupport::QtKitInformation::qtVersion(kit);
ToolChain *tc = ToolChainKitInformation::toolChain(kit);
if (qt && tc)
return qt->type() == QLatin1String(Constants::ANDROIDQT)
&& tc->typeId() == Constants::ANDROID_TOOLCHAIN_ID;
return false;
}
示例5: MsvcToolChain
static ToolChain *findOrCreateToolChain(const QList<ToolChain *> &alreadyKnown,
const QString &name, const Abi &abi,
const QString &varsBat, const QString &varsBatArg,
ToolChain::Detection d = ToolChain::ManualDetection)
{
ToolChain *tc = Utils::findOrDefault(alreadyKnown,
[&varsBat, &varsBatArg](ToolChain *tc) -> bool {
if (tc->typeId() != Constants::MSVC_TOOLCHAIN_TYPEID)
return false;
auto mtc = static_cast<MsvcToolChain *>(tc);
return mtc->varsBat() == varsBat
&& mtc->varsBatArg() == varsBatArg;
});
if (!tc)
tc = new MsvcToolChain(name, abi, varsBat, varsBatArg, d);
return tc;
}
示例6: defaultValue
QVariant CMakeGeneratorKitInformation::defaultValue(const Kit *k) const
{
CMakeTool *tool = CMakeKitInformation::cmakeTool(k);
if (!tool)
return QString();
QStringList known = tool->supportedGenerators();
auto it = std::find_if(known.constBegin(), known.constEnd(),
[](const QString &s) { return s == QLatin1String("CodeBlocks - Ninja"); });
if (it != known.constEnd()) {
Utils::Environment env = Utils::Environment::systemEnvironment();
k->addToEnvironment(env);
const Utils::FileName ninjaExec = env.searchInPath(QLatin1String("ninja"));
if (ninjaExec.isEmpty())
it = known.constEnd(); // Ignore ninja generator without ninja exectuable
}
if (Utils::HostOsInfo::isWindowsHost()) {
// *sigh* Windows with its zoo of incompatible stuff again...
ToolChain *tc = ToolChainKitInformation::toolChain(k, ToolChain::Language::Cxx);
if (tc && tc->typeId() == ProjectExplorer::Constants::MINGW_TOOLCHAIN_TYPEID) {
if (it == known.constEnd())
it = std::find_if(known.constBegin(), known.constEnd(),
[](const QString &s) { return s == QLatin1String("CodeBlocks - MinGW Makefiles"); });
} else {
if (it == known.constEnd())
it = std::find_if(known.constBegin(), known.constEnd(),
[](const QString &s) { return s == QLatin1String("CodeBlocks - NMake Makefiles"); });
}
} else {
// Unix-oid OSes:
if (it == known.constEnd())
it = std::find_if(known.constBegin(), known.constEnd(),
[](const QString &s) { return s == QLatin1String("CodeBlocks - Unix Makefiles"); });
}
if (it == known.constEnd())
it = known.constBegin(); // Fallback to the first generator...
if (it != known.constEnd())
return *it;
return QString();
}