Commit 5e035bd7 authored by Nikolai Kosjar's avatar Nikolai Kosjar

C++: Rename semanticRehighlight to recalculateSemanticInfoDetached

semanticRehighlight() does a bit more than only rehighlighting and we
want to trigger (only) rehighlighting in a follow-up change.

Change-Id: Ic8da9ec8643f0f82f7c99ef9a8180b2868194254
Reviewed-by: Orgad Shaneh's avatarOrgad Shaneh <orgads@gmail.com>
parent 7e08cca3
...@@ -162,9 +162,9 @@ void ClangEditorDocumentProcessor::run() ...@@ -162,9 +162,9 @@ void ClangEditorDocumentProcessor::run()
m_builtinProcessor.run(); m_builtinProcessor.run();
} }
void ClangEditorDocumentProcessor::semanticRehighlight(bool force) void ClangEditorDocumentProcessor::recalculateSemanticInfoDetached(bool force)
{ {
m_builtinProcessor.semanticRehighlight(force); m_builtinProcessor.recalculateSemanticInfoDetached(force);
} }
CppTools::SemanticInfo ClangEditorDocumentProcessor::recalculateSemanticInfo() CppTools::SemanticInfo ClangEditorDocumentProcessor::recalculateSemanticInfo()
......
...@@ -56,7 +56,7 @@ public: ...@@ -56,7 +56,7 @@ public:
// BaseEditorDocumentProcessor interface // BaseEditorDocumentProcessor interface
void run() override; void run() override;
void semanticRehighlight(bool force) override; void recalculateSemanticInfoDetached(bool force) override;
CppTools::SemanticInfo recalculateSemanticInfo() override; CppTools::SemanticInfo recalculateSemanticInfo() override;
CppTools::BaseEditorDocumentParser *parser() override; CppTools::BaseEditorDocumentParser *parser() override;
CPlusPlus::Snapshot snapshot() override; CPlusPlus::Snapshot snapshot() override;
......
...@@ -182,7 +182,7 @@ void CppEditorWidget::finalizeInitialization() ...@@ -182,7 +182,7 @@ void CppEditorWidget::finalizeInitialization()
connect(document(), SIGNAL(contentsChange(int,int,int)), connect(document(), SIGNAL(contentsChange(int,int,int)),
&d->m_localRenaming, SLOT(onContentsChangeOfEditorWidgetDocument(int,int,int))); &d->m_localRenaming, SLOT(onContentsChangeOfEditorWidgetDocument(int,int,int)));
connect(&d->m_localRenaming, &CppLocalRenaming::finished, [this] { connect(&d->m_localRenaming, &CppLocalRenaming::finished, [this] {
cppEditorDocument()->semanticRehighlight(); cppEditorDocument()->recalculateSemanticInfoDetached();
}); });
connect(&d->m_localRenaming, &CppLocalRenaming::processKeyPressNormally, connect(&d->m_localRenaming, &CppLocalRenaming::processKeyPressNormally,
this, &CppEditorWidget::processKeyNormally); this, &CppEditorWidget::processKeyNormally);
......
...@@ -130,11 +130,11 @@ TextEditor::CompletionAssistProvider *CppEditorDocument::completionAssistProvide ...@@ -130,11 +130,11 @@ TextEditor::CompletionAssistProvider *CppEditorDocument::completionAssistProvide
return m_completionAssistProvider; return m_completionAssistProvider;
} }
void CppEditorDocument::semanticRehighlight() void CppEditorDocument::recalculateSemanticInfoDetached()
{ {
CppTools::BaseEditorDocumentProcessor *p = processor(); CppTools::BaseEditorDocumentProcessor *p = processor();
QTC_ASSERT(p, return); QTC_ASSERT(p, return);
p->semanticRehighlight(true); p->recalculateSemanticInfoDetached(true);
} }
CppTools::SemanticInfo CppEditorDocument::recalculateSemanticInfo() CppTools::SemanticInfo CppEditorDocument::recalculateSemanticInfo()
......
...@@ -57,7 +57,7 @@ public: ...@@ -57,7 +57,7 @@ public:
bool isObjCEnabled() const; bool isObjCEnabled() const;
TextEditor::CompletionAssistProvider *completionAssistProvider() const override; TextEditor::CompletionAssistProvider *completionAssistProvider() const override;
void semanticRehighlight(); void recalculateSemanticInfoDetached();
CppTools::SemanticInfo recalculateSemanticInfo(); // TODO: Remove me CppTools::SemanticInfo recalculateSemanticInfo(); // TODO: Remove me
void setPreprocessorSettings(const CppTools::ProjectPart::Ptr &projectPart, void setPreprocessorSettings(const CppTools::ProjectPart::Ptr &projectPart,
......
...@@ -60,7 +60,7 @@ public: ...@@ -60,7 +60,7 @@ public:
// Function interface to implement // Function interface to implement
virtual void run() = 0; virtual void run() = 0;
virtual void semanticRehighlight(bool force) = 0; virtual void recalculateSemanticInfoDetached(bool force) = 0;
virtual CppTools::SemanticInfo recalculateSemanticInfo() = 0; virtual CppTools::SemanticInfo recalculateSemanticInfo() = 0;
virtual CPlusPlus::Snapshot snapshot() = 0; virtual CPlusPlus::Snapshot snapshot() = 0;
virtual BaseEditorDocumentParser *parser() = 0; virtual BaseEditorDocumentParser *parser() = 0;
......
...@@ -176,7 +176,7 @@ CPlusPlus::Snapshot BuiltinEditorDocumentProcessor::snapshot() ...@@ -176,7 +176,7 @@ CPlusPlus::Snapshot BuiltinEditorDocumentProcessor::snapshot()
return m_parser.snapshot(); return m_parser.snapshot();
} }
void BuiltinEditorDocumentProcessor::semanticRehighlight(bool force) void BuiltinEditorDocumentProcessor::recalculateSemanticInfoDetached(bool force)
{ {
const auto source = createSemanticInfoSource(force); const auto source = createSemanticInfoSource(force);
m_semanticInfoUpdater.updateDetached(source); m_semanticInfoUpdater.updateDetached(source);
......
...@@ -51,7 +51,7 @@ public: ...@@ -51,7 +51,7 @@ public:
// BaseEditorDocumentProcessor interface // BaseEditorDocumentProcessor interface
void run() override; void run() override;
void semanticRehighlight(bool force) override; void recalculateSemanticInfoDetached(bool force) override;
CppTools::SemanticInfo recalculateSemanticInfo() override; CppTools::SemanticInfo recalculateSemanticInfo() override;
BaseEditorDocumentParser *parser() override; BaseEditorDocumentParser *parser() override;
CPlusPlus::Snapshot snapshot() override; CPlusPlus::Snapshot snapshot() override;
......
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