summaryrefslogtreecommitdiffstats
path: root/src/gui/image/qpixmap_mac.cpp
diff options
context:
space:
mode:
authorJason Barron <jbarron@trolltech.com>2009-08-20 19:51:31 (GMT)
committerJason Barron <jbarron@trolltech.com>2009-08-20 19:51:31 (GMT)
commit1af6fc12def29e3f44dd7fcf5635c688902f29c8 (patch)
tree3731b65cb36ade6172ed47d27b47b4d358adc2a9 /src/gui/image/qpixmap_mac.cpp
parent0f42290719ebe6d930ba28fdf256e64d9c97be37 (diff)
downloadQt-1af6fc12def29e3f44dd7fcf5635c688902f29c8.zip
Qt-1af6fc12def29e3f44dd7fcf5635c688902f29c8.tar.gz
Qt-1af6fc12def29e3f44dd7fcf5635c688902f29c8.tar.bz2
Fix qpixmap*.cpp after latest QExplicitlySharedDataPointer changes.
static_cast'ing this pointer type is not possible. You must call data() or constData() to get the actual pointer to cast.
Diffstat (limited to 'src/gui/image/qpixmap_mac.cpp')
-rw-r--r--src/gui/image/qpixmap_mac.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/image/qpixmap_mac.cpp b/src/gui/image/qpixmap_mac.cpp
index 5959da1..d1ec3d8 100644
--- a/src/gui/image/qpixmap_mac.cpp
+++ b/src/gui/image/qpixmap_mac.cpp
@@ -73,12 +73,12 @@ static int qt_pixmap_serial = 0;
Q_GUI_EXPORT quint32 *qt_mac_pixmap_get_base(const QPixmap *pix)
{
- return static_cast<QMacPixmapData*>(pix->data)->pixels;
+ return static_cast<QMacPixmapData*>(pix->data.data())->pixels;
}
Q_GUI_EXPORT int qt_mac_pixmap_get_bytes_per_line(const QPixmap *pix)
{
- return static_cast<QMacPixmapData*>(pix->data)->bytesPerRow;
+ return static_cast<QMacPixmapData*>(pix->data.data())->bytesPerRow;
}
void qt_mac_cgimage_data_free(void *info, const void *memoryToFree, size_t)
@@ -421,7 +421,7 @@ QPixmap QMacPixmapData::alphaChannel() const
void QMacPixmapData::setAlphaChannel(const QPixmap &alpha)
{
has_mask = true;
- QMacPixmapData *alphaData = static_cast<QMacPixmapData*>(alpha.data);
+ QMacPixmapData *alphaData = static_cast<QMacPixmapData*>(alpha.data.data());
macSetAlphaChannel(alphaData, false);
}
@@ -449,7 +449,7 @@ void QMacPixmapData::setMask(const QBitmap &mask)
has_alpha = false;
has_mask = true;
- QMacPixmapData *maskData = static_cast<QMacPixmapData*>(mask.data);
+ QMacPixmapData *maskData = static_cast<QMacPixmapData*>(mask.data.data());
macSetAlphaChannel(maskData, true);
}
@@ -961,14 +961,14 @@ Qt::HANDLE QPixmap::macQDAlphaHandle() const
Qt::HANDLE QPixmap::macCGHandle() const
{
if (data->classId() == QPixmapData::MacClass) {
- QMacPixmapData *d = static_cast<QMacPixmapData *>(data);
+ QMacPixmapData *d = static_cast<QMacPixmapData *>(data.data());
if (!d->cg_data)
d->macCreateCGImageRef();
CGImageRef ret = d->cg_data;
CGImageRetain(ret);
return ret;
} else if (data->classId() == QPixmapData::RasterClass) {
- return qt_mac_image_to_cgimage(static_cast<QRasterPixmapData *>(data)->image);
+ return qt_mac_image_to_cgimage(static_cast<QRasterPixmapData *>(data.data())->image);
}
return 0;
}
@@ -980,7 +980,7 @@ bool QMacPixmapData::hasAlphaChannel() const
CGImageRef qt_mac_create_imagemask(const QPixmap &pixmap, const QRectF &sr)
{
- QMacPixmapData *px = static_cast<QMacPixmapData*>(pixmap.data);
+ QMacPixmapData *px = static_cast<QMacPixmapData*>(pixmap.data.data());
if (px->cg_mask) {
if (px->cg_mask_rect == sr) {
CGImageRetain(px->cg_mask); //reference for the caller
@@ -1106,7 +1106,7 @@ void QMacPixmapData::copy(const QPixmapData *data, const QRect &rect)
return;
}
- const QMacPixmapData *macData = static_cast<const QMacPixmapData*>(data);
+ const QMacPixmapData *macData = static_cast<const QMacPixmapData*>(data.constData());
resize(rect.width(), rect.height());