1853 Commits

Author SHA1 Message Date
Nyall Dawson
051ed1e156 Prevent snapping to selected items when resizing 2017-10-06 17:48:24 +10:00
Nyall Dawson
d950f17e75 Add item bounds based snapping to QgsLayoutSnapper 2017-10-06 17:48:24 +10:00
Nyall Dawson
bfa9c1d661 Port methods for retrieving item at a point to layouts 2017-10-06 17:48:24 +10:00
Nyall Dawson
bb129516f8 Port selection handling code from composer 2017-10-06 17:48:24 +10:00
Nyall Dawson
51efa19f75 Port item frame related code from composer 2017-10-06 17:48:24 +10:00
Nyall Dawson
0b188295bc Port item selection and lock related code from composer 2017-10-06 17:48:24 +10:00
Nyall Dawson
4e61ea892a Port frame and background handling to layout items
And add support for frame widths with units
2017-10-06 17:48:24 +10:00
Alessandro Pasotti
dcc672520c Merge pull request #5281 from boundlessgeo/auth_use_settings_widget
[auth][needs-docs] Provider connection dialogs use the new auth settings widget
2017-10-05 17:33:56 +02:00
Sandro Mani
2f44d52ee5 Merge pull request #5298 from manisandro/ogr_tin_triangle
[Feature][OGR] Support Triangle, TIN and PolyhedralSurface geometry types by mapping them to Polygon and MultiPolygon respectively
2017-10-05 11:29:02 +02:00
Sandro Mani
abaeb9e9c1 [Feature][OGR] Support Triangle, TIN and PolyhedralSurface geometry types by mapping them to Triangle and MultiPolygon respectively 2017-10-04 22:15:43 +02:00
Sandro Mani
4e2e3608f0 [OGR] Pass AUTO_REPACK=OFF when opening datasets for non-implicit update modes 2017-10-04 12:17:20 +02:00
Matthias Kuhn
c764d9c177 Merge pull request #5256 from qgis/docker2
[travis] Use docker to run test
2017-10-04 11:11:52 +02:00
Matthias Kuhn
6d683230de
Disable unstable tests
Parts of the following tests behave unstable because of enironment changes
(distro upgrade, running in docker, ...) or dependency updates.

- qgis_rastersublayertest (Failed)
- PyQgsShapefileProvider (Failed)
- PyQgsWFSProvider (Failed)

They are unlikely to be introduced by the new continuous integration
environment.

Therefore, the affected parts have been disabled. Help by knowledgeable
developers to make the tests more stable or fix real underlying issues.
2017-10-03 17:36:39 +02:00
Blottiere Paul
8a09a197cc Merge pull request #5150 from pblottiere/server_bugfix_ogc_getfeatureinfo_invalid_format
[server][bugfix] Fix OGC test getfeatureinfo:invalid-info_format
2017-10-03 06:24:46 +01:00
Alessandro Pasotti
f09e5b16e0 [auth] Renamed setters to better follow Qt5 conventions 2017-10-02 17:12:02 +02:00
Alessandro Pasotti
dfdf2ceeac [auth] Added support for "Store" checkboxes 2017-10-02 16:39:31 +02:00
Alessandro Pasotti
c57b9e7e73 [auth] Tests for new setters methods 2017-10-02 14:44:01 +02:00
Alessandro Pasotti
feeec8e0bf [auth] Use explicit signal connections 2017-10-02 12:26:15 +02:00
Alessandro Pasotti
5bdb605fda Merge pull request #5270 from boundlessgeo/auth_widget2
[auth][needs-docs] Authentication widget
2017-10-02 09:18:00 +02:00
Blottiere Paul
60fd763621 Merge pull request #5157 from pblottiere/server_bugfix_ogc_invalid_querylayers
[server][bugfix] Fix OGC test getfeatureinfo:invalid-query_layers
2017-10-02 04:37:35 +01:00
Alessandro Pasotti
e33ff0609b [auth] Renamed class to QgsAuthSettingsWidget 2017-09-30 08:59:07 +02:00
Matthias Kuhn
e025011799
Make Mr. Travis happy 2017-09-29 17:52:33 +02:00
Matthias Kuhn
3562af4db7
Fix missing import 2017-09-29 17:52:33 +02:00
Matthias Kuhn
366433e1f5
Add more applyOnUpdate tests 2017-09-29 17:52:32 +02:00
Matthias Kuhn
1552b4ed3b
Test updates for changed method name/signature 2017-09-29 17:52:32 +02:00
Matthias Kuhn
951b699c97
More default value tests 2017-09-29 17:52:31 +02:00
Matthias Kuhn
ff385fb035
Add tests for QgsDefaultValue 2017-09-29 17:52:31 +02:00
Alessandro Pasotti
242696c1d5 [auth] Added tests and completed QgsAuthenticationWidget 2017-09-29 17:34:59 +02:00
Matthias Kuhn
ca5a0bb3de
Fix python expression functions 2017-09-29 17:01:33 +02:00
Alessandro Pasotti
db0c223ab1 [auth] Added new widget ui 2017-09-29 12:16:28 +02:00
Blottiere Paul
203e81fa6b Add tests 2017-09-29 09:30:20 +01:00
Blottiere Paul
04cdf496b7 Add some tests 2017-09-29 09:26:25 +01:00
Matthias Kuhn
af0451c4c3
Fix debug logging 2017-09-28 13:22:42 +02:00
Matthias Kuhn
a65f51891e
Use self.assertTrue instead of assert 2017-09-28 13:22:40 +02:00
Ismail Sunni
04e54903e8
Add unit test for remove and beginGroup with section. 2017-09-28 17:01:00 +07:00
Alessandro Pasotti
829702bd24 Merge pull request #5253 from boundlessgeo/auth_proxy
[auth][feature][needs-docs] Proxy authentication integration with QGIS authentication system
2017-09-27 17:41:53 +02:00
Alessandro Pasotti
40b7f7914a [auth] Added tests for updateNetworkProxy 2017-09-27 15:15:01 +02:00
Sandro Mani
7705179a6c Merge pull request #5250 from manisandro/ogr_orig_fid
[OGR] orig_ogc_fid followups
2017-09-25 15:21:41 +02:00
Sandro Mani
992a759caa Merge pull request #5231 from manisandro/ogr_repack
[OGR] Defer repacking while in explicit updateMode
2017-09-25 14:09:48 +02:00
Sandro Mani
15eaafdf0c [OGR] Ensure orig_ogc_fid is never set as ignored field 2017-09-25 13:34:06 +02:00
Nyall Dawson
57108f9b61 Boost test coverage for geometry collections 2017-09-25 17:20:36 +10:00
Nyall Dawson
20cc7a7332 Boost test coverage for QgsRectangle 2017-09-25 17:20:36 +10:00
Nyall Dawson
d704163884 Rename QgsRectangle::buffer to buffered and mark as const 2017-09-25 17:20:36 +10:00
Nyall Dawson
fe98fe1131 Merge pull request #5236 from nyalldawson/field_default
[processing] Allow setting default values for field parameters in models
2017-09-24 07:58:39 +10:00
Juergen E. Fischer
9e36fd9c6d remove app startup tests depending on removed options configpath and --optionspath 2017-09-23 19:38:42 +02:00
Vincent Mora
02e3916bf5 [FEATURE] layer refresh and trigger actions on provider notification
[needs-docs]

In vector layer properties (only usefull for postgres datasources)

**in the rendering tab**

A "Refresh layer on notification" checkbox has been added to refresh layer
on provider notification.

For a postgres datasource, if a `NOTIFY qgis;` command is issued by one of the database clients,
a refresh of the layer will occur.

If the "Only if message is" checkbox is checked, the notification will trigger the refresh only
if the message contend is the one specified, e.g. if the user enters
"refresh" in the box right next to the "Only if message is" checkbox,
then a `NOTIFY qgis, 'refresh';` command in the datatabase will trigger
a layer refresh, but `NOTIFY qgis;` or `NOTIFY qgis, 'something else';`
won't.

**in the actions tab**

A column "On notification" has been added, the action editor widget
a has text field "Execute if notification message matches" to
specify a filter for notification from the provider. The filter is a
Perl-type regex.

Note that, as opposed to the "layer refresh" that

Exemple:
  - QGIS side "Execute if notification message matches" `^trigger my action`
  - Postgres side: `NOTIFY qgis, 'trigger my action'` will trigger the action
  - Postgres side: `NOTIFY qgis, 'trigger my action some additional data'` will trigger the action
  - Postgres side: `NOTIFY qgis, 'do not trigger my action some additional data'` will NOT trigger the action

Please note that if the `^`, which means "starts with",  in `^trigger my action` had been ommited,
the last notification would have triggered the action because the
notification message contains the `trigger my action`

A new qgis variable `notification_message` is available for use in
actions, it holds the contend of the notification message. To continue
with the previous exemple, if the action is of python type with the code:

```python
print('[% @notification_message %]')
```

The three notifictions above will result in two printed lines
```
trigger my action
trigger my action some additional data
```

User Warning:

For postgres providers, if the "Refresh layer on notification" is checked, or if one layer action has
"On notification" specified, a new connection to the database is made to
listen to postgres notifications. This olds even if transaction groups
are enabled at the project level.

Note that once the notification mechanism is started in a QGIS
session, it will not stop, even if there is no more need for it (Refresh
layer on notification" unchecked and no "On notification" in any
action). Consequently the connection listening to notification will
remain open.

IMPLEMENTATION DETAILS:

A notify signal has been added to the abstract QgsVectorDataProvider
along with a setListening function that enables/disble the notification
mechanism.

For the moment only the postgres provider implements the notification.

QgsAction has a notificationMessage member function that holds the regex
to match to trigger action

QgsActionManager becomes a QObject and is doing the filtering and execute actions on
notifications.

The notification notion extends beyond SRGBD servers (postgres and oracle at
least have the notify) and the "watch file" in the delimitedtext
provider could also benefit from this interface.

For the postgres provider a thread is created with a second connection
to the database. This thread is responsible for listening postgres
notifications.

It would be nice to avoid the creation of one listening chanel per
provider in the case transaction groups are enabled.

Please note that when listening starts (a thread and connection is
created in the postgres provider) it cannot be stopped by removing the
connected actions or unchecking the refresh check box. Indeed, since we
don't know who needs the signals, we dont't want to stop the service.

The service will not restart in the next qgis session though.

If this behavior is not deemed appropriate, we could use
```
int QObject::receivers ( const char * signal ) const
```
and have QgsDataProvider::setListening return a bool to tell the caller
if the signal has actually been closed.
2017-09-22 12:51:51 +02:00
Nyall Dawson
cbca7c97bc Boost test coverage of geometry classes 2017-09-22 15:41:41 +10:00
Nyall Dawson
b4a798e892 Setting field for QgsFieldComboBox should be case-insensitive 2017-09-22 11:39:17 +10:00
Matthias Kuhn
9caa7224cd Merge pull request #5230 from m-kuhn/taskWaitForFinished
QgsTask::waitForFinished without event loop
2017-09-21 18:35:43 +02:00
Matthias Kuhn
8f2c885436
[travis] Disable flaky test
See https://travis-ci.org/qgis/QGIS/jobs/278224577
https://github.com/qgis/QGIS/pull/5230#issuecomment-331189552
2017-09-21 18:00:46 +02:00