summaryrefslogtreecommitdiff
path: root/src/plugins/cpptools/cppcompletionassist.cpp
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2017-02-07 15:00:38 +0100
committerMarco Bubke <marco.bubke@qt.io>2017-09-14 15:23:56 +0000
commitb6e12f4a1c2a8dbc7a672f0cf42ea76ece71b10d (patch)
tree81550e7fce5053ecb1ead60ddf59534d44517a87 /src/plugins/cpptools/cppcompletionassist.cpp
parent3adb71d45ebebd8c8fc2ec6beeb7a5ee67d64e4e (diff)
downloadqt-creator-b6e12f4a1c2a8dbc7a672f0cf42ea76ece71b10d.tar.gz
Convert macros from plain QByteArray to a vector of structs
The old code model expected the macros as C++ formatted text ("#define Foo 42) but newer targets like the Clang codemodel expect key value arguments like "-DFoo=42". So instead of parsing the text again and again we use an abstract data description. Task-number: QTCREATORBUG-17915 Change-Id: I0179fd13c48a581e91ee79bba9d42d501c26f19f Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Diffstat (limited to 'src/plugins/cpptools/cppcompletionassist.cpp')
-rw-r--r--src/plugins/cpptools/cppcompletionassist.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/cpptools/cppcompletionassist.cpp b/src/plugins/cpptools/cppcompletionassist.cpp
index 26b139e647..3e1c19399e 100644
--- a/src/plugins/cpptools/cppcompletionassist.cpp
+++ b/src/plugins/cpptools/cppcompletionassist.cpp
@@ -1902,7 +1902,7 @@ void InternalCppCompletionAssistProcessor::addMacros_helper(const Snapshot &snap
foreach (const Document::Include &i, doc->resolvedIncludes())
addMacros_helper(snapshot, i.resolvedFileName(), processed, definedMacros);
- foreach (const Macro &macro, doc->definedMacros()) {
+ foreach (const CPlusPlus::Macro &macro, doc->definedMacros()) {
const QString macroName = macro.nameToQString();
if (!macro.isHidden())
definedMacros->insert(macroName);