diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-04-22 12:00:01 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-05-08 18:10:35 +0200 |
commit | 8481a9fc974a1f1dd44a9f82decb18fe2290689f (patch) | |
tree | c77ee86c162fc806a47392f77491ae7b387c682a /src/widgets/widgets/qwidgettextcontrol.cpp | |
parent | 7cb4c50e73cf611cf9e888013de7ae6f5ab481c7 (diff) |
QCocoaDrag - avoid using the deprecated API if possible
The -dragImage stopped to work in 10.14 first with change in behavior
documented and the new API (AppKit) proposed/advised. Then after
some update the old behavior was restored and D&D for multiple
URLs was working again without us having to change anything.
In 10.15 it's not working anymore and we have to properly fix
it and switch to the API advised. The new API is non-blocking,
but QCocoaDrag::drag is expected to be blocking so we have to
add a nested event loop to emulate the old behavior. Dragging
image is a bit problematic (the exception is thrown because
number of images (1) and number of items in NSPasteboard
are not equal): creating separate images for different
drag items looks really messy. So ... we use the same image
again and again with the same frame.
Fixes: QTBUG-71939
Change-Id: I02c2a10eab280cf4a55513adaf29c22fff934c01
Pick-to: 5.15
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/widgets/qwidgettextcontrol.cpp')
0 files changed, 0 insertions, 0 deletions