[QGIS-Developer] File dialogs in QGIS
Richard Duivenvoorde
rdmailings at duif.net
Fri Oct 19 08:58:19 PDT 2018
Hi,
See also my comments at this PR: https://github.com/qgis/QGIS/pull/8245
But in short: current Open/Save File dialogs in QGIS use a 'All Files
(*.*)' filter which is not portable. I hit this in
https://issues.qgis.org/issues/19703
So I fixed for the mdal dialog (https://github.com/qgis/QGIS/pull/8245),
but grepping there are more of places where you will still not see ALL
your files (because *.* does not show files without extension).
Is this something we should/can fix globally (by using some text
constant for it?).
I also read http://doc.qt.io/qt-5/qfiledialog.html#setNameFilters that
mimetype filters are the preferred way. Not sure if we in the geo-world
have those for the myriad of file types we have though.
Also it is not sure if the file-filters (the little dropdown for the
different types in the dialogs) should be translated fully or not.
In Gnome you ONLY see the text and NOT the actual filter expressions.
On Windows you see both.
What is the preferred way to make this translatable (eg for
japanese/chinese users)? As an example:
2DM Mesh File(*.2dm)
Should only the text be translated tr("2DM Mesh File")+"(*.2dm)"
OR the whole string tr("2DM Mesh File(*.2dm)").
In code I see both types of use. I was wondering how filenames like
example.2dm or example.shp would look like on Japanes Windows machines...
Last: on gnome I have a silly long file filter list with all emtpy items
in it (see https://issues.qgis.org/issues/20169). Can others reproduce?
Thoughts?
Regards,
Richard Duivenvoorde
More information about the QGIS-Developer
mailing list