D15053: Consistently use qreal in libs/pigment

Damien Caliste noreply at phabricator.kde.org
Fri Aug 24 10:51:58 BST 2018


dcaliste created this revision.
dcaliste added reviewers: leinir, danders, Calligra: 3.0.
dcaliste added a project: Calligra: 3.0.
Herald added a subscriber: Calligra-Devel-list.
dcaliste requested review of this revision.

REVISION SUMMARY
  On my ARM environment, qreal is interpreted as float, not double. Currently in libs/pigment, qreal is implicitly treated like a double, while writing something like qmax(v, 0.), where v is a qreal. 0. is a double and the compiler complains because there is no function using (float, double).
  
  There are also many conversions that are done between floats and doubles in KoColorSpace.cpp. So I've updated all necessary functions to accept qreal instead of double or float. As a result, the API has been changed. I've checked that it's still compiling on amd64 in addition to arm for instance but I'm not sure that I didn't break something in the plugins for instance.
  
  I would like to hear your review on this patch. If I'm creating some issues, I'm eager to try to solve them.

REPOSITORY
  R8 Calligra

REVISION DETAIL
  https://phabricator.kde.org/D15053

AFFECTED FILES
  libs/pigment/KoColorConversions.cpp
  libs/pigment/KoColorSpace.cpp
  libs/pigment/KoColorSpace.h
  libs/pigment/KoColorSpaceAbstract.h
  libs/pigment/KoColorSpaceTraits.h
  libs/pigment/colorprofiles/KoDummyColorProfile.cpp
  libs/pigment/colorprofiles/KoDummyColorProfile.h
  libs/pigment/colorspaces/KoAlphaColorSpace.h
  libs/pigment/colorspaces/KoLabColorSpace.cpp
  libs/pigment/colorspaces/KoLabColorSpace.h
  libs/pigment/colorspaces/KoRgbU16ColorSpace.cpp
  libs/pigment/colorspaces/KoRgbU16ColorSpace.h
  libs/pigment/colorspaces/KoRgbU8ColorSpace.cpp
  libs/pigment/colorspaces/KoRgbU8ColorSpace.h
  libs/pigment/colorspaces/KoSimpleColorSpace.h

To: dcaliste, leinir, danders, #calligra:_3.0
Cc: Calligra-Devel-list, cochise, vandenoever
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20180824/c1083e06/attachment.htm>


More information about the calligra-devel mailing list