forked from qt-creator/qt-creator
ProjectExplorer: Add "build for current run config" menu entry
This lets users build the executable corresponding to the currently active run configuration. It's functionally equivalent to locating the corresponding node in the project tree and choosing "Build" from the context menu. Fixes: QTCREATORBUG-22403 Change-Id: Ic2b729c7ce17f1ad944dc06746bb9d6db90b6c61 Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -164,6 +164,7 @@ public:
|
||||
bool m_isParsing = false;
|
||||
bool m_hasParsingData = false;
|
||||
bool m_needsInitialExpansion = false;
|
||||
bool m_canBuildProducts = false;
|
||||
std::unique_ptr<Core::IDocument> m_document;
|
||||
std::unique_ptr<ProjectNode> m_rootProjectNode;
|
||||
std::unique_ptr<ContainerNode> m_containerNode;
|
||||
@@ -227,6 +228,11 @@ QString Project::mimeType() const
|
||||
return document()->mimeType();
|
||||
}
|
||||
|
||||
bool Project::canBuildProducts() const
|
||||
{
|
||||
return d->m_canBuildProducts;
|
||||
}
|
||||
|
||||
Core::IDocument *Project::document() const
|
||||
{
|
||||
QTC_CHECK(d->m_document);
|
||||
@@ -938,6 +944,11 @@ void Project::setRequiredKitPredicate(const Kit::Predicate &predicate)
|
||||
d->m_requiredKitPredicate = predicate;
|
||||
}
|
||||
|
||||
void Project::setCanBuildProducts()
|
||||
{
|
||||
d->m_canBuildProducts = true;
|
||||
}
|
||||
|
||||
Kit::Predicate Project::preferredKitPredicate() const
|
||||
{
|
||||
return d->m_preferredKitPredicate;
|
||||
|
||||
Reference in New Issue
Block a user