diff options
author | Friedemann Kleint <Friedemann.Kleint@nokia.com> | 2012-02-22 10:58:28 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-29 20:10:30 +0100 |
commit | 3a72a1c7ed5adcdf3e473b50cc9c932e9290ee81 (patch) | |
tree | c9c6ab476e935c1141675382c051ef86e003440d /src/gui/kernel/qwindowsysteminterface_qpa.cpp | |
parent | 70784b9069fbd1c73eddbbfc83ffb44b2ca15854 (diff) |
Refactor the QPA dnd interface.
- Give QPlatformDrag a synchronous drag() function returning
the Qt::DropAction
- Move the base functionality for asynchronous event handling
to the platformsupport library as QBasicDrag (extendable base class
handling drag icon and providing new virtuals) and QSimpleDrag
(sample implementation for drag within the Qt application).
- Change the Windows implementation accordingly.
- Change XCB to be based on QBasicDrag.
- Clean up QDragManager.
Change-Id: I654f76f0e55a385ba189bd74f3ceaded6a8fe318
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Diffstat (limited to 'src/gui/kernel/qwindowsysteminterface_qpa.cpp')
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface_qpa.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp index 40a4ec07a6..5b77d97950 100644 --- a/src/gui/kernel/qwindowsysteminterface_qpa.cpp +++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp @@ -43,6 +43,7 @@ #include "private/qguiapplication_p.h" #include "private/qtouchdevice_p.h" #include <QAbstractEventDispatcher> +#include <QPlatformDrag> #include <qdebug.h> QT_BEGIN_NAMESPACE @@ -447,14 +448,14 @@ int QWindowSystemInterface::windowSystemEventsQueued() return QWindowSystemInterfacePrivate::windowSystemEventsQueued(); } -Qt::DropAction QWindowSystemInterface::handleDrag(QWindow *w, QMimeData *dropData, const QPoint &p) +QPlatformDragQtResponse QWindowSystemInterface::handleDrag(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions) { - return QGuiApplicationPrivate::processDrag(w, dropData, p); + return QGuiApplicationPrivate::processDrag(w, dropData, p,supportedActions); } -Qt::DropAction QWindowSystemInterface::handleDrop(QWindow *w, QMimeData *dropData, const QPoint &p) +QPlatformDropQtResponse QWindowSystemInterface::handleDrop(QWindow *w, const QMimeData *dropData, const QPoint &p, Qt::DropActions supportedActions) { - return QGuiApplicationPrivate::processDrop(w, dropData, p); + return QGuiApplicationPrivate::processDrop(w, dropData, p,supportedActions); } /*! |