Skip to content
Snippets Groups Projects
Commit 07ff6be6 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

QbsProjectManager: Create run configurations for runnable products only.


There is no need anymore for the current hack, as the API now provides
the necessary information.

Task-number: QTCREATORBUG-12152
Change-Id: I93524da34556fef1de40b1948a2997ee8d3dfaef
Reviewed-by: default avatarJoerg Bornemann <joerg.bornemann@digia.com>
parent b5ed0b87
No related branches found
No related tags found
No related merge requests found
...@@ -562,15 +562,9 @@ QList<Core::Id> QbsRunConfigurationFactory::availableCreationIds(ProjectExplorer ...@@ -562,15 +562,9 @@ QList<Core::Id> QbsRunConfigurationFactory::availableCreationIds(ProjectExplorer
if (!project || !project->qbsProject().isValid()) if (!project || !project->qbsProject().isValid())
return result; return result;
// Before the first build, some information regarding the target artifacts is not yet
// present. Simply create run configs for all products in that case; the irrelevant ones
// will disapear again later.
foreach (const qbs::ProductData &product, project->qbsProjectData().allProducts()) { foreach (const qbs::ProductData &product, project->qbsProjectData().allProducts()) {
const bool alreadyhasTargetInfo = !product.targetArtifacts().isEmpty(); if (product.isRunnable())
if (!alreadyhasTargetInfo || !project->qbsProject()
.targetExecutable(product, qbs::InstallOptions()).isEmpty()) {
result << Core::Id::fromString(QString::fromLatin1(QBS_RC_PREFIX) + product.name()); result << Core::Id::fromString(QString::fromLatin1(QBS_RC_PREFIX) + product.name());
}
} }
return result; return result;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment