summaryrefslogtreecommitdiffstats
path: root/src/gui/image
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2019-07-12 10:33:07 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2019-07-23 19:07:56 +0200
commit181e96cae2db8ec0b87adc18db1c603bf41fc0ed (patch)
tree60b2a029a707ee08d84f6409cbf17cf8e6f08637 /src/gui/image
parentaa4470943d0fafb20c8e90d5f5a71369a990189a (diff)
Remove public d_func from QColorSpace
Replaced with getter in private. Change-Id: I968eb45052a80b45750213cf6a0c08b5973dfc4d Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Diffstat (limited to 'src/gui/image')
-rw-r--r--src/gui/image/qpnghandler.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/image/qpnghandler.cpp b/src/gui/image/qpnghandler.cpp
index cd1c1d5433..4b72888414 100644
--- a/src/gui/image/qpnghandler.cpp
+++ b/src/gui/image/qpnghandler.cpp
@@ -607,7 +607,8 @@ bool QPngHandlerPrivate::readPngHeader()
#endif
png_uint_32 profLen;
png_get_iCCP(png_ptr, info_ptr, &name, &compressionType, &profileData, &profLen);
- if (!QIcc::fromIccProfile(QByteArray::fromRawData((const char *)profileData, profLen), &colorSpace)) {
+ colorSpace = QColorSpace::fromIccProfile(QByteArray::fromRawData((const char *)profileData, profLen));
+ if (!colorSpace.isValid()) {
qWarning() << "QPngHandler: Failed to parse ICC profile";
} else {
colorSpaceState = Icc;
@@ -677,7 +678,7 @@ bool QPngHandlerPrivate::readPngImage(QImage *outImage)
// This configuration forces gamma correction and
// thus changes the output colorspace
png_set_gamma(png_ptr, 1.0f / gamma, fileGamma);
- QColorSpacePrivate *csPrivate = colorSpace.d_func();
+ QColorSpacePrivate *csPrivate = QColorSpacePrivate::getWritable(colorSpace);
csPrivate->transferFunction = QColorSpace::TransferFunction::Gamma;
csPrivate->gamma = gamma;
csPrivate->setTransferFunction();