Skip to content

Resource system fixes (misc)

Commits description

  • commit 1: add a log line when creating a database from scratch (because there is already a log line stating the database is up to date)
  • commit 2: ensure that tags will be only written to files ending with .tag and not .abr or .bundle
  • commit 3: speed up updateView() in tag selection widget
  • commit 4: fix saving tags on startup when there is no migration plan (by ensuring the path to resource folder is correct)
  • commit 5: add ORDER BY to KisTagModel query

Note for commit 4

NOTE: Setting of the resource ids happens only in setResourceIds() function, and updateView() assumes it's already done. This improves the performance even more (because every setResourcesFilter() invalidates the filter inside the model, which causes it to iterate and filter out incorrect rows again, while having the filter already done means that adding or removing on those resources will only add or remove some rows), but the performance imrpovements are only on doing repeated actions on the same set of resources. It can potentially make it a bit more error prone, hence the comment above the loop.

A possibility to make it still faster than before this commit, but less error prone: just set resources filter just before the loop, or set it to empty list and check for resource id being in the selected list manually in updateView().

Test Plan

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

Merge request reports

Loading