Skip to content

Add optional failure indicator in `KisDomUtils` and `SvgUtil`

Lucid Sunlight requested to merge awakening/krita:dom-utils-ok into master

While looking into fixing bug 342302, I found a need to be able to tell if fill-opacity failed conversion or not, so the opacity wouldn't always revert to 0 if invalid value was passed.

Also updated SvgUtil::fromPercentage and SvgUtil::toPercentage docstrings while I was at it, as they were misleading.

Formalities Checklist

  • I confirmed this builds. (builds on current master and krita/4.3)
  • 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. (SvgUtil change depends on KisDomUtils change)
  • I made sure my commits 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 Lucid Sunlight

Merge request reports