forked from qt-creator/qt-creator
QmlDesigner: Don't save null image for preview collector
Change-Id: I01ad1c12c25a734107b359461508c037a2f23bb2 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
@@ -113,12 +113,10 @@ TEST_F(AsynchronousImageFactory, RequestImageWithAuxiliaryDataRequestImageFromGe
|
||||
|
||||
TEST_F(AsynchronousImageFactory, DontRequestImageRequestImageFromGeneratorIfFileWasNotUpdated)
|
||||
{
|
||||
ON_CALL(mockStorage, fetchHasImage(Eq("/path/to/Component.qml"))).WillByDefault([&](auto) {
|
||||
ON_CALL(mockStorage, fetchModifiedImageTime(Eq("/path/to/Component.qml"))).WillByDefault([&](auto) {
|
||||
notification.notify();
|
||||
return true;
|
||||
return Sqlite::TimeStamp{124};
|
||||
});
|
||||
ON_CALL(mockStorage, fetchModifiedImageTime(Eq("/path/to/Component.qml")))
|
||||
.WillByDefault(Return(Sqlite::TimeStamp{124}));
|
||||
ON_CALL(mockTimeStampProvider, timeStamp(Eq("/path/to/Component.qml")))
|
||||
.WillByDefault(Return(Sqlite::TimeStamp{124}));
|
||||
|
||||
@@ -128,28 +126,6 @@ TEST_F(AsynchronousImageFactory, DontRequestImageRequestImageFromGeneratorIfFile
|
||||
notification.wait();
|
||||
}
|
||||
|
||||
TEST_F(AsynchronousImageFactory,
|
||||
RequestImageRequestImageFromGeneratorIfFileWasNotUpdatedButTheImageIsNull)
|
||||
{
|
||||
ON_CALL(mockStorage, fetchHasImage(Eq("/path/to/Component.qml"))).WillByDefault(Return(false));
|
||||
ON_CALL(mockStorage, fetchModifiedImageTime(Eq("/path/to/Component.qml")))
|
||||
.WillByDefault(Return(Sqlite::TimeStamp{124}));
|
||||
ON_CALL(mockTimeStampProvider, timeStamp(Eq("/path/to/Component.qml")))
|
||||
.WillByDefault(Return(Sqlite::TimeStamp{124}));
|
||||
|
||||
EXPECT_CALL(mockGenerator,
|
||||
generateImage(Eq("/path/to/Component.qml"),
|
||||
IsEmpty(),
|
||||
Eq(Sqlite::TimeStamp{124}),
|
||||
_,
|
||||
_,
|
||||
VariantWith<Utils::monostate>(Utils::monostate{})))
|
||||
.WillRepeatedly([&](auto, auto, auto, auto, auto, auto) { notification.notify(); });
|
||||
|
||||
factory.generate("/path/to/Component.qml");
|
||||
notification.wait();
|
||||
}
|
||||
|
||||
TEST_F(AsynchronousImageFactory, CleanRemovesEntries)
|
||||
{
|
||||
EXPECT_CALL(mockGenerator, generateImage(Eq("/path/to/Component1.qml"), _, _, _, _, _))
|
||||
|
||||
Reference in New Issue
Block a user