QmlJS: Make Document::Ptr point to a const Document.

Change-Id: I15a36c3f918c0ee16f30bc8366df505e0afac949
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
This commit is contained in:
Christian Kamm
2011-11-03 13:47:03 +01:00
parent 86f0f93033
commit 386fc347d7
19 changed files with 41 additions and 35 deletions

View File

@@ -135,8 +135,9 @@ Document::Ptr QmlJSRefactoringFile::qmljsDocument() const
const QString name = fileName();
const Snapshot &snapshot = data()->m_snapshot;
m_qmljsDocument = snapshot.documentFromSource(source, name, languageOfFile(name));
m_qmljsDocument->parse();
Document::MutablePtr newDoc = snapshot.documentFromSource(source, name, languageOfFile(name));
newDoc->parse();
m_qmljsDocument = newDoc;
}
return m_qmljsDocument;