let "build file" only run one build step

For example, C++ source files will be compiled but the build
stops before linking.

Task-number: QBS-283

Change-Id: If0573ea58b9a047980aab0fd8e4828f3d0c315b8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
Joerg Bornemann
2013-07-24 16:47:02 +02:00
parent 0a8f93268b
commit c883498e3b
6 changed files with 31 additions and 4 deletions

View File

@@ -301,7 +301,7 @@ void QbsProjectManagerPlugin::buildFileContextMenu()
QTC_ASSERT(m_currentNode, return);
QTC_ASSERT(m_currentProject, return);
buildFiles(m_currentProject, QStringList(m_currentNode->path()));
buildSingleFile(m_currentProject, m_currentNode->path());
}
void QbsProjectManagerPlugin::buildFile()
@@ -316,7 +316,7 @@ void QbsProjectManagerPlugin::buildFile()
if (!project || file.isEmpty())
return;
buildFiles(project, QStringList(file));
buildSingleFile(project, file);
}
void QbsProjectManagerPlugin::buildProductContextMenu()
@@ -345,7 +345,8 @@ void QbsProjectManagerPlugin::buildProduct()
buildProducts(project, QStringList(product->displayName()));
}
void QbsProjectManagerPlugin::buildFiles(QbsProject *project, const QStringList &files)
void QbsProjectManagerPlugin::buildFiles(QbsProject *project, const QStringList &files,
const QStringList &activeFileTags)
{
QTC_ASSERT(project, return);
QTC_ASSERT(!files.isEmpty(), return);
@@ -362,6 +363,7 @@ void QbsProjectManagerPlugin::buildFiles(QbsProject *project, const QStringList
return;
bc->setChangedFiles(files);
bc->setActiveFileTags(activeFileTags);
bc->setProducts(QStringList());
const Core::Id buildStep = Core::Id(ProjectExplorer::Constants::BUILDSTEPS_BUILD);
@@ -372,6 +374,12 @@ void QbsProjectManagerPlugin::buildFiles(QbsProject *project, const QStringList
bc->setChangedFiles(QStringList());
}
void QbsProjectManagerPlugin::buildSingleFile(QbsProject *project, const QString &file)
{
buildFiles(project, QStringList(file), QStringList()
<< QLatin1String("obj") << QLatin1String("hpp"));
}
void QbsProjectManagerPlugin::buildProducts(QbsProject *project, const QStringList &products)
{
QTC_ASSERT(project, return);