Commit 2ad31475 authored by Daniel Teske's avatar Daniel Teske
Browse files

QmakeNodes::addNewInformation: Be responsible subfolder nodes



And increase the priority for those too. Fixes the case:

a.pro
 b.pri
   test
 c.pri

Right click on test and add new file. In that case b.pri should be the
node to which the file is added.

Task-number: QTCREATORBUG-12272
Change-Id: I54d144861bc06545db8e71ed33513a0df971dae2
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent ca3e082b
......@@ -1069,7 +1069,7 @@ bool QmakePriFileNode::renameFile(const QString &filePath, const QString &newFil
ProjectExplorer::FolderNode::AddNewInformation QmakePriFileNode::addNewInformation(const QStringList &files, Node *context) const
{
Q_UNUSED(files)
return ProjectExplorer::FolderNode::AddNewInformation(QFileInfo(path()).fileName(), context == this ? 120 : 90);
return ProjectExplorer::FolderNode::AddNewInformation(QFileInfo(path()).fileName(), context->projectNode() == this ? 120 : 90);
}
bool QmakePriFileNode::priFileWritable(const QString &path)
......@@ -1576,7 +1576,7 @@ bool QmakeProFileNode::showInSimpleTree() const
ProjectExplorer::FolderNode::AddNewInformation QmakeProFileNode::addNewInformation(const QStringList &files, Node *context) const
{
Q_UNUSED(files)
return AddNewInformation(QFileInfo(path()).fileName(), context == this ? 120 : 100);
return AddNewInformation(QFileInfo(path()).fileName(), context->projectNode() == this ? 120 : 100);
}
bool QmakeProFileNode::showInSimpleTree(QmakeProjectType projectType) const
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment