User native dialogs elsewhere (uses native file dialogs on other
DEs/platforms)
Details
Diff Detail
- Repository
- R33 KDevPlatform
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Similar approach is used in Krita: https://forum.kde.org/viewtopic.php?f=139&t=122937
Tested on OSX, commented on a minor issue inline.
shell/documentcontroller.cpp | ||
---|---|---|
147 | On OSX, having tried this patch, this QFileDialog::getOpenFileUrls() does succeed in presenting a native 'open file' dialog. However, the 'filter' argument doesn't work as desired. It just displays the raw "*|Text File" string, which looks out of place, and doesn't cause any filtering. http://doc.qt.io/qt-5/qfiledialog.html#getOpenFileNames QT documentation appears to want a different syntax for filters. I tried the following just to verify understanding: "Text Files (*);;C Files(*.c)" It worked. However, when it is reduced to: "Text Files (*)" Something it optimizing away the filter altogether, resulting in no filter functionality. (Which is probably fine). Given this knowledge: It may make sense to not pass any filter at all, since it isn't actually filtering anything. It appears to simply be a placeholder for the Widget that is present on KDE dialog. |
Pushed.
Thanks a lot for the detailed analysis, didn't check thoroughly on my Windows box.