2022-08-19 15:59:36 +02:00
|
|
|
// Copyright (C) 2020 The Qt Company Ltd.
|
2022-12-21 10:12:09 +01:00
|
|
|
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
|
2020-09-16 13:44:43 +02:00
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include "googletest.h"
|
|
|
|
|
|
|
|
|
|
#include <imagecachestorageinterface.h>
|
|
|
|
|
|
|
|
|
|
class MockImageCacheStorage : public QmlDesigner::ImageCacheStorageInterface
|
|
|
|
|
{
|
|
|
|
|
public:
|
2021-01-13 13:23:46 +01:00
|
|
|
MOCK_METHOD(QmlDesigner::ImageCacheStorageInterface::ImageEntry,
|
2020-09-16 13:44:43 +02:00
|
|
|
fetchImage,
|
|
|
|
|
(Utils::SmallStringView name, Sqlite::TimeStamp minimumTimeStamp),
|
|
|
|
|
(const, override));
|
|
|
|
|
|
2023-01-25 10:11:18 +01:00
|
|
|
MOCK_METHOD(QmlDesigner::ImageCacheStorageInterface::ImageEntry,
|
|
|
|
|
fetchMidSizeImage,
|
|
|
|
|
(Utils::SmallStringView name, Sqlite::TimeStamp minimumTimeStamp),
|
|
|
|
|
(const, override));
|
|
|
|
|
|
2021-01-13 13:23:46 +01:00
|
|
|
MOCK_METHOD(QmlDesigner::ImageCacheStorageInterface::ImageEntry,
|
|
|
|
|
fetchSmallImage,
|
|
|
|
|
(Utils::SmallStringView name, Sqlite::TimeStamp minimumTimeStamp),
|
|
|
|
|
(const, override));
|
|
|
|
|
|
|
|
|
|
MOCK_METHOD(QmlDesigner::ImageCacheStorageInterface::IconEntry,
|
2020-09-16 13:44:43 +02:00
|
|
|
fetchIcon,
|
|
|
|
|
(Utils::SmallStringView name, Sqlite::TimeStamp minimumTimeStamp),
|
|
|
|
|
(const, override));
|
|
|
|
|
|
|
|
|
|
MOCK_METHOD(void,
|
|
|
|
|
storeImage,
|
2021-01-13 13:23:46 +01:00
|
|
|
(Utils::SmallStringView name,
|
|
|
|
|
Sqlite::TimeStamp newTimeStamp,
|
|
|
|
|
const QImage &image,
|
2023-01-25 10:11:18 +01:00
|
|
|
const QImage &midSizeImage,
|
2021-01-13 13:23:46 +01:00
|
|
|
const QImage &smallImage),
|
2020-09-16 13:44:43 +02:00
|
|
|
(override));
|
2021-01-13 13:23:46 +01:00
|
|
|
|
|
|
|
|
MOCK_METHOD(void,
|
|
|
|
|
storeIcon,
|
|
|
|
|
(Utils::SmallStringView name, Sqlite::TimeStamp newTimeStamp, const QIcon &icon),
|
|
|
|
|
(override));
|
|
|
|
|
|
2020-09-16 13:44:43 +02:00
|
|
|
MOCK_METHOD(void, walCheckpointFull, (), (override));
|
2021-12-28 11:32:47 +01:00
|
|
|
MOCK_METHOD(Sqlite::TimeStamp,
|
|
|
|
|
fetchModifiedImageTime,
|
|
|
|
|
(Utils::SmallStringView name),
|
|
|
|
|
(const, override));
|
2022-01-06 12:00:45 +01:00
|
|
|
MOCK_METHOD(bool, fetchHasImage, (Utils::SmallStringView name), (const, override));
|
2020-09-16 13:44:43 +02:00
|
|
|
};
|