diff options
author | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-09-21 13:38:02 +0200 |
---|---|---|
committer | Timur Pocheptsov <timur.pocheptsov@qt.io> | 2020-09-21 15:02:40 +0200 |
commit | b8a03411784803c07ecc1f769860756d6fdc04cd (patch) | |
tree | 9ef819441b764206586fb518ca4cb07263a0aeb4 /src/plugins/platforms/cocoa | |
parent | f91531a056740c2e3a9b2ead8cd6c3456d7cb99f (diff) |
QCocoaDrag::maybeDragMultipleItems - fix erroneous size check
Due to somewhat inverted logic introduced by the 8481a9fc974a1f1dd44a,
testing number of items in a pasteboard happens _before_ we fill it,
which is wrong and useless. As a result, maybeDragMultipleItems will
prevent the single item drag.
Pick-to: 5.15
Task-number: QTCREATORBUG-24665
Task-number: QTBUG-86786
Change-Id: Ia4be9fc56677575bb363cbb8b1adbea59e6c3b0b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/cocoa')
-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 a27f8aaf87..d56f30b063 100644 --- a/src/plugins/platforms/cocoa/qcocoadrag.mm +++ b/src/plugins/platforms/cocoa/qcocoadrag.mm @@ -186,7 +186,7 @@ bool QCocoaDrag::maybeDragMultipleItems() const auto &qtUrls = m_drag->mimeData()->urls(); NSPasteboard *dragBoard = [NSPasteboard pasteboardWithName:NSPasteboardNameDrag]; - if (int(dragBoard.pasteboardItems.count) == 1 && qtUrls.size() <= 1) { + if (qtUrls.size() <= 1) { // Good old -dragImage: works perfectly for this ... return false; } |