summaryrefslogtreecommitdiff
path: root/src/tools
diff options
context:
space:
mode:
authorMarco Bubke <marco.bubke@qt.io>2019-07-25 15:30:46 +0200
committerMarco Bubke <marco.bubke@qt.io>2019-08-27 11:50:15 +0000
commitd086bbdc9a271ab265326e268d0da2b1428cc2e8 (patch)
tree7599c276627d8a1b9ab857e9265ef7fe23591242 /src/tools
parent578b70e998b5fa5a54bf3e4f8ddea230a63e7986 (diff)
downloadqt-creator-d086bbdc9a271ab265326e268d0da2b1428cc2e8.tar.gz
ClangPchManager: Fix transactions in precompiled header storage
Change-Id: Ia0333ef7110c97a42d73c70c33157849323fb34d Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/clangpchmanagerbackend/source/precompiledheaderstorage.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/tools/clangpchmanagerbackend/source/precompiledheaderstorage.h b/src/tools/clangpchmanagerbackend/source/precompiledheaderstorage.h
index 30b4c0e1df..a65ab803df 100644
--- a/src/tools/clangpchmanagerbackend/source/precompiledheaderstorage.h
+++ b/src/tools/clangpchmanagerbackend/source/precompiledheaderstorage.h
@@ -133,10 +133,11 @@ public:
auto value = fetchSystemPrecompiledHeaderPathStatement.template value<FilePath>(
projectPartId.projectPathId);
+ transaction.commit();
+
if (value)
return *value;
- transaction.commit();
} catch (const Sqlite::StatementIsBusy) {
return fetchSystemPrecompiledHeaderPath(projectPartId);
}
@@ -152,10 +153,11 @@ public:
auto value = fetchPrecompiledHeaderStatement.template value<FilePath>(
projectPartId.projectPathId);
+ transaction.commit();
+
if (value)
return *value;
- transaction.commit();
} catch (const Sqlite::StatementIsBusy) {
return fetchPrecompiledHeader(projectPartId);
}
@@ -171,10 +173,11 @@ public:
auto value = fetchPrecompiledHeadersStatement.template value<PchPaths, 2>(
projectPartId.projectPathId);
+ transaction.commit();
+
if (value)
return *value;
- transaction.commit();
} catch (const Sqlite::StatementIsBusy) {
return fetchPrecompiledHeaders(projectPartId);
}