201 Commits

Author SHA1 Message Date
Juergen E. Fischer
d0e94728d8 fix build with sip 4.18.1 (eg. ubuntu artful) 2018-06-27 23:30:04 +02:00
Denis Rouzaud
ac4f508c13 create Python __repr__ methods for QgsPoint and QgsPointXY 2018-06-19 07:02:17 -04:00
Nyall Dawson
c705670947 Upgrade INT_ methods to numeric_limits 2018-06-17 09:24:37 +10:00
Nyall Dawson
17cd2fd5f3 More DBL_MIN/MAX_EPSILON upgrades 2018-06-17 09:24:37 +10:00
Nyall Dawson
a4c8386e88 [sipify] Replace std::numeric_limits with old style DBL_MAX/etc 2018-06-17 09:24:37 +10:00
Denis Rouzaud
164f662dc0 fix sipify and run 2018-06-03 11:07:09 -08:00
Denis Rouzaud
e5b02cd2a8 use dedicated files for auto additions 2018-06-03 11:07:09 -08:00
Denis Rouzaud
7cb18cd5f1 [sipify] allow to define python operator in headers
sipify will take care of injecting them in python/{module}/__init__.py
2018-06-03 11:07:09 -08:00
Denis Rouzaud
83be4fae6b [sipify] fix deprecated annotation without additional comment 2018-05-28 10:39:34 -08:00
Nyall Dawson
4c3a9ef7be Ensure that class \brief comes before \since (#7081)
Otherwise it breaks the Python docstrings, which require
the brief to come first
2018-05-28 04:03:46 -08:00
Nyall Dawson
f8bc97030b Remove extra space added before first line of docstring 2018-05-28 08:22:11 +10:00
Nyall Dawson
7a1a787c0a Fix incorrect returns docstring when doxygen \returns has extra trailing spaces or uses tabs 2018-05-27 18:54:09 +10:00
Nyall Dawson
0e75f6ef85 Don't indent multiline versionadded/deprecated tags
Turns out there isn't any valid ones anyway - the only
multiline versionadded tags are due to incorrect ordering
of brief/since tags (which is fixed in a different PR)
2018-05-27 18:54:09 +10:00
Nyall Dawson
9f650fead9 Fix incorrect param docstring when doxygen \param has extra
trailing spaces or uses tabs
2018-05-27 18:54:09 +10:00
Nyall Dawson
4b1b752633 Fix bad regex 2018-05-27 18:54:09 +10:00
Nyall Dawson
3d6ea5972b Remove some junk lines from docstrings 2018-05-27 18:54:09 +10:00
Nyall Dawson
38850bdb94 [pyqgis] Ensure that multiline param tags are indented for additional lines 2018-05-27 18:54:09 +10:00
Denis Rouzaud
b4ec9a3190
[pyqgis] add QgsSettings.enumValue and flagValue to the bindings (#7024)
* [pyqgis] add QgsSettings.enumValue and flagValue to the bindings

these are done in pure Python since no implementation is possible in SIP

there is a dirty hack for flags since QgsMapLayerProxyModel.Filters.__qualname__
returns 'Filters' and not 'QgsMapLayerProxyModel.Filters'

* fix typo
2018-05-18 09:25:12 -08:00
Denis Rouzaud
deccf205cf
[pyqgis] add method to retrieve metaEnum from an enum value or type (#7023) 2018-05-18 06:47:18 -08:00
Denis Rouzaud
6301f9b6f3 [sipify] write helpers in core.__init__.py for Q_ENUM
whenever reading a Q_ENUM macro, sipify will create a helper in the core module:
BaseClass.EnumType.parentClass = lamda: BaseClass

this will allow to use the meta object to access the QMetaEnum of the object
2018-05-17 22:54:18 -04:00
Denis Rouzaud
1fe0fb74ec [sipify] fix remove value assignment in members 2018-05-17 21:49:07 -04:00
Denis Rouzaud
c1e16969f3 [QgsLocator] add the capability of adding group for elements within the same filter 2018-05-17 21:46:31 -04:00
Denis Rouzaud
2abcfa23b8 do not add static QMetaObject to QgsDefaultValue
it has no Q_ENUM so no need for now
I do not understand while it doesn't compile though
2018-05-16 14:25:01 -04:00
Denis Rouzaud
e8cf8c2f1c [sipify] insert missing QMetaObject for gadget classes 2018-05-15 17:38:16 -04:00
Nyall Dawson
0f78277a59 Add SIP_THROW annotation
SIP uses the deprecated throw(...) annotation in order to determine
which exceptions may be thrown by c++ code. Without these, only
a generic unknown exception is throw, which is of limited value
to Python code (losing any valuable message and exception type).

So we add a new SIP_THROW macro, which can be added to method's
declaration:

    bool doSomething() SIP_THROW( QgsCsException );

This is ignored outside of sipify, so we don't actually use
the deprecated c++ throw annotations, but sipify picks it up
and adds the appropriate change to the sip definition for
the method:

   bool doSomething() throw( QgsCsException );

This means that calling the method from Python will raise
the QgsCsException instead of a generic exception.
2018-05-16 04:35:17 +10:00
Nyall Dawson
0acdcfadfd Fix crash when using the identify tool on a categorized render
with an unchecked category corresponding to the feature at the
clicked point

Also fix count of default category symbols
2018-03-01 16:49:29 +11:00
Denis Rouzaud
d171ca7ae4 offer enterCategory in Python bindings by adding a context manager 2018-02-28 13:43:11 -04:00
Denis Rouzaud
d468e5bb6a [sipify] fix Q_FLAG declaration 2018-02-19 05:55:09 -09:00
lbartoletti
124e26815d Standardize shebangs (was Usr bin env) (#6229)
* Use portable /usr/bin/env/{perl,python} instead of /usr/bin/{perl,python}

* fix perl;add bash

* Fix indentation using modified scripts

* Revert "fix perl;add bash"

This reverts commit be8b9113c25f7c2fb9c8c9bad556fbca2f0c0ba2.

* python3 everywhere

* more bash

* rebase
change perl

* Linux perl; missing from last PR

* fix doxygen_space

* Use portable /usr/bin/env/{perl,python} instead of /usr/bin/{perl,python}

* fix perl;add bash

* Fix indentation using modified scripts

* Revert "fix perl;add bash"

This reverts commit be8b9113c25f7c2fb9c8c9bad556fbca2f0c0ba2.

* python3 everywhere

* more bash

* rebase
change perl

* fix doxygen_space
2018-02-05 03:38:02 -09:00
Denis Rouzaud
a09b9e7af9 [sipify] fix QMap/Qlist with init in header 2018-02-03 15:52:33 -09:00
Alessandro Pasotti
cbd0ece0a6 Support comma in annotations when merging inline 2018-01-31 12:50:07 +01:00
Nyall Dawson
f37c2bf6f6 Revert "[needs-qa]Usr bin env" 2018-01-30 11:33:49 +11:00
lbartoletti
1ce7dbad94 Merge branch 'master' of https://github.com/qgis/QGIS into usr_bin_env 2018-01-29 13:13:03 +01:00
Denis Rouzaud
0644f59cde fix variable used for configuration 2018-01-17 10:16:37 -04:00
Denis Rouzaud
fe5a001df1 [sipify] remove space before semi-column 2018-01-17 10:16:37 -04:00
Denis Rouzaud
1d4e6a820a [sipify] use configuration file for SIP sources (*.sip.in)
to allow preprocessing the files to handle version specific features such as template based classes documentation in 4.19.7+
2018-01-17 10:16:37 -04:00
Denis Rouzaud
5327978ecf SIP 4.19.7+ allows to document template based classes 2018-01-17 10:16:37 -04:00
lbartoletti
f2a0c77952 Merge branch 'usr_bin_env' of https://github.com/lbartoletti/QGIS into usr_bin_env 2018-01-15 15:59:08 +01:00
Denis Rouzaud
4568bcdf1f [sipify] prevent creation of param list when not necessary 2018-01-12 21:10:16 -04:00
Denis Rouzaud
ba951893f3 [sipify] fix multiline note or warning 2018-01-12 21:10:16 -04:00
Denis Rouzaud
d87c60512c [sipify] fix bad handling of \see within sentences
and other docstrings improvements
2018-01-09 21:40:10 -04:00
Denis Rouzaud
9deef832c1 [sipify] fix SIP new restrictions on Docstrings
class members, operators cannot be documented anymore
2018-01-09 11:40:39 -04:00
Nyall Dawson
c7e37e89eb [sipify] Correctly convert doxygen warning blocks to sphinx warnings 2017-12-23 18:48:03 +11:00
Denis Rouzaud
5dc9b5869a fix empty lines with spaces 2017-12-19 21:17:29 -04:00
Denis Rouzaud
7b0ad1b6d5 fix code snippet and do not display cpp code in sip files 2017-12-19 21:17:29 -04:00
Denis Rouzaud
d042304cc3 [sipify] habndle python code snippets 2017-12-19 21:17:29 -04:00
Denis Rouzaud
36a05a3a0d do not create link for current class 2017-12-19 14:55:46 -04:00
Denis Rouzaud
db8a7c613b [sipify] also create links in docstrings 2017-12-19 14:55:46 -04:00
Denis Rouzaud
cb9bd6d3da fix missing new line before first param 2017-12-15 22:13:44 -04:00
Denis Rouzaud
8db419ca08 [sipify] avoid printing empty Docstrings 2017-12-15 22:13:44 -04:00