forked from qt-creator/qt-creator
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:
@@ -61,10 +61,10 @@ QStringList MakefileParserThread::includePaths() const
|
||||
return m_includePaths;
|
||||
}
|
||||
|
||||
QByteArray MakefileParserThread::defines() const
|
||||
ProjectExplorer::Macros MakefileParserThread::macros() const
|
||||
{
|
||||
QMutexLocker locker(&m_mutex);
|
||||
return m_defines;
|
||||
return m_macros;
|
||||
}
|
||||
|
||||
QStringList MakefileParserThread::cflags() const
|
||||
@@ -109,7 +109,7 @@ void MakefileParserThread::run()
|
||||
m_sources = m_parser.sources();
|
||||
m_makefiles = m_parser.makefiles();
|
||||
m_includePaths = m_parser.includePaths();
|
||||
m_defines = m_parser.defines();
|
||||
m_macros = m_parser.macros();
|
||||
m_cflags = m_parser.cflags();
|
||||
m_cxxflags = m_parser.cxxflags();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user