51093 Commits

Author SHA1 Message Date
Alessandro Pasotti
b80c95c71a
Merge pull request #8150 from elpaso/bugfix-20053-json-exporter-values
Fixes #20053 decimal separator in csv files
2018-10-10 09:56:52 +02:00
nirvn
69dab87d4a [auth] don't share config db connection across threads
(fixes #20054)
2018-10-10 14:47:53 +07:00
Juergen E. Fischer
e71e135e15 fix build on xenial 2018-10-10 03:47:53 +02:00
Denis Rouzaud
7c0a2a1cd7 a few more forward declarations 2018-10-09 11:48:33 -08:00
Denis Rouzaud
f27a5043bb remove useless includes 2018-10-09 11:48:33 -08:00
Denis Rouzaud
7fb3a92994 forward declaration of QgsMapMouseEvent 2018-10-09 11:48:33 -08:00
Denis Rouzaud
ef1efebda4 forward declaration of QgsPoint 2018-10-09 11:48:33 -08:00
Denis Rouzaud
159eb09505 replace old-style cast by reinterpret_cast 2018-10-09 11:48:33 -08:00
Alessandro Pasotti
859b39a634 Fixes #20053 decimal separator in csv files
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.
2018-10-09 11:03:06 +02:00
Martin Dobias
1a5a23d1a5 [postgres] Fix jumping item when changing pkey / geom type / srid
On change of on of the properties the affected item would suddenly jump to the end of the list.
2018-10-09 08:58:47 +02:00
Martin Dobias
c225f56026 [postgres] Fix addition of views from Data Source Manager (fixes #19424)
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.
2018-10-09 08:58:47 +02:00
Alessandro Pasotti
795c27fe9f
Merge pull request #8125 from elpaso/bugfix-20020-paste-geometry-collapsed-features
Show a warning when pasted feature geometry collapsed
2018-10-09 08:40:28 +02:00
nirvn
b4a2218021 [labeling] always consider data-defined property for line height 2018-10-09 13:00:49 +07:00
AndrewAnnex
8fbb717580 addressed comments, ran prepare-commit.sh 2018-10-09 14:36:05 +10:00
AndrewAnnex
c04accd72a forgot to add voids in testqgsgdalprovider.cpp 2018-10-09 14:36:05 +10:00
AndrewAnnex
9b4cb7a269 added unit test and test raster 2018-10-09 14:36:05 +10:00
AndrewAnnex
c4872b844b responding to github comments, simplified behavior to display the band name if present 'Band #: Band Name'. removed options 2018-10-09 14:36:05 +10:00
AndrewAnnex
b86f84edb5 Use raster band names in QGIS [FEATURE] [needs-docs]
* 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
2018-10-09 14:36:05 +10:00
Nyall Dawson
b6e6b90557 [mssql] Misc browser fixes
- 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
2018-10-09 11:30:57 +10:00
Nyall Dawson
e813fe880f [mssql] Fix browser items only show tables in geometry_columns
table, regardless of connection setting
2018-10-09 11:30:57 +10:00
Loïc Bartoletti
0989e73d72 Use QgsFileWdiget for geopackage database 2018-10-09 10:51:21 +10:00
Loïc Bartoletti
b74292aaae Fixes #19555
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.
2018-10-09 10:51:21 +10:00
Juergen E. Fischer
6ac262f432 configonly.bat: retrieve version from CMakeLists.txt 2018-10-09 02:30:10 +02:00
Denis Rouzaud
711ec1de47 forward declaration of QgsProject 2018-10-08 13:01:16 -08:00
Denis Rouzaud
0901a21e4f Fix include in server 2018-10-08 13:01:16 -08:00
Denis Rouzaud
f404751e5b move definition to source 2018-10-08 13:01:16 -08:00
Denis Rouzaud
775d603f54 forward declarations for QgsMapCanvas 2018-10-08 13:01:16 -08:00
Denis Rouzaud
d000157341 forward declarations for QgsMapLayer 2018-10-08 13:01:16 -08:00
Denis Rouzaud
f86b86bc8c forward declaration for QgsVectorLayer 2018-10-08 13:01:16 -08:00
signedav
f5d2b88dba check if visibilityexpression is enabled (#8141)
before adding the containers to the mContainerVisibilityInformation

fix: #20045
2018-10-08 12:10:52 -08:00
Denis Rouzaud
425fe74908
add missing coordinateTransformContext property to QgsProject (#8145) 2018-10-08 11:26:29 -08:00
Alessandro Pasotti
a176bad0b0 Kill refreshLegend (not used since a long time) 2018-10-08 13:01:28 +02:00
stra2da
c8577c777d Add files via upload 2018-10-08 17:33:07 +07:00
stra2da
a6bfffbfb8 Update qgsoptionsbase.ui 2018-10-08 17:33:07 +07:00
stra2da
4caec08de5 Update images.qrc 2018-10-08 17:33:07 +07:00
stra2da
52055d5588 Add files via upload 2018-10-08 17:33:07 +07:00
Nyall Dawson
06520be7b0 Spelling 2018-10-08 19:16:29 +10:00
Nyall Dawson
302b449451 [mssql] Add browser actions for deleting and truncating tables
Because we can no longer overwrite tables directly using drag
and drop (refs #16805), add some explicit actions which allow
dropping existing tables (after user confirmation, of course!)
2018-10-08 19:16:29 +10:00
Nyall Dawson
745495fe73 [mssql] Prevent overwriting existing tables via drag and drop in browser
Fixes #16805
2018-10-08 19:16:29 +10:00
Nyall Dawson
da21193894 [mssql] Fix handling of geometry column when multiple geometry/geography
columns are present

Fixes #13932
2018-10-08 17:01:03 +10:00
Nyall Dawson
71c5051356 [mssql] Fix incorrect precision detection for double/float fields
Fixes #15124
2018-10-08 17:01:03 +10:00
Alessandro Pasotti
f6b80205e8
Merge pull request #8126 from elpaso/bugfix-18608-raster-legend-embedded-widgets
Force legend update when raster properties changes
2018-10-08 08:33:24 +02:00
Nyall Dawson
8c2afa6b75 Indentation 2018-10-08 16:15:31 +10:00
Nyall Dawson
5503ba48bb [mssql] Forward port more of 62af54e
But avoid the inexact Filter test when we are doing an
exact intersection request

Refs #15752
2018-10-08 16:15:31 +10:00
Nyall Dawson
b79229092e QStringLiteral 2018-10-08 16:15:31 +10:00
Nyall Dawson
84a821915e [mssql] Small fixes to expression compilation
- Use [] to correctly quote field names instead of ""
- Don't invalidate provider side limit when not required

Forward port of 8dec70c, because I'm only human and forgot
2018-10-08 16:15:31 +10:00
Nyall Dawson
794583e62e [mssql] Test data load script 2018-10-08 16:15:31 +10:00
Nyall Dawson
eb439d34ba [mssql] Update test for skipping invalid geometry handling 2018-10-08 16:15:31 +10:00
Nyall Dawson
eb40d911df Add test for MSSQL behavior with invalid polygon geometries
Forward port of 039866d, because I am an idiot and forgot
2018-10-08 16:15:31 +10:00
Nyall Dawson
dafeaf4372 [mssql][needs-docs] Add connection setting to ignore invalid geometry handling
Sets whether the connection should skip all handling of records with
invalid geometry, which are slow and costly.

This speeds up the provider, however, if any invalid geometries
are present in a table then the result is unpredictable and may
include missing records. Only check this option if you are certain
that all geometries present in the database are valid, and any newly
added geometries or tables will also be valid!

Why would we want this? Well, SQL Server invalid geometry handling
is AWEFUL. A seriously lame, data mangling and corrupting
piece of s***. Use Postgres instead. But if you can't, then you
can at least choose to use your layers at full speed, if you
can take the responsibility that a SINGLE invalid geometry
hiding somewhere in the table will result in a whole bunch
of missing (valid) features.

SQL server is at fault here, not us. There's nothing we (or
GDAL, or MapServer, or GeoServer, or anyone else) can do
to fix this.

Suffice to say, this option is off by default, as we're better
to have a slow provider which actually shows all features.

Fixes #15752

Rant over
2018-10-08 16:15:31 +10:00