summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/cocoa/qmacmime.mm
diff options
context:
space:
mode:
authorAndy Shaw <andy.shaw@digia.com>2013-04-17 14:29:49 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-04-22 08:57:48 +0200
commitd672ef07681a959d9559dd1e11e70db1f448a7f1 (patch)
tree50a3d5256d456b5d1282708c05c2b9affaf620fd /src/plugins/platforms/cocoa/qmacmime.mm
parentf78842abe429dc9b42fd15dc8e9e842ab72dcf2b (diff)
Convert the CGImage into a QPixmap after reading from clipboard
Now that the relevant function is available we can do the conversion inside QMacPasteboardMimeTiff when obtaining an image from the clipboard Change-Id: Ie41b0fffedf4dd3f8ef49431482bd075a69722b1 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Diffstat (limited to 'src/plugins/platforms/cocoa/qmacmime.mm')
-rw-r--r--src/plugins/platforms/cocoa/qmacmime.mm6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/plugins/platforms/cocoa/qmacmime.mm b/src/plugins/platforms/cocoa/qmacmime.mm
index 89539de331..51c39357ea 100644
--- a/src/plugins/platforms/cocoa/qmacmime.mm
+++ b/src/plugins/platforms/cocoa/qmacmime.mm
@@ -553,10 +553,8 @@ QVariant QMacPasteboardMimeTiff::convertToMime(const QString &mime, QList<QByteA
a.size(), kCFAllocatorNull);
QCFType<CGImageSourceRef> imageSource = CGImageSourceCreateWithData(tiffData, 0);
image = CGImageSourceCreateImageAtIndex(imageSource, 0, 0);
-
- // ### TODO (msorvig) QPixmap conversion
- //if (image != 0)
- // ret = QVariant(QPixmap::fromMacCGImageRef(image).toImage());
+ if (image != 0)
+ ret = QVariant(qt_mac_toQImage(image));
return ret;
}