Simplify XML parsing code across several classes.
This merge request simplifies XML parsing code in KisDomUtils
,
KisFilterConfiguration
, KoDocumentInfo
, KisMimeData
, and
Schema::Private
. In a few cases, I added some simple error checking
or code style fixes if it seemed appropriate (if I was
already rewriting all the code around it).
This is essentially a continuation of MR !1804 (merged).
Test Plan
These patches don't implement any new functionality other than some
simple error checks in KoDocument::load{About,Author}Info()
and
Schema::Private::load()
. This doesn't seem to affect the unit tests
for me, but maybe those cases could be covered in the future.
I manually tested areas I think are relevant, including layer styles, legacy filter layers, PSD files, and document metadata. All of these worked normally for me.
However, I didn't have a KRA file with a legacy XML format filter layer, so I unzipped a modern one, edited the filter configuration, and rezipped it. This did work as expected, but it would be good to confirm I did things right.
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.
Reminder: the reviewer is responsible for merging the patch, this is to ensure at the least two people can build the patch. In case a patch breaks the build, both the author and the reviewer should be contacted to fix the build. If this is not possible, the commits shall be reverted, and a notification with the reasoning and any relevant logs shall be sent to the mailing list, kimageshop@kde.org.