Native drag implementation on Mac
authorJames Turner <james.turner@kdab.com>
Wed, 20 Jun 2012 13:01:56 +0000 (15:01 +0200)
committerQt by Nokia <qt-info@nokia.com>
Wed, 4 Jul 2012 16:00:41 +0000 (18:00 +0200)
commit76b1df303237c1bd37e4b822f44686980e66b73f
tree46dcd5ef12228319ec9ee394dde08b977b7a35ea
parenta8fb38f230da9a7afc3dbace6fa45c33dc58b4a6
Native drag implementation on Mac

Create a native implementation of QCocoaDrag, using the 10.6 (and earlier) Cocoa
dragging API. This matches the implementation in Qt4 closely for the moment.
In the future it may be desirable to create an alternative implementation using
the new (non-blocking) drag API introduced in 10.7, but that will require deeper
changes to the mime-data handling.

This changes makes one more method on QPlatformDrag virtual, since the
Cocoa behaviour diverges from the base version: ::defaultAction is customised.

Change-Id: I1843293a62b2b4973a07b5e75ea3c312dc064018
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
src/gui/kernel/qplatformdrag.h
src/plugins/platforms/cocoa/qcocoadrag.h
src/plugins/platforms/cocoa/qcocoadrag.mm
src/plugins/platforms/cocoa/qcocoahelpers.mm
src/plugins/platforms/cocoa/qnsview.mm