diff options
author | Sergio Martins <sergio.martins.qnx@kdab.com> | 2012-10-09 13:00:07 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2012-10-25 10:08:08 +0200 |
commit | 935f223440bd125ccbda380ea880486653e8b42e (patch) | |
tree | f9cb95c295fe533ba0531b66398c8e5a68f602de /src/plugins/platforms | |
parent | 9fc7fcb4c90f9fdc5bb3581609a1d5b01cfb7076 (diff) |
Add DnD support for QNX.
We only need DnD within the same application for now, so returning
a QSimpleDrag is enough.
Change-Id: I842d48f0252f8103fa8632dd3d149ae431658adb
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Diffstat (limited to 'src/plugins/platforms')
-rw-r--r-- | src/plugins/platforms/qnx/qqnxintegration.cpp | 17 | ||||
-rw-r--r-- | src/plugins/platforms/qnx/qqnxintegration.h | 11 |
2 files changed, 25 insertions, 3 deletions
diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp index a45c65db08..adb92741f9 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.cpp +++ b/src/plugins/platforms/qnx/qqnxintegration.cpp @@ -89,6 +89,8 @@ #include <QtGui/QOpenGLContext> #endif +#include <QtPlatformSupport/private/qsimpledrag_p.h> + #include <QtCore/QDebug> #include <QtCore/QHash> @@ -128,6 +130,9 @@ QQnxIntegration::QQnxIntegration() #if !defined(QT_NO_CLIPBOARD) , m_clipboard(0) #endif +#if !defined(QT_NO_DRAGANDDROP) + , m_drag(new QSimpleDrag()) +#endif { qIntegrationDebug() << Q_FUNC_INFO; // Open connection to QNX composition manager @@ -224,6 +229,11 @@ QQnxIntegration::~QQnxIntegration() qIntegrationDebug() << Q_FUNC_INFO << "platform plugin shutdown begin"; delete m_nativeInterface; +#if !defined(QT_NO_DRAGANDDROP) + // Destroy the drag object + delete m_drag; +#endif + #if defined(QQNX_PPS) // Destroy the hardware button notifier delete m_buttonsNotifier; @@ -364,6 +374,13 @@ QPlatformClipboard *QQnxIntegration::clipboard() const } #endif +#if !defined(QT_NO_DRAGANDDROP) +QPlatformDrag *QQnxIntegration::drag() const +{ + return m_drag; +} +#endif + QVariant QQnxIntegration::styleHint(QPlatformIntegration::StyleHint hint) const { qIntegrationDebug() << Q_FUNC_INFO; diff --git a/src/plugins/platforms/qnx/qqnxintegration.h b/src/plugins/platforms/qnx/qqnxintegration.h index acedda51c6..441e2c9d68 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.h +++ b/src/plugins/platforms/qnx/qqnxintegration.h @@ -62,6 +62,8 @@ class QQnxAbstractNavigator; class QQnxAbstractVirtualKeyboard; class QQnxServices; +class QSimpleDrag; + #if defined(QQNX_PPS) class QQnxInputContext; class QQnxNavigatorEventNotifier; @@ -105,7 +107,9 @@ public: #if !defined(QT_NO_CLIPBOARD) QPlatformClipboard *clipboard() const; #endif - +#if !defined(QT_NO_DRAGANDDROP) + QPlatformDrag *drag() const; +#endif QVariant styleHint(StyleHint hint) const; QPlatformServices *services() const; @@ -151,9 +155,10 @@ private: #if !defined(QT_NO_CLIPBOARD) mutable QQnxClipboard* m_clipboard; #endif - QQnxAbstractNavigator *m_navigator; - +#if !defined(QT_NO_DRAGANDDROP) + QSimpleDrag *m_drag; +#endif static QQnxWindowMapper ms_windowMapper; static QMutex ms_windowMapperMutex; |