diff options
author | Marco Bubke <marco.bubke@qt.io> | 2019-07-25 15:30:46 +0200 |
---|---|---|
committer | Marco Bubke <marco.bubke@qt.io> | 2019-08-27 11:50:15 +0000 |
commit | d086bbdc9a271ab265326e268d0da2b1428cc2e8 (patch) | |
tree | 7599c276627d8a1b9ab857e9265ef7fe23591242 /src/tools | |
parent | 578b70e998b5fa5a54bf3e4f8ddea230a63e7986 (diff) | |
download | qt-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.h | 9 |
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); } |