Project: Remove Project::document() method

The document is used to do file watching, which may or may not be
ideal. So make sure we do not leak the information how we watch
files into the API and its users.

The method is not used sensibly anywhere in creator, so it seems
safe to remove it entirely.

Change-Id: Ieed755bd5c852875378e4e96665dc906499975b0
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
Tobias Hunger
2019-08-16 09:57:59 +02:00
parent 109a8b1829
commit d272a64eab
7 changed files with 12 additions and 39 deletions

View File

@@ -84,7 +84,7 @@ bool QmlProjectNode::renameFile(const QString & filePath, const QString & newFil
m_project->setMainFile(newFilePath);
// make sure to change it also in the qmlproject file
const QString qmlProjectFilePath = m_project->document()->filePath().toString();
const QString qmlProjectFilePath = m_project->projectFilePath().toString();
Core::FileChangeBlocker fileChangeBlocker(qmlProjectFilePath);
const QList<Core::IEditor *> editors = Core::DocumentModel::editorsForFilePath(qmlProjectFilePath);
TextEditor::TextDocument *document = nullptr;