QmlJSEditor: Rename documentRevision() to editorRevision()

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

Reviewed-by: Roberto Raggi
This commit is contained in:
Kai Koehne
2010-07-13 10:45:20 +02:00
parent d34c336819
commit 2bafdb71a2
4 changed files with 6 additions and 6 deletions

View File

@@ -685,14 +685,14 @@ SemanticInfo QmlJSTextEditor::semanticInfo() const
return m_semanticInfo;
}
int QmlJSTextEditor::documentRevision() const
int QmlJSTextEditor::editorRevision() const
{
return document()->revision();
}
bool QmlJSTextEditor::isOutdated() const
{
if (m_semanticInfo.revision() != documentRevision())
if (m_semanticInfo.revision() != editorRevision())
return true;
return false;
@@ -835,7 +835,7 @@ void QmlJSTextEditor::updateMethodBoxIndex()
if (!m_semanticInfo.document)
return;
if (m_semanticInfo.document->editorRevision() != documentRevision()) {
if (m_semanticInfo.document->editorRevision() != editorRevision()) {
m_updateMethodBoxTimer->start();
return;
}

View File

@@ -213,7 +213,7 @@ public:
virtual void unCommentSelection();
SemanticInfo semanticInfo() const;
int documentRevision() const;
int editorRevision() const;
bool isOutdated() const;
QmlOutlineModel *outlineModel() const;

View File

@@ -251,7 +251,7 @@ void QmlJSEditorPlugin::quickFixNow()
if (QmlJSTextEditor *editor = qobject_cast<QmlJSTextEditor*>(m_currentTextEditable->widget())) {
if (currentEditor == editor) {
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);
m_quickFixTimer->stop();
} else {

View File

@@ -126,7 +126,7 @@ void HoverHandler::updateHelpIdAndTooltip(TextEditor::ITextEditor *editor, int p
const SemanticInfo semanticInfo = edit->semanticInfo();
if (semanticInfo.revision() != edit->documentRevision())
if (semanticInfo.revision() != edit->editorRevision())
return;
const Snapshot snapshot = semanticInfo.snapshot;