diff --git a/src/plugins/qt4projectmanager/qt4nodes.cpp b/src/plugins/qt4projectmanager/qt4nodes.cpp index f8e2f6d4f753da412632d221bcda99ccd07e7ef7..f1556eb5ff07d55190c5c0b335b068e2a61df2a3 100644 --- a/src/plugins/qt4projectmanager/qt4nodes.cpp +++ b/src/plugins/qt4projectmanager/qt4nodes.cpp @@ -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) + continue; const QString &relativeFilePath = priFileDir.relativeFilePath(filePath); proModel.insertItem(new ProValue(relativeFilePath, proVar), proModel.rowCount(varIndex), varIndex);