diff options
author | Samuel Rødal <samuel.rodal@digia.com> | 2013-05-23 12:44:20 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-30 12:49:51 +0200 |
commit | 1df7a6a50a794721edb1bc63d268378f4f0ed7c4 (patch) | |
tree | e20fad557bfd4a3f65f41c5b5a50633a074178da /src/gui/kernel/qplatformintegration.cpp | |
parent | 853a0b764e08d5f910072b6f3fd3ff3f9dc5c0c4 (diff) |
Move QBasicDrag and QSimpleDrag to QtGui.
These are useful as default implementations of
QPlatformIntegration::drag(), instead of having it return 0 which will
lead to crashes in Qt Quick 2 and widgets applications that use drag
and drop.
Task-number: QTBUG-31288
Change-Id: I70efa139306ced5d879def0f74e3a72d3bcd64f7
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Diffstat (limited to 'src/gui/kernel/qplatformintegration.cpp')
-rw-r--r-- | src/gui/kernel/qplatformintegration.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/gui/kernel/qplatformintegration.cpp b/src/gui/kernel/qplatformintegration.cpp index e82e30df80..e4f45ebb6e 100644 --- a/src/gui/kernel/qplatformintegration.cpp +++ b/src/gui/kernel/qplatformintegration.cpp @@ -49,6 +49,7 @@ #include <QtGui/private/qpixmap_raster_p.h> #include <qpa/qplatformscreen_p.h> #include <private/qdnd_p.h> +#include <private/qsimpledrag_p.h> QT_BEGIN_NAMESPACE @@ -99,7 +100,11 @@ QPlatformClipboard *QPlatformIntegration::clipboard() const */ QPlatformDrag *QPlatformIntegration::drag() const { - return 0; + static QSimpleDrag *drag = 0; + if (!drag) { + drag = new QSimpleDrag; + } + return drag; } #endif |