summaryrefslogtreecommitdiffstats
path: root/src/printsupport/dialogs/qprintdialog_mac.mm
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@qt.io>2021-04-28 16:01:40 +0200
committerVolker Hilsheimer <volker.hilsheimer@qt.io>2021-05-01 06:35:42 +0200
commit808a6dedcb4aabcb81f096f03d0b1bb4ae2ea0d1 (patch)
treee6722e5a132d85ece78c7d42f746a88b2dd37cb9 /src/printsupport/dialogs/qprintdialog_mac.mm
parentb3f9c2b3d1312b51119b86f3930be5d531cb2817 (diff)
ItemViews: don't delete dragged items when a subclass accepted the move
Amends 0f1008a5936c903ca9448193df7df6117e2c617b, which introduced the dropEventMoved private data member through which the drop-site itemview can notify the drag-site that the drop handler has taken care of the move operation. However, if a subclass of an item view overrides dropEvent to move and accept the event before calling the default implementation, then the flag would not be set, as the dropOn helper would return false. So QAbstractItemView still removed the item, resulting in two items being removed when one was move-dropped. Set the dropEventMoved member also when the QTreeWidget::dropEvent handler is called by a subclass override and the event is already accepted. This way, overrides don't have to artifically set the accepted action to "IgnoreAction" to disable the handling in drag site. [ChangeLog][QtWidgets][QAbstractItemView] Classes overriding dropEvent for MoveAction events to move data can call accept() on the event before calling the superclass to prevent QAbstractItemView from deleting the source item. Task-number: QTBUG-87057 Task-number: QTBUG-77427 Pick-to: 6.1 Change-Id: Ibe75fc1b2ca60627c825ad9b9b6d48953577edec Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/printsupport/dialogs/qprintdialog_mac.mm')
0 files changed, 0 insertions, 0 deletions