diff options
author | Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com> | 2016-05-18 15:41:24 +0200 |
---|---|---|
committer | Jake Petroules <jake.petroules@qt.io> | 2016-06-14 17:23:38 +0000 |
commit | 58566686fcfceee1caeab88d0531816f4df49192 (patch) | |
tree | cfc322f296b7c1f6066cdb0e2760889132b5aa55 /src/plugins/platforms/cocoa/qcocoadrag.mm | |
parent | 197471beacf5589802cb91f1ceba59ed99cbb511 (diff) |
darwin: Add Foundation conversion functions for QSize/QSizeF
The fromCGPoint function was left out for QSize, as the foundation type is
using CGFloats internally. Clients should use an explicit QSizeF::toSize()
when potentially throwing away precision.
Change-Id: I12d43ae0881f09ad8d79f2caaa000c3983f4ef30
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa/qcocoadrag.mm')
-rw-r--r-- | src/plugins/platforms/cocoa/qcocoadrag.mm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoadrag.mm b/src/plugins/platforms/cocoa/qcocoadrag.mm index 872b97566f..1ebcde0584 100644 --- a/src/plugins/platforms/cocoa/qcocoadrag.mm +++ b/src/plugins/platforms/cocoa/qcocoadrag.mm @@ -128,7 +128,7 @@ Qt::DropAction QCocoaDrag::drag(QDrag *o) QPixmap pm = dragPixmap(m_drag, hotSpot); QSize pmDeviceIndependentSize = pm.size() / pm.devicePixelRatio(); NSImage *nsimage = qt_mac_create_nsimage(pm); - [nsimage setSize : qt_mac_toNSSize(pmDeviceIndependentSize)]; + [nsimage setSize:pmDeviceIndependentSize.toCGSize()]; QMacPasteboard dragBoard((CFStringRef) NSDragPboard, QMacInternalPasteboardMime::MIME_DND); m_drag->mimeData()->setData(QLatin1String("application/x-qt-mime-type-name"), QByteArray("dummy")); |