Summary: | KFileDialog: Slashes corrupt filter when converting from Qt | ||
---|---|---|---|
Product: | [Applications] kfile | Reporter: | Felix Geyer <debfx-kde> |
Component: | general | Assignee: | kdelibs bugs <kdelibs-bugs> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | andresbajotierra, mpyne |
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Attachments: | Replace "/" with "\\/" in qt2KdeFilter() |
Description
Felix Geyer
2009-06-19 22:07:01 UTC
I can confirm the proximate bug, but it's not caused by the style directly. When using a KDE style Qt tries to use the native KDE file dialogs as well, which handles the filters differently, assuming the the slash represents a mimetype (so the cause is Qt "upgrading" VirtualBox's QFileDialog to a KFileDialog, but it's still a KDE bug). If you were to do this with a KDE application the filters would never work (the API docs for KFileDialog do refer to the mimetype filter assumption). I think it would be best to make the mimetype filter handling only take effect for valid mimetypes instead of just detecting "/". Created attachment 34711 [details]
Replace "/" with "\\/" in qt2KdeFilter()
Replacing "/" with "\\/" in qt2KdeFilter() fixes the bug.
Comment on attachment 34711 [details]
Replace "/" with "\\/" in qt2KdeFilter()
patch
Comment on attachment 34711 [details] Replace "/" with "\\/" in qt2KdeFilter() Submitted to Review Board: http://reviewboard.kde.org/r/934/ @Michael: any possibility of reviewing the patch before commiting ? SVN commit 1001314 by cfeck: Correctly handle slashes when converting filters from Qt Patch by Felix Geyer, reviewed by Albert Astals Cid See http://reviewboard.kde.org/r/934/ BUG: 197195 M +1 -1 kfiledialog.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1001314 SVN commit 1001316 by cfeck: Correctly handle slashes when converting filters from Qt (backport r1001314) CCBUG: 197195 M +1 -1 kfiledialog.cpp WebSVN link: http://websvn.kde.org/?view=rev&revision=1001316 I'm late to the party but the patch looks good IMO. |