Fix more synchronize database issues
- The most important: when the only thing that doesn't match is timestamp, DON'T CREATE A NEW VERSION, instead just update the version entry that exists in the database already. However I only fixed the fact that it tried to do that (which led to an assert), I haven't added the update of metainfo (thumbnails, name, timestamp etc.) yet.
- I fixed KisAslStorage and KisAbrStorage to only list resources for the given resource type
- I fixed looking into the database by storage id instead of storage type, because there might be multiple storages with the same storage type (especially true in case of bundles, asls, abrs).
Test Plan
Test it on the most dirty resource folder you have! :D Particularly encouraged is a folder with .abr inside, since I haven't tested it.
Formalities Checklist
-
I confirmed this builds. -
I confirmed Krita ran and the relevant functions work. -
I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!) -
I made sure my commits build individually and have good descriptions as per KDE guidelines. -
I made sure my code conforms to the standards set in the HACKING file. -
I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.
Edited by Agata Cacko