forked from qt-creator/qt-creator
QmakeProjectManager: Do not keep an IDocument in QmakePriFile
Instead, we keep the IDocuments as "extra project files" in the Project
class, like the other project managers do it.
This has two advantages:
- The document is no longer created in a parser thread
callback, improving Qt Creator responsiveness while
loading a project.
- The IDocuments no longer get needlessly destroyed
and re-created on a re-parse.
This is relevant because adding these objects to the DocumentManager
results in the creation of file watchers, which is expensive.
Task-number: QTCREATORBUG-18533
Change-Id: I49c03377974e6b33340234dbabbbd82b8d0c827c
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
@@ -182,8 +182,6 @@ void QmakePriFile::finishInitialization(QmakeBuildSystem *buildSystem, QmakeProF
|
||||
QTC_ASSERT(buildSystem, return);
|
||||
m_buildSystem = buildSystem;
|
||||
m_qmakeProFile = qmakeProFile;
|
||||
m_priFileDocument = std::make_unique<QmakePriFileDocument>(this, filePath());
|
||||
Core::DocumentManager::addDocument(m_priFileDocument.get());
|
||||
}
|
||||
|
||||
FilePath QmakePriFile::filePath() const
|
||||
|
||||
Reference in New Issue
Block a user