Clang: Move transactions to storage

We call the function anyway only isolated from other queries, so we can
move the transaction guards to the project storage.

Change-Id: I7cca26b25c2258856c68821671085c0a68044693
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
This commit is contained in:
Marco Bubke
2019-07-15 11:24:58 +02:00
parent 19580ab203
commit eadd37572a
3 changed files with 63 additions and 6 deletions

View File

@@ -183,12 +183,10 @@ void SymbolIndexer::updateChangedPath(FilePathId filePathId,
{
m_fileStatusCache.update(filePathId);
Sqlite::DeferredTransaction transaction{m_transactionInterface};
const Utils::optional<ProjectPartArtefact>
optionalArtefact = m_projectPartsStorage.fetchProjectPartArtefact(filePathId);
if (!optionalArtefact)
return;
transaction.commit();
ProjectPartId projectPartId = optionalArtefact->projectPartId;