forked from qt-creator/qt-creator
QbsProjectManager: Add new files to the top-level product
... by default. The "New File" wizard, if not invoked from the context menu, implicitly prefers Groups over Products, because the respective nodes are tried first. Thus, we lower the priority of group nodes so that their parent product will be a better match unless the group was specifically selected. Task-number: QTCREATORBUG-20480 Change-Id: I0c5b2dbf861065ee97ab957ec8bd86132295893e Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -353,6 +353,15 @@ bool QbsGroupNode::renameFile(const QString &filePath, const QString &newFilePat
|
||||
prdNode->qbsProductData(), m_qbsGroupData);
|
||||
}
|
||||
|
||||
FolderNode::AddNewInformation QbsGroupNode::addNewInformation(const QStringList &files,
|
||||
Node *context) const
|
||||
{
|
||||
AddNewInformation info = QbsBaseProjectNode::addNewInformation(files, context);
|
||||
if (context != this)
|
||||
--info.priority;
|
||||
return info;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------------
|
||||
// QbsProductNode:
|
||||
// --------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user