ProjectExplorer: Follow up on too-much-magic in IProjectManager

Use a ProjectManager::registerProjectType<Project>(MimeType) function,
removing cryptic IProjectManager object ownership.

Change-Id: I212cd25bd4ee757022a8cb0decb4b8de3a112d12
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
hjk
2017-03-03 18:16:34 +01:00
parent 57144e28da
commit c1bfc5d8ec
54 changed files with 152 additions and 532 deletions

View File

@@ -116,8 +116,8 @@ private:
// QbsProject:
// --------------------------------------------------------------------
QbsProject::QbsProject(const QString &fileName) :
m_projectName(QFileInfo(fileName).completeBaseName()),
QbsProject::QbsProject(const FileName &fileName) :
m_projectName(fileName.toFileInfo().completeBaseName()),
m_qbsProjectParser(0),
m_qbsUpdateFutureInterface(0),
m_parsingScheduled(false),
@@ -766,7 +766,7 @@ void QbsProject::updateDocuments(const QSet<QString> &files)
}
QSet<IDocument *> toAdd;
foreach (const QString &f, filesToAdd)
toAdd.insert(new QbsProjectFile(this, f));
toAdd.insert(new QbsProjectFile(this, FileName::fromString(f)));
DocumentManager::addDocuments(toAdd.toList());
m_qbsDocuments.unite(toAdd);