[krita] [Bug 446743] overwrite resource with different capitalization fails with "couldn't be opened as resource"

Halla Rempt bugzilla_noreply at kde.org
Mon Dec 13 16:20:36 GMT 2021


https://bugs.kde.org/show_bug.cgi?id=446743

--- Comment #6 from Halla Rempt <halla at valdyas.org> ---
Git commit 358bc9f1c0624a67565c0884120787140cfa7a9e by Halla Rempt, on behalf
of Dmitry Kazakov.
Committed on 13/12/2021 at 15:51.
Pushed by dkazakov into branch 'master'.

Add unittests for KisResourceLocator::importResource

The requirements the tests check are the following:

1) When 'override' flag is not set we will never succeed importing,
   even when the existing resource is exactly the same. It is needed
   to avoid confusion in the models that expect the resource to be
   **added** for real.

2) When override flag is set and the exactly the same resource (with the
   same filename case, and with the latest version) exists, then we return
   this resource.

3) Otherwise we remove all the versions of the existing resource and
   add the new one.
Related: bug 446588

M  +36   -0    libs/resources/KisResourceCacheDb.cpp
M  +2    -0    libs/resources/KisResourceCacheDb.h
M  +59   -39   libs/resources/KisResourceLocator.cpp
M  +30   -0    libs/resources/tests/TestBundleStorage.cpp
M  +1    -0    libs/resources/tests/TestBundleStorage.h
M  +28   -0    libs/resources/tests/TestFolderStorage.cpp
M  +1    -0    libs/resources/tests/TestFolderStorage.h
M  +93   -0    libs/resources/tests/TestResourceLocator.cpp
M  +1    -0    libs/resources/tests/TestResourceLocator.h

https://invent.kde.org/graphics/krita/commit/358bc9f1c0624a67565c0884120787140cfa7a9e

-- 
You are receiving this mail because:
You are watching all bug changes.



More information about the kde-mac mailing list