Clang: Improve dependency building

We want to use the cached values in the database because it is faster than
to parse the the files again.

Task-number: QTCREATORBUG-22035
Change-Id: I7ada7073887b1d89a06332fdb617701cb69ccd68
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
Marco Bubke
2019-02-25 19:07:19 +01:00
parent 776d54e435
commit 1a63297d9b
44 changed files with 713 additions and 548 deletions

View File

@@ -143,6 +143,7 @@ public:
const Sqlite::Column &projectPartIdColumn = table.addColumn("projectPartId", Sqlite::ColumnType::Integer);
const Sqlite::Column &sourceIdColumn = table.addColumn("sourceId", Sqlite::ColumnType::Integer);
table.addColumn("sourceType", Sqlite::ColumnType::Integer);
table.addColumn("pchCreationTimeStamp", Sqlite::ColumnType::Integer);
table.addUniqueIndex({sourceIdColumn, projectPartIdColumn});
table.addIndex({projectPartIdColumn});
@@ -168,11 +169,11 @@ public:
Sqlite::Table table;
table.setUseIfNotExists(true);
table.setName("fileStatuses");
table.addColumn("sourceId", Sqlite::ColumnType::Integer, Sqlite::Contraint::PrimaryKey);
table.addColumn("sourceId",
Sqlite::ColumnType::Integer,
Sqlite::Contraint::PrimaryKey);
table.addColumn("size", Sqlite::ColumnType::Integer);
table.addColumn("lastModified", Sqlite::ColumnType::Integer);
table.addColumn("buildDependencyTimeStamp", Sqlite::ColumnType::Integer);
table.addColumn("isInPrecompiledHeader", Sqlite::ColumnType::Integer);
table.initialize(database);
}