Ask the platform drag for the correct default drag action
This fixes a remaining feature regression from Qt 4.x, where the dragmanager also determined the default action for a drag given the set of supported actions and the keyboard modifiers. Task-number: QTBUG-25373 Change-Id: I80b23b135ba218eb5b7ccc692f12140477bc7809 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
This commit is contained in:
parent
a4ca3280c0
commit
4d0424b671
@ -42,6 +42,8 @@
|
||||
#include "qevent.h"
|
||||
#include "qcursor.h"
|
||||
#include "private/qguiapplication_p.h"
|
||||
#include "qpa/qplatformintegration.h"
|
||||
#include "qpa/qplatformdrag.h"
|
||||
#include "private/qevent_p.h"
|
||||
#include "private/qkeysequence_p.h"
|
||||
#include "qdebug.h"
|
||||
@ -2252,7 +2254,7 @@ QDropEvent::QDropEvent(const QPointF& pos, Qt::DropActions actions, const QMimeD
|
||||
modState(modifiers), act(actions),
|
||||
mdata(data)
|
||||
{
|
||||
default_action = Qt::CopyAction; // ### Qt5: QDragManager::self()->defaultAction(act, modifiers);
|
||||
default_action = QGuiApplicationPrivate::platformIntegration()->drag()->defaultAction(act, modifiers);
|
||||
drop_action = default_action;
|
||||
ignore();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user