Qmake: Fix "Build File" for sub-projects in pri

For example, locatorwidget.cpp which is in locator.pri under
coreplugin.pro.

Change-Id: I93e6d06ad19b14280c6c3c9e701c64dca3a51856
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
Orgad Shaneh
2017-03-14 22:53:51 +02:00
committed by Orgad Shaneh
parent 423cca3521
commit 181766c41d

View File

@@ -216,9 +216,11 @@ void QmakeManager::handleSubDirContextMenu(QmakeManager::Action action, bool isF
if (!contextNode || !buildableFile)
isFileBuild = false;
if (QmakeProFileNode *profile = dynamic_cast<QmakeProFileNode *>(contextNode)) {
if (profile != contextProject->rootProjectNode() || isFileBuild)
bc->setSubNodeBuild(profile);
if (QmakePriFileNode *prifile = dynamic_cast<QmakePriFileNode *>(contextNode)) {
if (QmakeProFileNode *profile = prifile->proFileNode()) {
if (profile != contextProject->rootProjectNode() || isFileBuild)
bc->setSubNodeBuild(profile->proFileNode());
}
}
if (isFileBuild)