Change 939f21be53 introduced a crash when dragging data from
a 3rd party app into the app. Basically the current code assumed
that we always have QCocoaIntegration::instance()->drag()->currentDrag()
but this seems to only be the case if the drag was started by the
app itself.
The crash was found by testing the fridgemagnets example. Just
drag text from other app into the example to see it crash.
Also, refactored the cursor code into a separate method
to simplify code reading.
Change-Id: Ica611a4452a0dd02e01451111aeda14c879f8f1b
Reviewed-by: Filipe Azevedo <filipe.azevedo@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@theqtcompany.com>