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>
This commit is contained in:
Marco Bubke
2017-02-07 15:00:38 +01:00
parent 3adb71d45e
commit b6e12f4a1c
60 changed files with 1144 additions and 420 deletions

View File

@@ -31,6 +31,7 @@
#include "projectpartheaderpath.h"
#include <projectexplorer/projectexplorer_global.h>
#include <projectexplorer/projectmacro.h>
#include <coreplugin/id.h>
@@ -118,7 +119,7 @@ public:
QStringList precompiledHeaders;
ProjectPartHeaderPaths headerPaths;
QByteArray projectDefines;
ProjectExplorer::Macros projectMacros;
LanguageVersion languageVersion = LatestCxxVersion;
LanguageExtensions languageExtensions = NoExtensions;
@@ -130,7 +131,7 @@ public:
Core::Id toolchainType;
bool isMsvc2015Toolchain = false;
QByteArray toolchainDefines;
ProjectExplorer::Macros toolChainMacros;
ToolChainWordWidth toolChainWordWidth = WordWidth32Bit;
QString toolChainTargetTriple;
};