51054 Commits

Author SHA1 Message Date
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
Nyall Dawson
7464575f2c More refactoring 2018-10-08 16:15:31 +10:00
Nyall Dawson
ad25261708 More minor refactoring 2018-10-08 16:15:31 +10:00
Nyall Dawson
fabc2c1376 [mssql] Minor refactoring 2018-10-08 16:15:31 +10:00
Nathan Woodrow
7c5cc27b8f
Fix #13684 - Update conditional full row style on value change (#8137) 2018-10-08 15:14:48 +10:00
Nathan Woodrow
ca4fcceb8f
Fix - Fix font color in table conditional present selection (#8136) 2018-10-08 13:57:56 +10:00
Nyall Dawson
f630c93816 [mssql] Fix inefficiencies in expression compiler, resulting in
apparent hangs when compiling complex expressions

Fixes #15404
2018-10-08 13:09:26 +10:00
Nathan Woodrow
f928c2e545
[FIX] - Respect selection order in attribute table copy. (#8048)
Only copy fields shown in view for current table.
2018-10-08 12:07:28 +10:00
Nathan Woodrow
556cddd4d9
Fix #19465 - Don't delete expression when pressing enter in combo (#8134) 2018-10-08 12:05:54 +10:00
Nyall Dawson
4da2b80a42 Fix build 2018-10-08 12:01:23 +10:00
Nyall Dawson
1f02b42e04 Fix race condition causing crash on startup
Also flick more static list initializations across to nicer
std::call_once implimentations
2018-10-08 11:20:40 +10:00
Nathan Woodrow
ee7ca0a526 Fix build follow up 2018-10-08 10:40:02 +10:00
Nathan Woodrow
4bcaba8404 Fix build on fedora 26 2018-10-08 09:16:00 +10:00
Blottiere Paul
9ccb1b579b Update doc 2018-10-08 07:24:53 +10:00
Blottiere Paul
6e95586a1c Update python binding 2018-10-08 07:24:53 +10:00
Blottiere Paul
9ed3ee0d4b Add doc 2018-10-08 07:24:53 +10:00
Blottiere Paul
1ecc57d2a2 Adds more explicit error message when auxiliary storage is saved 2018-10-08 07:24:53 +10:00
Even Rouault
119cd8ace9 QgisApp::addVectorLayer(): add |layername= to OGR datasets (fixes #20031)
Do it also in case of datasets that have a single layer, in case they might
later be edited to have more layers
(except for a few drivers known to be always single layer)
2018-10-08 07:23:27 +10:00
Even Rouault
bd6c1115bb [OGR provider] Make createEmptyLayer() work properly on GeoPackage when creating/overwrite a new database (fixes #20040) 2018-10-08 07:23:12 +10:00
Even Rouault
1aa9485f6d [OGR provider] Fix deletion of layers from QGIS browser when filename has non-ASCII characters (fixes https://issues.qgis.org/issues/19861) 2018-10-08 07:22:54 +10:00
Alessandro Pasotti
7c6cb910cc Fixes #20038 null island in canvas.saveAsImage 2018-10-08 07:22:39 +10:00
Nyall Dawson
7c21bfd199 Silence "libpng warning: iCCP: known incorrect sRGB profile" warnings
These are thrown by 3rd party components (e.g. webkit) which we have no
control over, and have low value anyway

Better to keep the debug log cleaner so that real errors are noticed
2018-10-08 05:04:31 +10:00
Blottiere Paul
80e19b6328 Add core unit test 2018-10-08 05:03:49 +10:00
Blottiere Paul
7681d308e2 Removes TODO comment 2018-10-08 05:03:49 +10:00
Blottiere Paul
6dfae7238c Activates unit test 2018-10-08 05:03:49 +10:00
Blottiere Paul
5a9067e722 Fixes #19826 - Use subset layer to manage fid 2018-10-08 05:03:49 +10:00
Alessandro Pasotti
12fd51e27e Deprecate refreshLegend 2018-10-07 17:26:31 +02:00
rldhont
2b71c9cc97
Merge pull request #7915 from rldhont/server-cache-manager-extension
[Server][Cache] Finalizing the cache manager
2018-10-07 15:50:00 +02:00
Nyall Dawson
b247c7ce5d More hacking around crs db 2018-10-07 17:36:40 +10:00
Nyall Dawson
086b6a80d0 Fix dox test 2018-10-07 17:36:40 +10:00
Nyall Dawson
195a2fb8c7 Workaround ellipsoid_acronym not null constraint 2018-10-07 17:36:40 +10:00
Nyall Dawson
af7957707b Fix various qt warnings related to user profile databases
Switch to using QGIS sqlite helper classes instead of Qt database
classes
2018-10-07 17:36:40 +10:00
Nyall Dawson
e91e342e6a Fix some chatty debug messages 2018-10-07 17:36:40 +10:00
Nyall Dawson
ed35ad9ca7 Unify sqlite string quoting functions to a single QgsSqliteUtils::quoteString
function, with tests
2018-10-07 17:36:40 +10:00
Even Rouault
7e81226b51 Replace toUtf8().data() by toUtf8().constData()
All your uses of toUtf8().data() actually just need a const char*
So use constData() that is semantically more correct, and documented
to be faster.

From http://doc.qt.io/qt-5/qbytearray.html#data
"For read-only access, constData() is faster because it never
causes a deep copy to occur."
2018-10-07 07:23:42 +10:00
rldhont
3bb64a7f1a [Server][Cache] Adding HAVE_SERVER_PYTHON_PLUGINS around accessControls and cacheManager methods 2018-10-06 15:08:39 +02:00
Even Rouault
f5d2d85860
QgsXmlUtils::readFlagAttribute(): fix use-after-free
Found with Valgrind

```const char* c_str = qstr.toUtf8().data()``` is invalid
since the QByteArray returned by toUtf8() is destroyed at the
end of the expression, letting c_str point to freed memory

On the contrary ```foo(qstr.toUtf8().data())``` is valid since
the temporary object is destroyed only after foo invokation.
2018-10-06 15:00:39 +02:00