Closed qgib closed 5 years ago
Author Name: Richard Duivenvoorde (@rduivenvoorde)
Ok, I had a look into this myself, and found that the value of mFilter in qgsfilewidget.ccp
https://github.com/qgis/QGIS/blob/master/src/gui/qgsfilewidget.cpp#L254-L278
Was different for different kind of files:
For grib it was:
"All files(.);;GRIB File(.grb .grb2 .bin .grib .grib1 .grib2);;2DM Mesh File(*.2dm);;3Di Resu"
For rasters it is:
"All files ();;GDAL/OGR VSIFileHandler (.zip .gz .tar .tar.gz .tgz .ZIP .GZ .TAR .TAR.GZ *."
For csv it is:
"Text files (.txt .csv .dat .wkt);;All files ( .*)"
AND actually only the csv shows ALL files for me!
According to http://doc.qt.io/qt-5/qfiledialog.html#setNameFilters using "." is not portable. They point to dot-files, but in my case the downloaded grb files without(!) any extension is also not shown.
I'll add a patch which change All files(.) to All files(*).
Grepping on "All files(*" there are still a lot of other places where this is used.
Author Name: Richard Duivenvoorde (@rduivenvoorde)
Applied in changeset 4fa62e9b3bbe6383db2b682e89003a0a85428bad.
Author Name: Richard Duivenvoorde (@rduivenvoorde) Original Redmine Issue: 19703 Affected QGIS version: 3.3(master) Redmine category:data_provider/mdal
In current master if I open a Mesh via the Data Source Manager by clicking on the ... button, I get an 'Open MDAL Supported Mesh Dataset(s)' dialog, with on the bottom the possibility to only show 'GRIB Files', '2DM Meshfile' or All files.
BUT even using the 'All files', I do not see all files. Only when I rename a file to something.grib I start to see it.
To test: go to: https://data.knmi.nl/datasets/harmonie_p1/0.2?q=grib
To get a current weather grib file, untar the .tgz file which will open as a long list of filenames like: /tmp/harm36_v1_ned_surface_2018082700_048_GB (not without extension!)
But you will not be able to open those, unless you rename them to *.grib (see screenshot, where I untarred the tgz into my /tmp and only renamed 1 of the files to /tmp/harm36_v1_ned_surface_2018082700_048_GB.grib)
Also added a screenshot to show the mesh in QGIS because it is so cool :-)