diff options
author | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-07-10 13:35:11 +0200 |
---|---|---|
committer | Friedemann Kleint <Friedemann.Kleint@theqtcompany.com> | 2015-10-23 06:35:47 +0000 |
commit | 6f65ddbc217a8c82b091d31e88faf3dc23baa13b (patch) | |
tree | 8320cf82311bb06368fe64b7f0768d3604340be0 /src/gui/kernel/qplatformdrag.h | |
parent | 746fbbe03926b8741fefab846638c09603424063 (diff) |
Implement canceling of Qt-initiated drags.
- Add new virtual QPlatformDrag::cancelDrag()
[avoiding a conflict with existing QBasicDrag::cancel()]
- Implement on Windows by returning DRAGDROP_S_CANCEL
from IOleDropSource::QueryContinueDrag() as suggested on report.
- Implement in QBasicDrag by calling QBasicDrag::cancel()
and quitting the event loop.
- Add new API static void QDrag::cancel() for it.
Task-number: QTBUG-47004
Change-Id: I4b4bb52e5fc226c8e04688ac1b0f9550daaf918e
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Diffstat (limited to 'src/gui/kernel/qplatformdrag.h')
-rw-r--r-- | src/gui/kernel/qplatformdrag.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformdrag.h b/src/gui/kernel/qplatformdrag.h index 10ee88477f..72e28d2745 100644 --- a/src/gui/kernel/qplatformdrag.h +++ b/src/gui/kernel/qplatformdrag.h @@ -92,6 +92,7 @@ public: virtual QMimeData *platformDropData() = 0; virtual Qt::DropAction drag(QDrag *m_drag) = 0; + virtual void cancelDrag(); void updateAction(Qt::DropAction action); virtual Qt::DropAction defaultAction(Qt::DropActions possibleActions, Qt::KeyboardModifiers modifiers) const; |