Add a startDrag to QPlatformDrag
This can be used to initialize data when a drag starts. The Xdnd implementation at least has a need for it. Reviewed-by: Samuel
This commit is contained in:
parent
28391442e7
commit
92edbd2060
@ -473,7 +473,7 @@ Qt::DropAction QDragManager::drag(QDrag *o)
|
||||
oldstate = Qt::NoModifier; // #### Should use state that caused the drag
|
||||
// drag_mode = mode;
|
||||
|
||||
possible_actions = dragPrivate()->possible_actions;
|
||||
possible_actions = dragPrivate()->possible_actions;
|
||||
|
||||
willDrop = false;
|
||||
object->d_func()->target = 0;
|
||||
@ -487,6 +487,8 @@ Qt::DropAction QDragManager::drag(QDrag *o)
|
||||
#endif
|
||||
updatePixmap();
|
||||
|
||||
platformDrag->startDrag();
|
||||
|
||||
eventLoop = new QEventLoop;
|
||||
(void) eventLoop->exec();
|
||||
delete eventLoop;
|
||||
|
@ -56,6 +56,7 @@ public:
|
||||
|
||||
virtual QMimeData *platformDropData() = 0;
|
||||
|
||||
virtual void startDrag() {};
|
||||
virtual void move(const QMouseEvent *me) = 0;
|
||||
virtual void drop(const QMouseEvent *me) = 0;
|
||||
virtual void cancel() = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user