currently displayed folder, if one is shown
And only fallback to the default root path if no file name has
been entered.
This change improves the UX of the widget, because it allows
users to manually enter a path (or paste a filename, etc)
into the widget and THEN click the browse button to tweak
that current location. Otherwise we always jump back to
some historic location on clicking that button, which is
annoying.
It's possible for items to be deleted in the background
while we are waiting on user input (e.g. from the confirmation
prompt) by a parent directory refresh, so we need to capture
everything relevant and not rely on the item itself existing
anymore during the delete layer calls.
std::move should not be used here because
it prevents RVO (copy elision) and it's
considered an anti-pattern.
To fix the original warning the returned
type must match the declared return
type or copy elision will not be possible
(and the warning will be triggered).
Actually it had nothing to do with CSV being the
source, but it was the json exporter passing
the values through all field formatters except for
the fallback.
This resulted in all fields using a 'Range' formatter
(which is the default for all numeric types) passing
through the formatter and being returned as strings
in the json. Worse, if the locale was not a "dot"
locale and decimal separator was on, the resulting
string could not be easily converted into its original
numeric type.
Now, instead of checking for the fallback formatter
only, there is a white list of formatters that
can be applied when we want a json.
This is a temporary solution because the "right" way
to do it would be either a flag in the formatter to
tell if it can be applied when converting to json
and/or other "data" formats (csv etc.) or a different
new method similar to representValue.
In order to add a PostgreSQL layer based on a view, one needs to explicitly
pick one or more columns to serve as the primary key. However in both browser
dock and in the DB manager user can add a view as a layer without specifying
primary key. Users get confused about this behavior, therefore this commit
makes the Data Source Manager behave consistently with browser and DB manager,
that is it will pick the first column as the proposed primary key automatically.
While this may be a bit risky in letting user use wrong pkey, it is very
convenient (and consistent with other part of QGIS). Also, usability of selection
of geometry type / srid / pkey column(s) is not great so it is good not to force
people to always choose pkey for their views. The list will still keep
the warning icon and tooltip shown as before.
* fixes#16047
* extracts band name info using gdalapi in QgsGdalProvider
* added configuration option to allowing user to select band name behavior
* currently 5 ways including current default behavior: #, name, name (#), # (name), _DIM_EXTRA metadata
- Add 'refresh' action to allow display of displays created outside
of QGIS
- Show empty schemas in browser too, as they can be useful for
drag and dropping new data sets to import into
- Add create schema item
Adds a QMessageBox if file exists
Remove lastDatabase setting to lastDirDatabase. It's dangerous to reuse
the last database.
Adds a .gpkg extension to filename if not presents.