本文整理汇总了C++中Qt4ProFileNode::projectType方法的典型用法代码示例。如果您正苦于以下问题:C++ Qt4ProFileNode::projectType方法的具体用法?C++ Qt4ProFileNode::projectType怎么用?C++ Qt4ProFileNode::projectType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Qt4ProFileNode
的用法示例。
在下文中一共展示了Qt4ProFileNode::projectType方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
bool QMakeStep::init()
{
Qt4BuildConfiguration *qt4bc = qt4BuildConfiguration();
const QtSupport::BaseQtVersion *qtVersion = QtSupport::QtProfileInformation::qtVersion(target()->profile());
if (!qtVersion)
return false;
QString args = allArguments();
QString workingDirectory;
if (qt4bc->subNodeBuild())
workingDirectory = qt4bc->subNodeBuild()->buildDir();
else
workingDirectory = qt4bc->buildDirectory();
Utils::FileName program = qtVersion->qmakeCommand();
QString makefile = workingDirectory;
if (qt4bc->subNodeBuild()) {
if (!qt4bc->subNodeBuild()->makefile().isEmpty())
makefile.append(qt4bc->subNodeBuild()->makefile());
else
makefile.append(QLatin1String("/Makefile"));
} else if (!qt4bc->makefile().isEmpty()) {
makefile.append(QLatin1Char('/'));
makefile.append(qt4bc->makefile());
} else {
makefile.append(QLatin1String("/Makefile"));
}
// Check whether we need to run qmake
bool makefileOutDated = (qt4bc->compareToImportFrom(makefile) != Qt4BuildConfiguration::MakefileMatches);
if (m_forced || makefileOutDated)
m_needToRunQMake = true;
m_forced = false;
ProcessParameters *pp = processParameters();
pp->setMacroExpander(qt4bc->macroExpander());
pp->setWorkingDirectory(workingDirectory);
pp->setCommand(program.toString());
pp->setArguments(args);
pp->setEnvironment(qt4bc->environment());
setOutputParser(new QMakeParser);
Qt4ProFileNode *node = static_cast<Qt4Project *>(qt4bc->target()->project())->rootQt4ProjectNode();
if (qt4bc->subNodeBuild())
node = qt4bc->subNodeBuild();
QString proFile = node->path();
m_tasks = qtVersion->reportIssues(proFile, workingDirectory);
qSort(m_tasks);
m_scriptTemplate = node->projectType() == ScriptTemplate;
return AbstractProcessStep::init();
}
示例2:
bool S60DeployConfiguration::isStaticLibrary(const Qt4ProFileNode &projectNode) const
{
if (projectNode.projectType() == LibraryTemplate) {
const QStringList &config(projectNode.variableValue(ConfigVar));
if (config.contains(QLatin1String("static")) || config.contains(QLatin1String("staticlib")))
return true;
}
return false;
}
示例3: 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();
}