summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cpphighlightingsupportinternal.cpp
diff options
context:
space:
mode:
authorErik Verbruggen <erik.verbruggen@digia.com>2013-04-16 16:48:10 +0200
committerErik Verbruggen <erik.verbruggen@digia.com>2013-04-18 12:25:24 +0200
commit4b0f70f4c9d52574edc80dbff441a2a5fa1a7f80 (patch)
tree41ae389add1d6cb415a3ca7ebe47e6e64add4629 /src/plugins/cpptools/cpphighlightingsupportinternal.cpp
parent6a4310a44afc0396b462f9ac9f3524161155645a (diff)
downloadqt-creator-4b0f70f4c9d52574edc80dbff441a2a5fa1a7f80.tar.gz
C++: highlighter clean-ups
- Moved TextEditor::SemanticHighlighter::Result to TextEditor::HighlightingResult - Moved SemanticInfo::UseKind to CppHighlightingSupport::Kind Change-Id: I14faab1891ca691a0691cfd9243edf19fcd3d3df Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
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);
}