Details
-
Bug
-
Resolution: Done
-
P2: Important
-
4.7.1
-
None
-
Windows, VS 2010, qt 4.7.1
-
efbc53858725ec8563bb97423d9bf789c41cf79f
Description
There is an issue while for instance we try to drag n drop several mail attachments from outlook.
I ask the QMimeData object to give me the data related to the mime type: application/x-qt-windows-mime;value="FileContents", and all I retrieve from this is the content of one file of the initial selection.
The problem is located in the method static QByteArray getData(int cf, IDataObject *pDataObj) (line 156) in the file qmime_win.cpp.
The code looks like that:
//Try reading IStream data formatetc.tymed = TYMED_ISTREAM; if (pDataObj->GetData(&formatetc, &s) == S_OK) { char szBuffer[4096]; ULONG actualRead = 0;
GetData is done only on one index of the object formatect, designed by the attribute lindex of the Windows structure FORMATETC:
typedef struct tagFORMATETC { CLIPFORMAT cfFormat; DVTARGETDEVICE *ptd; DWORD dwAspect; LONG lindex; DWORD tymed; } FORMATETC;
You do not iterate on the index so the only data you read is the data of the first element dropped.
Would it be possible to fix it please?
Attachments
For Gerrit Dashboard: QTBUG-17373 | ||||||
---|---|---|---|---|---|---|
# | Subject | Branch | Project | Status | CR | V |
99014,7 | qwindowsmime.cpp: support dropping multiple mail attachments | dev | qt/qtbase | Status: MERGED | +2 | 0 |