本文整理汇总了C++中QmakeBuildConfiguration类的典型用法代码示例。如果您正苦于以下问题:C++ QmakeBuildConfiguration类的具体用法?C++ QmakeBuildConfiguration怎么用?C++ QmakeBuildConfiguration使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了QmakeBuildConfiguration类的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: QTC_ASSERT
void QmakeManager::runQMake(ProjectExplorer::Project *p, ProjectExplorer::Node *node)
{
if (!ProjectExplorerPlugin::saveModifiedFiles())
return;
QmakeProject *qmakeProject = qobject_cast<QmakeProject *>(p);
QTC_ASSERT(qmakeProject, return);
if (!qmakeProject->activeTarget() ||
!qmakeProject->activeTarget()->activeBuildConfiguration())
return;
QmakeBuildConfiguration *bc = static_cast<QmakeBuildConfiguration *>(qmakeProject->activeTarget()->activeBuildConfiguration());
QMakeStep *qs = bc->qmakeStep();
if (!qs)
return;
//found qmakeStep, now use it
qs->setForced(true);
if (node != 0 && node != qmakeProject->rootProjectNode())
if (QmakeProFileNode *profile = dynamic_cast<QmakeProFileNode *>(node))
bc->setSubNodeBuild(profile);
BuildManager::appendStep(qs, tr("QMake"));
bc->setSubNodeBuild(0);
}
示例2: qmakeBuildConfiguration
///
/// Returns all arguments
/// That is: possbile subpath
/// spec
/// config arguemnts
/// moreArguments
/// user arguments
QString QMakeStep::allArguments(bool shorted)
{
QmakeBuildConfiguration *bc = qmakeBuildConfiguration();
QStringList arguments;
if (bc->subNodeBuild())
arguments << bc->subNodeBuild()->path().toUserOutput();
else if (shorted)
arguments << project()->projectFilePath().fileName();
else
arguments << project()->projectFilePath().toUserOutput();
arguments << QLatin1String("-r");
bool userProvidedMkspec = false;
for (QtcProcess::ConstArgIterator ait(m_userArgs); ait.next(); ) {
if (ait.value() == QLatin1String("-spec")) {
if (ait.next()) {
userProvidedMkspec = true;
break;
}
}
}
FileName specArg = mkspec();
if (!userProvidedMkspec && !specArg.isEmpty())
arguments << QLatin1String("-spec") << specArg.toUserOutput();
// Find out what flags we pass on to qmake
arguments << bc->configCommandLineArguments();
arguments << deducedArguments().toArguments();
QString args = QtcProcess::joinArgs(arguments);
// User arguments
QtcProcess::addArgs(&args, m_userArgs);
return args;
}
示例3: qmakeBuildConfiguration
QString MakeStep::effectiveMakeCommand() const
{
QString makeCmd = m_makeCmd;
if (makeCmd.isEmpty()) {
QmakeBuildConfiguration *bc = qmakeBuildConfiguration();
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit());
if (bc && tc)
makeCmd = tc->makeCommand(bc->environment());
}
return makeCmd;
}
示例4: updateSigningWarning
void AndroidPackageCreationWidget::updateSigningWarning()
{
QmakeBuildConfiguration *bc = qobject_cast<QmakeBuildConfiguration *>(m_step->target()->activeBuildConfiguration());
bool debug = bc && (bc->qmakeBuildConfiguration() & QtSupport::BaseQtVersion::DebugBuild);
if (m_step->signPackage() && debug) {
m_ui->signingDebugWarningIcon->setVisible(true);
m_ui->signingDebugWarningLabel->setVisible(true);
} else {
m_ui->signingDebugWarningIcon->setVisible(false);
m_ui->signingDebugWarningLabel->setVisible(false);
}
}
示例5: 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()));
}
示例6: qmakeBuildConfiguration
QString MakeStep::effectiveMakeCommand() const
{
QString makeCmd = m_makeCmd;
if (makeCmd.isEmpty()) {
QmakeBuildConfiguration *bc = qmakeBuildConfiguration();
if (!bc)
bc = qobject_cast<QmakeBuildConfiguration *>(target()->activeBuildConfiguration());
ToolChain *tc = ToolChainKitInformation::toolChain(target()->kit(), ProjectExplorer::Constants::CXX_LANGUAGE_ID);
if (bc && tc)
makeCmd = tc->makeCommand(bc->environment());
}
return makeCmd;
}
示例7: qCWarning
FileName IosRunConfiguration::bundleDirectory() const
{
FileName res;
Core::Id devType = DeviceTypeKitInformation::deviceTypeId(target()->kit());
bool isDevice = (devType == Constants::IOS_DEVICE_TYPE);
if (!isDevice && devType != Constants::IOS_SIMULATOR_TYPE) {
qCWarning(iosLog) << "unexpected device type in bundleDirForTarget: " << devType.toString();
return res;
}
QmakeBuildConfiguration *bc =
qobject_cast<QmakeBuildConfiguration *>(target()->activeBuildConfiguration());
if (bc) {
QmakeProject *pro = qobject_cast<QmakeProject *>(target()->project());
const QmakeProFileNode *node = 0;
if (pro)
node = pro->rootProjectNode();
if (node)
node = node->findProFileFor(profilePath());
if (node) {
TargetInformation ti = node->targetInformation();
if (ti.valid)
res = FileName::fromString(ti.buildDir);
}
if (res.isEmpty())
res = bc->buildDirectory();
switch (bc->buildType()) {
case BuildConfiguration::Debug :
case BuildConfiguration::Unknown :
if (isDevice)
res.appendPath(QLatin1String("Debug-iphoneos"));
else
res.appendPath(QLatin1String("Debug-iphonesimulator"));
break;
case BuildConfiguration::Profile :
case BuildConfiguration::Release :
if (isDevice)
res.appendPath(QLatin1String("Release-iphoneos"));
else
res.appendPath(QLatin1String("Release-iphonesimulator"));
break;
default:
qCWarning(iosLog) << "IosBuildStep had an unknown buildType "
<< target()->activeBuildConfiguration()->buildType();
}
}
res.appendPath(applicationName() + QLatin1String(".app"));
return res;
}
示例8: updateAndroidProjectInfo
void AndroidPackageCreationWidget::initGui()
{
updateAndroidProjectInfo();
ProjectExplorer::Target *target = m_step->target();
m_fileSystemWatcher->addPath(AndroidManager::dirPath(target).toString());
m_fileSystemWatcher->addPath(AndroidManager::manifestPath(target).toString());
m_fileSystemWatcher->addPath(AndroidManager::srcPath(target).toString());
connect(m_fileSystemWatcher, SIGNAL(directoryChanged(QString)),
this, SLOT(updateAndroidProjectInfo()));
connect(m_fileSystemWatcher, SIGNAL(fileChanged(QString)), this,
SLOT(updateAndroidProjectInfo()));
connect(m_ui->targetSDKComboBox, SIGNAL(activated(QString)), SLOT(setTargetSDK(QString)));
connect(m_qtLibsModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)), SLOT(setQtLibs(QModelIndex,QModelIndex)));
connect(m_prebundledLibs, SIGNAL(dataChanged(QModelIndex,QModelIndex)), SLOT(setPrebundledLibs(QModelIndex,QModelIndex)));
connect(m_ui->prebundledLibsListView, SIGNAL(activated(QModelIndex)), SLOT(prebundledLibSelected(QModelIndex)));
connect(m_ui->prebundledLibsListView, SIGNAL(clicked(QModelIndex)), SLOT(prebundledLibSelected(QModelIndex)));
connect(m_ui->upPushButton, SIGNAL(clicked()), SLOT(prebundledLibMoveUp()));
connect(m_ui->downPushButton, SIGNAL(clicked()), SLOT(prebundledLibMoveDown()));
connect(m_ui->readInfoPushButton, SIGNAL(clicked()), SLOT(readElfInfo()));
m_ui->qtLibsListView->setModel(m_qtLibsModel);
m_ui->prebundledLibsListView->setModel(m_prebundledLibs);
m_ui->KeystoreLocationLineEdit->setText(m_step->keystorePath().toUserOutput());
// Make the buildconfiguration emit a evironmentChanged() signal
// TODO find a better way
QmakeBuildConfiguration *bc = qobject_cast<QmakeBuildConfiguration *>(m_step->target()->activeBuildConfiguration());
if (!bc)
return;
bool use = bc->useSystemEnvironment();
bc->setUseSystemEnvironment(!use);
bc->setUseSystemEnvironment(use);
activeBuildConfigurationChanged();
connect(m_step->target(), SIGNAL(activeBuildConfigurationChanged(ProjectExplorer::BuildConfiguration*)),
this, SLOT(activeBuildConfigurationChanged()));
}
示例9: setTargetSDK
void AndroidPackageCreationWidget::setTargetSDK(const QString &sdk)
{
AndroidManager::setBuildTargetSDK(m_step->target(), sdk);
QmakeBuildConfiguration *bc = qobject_cast<QmakeBuildConfiguration *>(m_step->target()->activeBuildConfiguration());
if (!bc)
return;
QMakeStep *qs = bc->qmakeStep();
if (!qs)
return;
qs->setForced(true);
BuildManager::buildList(bc->stepList(ProjectExplorer::Constants::BUILDSTEPS_CLEAN),
ProjectExplorerPlugin::displayNameForStepId(ProjectExplorer::Constants::BUILDSTEPS_CLEAN));
BuildManager::appendStep(qs, ProjectExplorerPlugin::displayNameForStepId(ProjectExplorer::Constants::BUILDSTEPS_CLEAN));
bc->setSubNodeBuild(0);
// Make the buildconfiguration emit a evironmentChanged() signal
// TODO find a better way
bool use = bc->useSystemEnvironment();
bc->setUseSystemEnvironment(!use);
bc->setUseSystemEnvironment(use);
}
示例10: qmakeBuildConfiguration
bool QMakeStep::init(QList<const BuildStep *> &earlierSteps)
{
if (m_commandFuture)
return false;
QmakeBuildConfiguration *qmakeBc = qmakeBuildConfiguration();
const BaseQtVersion *qtVersion = QtKitInformation::qtVersion(target()->kit());
if (!qtVersion)
return false;
QString workingDirectory;
if (qmakeBc->subNodeBuild())
workingDirectory = qmakeBc->subNodeBuild()->buildDir();
else
workingDirectory = qmakeBc->buildDirectory().toString();
m_qmakeExecutable = qtVersion->qmakeCommand().toString();
m_qmakeArguments = allArguments(qtVersion);
m_runMakeQmake = (qtVersion->qtVersion() >= QtVersionNumber(5, 0 ,0));
if (m_runMakeQmake) {
m_makeExecutable = makeCommand();
if (m_makeExecutable.isEmpty())
return false;
} else {
m_makeExecutable.clear();
}
QString makefile = workingDirectory;
if (qmakeBc->subNodeBuild()) {
if (!qmakeBc->subNodeBuild()->makefile().isEmpty())
makefile.append(qmakeBc->subNodeBuild()->makefile());
else
makefile.append(QLatin1String("/Makefile"));
} else if (!qmakeBc->makefile().isEmpty()) {
makefile.append(QLatin1Char('/'));
makefile.append(qmakeBc->makefile());
} else {
makefile.append(QLatin1String("/Makefile"));
}
// Check whether we need to run qmake
bool makefileOutDated = (qmakeBc->compareToImportFrom(makefile) != QmakeBuildConfiguration::MakefileMatches);
if (m_forced || makefileOutDated)
m_needToRunQMake = true;
m_forced = false;
ProcessParameters *pp = processParameters();
pp->setMacroExpander(qmakeBc->macroExpander());
pp->setWorkingDirectory(workingDirectory);
pp->setEnvironment(qmakeBc->environment());
setOutputParser(new QMakeParser);
QmakeProFileNode *node = static_cast<QmakeProject *>(qmakeBc->target()->project())->rootProjectNode();
if (qmakeBc->subNodeBuild())
node = qmakeBc->subNodeBuild();
QString proFile = node->filePath().toString();
QList<ProjectExplorer::Task> tasks = qtVersion->reportIssues(proFile, workingDirectory);
Utils::sort(tasks);
if (!tasks.isEmpty()) {
bool canContinue = true;
foreach (const ProjectExplorer::Task &t, tasks) {
addTask(t);
if (t.type == Task::Error)
canContinue = false;
}
示例11: resDirForTarget
QString IosManager::resDirForTarget(Target *target)
{
QmakeBuildConfiguration *bc =
qobject_cast<QmakeBuildConfiguration *>(target->activeBuildConfiguration());
return bc->buildDirectory().toString();
}