QmlDesigner: Enable database sharing for image cache

Two creator can be started concurrently. This can lead to strange
behavior.

Change-Id: I0556905aba7d3a71d7b5e75daa954cb4c91b2a4f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
Marco Bubke
2021-06-01 11:45:34 +02:00
parent f913a65405
commit a19ff0550b

View File

@@ -66,7 +66,9 @@ class ImageCacheData
{
public:
Sqlite::Database database{Utils::PathString{
Core::ICore::cacheResourcePath("imagecache-v2.db").toString()}};
Core::ICore::cacheResourcePath("imagecache-v2.db").toString()},
Sqlite::JournalMode::Wal,
Sqlite::LockingMode::Normal};
ImageCacheStorage<Sqlite::Database> storage{database};
ImageCacheConnectionManager connectionManager;
ImageCacheCollector collector{connectionManager};