From 4d0424b671a2cac8b1e8035f604ead9dbeae547b Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sat, 26 May 2012 12:12:22 +0200 Subject: [PATCH] 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 --- src/gui/kernel/qevent.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gui/kernel/qevent.cpp b/src/gui/kernel/qevent.cpp index 2181d06..d6928c9 100644 --- a/src/gui/kernel/qevent.cpp +++ b/src/gui/kernel/qevent.cpp @@ -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(); } -- 2.7.4