3695 Commits

Author SHA1 Message Date
Juergen E. Fischer
12e69d0991 dxf export:
* empty field name resets to layer name (fixes #17060)
* allow forcing to 2d to support polyline width (fixes #17049)
2017-08-30 00:50:10 +02:00
Nyall Dawson
d2fe65826e Update sip 2017-08-29 20:00:19 +10:00
Nyall Dawson
78b834c5b0 Fix missing Q_OBJECT macros
Thanks to Clazy
2017-08-29 18:03:41 +10:00
Nyall Dawson
1fddfcf622 Flip Q_ENUMS to Q_ENUM
See https://woboq.com/blog/q_enum.html for rationale
2017-08-29 18:03:41 +10:00
Alessandro Pasotti
daa60d1a0e Merge pull request #5057 from boundlessgeo/gpkg-raster-import2
Geopackage: handle raster drop in browser
2017-08-29 08:48:51 +02:00
Nyall Dawson
99ef3ff834 Merge pull request #5075 from nyalldawson/no_math_defines
Remove redundant math constant defines
2017-08-29 11:59:24 +10:00
Nyall Dawson
029f741cfa Add qgsAsConst(...)
This is the equivalent of std::as_const (which requires c++17) or
qAsConst (which requires Qt 5.7), neither of which we have
as minimum dependancies.

By wrapping implicitly shared Qt containers in qgsAsConst we can
safely use c++ for ranged loops instead of Q_FOREACH. (Since
Q_FOREACH's future is shaky)

See https://www.kdab.com/goodbye-q_foreach/ for further details
on why for causes a detach for Qt containers and why Q_FOREACH
is being removed from Qt.
2017-08-29 03:18:37 +10:00
Blottiere Paul
1fb88a778c QgsVectorLayerJoinBuffer inherits from QgsFeatureSink 2017-08-28 14:09:57 +01:00
Blottiere Paul
b6e42c7d2b Move join intelligence in QgsVectorlayerJoinBuffer 2017-08-28 14:09:57 +01:00
Blottiere Paul
94d7e75a7e Fix spell check 2017-08-28 14:09:57 +01:00
Blottiere Paul
8b70d7fa4b Rename setDeleteCascade/isDeleteCascade in setCascadedDelete/hasCascadedDelete 2017-08-28 14:09:56 +01:00
Blottiere Paul
97ad226f64 Rename isUpsertOnEdit in hasUpsertOnEdit 2017-08-28 14:09:56 +01:00
Blottiere Paul
c347055d82 Update sip binding 2017-08-28 14:09:55 +01:00
Blottiere Paul
477775a5d7 [FEATURE] Joined fields are editable if the option is activated 2017-08-28 14:09:55 +01:00
Blottiere Paul
e92f59ca06 Update sip binding 2017-08-28 14:09:55 +01:00
Nyall Dawson
725301ad58 Make more use of math constants 2017-08-26 04:17:44 +10:00
Nyall Dawson
7f447374cd Remove redundant math constant defines
Since we use _USE_MATH_DEFINES for windows builds, these are
not required
2017-08-26 04:06:57 +10:00
Nyall Dawson
578045d1d5 Update sip bindings 2017-08-25 06:29:04 +10:00
Nyall Dawson
4b009f96ec Use std::round instead of qRound
Now that our minimum VS studio version allowed supports std::round,
we should use that in place of Qt's qRound method.

Because:
- it doesn't truncate to int, resulting in unpredictable
behaviour (refs #16925)
- better to stick to standard c++ methods wherever possible,
since they're likely better supported and optimised by the
compilers
- it's a tiny reduction to the barrier for entry to QGIS
development (I'm sick of pointing out the need to use
qRound during PR reviews!)
2017-08-25 02:35:27 +10:00
Etienne Trimaille
c606abc702 enable custom help in python expressions 2017-08-23 12:00:57 +02:00
Nyall Dawson
cb70aad7a3 Fix restricting model algorithm input types to valid types for alg (refs #17030) 2017-08-23 17:34:08 +10:00
Jorge Gustavo Rocha
8486767fa3 Support removal of global defined XYZ connections 2017-08-22 23:11:58 +01:00
Alessandro Pasotti
ab2589bc03 Added rasterLayer method 2017-08-22 12:07:01 +02:00
Denis Rouzaud
bc193c0034 fix QgsRasterHistogram::histogramVector for SIP <= 4.17 2017-08-19 09:11:40 +02:00
Nyall Dawson
ebda2fd212 Rename some enum values for clarity 2017-08-19 02:46:22 +10:00
Nyall Dawson
7879c0a20b Fix processing rendering styles for output dialog, functionality 2017-08-19 00:47:21 +10:00
Nyall Dawson
37b899fb99 Add a pure virtual clone method to processing parameter definitions
And use it when we need to clone parameters (instead of more fragile
conversion to and from variants)

This fixes model loading which use algorithms which create python
subclasses of parameter definitions
2017-08-18 01:22:07 +10:00
Nyall Dawson
c7affb3b70 Use const references to options instead of pointers in QgsVectorLayerExporter
The use of pointers make ownership of the argument confusing, and there's
nothing stopping us just using an empty map as the default value instead.
2017-08-17 19:26:57 +10:00
Juergen E. Fischer
e32589599a packaging updates after helpviewer removal (followup 55cdc89a1) 2017-08-17 07:58:10 +02:00
Matthias Kuhn
55cdc89a11 Merge pull request #5004 from jgrocha/helpviewer
[needs-docs] Refactoring of all help calls, deprecating QgsContextHelp+Helpviewer
2017-08-16 18:30:59 +02:00
Matthias Kuhn
80e8ff04e0 Merge pull request #5014 from m-kuhn/enumgeomfunc
Return enum instead of int from QgsGeometry operations
2017-08-14 15:06:06 +02:00
arnaud.morvan@camptocamp.com
b3a9e46cfe [processing] Port refactor fields to new API 2017-08-14 13:48:50 +02:00
Matthias Kuhn
0683528d9a
More doxymentation 2017-08-14 10:52:43 +02:00
Matthias Kuhn
a70bfe6ff8
More doxymentation 2017-08-14 10:43:37 +02:00
Matthias Kuhn
8294c434c6
More doxymentation 2017-08-14 10:37:51 +02:00
Matthias Kuhn
a4dac6ace2
Define params as /Out/ 2017-08-14 08:58:59 +02:00
Denis Rouzaud
86e8da74cb
Return enum instead of int from QgsGeometry operations 2017-08-13 23:08:45 +02:00
Matthias Kuhn
b51a5f7b6f Simplify QgsGeometryEngine code 2017-08-13 20:19:32 +02:00
Matthias Kuhn
e3787effc6 Doxymentation 2017-08-13 20:19:32 +02:00
Matthias Kuhn
581b89e0ec Use pointers and not references to QgsAbstractGeometry
because using this more consistently throughout the codebase makes it
easier to maintain code.
We also do not want to call the copy constructor on them, using pointers
just makes this more obvious. Further, casting is also something
that's commonly done on pointers and not references.

And if you want a value or a reference, just use QgsGeometry, it's meant
to be handled like this.
2017-08-13 20:19:32 +02:00
Matthias Kuhn
d0f33d6d05
Expose makeValid() errors to QgsGeometry::error() 2017-08-13 12:18:55 +02:00
Matthias Kuhn
d9ad859a81
Fix misplaced SIP_TRANSFER 2017-08-13 10:28:42 +02:00
Matthias Kuhn
639d0640a9
NULL to nullptr 2017-08-12 19:26:20 +02:00
Matthias Kuhn
a6800d6a5a
Add qgsgeometry_cast
Because it
- is faster than dynamic_cast
- doesn't rely on RTTI
- encapsulates type checking in one place
2017-08-12 19:26:20 +02:00
arnaud.morvan@camptocamp.com
e34a593c65 [FEATURE] Add expression function array_agg 2017-08-12 10:18:21 +02:00
Jorge Gustavo Rocha
3a103b7c62 Refactoring of all help calls, deprecating QgsContextHelp and the former helviewer 2017-08-09 09:27:29 +02:00
Alessandro Pasotti
bcb48f2bdc Fixes two issues with the browser refresh
1. endless loop when a sqlite-based layer is opened, and
   wal+shm files are created. This triggers a loop because
   the directoryChanged signal is emitted again and again ...
   This was the real blocker.

2. when a new files appears in a directory
   the directoryChanged is emitted and OGR/GDAL may fail
   to open the file because the file copy was not yet
   finished.

This commit fixes 1 but the fix for 2 is only a best effort using
a 100 ms timer: I could not find a definitive solution to this issue,
a file could be legitimately opened in streaming mode and it will
always triggers an error, there is apparently no way to get
the QFileSystemWatcher emit a signal when new files are closed
flusehd and not when they are just created.
2017-08-09 08:59:17 +02:00
Alessandro Pasotti
1c3fadebbb Sip update for qgsproject 2017-08-09 08:59:17 +02:00
Alessandro Pasotti
61504e7073 Expose GeoPackage to the browser tree 2017-08-09 08:59:17 +02:00
Nyall Dawson
3fd2e0921d Fix ownership issue with layout guides 2017-08-07 22:31:44 +10:00