Introduced ranges and versioning of QML/JS documents.

This commit is contained in:
Roberto Raggi
2010-01-25 14:18:53 +01:00
parent fbdd4fbf49
commit c9efafcb98
7 changed files with 154 additions and 100 deletions

View File

@@ -43,8 +43,9 @@ Document::Document(const QString &fileName)
: _engine(0)
, _pool(0)
, _ast(0)
, _fileName(fileName)
, _documentRevision(0)
, _parsedCorrectly(false)
, _fileName(fileName)
{
const int slashIdx = fileName.lastIndexOf('/');
if (slashIdx != -1)
@@ -101,6 +102,16 @@ void Document::setSource(const QString &source)
_source = source;
}
int Document::documentRevision() const
{
return _documentRevision;
}
void Document::setDocumentRevision(int revision)
{
_documentRevision = revision;
}
bool Document::parseQml()
{
Q_ASSERT(! _engine);