forked from qt-creator/qt-creator
Clang: Minimize reindexing
We optimal indexer is only reindexing if the index would be changed. This patch is a step in that direction. We only reindex now if the file or project has changed. It fixes some typos too. Task-number: QTCREATORBUG-21150 Change-Id: I6ea1c13282fbcd70253b9b2939aed37580dbd160 Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
This commit is contained in:
@@ -177,6 +177,7 @@ public:
|
||||
Sqlite::Contraint::PrimaryKey);
|
||||
table.addColumn("size", Sqlite::ColumnType::Integer);
|
||||
table.addColumn("lastModified", Sqlite::ColumnType::Integer);
|
||||
table.addColumn("indexingTimeStamp", Sqlite::ColumnType::Integer);
|
||||
table.initialize(database);
|
||||
}
|
||||
|
||||
@@ -188,6 +189,7 @@ public:
|
||||
const Sqlite::Column &sourceIdColumn = table.addColumn("sourceId", Sqlite::ColumnType::Integer);
|
||||
const Sqlite::Column &dependencySourceIdColumn = table.addColumn("dependencySourceId", Sqlite::ColumnType::Integer);
|
||||
table.addIndex({sourceIdColumn, dependencySourceIdColumn});
|
||||
table.addIndex({dependencySourceIdColumn, sourceIdColumn});
|
||||
|
||||
table.initialize(database);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user