diff options
author | Andre de la Rocha <andre.rocha@qt.io> | 2017-08-28 15:34:05 +0200 |
---|---|---|
committer | Andre de la Rocha <andre.rocha@qt.io> | 2017-09-05 08:22:45 +0000 |
commit | a2a5b7a697a90c5821ee675c943481bf0631aeba (patch) | |
tree | ef28b53a5ead5687d0b4cf514e42ecce9de0d667 /src/plugins/platforms/windows/qwindowsdrag.cpp | |
parent | 54c3ab7a1018ee2e5c1767d233e1c1d9e42425c7 (diff) |
Windows: Make dropped files be opened or attached
Adds QWindowsDropDataObject as a QWindowsOleDataObject subclass
specialized for handling Drag & Drop, which only allows "text/uri-list"
data to be exported as CF_HDROP, to allow files dragged from
Qt applications and dropped into other applications to be recognized as
attachments or opened. Otherwise, files would be imported as URLs and
inserted as local hyperlinks.
[ChangeLog][Important Behavior Changes][Windows] On Windows, a drag
& drop operation of local files URIs, like QListView items backed by a
QFileSystemModel, will result in the attachment or opening of the files
by the target application, instead of the creation of hyperlinks.
Task-number: QTBUG-62662
Change-Id: I51efa4a56574b5e5fb3ee736ede14b5da24caac4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'src/plugins/platforms/windows/qwindowsdrag.cpp')
-rw-r--r-- | src/plugins/platforms/windows/qwindowsdrag.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/plugins/platforms/windows/qwindowsdrag.cpp b/src/plugins/platforms/windows/qwindowsdrag.cpp index 857db7a65c..aa6454ef63 100644 --- a/src/plugins/platforms/windows/qwindowsdrag.cpp +++ b/src/plugins/platforms/windows/qwindowsdrag.cpp @@ -44,7 +44,7 @@ # include "qwindowsclipboard.h" #endif #include "qwindowsintegration.h" -#include "qwindowsole.h" +#include "qwindowsdropdataobject.h" #include <QtCore/qt_windows.h> #include "qwindowswindow.h" #include "qwindowsmousehandler.h" @@ -673,7 +673,7 @@ Qt::DropAction QWindowsDrag::drag(QDrag *drag) QWindowsDrag::m_canceled = false; QWindowsOleDropSource *windowDropSource = new QWindowsOleDropSource(this); windowDropSource->createCursors(); - QWindowsOleDataObject *dropDataObject = new QWindowsOleDataObject(dropData); + QWindowsDropDataObject *dropDataObject = new QWindowsDropDataObject(dropData); const Qt::DropActions possibleActions = drag->supportedActions(); const DWORD allowedEffects = translateToWinDragEffects(possibleActions); qCDebug(lcQpaMime) << '>' << __FUNCTION__ << "possible Actions=0x" |