forked from qt-creator/qt-creator
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:
@@ -119,9 +119,9 @@ Document::~Document()
|
||||
delete _engine;
|
||||
}
|
||||
|
||||
Document::Ptr Document::create(const QString &fileName, Language language)
|
||||
Document::MutablePtr Document::create(const QString &fileName, Language language)
|
||||
{
|
||||
Document::Ptr doc(new Document(fileName, language));
|
||||
Document::MutablePtr doc(new Document(fileName, language));
|
||||
doc->_ptr = doc;
|
||||
return doc;
|
||||
}
|
||||
@@ -375,11 +375,11 @@ void Snapshot::remove(const QString &fileName)
|
||||
}
|
||||
}
|
||||
|
||||
Document::Ptr Snapshot::documentFromSource(const QString &code,
|
||||
const QString &fileName,
|
||||
Document::Language language) const
|
||||
Document::MutablePtr Snapshot::documentFromSource(
|
||||
const QString &code, const QString &fileName,
|
||||
Document::Language language) const
|
||||
{
|
||||
Document::Ptr newDoc = Document::create(fileName, language);
|
||||
Document::MutablePtr newDoc = Document::create(fileName, language);
|
||||
|
||||
if (Document::Ptr thisDocument = document(fileName)) {
|
||||
newDoc->_editorRevision = thisDocument->_editorRevision;
|
||||
|
Reference in New Issue
Block a user