本文整理汇总了C++中ProcessParameters::commandMissing方法的典型用法代码示例。如果您正苦于以下问题:C++ ProcessParameters::commandMissing方法的具体用法?C++ ProcessParameters::commandMissing怎么用?C++ ProcessParameters::commandMissing使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ProcessParameters
的用法示例。
在下文中一共展示了ProcessParameters::commandMissing方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: updateDetails
void MakeStepConfigWidget::updateDetails()
{
ToolChain *tc
= ToolChainKitInformation::toolChain(m_makeStep->target()->kit());
QmakeBuildConfiguration *bc = m_makeStep->qmakeBuildConfiguration();
if (!bc)
bc = qobject_cast<QmakeBuildConfiguration *>(m_makeStep->target()->activeBuildConfiguration());
if (tc && bc)
m_ui->makeLabel->setText(tr("Override %1:").arg(QDir::toNativeSeparators(tc->makeCommand(bc->environment()))));
else
m_ui->makeLabel->setText(tr("Make:"));
if (!tc) {
setSummaryText(tr("<b>Make:</b> %1").arg(ProjectExplorer::ToolChainKitInformation::msgNoToolChainInTarget()));
return;
}
if (!bc) {
setSummaryText(tr("<b>Make:</b> No Qt build configuration."));
return;
}
ProcessParameters param;
param.setMacroExpander(bc->macroExpander());
param.setWorkingDirectory(bc->buildDirectory().toString());
QString makeCmd = tc->makeCommand(bc->environment());
if (!m_makeStep->makeCommand().isEmpty())
makeCmd = m_makeStep->makeCommand();
param.setCommand(makeCmd);
QString args = m_makeStep->userArguments();
Utils::Environment env = bc->environment();
Utils::Environment::setupEnglishOutput(&env);
// We prepend "L" to the MAKEFLAGS, so that nmake / jom are less verbose
// FIXME doing this without the user having a way to override this is rather bad
if (tc && m_makeStep->makeCommand().isEmpty()) {
if (tc->targetAbi().os() == Abi::WindowsOS
&& tc->targetAbi().osFlavor() != Abi::WindowsMSysFlavor) {
const QString makeFlags = QLatin1String("MAKEFLAGS");
env.set(makeFlags, QLatin1Char('L') + env.value(makeFlags));
}
}
param.setArguments(args);
param.setEnvironment(env);
if (param.commandMissing())
setSummaryText(tr("<b>Make:</b> %1 not found in the environment.").arg(makeCmd)); // Override display text
else
setSummaryText(param.summaryInWorkdir(displayName()));
}