本文整理汇总了C++中qtsupport::BaseQtVersion::supportedTargetIds方法的典型用法代码示例。如果您正苦于以下问题:C++ BaseQtVersion::supportedTargetIds方法的具体用法?C++ BaseQtVersion::supportedTargetIds怎么用?C++ BaseQtVersion::supportedTargetIds使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类qtsupport::BaseQtVersion
的用法示例。
在下文中一共展示了BaseQtVersion::supportedTargetIds方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
bool QMakeStep::init()
{
Qt4BuildConfiguration *qt4bc = qt4BuildConfiguration();
const QtSupport::BaseQtVersion *qtVersion = qt4bc->qtVersion();
if (!qtVersion)
return false;
QString args = allArguments();
QString workingDirectory;
if (qt4bc->subNodeBuild())
workingDirectory = qt4bc->subNodeBuild()->buildDir();
else
workingDirectory = qt4bc->buildDirectory();
QString program = qtVersion->qmakeCommand();
// Check whether we need to run qmake
m_needToRunQMake = true;
QString makefile = workingDirectory;
if (qt4bc->subNodeBuild()) {
if (!qt4bc->subNodeBuild()->makefile().isEmpty()) {
makefile.append(qt4bc->subNodeBuild()->makefile());
} else {
makefile.append("/Makefile");
}
} else if (!qt4bc->makefile().isEmpty()) {
makefile.append("/");
makefile.append(qt4bc->makefile());
} else {
makefile.append("/Makefile");
}
if (QFileInfo(makefile).exists()) {
QString qmakePath = QtSupport::QtVersionManager::findQMakeBinaryFromMakefile(makefile);
if (qtVersion->qmakeCommand() == qmakePath) {
m_needToRunQMake = !qt4bc->compareToImportFrom(makefile);
}
}
if (m_forced) {
m_forced = false;
m_needToRunQMake = true;
}
setEnabled(m_needToRunQMake);
ProcessParameters *pp = processParameters();
pp->setMacroExpander(qt4bc->macroExpander());
pp->setWorkingDirectory(workingDirectory);
pp->setCommand(program);
pp->setArguments(args);
pp->setEnvironment(qt4bc->environment());
setOutputParser(new QMakeParser);
Qt4ProFileNode *node = qt4bc->qt4Target()->qt4Project()->rootProjectNode();
if (qt4bc->subNodeBuild())
node = qt4bc->subNodeBuild();
QString proFile = node->path();
QtSupport::BaseQtVersion *version = qt4BuildConfiguration()->qtVersion();
m_tasks = version->reportIssues(proFile, workingDirectory);
foreach (Qt4BaseTargetFactory *factory, Qt4BaseTargetFactory::qt4BaseTargetFactoriesForIds(version->supportedTargetIds().toList()))
m_tasks.append(factory->reportIssues(proFile));
qSort(m_tasks);
m_scriptTemplate = node->projectType() == ScriptTemplate;
return AbstractProcessStep::init();
}