Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
5.12.9, 5.13.1, 5.15.0
-
None
-
Windows with WSL2
-
-
97de53ee8cce3dc6347b08668f0de45e1000f01c 9ef4fba108761bf30b9572fc53eaf98008bb4aae (qt/qtbase/5.15)
Description
When drag and drop file from windows explorer which opened a WSL2 location to a Qt based app, urls from event->mimeData()->urls() in dropEvent(QDropEvent *event) are always missing the hostname and no way to obtian the original url.
To reproduce:
- Prepare a Windows system with WSL2(Windows Subsystem for Linux 2) subsystem.
- Prepare a Qt application which accept file drop and print the URL which dropped on top of that widget/application.
- Open any WSL2 network location, and drag the file to the Qt application. (example path: \\wsl$\Ubuntu\home\username\filename.png)
- See the print. (for the example location, the hostname part wsl$ will be disappeared.
Probably related to QTBUG-86277 but I'm not quite sure. Although wsl$ is not a valid hostname, but since when DnD the url are get handled by Qt internal, so seems no way to workaround. Expecting a way to obtian correct file url for DnD.
Let me know if you need any additional info.
Attachments
Issue Links
- is replaced by
-
QTBUG-86277 QUrl::fromLocalFile should return valid URLs for UNC paths with invalid hosts (\\wsl$)
- Closed