summaryrefslogtreecommitdiffstats
path: root/src/gui/painting/qcolortransform.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-10-02 16:17:45 +0200
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2020-10-16 01:07:45 +0200
commit56475926e686408acdb3d2db3dfa072c36d0c574 (patch)
tree672852e421d47b9326fb67c5a591be5238dc3fc5 /src/gui/painting/qcolortransform.cpp
parent35c565e965c02f530483fe93fa6241d57646f1aa (diff)
Port QColorTransform to QESDP
Remove the hand-rolled refcount management code, and cleanup the existing constructors. Change-Id: I1b91dbf888feff25d67310637d42dcdc3acaac13 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src/gui/painting/qcolortransform.cpp')
-rw-r--r--src/gui/painting/qcolortransform.cpp14
1 files changed, 3 insertions, 11 deletions
diff --git a/src/gui/painting/qcolortransform.cpp b/src/gui/painting/qcolortransform.cpp
index 10ccefed74..013abf769a 100644
--- a/src/gui/painting/qcolortransform.cpp
+++ b/src/gui/painting/qcolortransform.cpp
@@ -134,19 +134,11 @@ void QColorTransformPrivate::updateLutsOut() const
*/
-QColorTransform::QColorTransform(const QColorTransform &colorTransform) noexcept
- : d(colorTransform.d)
-{
- if (d)
- d->ref.ref();
-}
+QColorTransform::QColorTransform(const QColorTransform &colorTransform) noexcept = default;
+QColorTransform::~QColorTransform() = default;
-QColorTransform::~QColorTransform()
-{
- if (d && !d->ref.deref())
- delete d;
-}
+QT_DEFINE_QESDP_SPECIALIZATION_DTOR(QColorTransformPrivate)
/*!
Applies the color transformation on the QRgb value \a argb.