diff options
author | David Faure <david.faure@kdab.com> | 2014-11-05 16:53:46 +0100 |
---|---|---|
committer | David Faure <david.faure@kdab.com> | 2014-11-13 19:21:06 +0100 |
commit | efbc53858725ec8563bb97423d9bf789c41cf79f (patch) | |
tree | 09d64bc8fcf528c7656c3689f4cb70098a102760 /src/corelib/doc | |
parent | 4c1ea8f72ce806a5059ddec1ec1364f9a92294f0 (diff) |
qwindowsmime.cpp: support dropping multiple mail attachments
Only the data for the first file could be reached with the mimetype
application/x-qt-windows-mime;value="FileContents"
To get the data for the other files, setting the lindex field of
the FORMATETC struct is necessary. Provide support for that by
appending ;index=N to the mimetype string.
The Windows API provides no generic way to find out how many of these
are available (the app has to find out by looking into the FILEGROUPDESCRIPTORW
structure, for this particular use case), so these additional mimetypes
are not listed in QMimeData::formats(). However this patch extends
the documentation to mention the feature.
[ChangeLog][Platform Specific Changes][Windows][QMimeData] Add support
for handling dropping of multiple mail attachments, adding ;index=N to
the mimetype string application/x-qt-windows-mime;value="FileContents"
Task-number: QTBUG-17373
Change-Id: I031e477d2357b4e5135d2dcd3e3cf991025715a5
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Diffstat (limited to 'src/corelib/doc')
-rw-r--r-- | src/corelib/doc/snippets/code/src_corelib_kernel_qmimedata.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/corelib/doc/snippets/code/src_corelib_kernel_qmimedata.cpp b/src/corelib/doc/snippets/code/src_corelib_kernel_qmimedata.cpp index 7f42cd8def..278a00fdfd 100644 --- a/src/corelib/doc/snippets/code/src_corelib_kernel_qmimedata.cpp +++ b/src/corelib/doc/snippets/code/src_corelib_kernel_qmimedata.cpp @@ -106,3 +106,9 @@ if (event->mimeData()->hasColor()) { ... } //! [7] + + +//! [8] +application/x-qt-windows-mime;value="FileContents";index=0 +application/x-qt-windows-mime;value="FileContents";index=1 +//! [8] |