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>
This commit is contained in:
Andy Shaw 2013-04-17 14:29:49 +02:00 committed by The Qt Project
parent f78842abe4
commit d672ef0768

View File

@ -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;
}