本文整理汇总了C++中QmakeProFileNode::path方法的典型用法代码示例。如果您正苦于以下问题:C++ QmakeProFileNode::path方法的具体用法?C++ QmakeProFileNode::path怎么用?C++ QmakeProFileNode::path使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QmakeProFileNode
的用法示例。
在下文中一共展示了QmakeProFileNode::path方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: init
bool QMakeStep::init()
{
QmakeBuildConfiguration *qt4bc = qmakeBuildConfiguration();
const QtSupport::BaseQtVersion *qtVersion = QtSupport::QtKitInformation::qtVersion(target()->kit());
if (!qtVersion)
return false;
QString args = allArguments();
QString workingDirectory;
if (qt4bc->subNodeBuild())
workingDirectory = qt4bc->subNodeBuild()->buildDir();
else
workingDirectory = qt4bc->buildDirectory().toString();
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) != QmakeBuildConfiguration::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());
pp->resolveAll();
setOutputParser(new QMakeParser);
QmakeProFileNode *node = static_cast<QmakeProject *>(qt4bc->target()->project())->rootQmakeProjectNode();
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: suggestedIncludePath
QString InternalLibraryDetailsController::suggestedIncludePath() const
{
const int currentIndex = libraryDetailsWidget()->libraryComboBox->currentIndex();
if (currentIndex >= 0) {
QmakeProFileNode *proFileNode = m_proFileNodes.at(currentIndex);
return proFileNode->path().toFileInfo().absolutePath();
}
return QString();
}