Commit 9ebba84b authored by Stian Sandvik Thomassen's avatar Stian Sandvik Thomassen
Browse files

Prevented project's existing .pro file from being added to project

A project's existing .pro file could be added to the project, making
the .pro file appear twice in the project tree. This is sub-optimal

1. It does not make sense for the .pro file to appear twice.
2. Qt Creator crashes when trying to remove either of the duplicate
.pro files.
parent d991ea23
......@@ -391,7 +391,10 @@ void Qt4PriFileNode::changeFiles(const FileType fileType,
const QModelIndex varIndex = root.child(row, 0);
const QString &proFilePath = includeFile->fileName();
foreach (const QString &filePath, filePaths) {
if (filePath == proFilePath)
const QString &relativeFilePath = priFileDir.relativeFilePath(filePath);
proModel.insertItem(new ProValue(relativeFilePath, proVar),
proModel.rowCount(varIndex), varIndex);
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