Commit 2bafdb71 authored by Kai Koehne's avatar Kai Koehne
Browse files

QmlJSEditor: Rename documentRevision() to editorRevision()

In line with QmlJS::Document::editorRevision() and
CPPEditor::editorRevision()

Reviewed-by: Roberto Raggi
parent d34c3368
...@@ -685,14 +685,14 @@ SemanticInfo QmlJSTextEditor::semanticInfo() const ...@@ -685,14 +685,14 @@ SemanticInfo QmlJSTextEditor::semanticInfo() const
return m_semanticInfo; return m_semanticInfo;
} }
int QmlJSTextEditor::documentRevision() const int QmlJSTextEditor::editorRevision() const
{ {
return document()->revision(); return document()->revision();
} }
bool QmlJSTextEditor::isOutdated() const bool QmlJSTextEditor::isOutdated() const
{ {
if (m_semanticInfo.revision() != documentRevision()) if (m_semanticInfo.revision() != editorRevision())
return true; return true;
return false; return false;
...@@ -835,7 +835,7 @@ void QmlJSTextEditor::updateMethodBoxIndex() ...@@ -835,7 +835,7 @@ void QmlJSTextEditor::updateMethodBoxIndex()
if (!m_semanticInfo.document) if (!m_semanticInfo.document)
return; return;
if (m_semanticInfo.document->editorRevision() != documentRevision()) { if (m_semanticInfo.document->editorRevision() != editorRevision()) {
m_updateMethodBoxTimer->start(); m_updateMethodBoxTimer->start();
return; return;
} }
......
...@@ -213,7 +213,7 @@ public: ...@@ -213,7 +213,7 @@ public:
virtual void unCommentSelection(); virtual void unCommentSelection();
SemanticInfo semanticInfo() const; SemanticInfo semanticInfo() const;
int documentRevision() const; int editorRevision() const;
bool isOutdated() const; bool isOutdated() const;
QmlOutlineModel *outlineModel() const; QmlOutlineModel *outlineModel() const;
......
...@@ -251,7 +251,7 @@ void QmlJSEditorPlugin::quickFixNow() ...@@ -251,7 +251,7 @@ void QmlJSEditorPlugin::quickFixNow()
if (QmlJSTextEditor *editor = qobject_cast<QmlJSTextEditor*>(m_currentTextEditable->widget())) { if (QmlJSTextEditor *editor = qobject_cast<QmlJSTextEditor*>(m_currentTextEditable->widget())) {
if (currentEditor == editor) { if (currentEditor == editor) {
if (editor->isOutdated()) { if (editor->isOutdated()) {
// qDebug() << "TODO: outdated document" << editor->documentRevision() << editor->semanticInfo().revision(); // qDebug() << "TODO: outdated document" << editor->editorRevision() << editor->semanticInfo().revision();
// ### FIXME: m_quickFixTimer->start(QUICKFIX_INTERVAL); // ### FIXME: m_quickFixTimer->start(QUICKFIX_INTERVAL);
m_quickFixTimer->stop(); m_quickFixTimer->stop();
} else { } else {
......
...@@ -126,7 +126,7 @@ void HoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, int p ...@@ -126,7 +126,7 @@ void HoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, int p
const SemanticInfo semanticInfo = edit->semanticInfo(); const SemanticInfo semanticInfo = edit->semanticInfo();
if (semanticInfo.revision() != edit->documentRevision()) if (semanticInfo.revision() != edit->editorRevision())
return; return;
const Snapshot snapshot = semanticInfo.snapshot; const Snapshot snapshot = semanticInfo.snapshot;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment