I am writing a little file/archives explorer and got an issue with interaction between qt-based app and Skype chat window on Windows platform only.
When I try to drag-drop file (provided by QDrag with file-urls mime data) from my app to skype chat window, file is sent twice. The same I’ve got when tried to modify one of Qt drag-drop examples.
Skype version is 5.10.0.116. Bug is reproducible on Qt versions 4.7.3, 4.8.1, 4.8.3.
EDIT:
Have tried drag-drop interactions between several apps
- My app -> Explorer = ok
- My app -> Notepad++ = ok (displays content of file only in one tab)
- My app -> WinRar = ok (creates archive with
only one file) - My app -> TotalCommander = ok
- My app -> ICQ = ok (only one file is sent)
- My app -> Clementine (Qt based music player) = ok (only one file
is added to playlist) - Explorer -> Skype = ok
But
- My app -> Skype – file is sent twice
- Clementine -> Skype – file is sent twice
EDIT2:
Also, qt-created mime data differs from created by explorer.
Qt:
- 0 “text/uri-list” “file:///C:/Users/user/Pictures/myfile.ext”
- 1 “application/x-qt-windows-mime;value=”UniformResourceLocatorW””
“…” (I’ve replaced QByteArray contents with ellipsis)
Explorer:
- 0 “application/x-qt-windows-mime;value=”Shell IDList Array”” “…”
- 1 “application/x-qt-windows-mime;value=”UsingDefaultDragImage””
“…” - 2 “application/x-qt-windows-mime;value=”DragImageBits”” “…”
- 3 “application/x-qt-windows-mime;value=”DragContext”” “…”
- 4 “application/x-qt-windows-mime;value=”DragSourceHelperFlags””
“…” - 5 “application/x-qt-windows-mime;value=”InShellDragLoop”” “…”
- 6 “text/uri-list” “file:///C:/Users/user/Pictures/myfile.ext”
I see, it’s not a problem if Qt, it’s wrong mime data processing on Skype side. Along with “text/uri-list”, Qt provides “UniformResourceLocatorW” value with the same data (i cant deny it, it is added a much deeper, than Qt user can get). And Skype processes both values – “text/uri-list” and “UniformResourceLocatorW”, causing sending the same file twice.