diff options
author | Albert Astals Cid <albert.astals@canonical.com> | 2017-02-16 16:38:49 +0100 |
---|---|---|
committer | Albert Astals Cid <albert.astals@canonical.com> | 2017-03-13 16:10:44 +0000 |
commit | b6e3fd8ced2ae3629b73b78bf436d1a3ac4bccda (patch) | |
tree | a5d91afe3cad874e595aa2b03abfe72b5a5984bd /src/gui/kernel | |
parent | d55e3bdced8efa69287c968a34fa37148a853f45 (diff) |
Remove QPlatformDrag::platformDropData
Its only uses were:
* Call it to just store it in QDragManager::QDragManager
* qnsview.mm calls it but since it knows it's a QCocoaDrag it can just call a function of that class directly
* qxcbdrag.cpp calls it but since it basically was calling itself can just use the class member directly
Change-Id: Ic7797c877d77f944a1212a7ea01173393bf903fe
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qdnd.cpp | 5 | ||||
-rw-r--r-- | src/gui/kernel/qdnd_p.h | 1 | ||||
-rw-r--r-- | src/gui/kernel/qplatformdrag.h | 1 | ||||
-rw-r--r-- | src/gui/kernel/qsimpledrag.cpp | 7 | ||||
-rw-r--r-- | src/gui/kernel/qsimpledrag_p.h | 1 |
5 files changed, 1 insertions, 14 deletions
diff --git a/src/gui/kernel/qdnd.cpp b/src/gui/kernel/qdnd.cpp index a59612474b..3af7f5c181 100644 --- a/src/gui/kernel/qdnd.cpp +++ b/src/gui/kernel/qdnd.cpp @@ -71,14 +71,11 @@ QDragManager *QDragManager::m_instance = 0; QDragManager::QDragManager() - : QObject(qApp), m_platformDropData(0), m_currentDropTarget(0), + : QObject(qApp), m_currentDropTarget(0), m_platformDrag(QGuiApplicationPrivate::platformIntegration()->drag()), m_object(0) { Q_ASSERT(!m_instance); - - if (m_platformDrag) - m_platformDropData = m_platformDrag->platformDropData(); } diff --git a/src/gui/kernel/qdnd_p.h b/src/gui/kernel/qdnd_p.h index 6f2ec46252..eaf6c74fd4 100644 --- a/src/gui/kernel/qdnd_p.h +++ b/src/gui/kernel/qdnd_p.h @@ -134,7 +134,6 @@ public: QObject *source() const; private: - QMimeData *m_platformDropData; QObject *m_currentDropTarget; QPlatformDrag *m_platformDrag; QDrag *m_object; diff --git a/src/gui/kernel/qplatformdrag.h b/src/gui/kernel/qplatformdrag.h index 560f984a5b..54e6a667fe 100644 --- a/src/gui/kernel/qplatformdrag.h +++ b/src/gui/kernel/qplatformdrag.h @@ -95,7 +95,6 @@ public: virtual ~QPlatformDrag(); QDrag *currentDrag() const; - virtual QMimeData *platformDropData() = 0; virtual Qt::DropAction drag(QDrag *m_drag) = 0; virtual void cancelDrag(); diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp index fc62273325..481971f21a 100644 --- a/src/gui/kernel/qsimpledrag.cpp +++ b/src/gui/kernel/qsimpledrag.cpp @@ -353,13 +353,6 @@ QSimpleDrag::QSimpleDrag() : m_current_window(0) { } -QMimeData *QSimpleDrag::platformDropData() -{ - if (drag()) - return drag()->mimeData(); - return 0; -} - void QSimpleDrag::startDrag() { QBasicDrag::startDrag(); diff --git a/src/gui/kernel/qsimpledrag_p.h b/src/gui/kernel/qsimpledrag_p.h index 0b8a0bc703..45c13e43b2 100644 --- a/src/gui/kernel/qsimpledrag_p.h +++ b/src/gui/kernel/qsimpledrag_p.h @@ -125,7 +125,6 @@ class Q_GUI_EXPORT QSimpleDrag : public QBasicDrag { public: QSimpleDrag(); - virtual QMimeData *platformDropData() Q_DECL_OVERRIDE; protected: virtual void startDrag() Q_DECL_OVERRIDE; |