summaryrefslogtreecommitdiff
path: root/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@digia.com>2013-07-24 16:47:02 +0200
committerJoerg Bornemann <joerg.bornemann@digia.com>2013-07-30 09:09:59 +0200
commitc883498e3bc440a9dff473156cc739441e05d482 (patch)
tree65360be0b24dca7652bba1e4b5f827a8300d32e9 /src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp
parent0a8f93268b0ee847ac0cf6e8216a4939b02e3996 (diff)
downloadqt-creator-c883498e3bc440a9dff473156cc739441e05d482.tar.gz
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>
Diffstat (limited to 'src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp')
-rw-r--r--src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp
index bb32ff9337..ebd9bb589b 100644
--- a/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp
+++ b/src/plugins/qbsprojectmanager/qbsprojectmanagerplugin.cpp
@@ -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);