summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/cpptools/cpphighlightingsupportinternal.cpp')
-rw-r--r--src/plugins/cpptools/cpphighlightingsupportinternal.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/plugins/cpptools/cpphighlightingsupportinternal.cpp b/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
index 44fcbeb279..ae39a0a076 100644
--- a/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
+++ b/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
@@ -49,22 +49,23 @@ CppHighlightingSupportInternal::~CppHighlightingSupportInternal()
{
}
-QFuture<CppHighlightingSupport::Use> CppHighlightingSupportInternal::highlightingFuture(
+QFuture<TextEditor::HighlightingResult> CppHighlightingSupportInternal::highlightingFuture(
const Document::Ptr &doc,
const Snapshot &snapshot) const
{
- QList<CheckSymbols::Use> macroUses;
+ typedef TextEditor::HighlightingResult Result;
+ QList<Result> macroUses;
- //Get macro definitions
+ // Get macro definitions
foreach (const CPlusPlus::Macro& macro, doc->definedMacros()) {
int line, column;
editor()->convertPosition(macro.offset(), &line, &column);
++column; //Highlighting starts at (column-1) --> compensate here
- CheckSymbols::Use use(line, column, macro.name().size(), SemanticInfo::MacroUse);
+ Result use(line, column, macro.name().size(), MacroUse);
macroUses.append(use);
}
- //Get macro uses
+ // Get macro uses
foreach (const Document::MacroUse &macro, doc->macroUses()) {
const QString name = QString::fromUtf8(macro.macro().name());
@@ -84,7 +85,7 @@ QFuture<CppHighlightingSupport::Use> CppHighlightingSupportInternal::highlightin
int line, column;
editor()->convertPosition(macro.begin(), &line, &column);
++column; //Highlighting starts at (column-1) --> compensate here
- CheckSymbols::Use use(line, column, name.size(), SemanticInfo::MacroUse);
+ Result use(line, column, name.size(), MacroUse);
macroUses.append(use);
}