Details
-
Bug
-
Resolution: Incomplete
-
P1: Critical
-
None
-
6.3.0
-
None
Description
Reproduction steps:
- Drag n drop some files from the Finder to the application
- Once the files drop is acepted, initial a single drag within the application
- Qt crahes with
Terminating app due to uncaught exception 'NSGenericException', reason: 'There are 10 items on the pasteboard, but 1 drag images. There must be 1 draggingItem per pasteboardItem.
Note:
In
bool QCocoaDrag::maybeDragMultipleItems(){ ... // *** sometimes when qtUrls.size() is 1, the number of items in the cocoa paste // board is still the same as the previous drag from the OS. The condition below will leave this function, // and use the deprecated API `dragImage:at:offset:event:pasteboard:source:slideBack:` and cause an exception then crash. // // What I do to workaround this is to make the condition check below: // if (qtUrls.size() <= 1 && [dragBoard.pasteboardItems count] <= 1) // if (qtUrls.size() <= 1) { // Good old -dragImage: works perfectly for this ... return false; } ... }