Fix loading of fill layers in krita master
ClosedPublic

Authored by zachmann on Apr 27 2016, 4:59 PM.

Details

Reviewers
dkazakov
rempt
Group Reviewers
Krita
Summary

In krita master loading of fill layers always results in a black layer. 2.9.x is working correctly.

It seems that the saving of the fill layers writes out the files in the current locale thanks to QDomElement.
So for me the color of the fill layer is saved as:

<!DOCTYPE params>
<params version="1">
 <param type="color" name="color"><![CDATA[<!DOCTYPE color>
 <color>
  <RGB space="sRGB-elle-V2-g10.icc" g="0,5270923972129822" r="0,5271534323692322" b="6,103608757257462e-05"/>
  </color>
]]></param>
</params>

The behaviour of QString has been changed in this regard. In 4.8 it first tried the current locale and then C locale. In 5.x only the C locale is used to convert to double. Which results in all values being 0.
The attached patch fixes the problem by using available functions to convert the doubles.

Diff Detail

Repository
R37 Krita
Lint
Lint Skipped
Unit
Unit Tests Skipped
zachmann updated this revision to Diff 3545.Apr 27 2016, 4:59 PM
zachmann retitled this revision from to Fix loading of fill layers in krita master .
zachmann updated this object.
zachmann edited the test plan for this revision. (Show Details)
zachmann added reviewers: Krita, dkazakov, rempt.
zachmann set the repository for this revision to R37 Krita.
zachmann updated this object.
rempt accepted this revision.Apr 28 2016, 6:18 AM
rempt edited edge metadata.

Ship it!

This revision is now accepted and ready to land.Apr 28 2016, 6:18 AM
zachmann closed this revision.May 1 2016, 4:40 AM

Fix is committed