CompilationDatabase: Speed up parsing project file

Avoid expensive indexOf and check for the exactly same flags
before applying the full filter.

Change-Id: I6936b2022a2b439aad7bf0a65280c3db16d00c34
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
This commit is contained in:
Ivan Donchevskii
2018-11-02 16:07:42 +01:00
parent 9b324aaccf
commit 0fabde31ab
4 changed files with 90 additions and 55 deletions

View File

@@ -38,6 +38,8 @@ class Macro;
namespace CompilationDatabaseProjectManager {
QStringList filterFromFileName(const QStringList &flags, QString baseName);
void filteredFlags(const QString &fileName,
const QString &workingDir,
QStringList &flags,