Commit Graph

8 Commits

Author SHA1 Message Date
Eike Ziller
80e0cb56ec Fix build with macOS deployment target < 10.14
As is used for the Qt 5 based prebuilt binaries.
std::optional is only fully supported out of the box since
10.14.

Change-Id: Ide8bd9ac8b66b05e1bb6e9b350edf3e7ffdaf97e
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-01-10 10:28:11 +00:00
Marco Bubke
b2e1bcc4e5 QmlDesigner: Add fetchHasImage to ImageCacheStorage
Change-Id: Ieb148abb02527bb84eda4f00af85a66d98731f03
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-06 14:36:19 +00:00
Marco Bubke
24087bd8b6 QmlDesigner: Add AsynchronousImageFactory
Task-number: QDS-5861
Change-Id: I3d938b3ddaa965da2105a326ea68f498dbb60fa0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-01-04 12:00:11 +00:00
Marco Bubke
d479047275 QmlDesigner: Use optional for ImageCache*
There are now matcher in google test for optional.

Change-Id: Ib3389fb0f537fd19a2930e7108483736bbba1628
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-01-04 12:00:04 +00:00
Marco Bubke
d4c6f06a63 Sqlite: Introduce BindParameterCount template parameter
The BindParameterCount is checked at compile time and then again for
the construction of the statement. So we provide an early error instead of
an some error later or even stranger behavior.

Change-Id: I860ca1f78645c222ae1accf5c7a469c77befc3bd
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-12-09 13:13:51 +00:00
Marco Bubke
7785a3a651 Sqlite: Move result count to class declaration
It move the magic number of column results to the sql statement
and improves the mock a little bit.

Change-Id: I101067444cf27ec5dea0c72de7fd484a7e8710f0
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-03-26 12:24:37 +00:00
Marco Bubke
7dc72c533e QmlDesigner: Improve imagecache
Instead of coding some arguments to extraId(state) we provide now a
std::variant there extra arguments can be saved. Because it's a
std::variant it can be easlily extended by new structs. There is a new
synchronous interface too. It has an extra method for QIcon which saves
icons in an extra table. It would be even nicer if we would have a
mipmap image too. So we could do it asynchonously too but so far it works
only in the main thread.

Task-number: QDS-3579
Fixes: QDS-3584
Change-Id: If368d84d82308a91a5f4f037021e749c9ef868ed
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2021-01-21 13:14:28 +00:00
Marco Bubke
d1b0c12d6b QmlDesigner: Add image cache
The image cache is saving images and icon of this images in a sqlite
database. If there are no images they are generated in the backgound.
The icons are fetched by item library.

Task-number: QDS-2782
Task-number: QDS-2783
Task-number: QDS-2858
Change-Id: I5a32cccfef7f8fd8eb78902605a09f5da18ce88e
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-10-16 10:01:21 +00:00