From b6e12f4a1c2a8dbc7a672f0cf42ea76ece71b10d Mon Sep 17 00:00:00 2001 From: Marco Bubke Date: Tue, 7 Feb 2017 15:00:38 +0100 Subject: 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 --- src/plugins/cpptools/builtineditordocumentparser.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/plugins/cpptools/builtineditordocumentparser.cpp') diff --git a/src/plugins/cpptools/builtineditordocumentparser.cpp b/src/plugins/cpptools/builtineditordocumentparser.cpp index ac3cf3ee2a..3fb407cb2d 100644 --- a/src/plugins/cpptools/builtineditordocumentparser.cpp +++ b/src/plugins/cpptools/builtineditordocumentparser.cpp @@ -26,6 +26,7 @@ #include "builtineditordocumentparser.h" #include "cppsourceprocessor.h" +#include #include #include @@ -91,9 +92,9 @@ void BuiltinEditorDocumentParser::updateImpl(const QFutureInterface &futur } if (const ProjectPart::Ptr part = baseState.projectPartInfo.projectPart) { - configFile += part->toolchainDefines; + configFile += ProjectExplorer::Macro::toByteArray(part->toolChainMacros); configFile += overwrittenToolchainDefines(*part.data()); - configFile += part->projectDefines; + configFile += ProjectExplorer::Macro::toByteArray(part->projectMacros); if (!part->projectConfigFile.isEmpty()) configFile += ProjectPart::readProjectConfigFile(part); headerPaths = part->headerPaths; -- cgit v1.2.1