forked from qt-creator/qt-creator
Clang: Add macro names the to project part
So we can compare later if the macro names have changed. Change-Id: I65c5f76e07fced8df6cc7282c03430adffcf5fa8 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -66,18 +66,20 @@ public:
|
||||
}
|
||||
|
||||
void insertOrUpdateProjectPart(Utils::SmallStringView projectPartName,
|
||||
const Utils::SmallStringVector &commandLineArguments) override
|
||||
const Utils::SmallStringVector &commandLineArguments,
|
||||
const Utils::SmallStringVector ¯oNames) override
|
||||
{
|
||||
m_statementFactory.database.setLastInsertedRowId(-1);
|
||||
|
||||
Utils::SmallString compilerArguementsAsJson = toJson(commandLineArguments);
|
||||
Utils::SmallString macroNamesAsJson = toJson(macroNames);
|
||||
|
||||
WriteStatement &insertStatement = m_statementFactory.insertProjectPartStatement;
|
||||
insertStatement.write(projectPartName, compilerArguementsAsJson);
|
||||
insertStatement.write(projectPartName, compilerArguementsAsJson, macroNamesAsJson);
|
||||
|
||||
if (m_statementFactory.database.lastInsertedRowId() == -1) {
|
||||
WriteStatement &updateStatement = m_statementFactory.updateProjectPartStatement;
|
||||
updateStatement.write(compilerArguementsAsJson, projectPartName);
|
||||
updateStatement.write(compilerArguementsAsJson, macroNamesAsJson, projectPartName);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user