From 6476ac738ca029af95932f53b53f0705808eb80e Mon Sep 17 00:00:00 2001 From: "Bradley T. Hughes" Date: Thu, 29 Sep 2011 11:50:08 +0200 Subject: Replace implicit QAtomic* casts with explicit load()/store() Change-Id: Ia7ef1a8e01001f203e409c710c977d6f4686342e Reviewed-by: Thiago Macieira --- src/gui/image/qimage.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/gui/image/qimage.cpp') diff --git a/src/gui/image/qimage.cpp b/src/gui/image/qimage.cpp index c74b715f8d..a19b608216 100644 --- a/src/gui/image/qimage.cpp +++ b/src/gui/image/qimage.cpp @@ -1075,10 +1075,10 @@ QImage::operator QVariant() const void QImage::detach() { if (d) { - if (d->is_cached && d->ref == 1) + if (d->is_cached && d->ref.load() == 1) QImagePixmapCleanupHooks::executeImageHooks(cacheKey()); - if (d->ref != 1 || d->ro_data) + if (d->ref.load() != 1 || d->ro_data) *this = copy(); if (d) @@ -5289,7 +5289,7 @@ qint64 QImage::cacheKey() const bool QImage::isDetached() const { - return d && d->ref == 1; + return d && d->ref.load() == 1; } @@ -5849,7 +5849,7 @@ bool QImageData::convertInPlace(QImage::Format newFormat, Qt::ImageConversionFla return true; // No in-place conversion if we have to detach - if (ref > 1) + if (ref.load() > 1) return false; const InPlace_Image_Converter *const converterPtr = &inplace_converter_map[format][newFormat]; -- cgit v1.2.3