Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Tobias Hunger
qt-creator
Commits
ef5aaa03
Commit
ef5aaa03
authored
Jul 07, 2010
by
Roberto Raggi
Browse files
Renamed QmlJS::Document::documentRevision().
parent
d532180b
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/libs/qmljs/qmljsdocument.cpp
View file @
ef5aaa03
...
...
@@ -45,7 +45,7 @@ Document::Document(const QString &fileName)
,
_ast
(
0
)
,
_bind
(
0
)
,
_isQmlDocument
(
false
)
,
_
document
Revision
(
0
)
,
_
editor
Revision
(
0
)
,
_parsedCorrectly
(
false
)
,
_fileName
(
QDir
::
cleanPath
(
fileName
))
{
...
...
@@ -133,14 +133,14 @@ void Document::setSource(const QString &source)
_source
=
source
;
}
int
Document
::
document
Revision
()
const
int
Document
::
editor
Revision
()
const
{
return
_
document
Revision
;
return
_
editor
Revision
;
}
void
Document
::
set
Document
Revision
(
int
revision
)
void
Document
::
set
Editor
Revision
(
int
revision
)
{
_
document
Revision
=
revision
;
_
editor
Revision
=
revision
;
}
QString
Document
::
fileName
()
const
...
...
@@ -364,7 +364,7 @@ Document::Ptr Snapshot::documentFromSource(const QString &code,
Document
::
Ptr
newDoc
=
Document
::
create
(
fileName
);
if
(
Document
::
Ptr
thisDocument
=
document
(
fileName
))
{
newDoc
->
_
document
Revision
=
thisDocument
->
_
document
Revision
;
newDoc
->
_
editor
Revision
=
thisDocument
->
_
editor
Revision
;
}
newDoc
->
setSource
(
code
);
...
...
src/libs/qmljs/qmljsdocument.h
View file @
ef5aaa03
...
...
@@ -84,8 +84,8 @@ public:
Bind
*
bind
()
const
;
int
document
Revision
()
const
;
void
set
Document
Revision
(
int
documentR
evision
);
int
editor
Revision
()
const
;
void
set
Editor
Revision
(
int
r
evision
);
QString
fileName
()
const
;
QString
path
()
const
;
...
...
@@ -101,7 +101,7 @@ private:
AST
::
Node
*
_ast
;
Bind
*
_bind
;
bool
_isQmlDocument
;
int
_
document
Revision
;
int
_
editor
Revision
;
bool
_parsedCorrectly
;
QList
<
QmlJS
::
DiagnosticMessage
>
_diagnosticMessages
;
QString
_fileName
;
...
...
src/plugins/qmljseditor/qmljseditor.cpp
View file @
ef5aaa03
...
...
@@ -558,7 +558,7 @@ AST::Node *SemanticInfo::nodeUnderCursor(int pos) const
int
SemanticInfo
::
revision
()
const
{
if
(
document
)
return
document
->
document
Revision
();
return
document
->
editor
Revision
();
return
0
;
}
...
...
@@ -767,7 +767,7 @@ static void appendExtraSelectionsForMessages(
void
QmlJSTextEditor
::
onDocumentUpdated
(
QmlJS
::
Document
::
Ptr
doc
)
{
if
(
file
()
->
fileName
()
!=
doc
->
fileName
()
||
doc
->
document
Revision
()
!=
document
()
->
revision
())
{
||
doc
->
editor
Revision
()
!=
document
()
->
revision
())
{
// didn't get the currently open, or an up to date document.
// trigger a semantic rehighlight anyway, after a time
m_semanticRehighlightTimer
->
start
();
...
...
@@ -1468,7 +1468,7 @@ SemanticInfo SemanticHighlighter::semanticInfo(const Source &source)
if
(
!
doc
)
{
snapshot
=
source
.
snapshot
;
doc
=
snapshot
.
documentFromSource
(
source
.
code
,
source
.
fileName
);
doc
->
set
Document
Revision
(
source
.
revision
);
doc
->
set
Editor
Revision
(
source
.
revision
);
doc
->
parse
();
}
...
...
src/plugins/qmljseditor/qmljsmodelmanager.cpp
View file @
ef5aaa03
...
...
@@ -384,7 +384,7 @@ void ModelManager::parse(QFutureInterface<void> &future,
}
Document
::
Ptr
doc
=
Document
::
create
(
fileName
);
doc
->
set
Document
Revision
(
documentRevision
);
doc
->
set
Editor
Revision
(
documentRevision
);
doc
->
setSource
(
contents
);
doc
->
parse
();
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment