Skip to content

Commit

Permalink
Do not add allowCommit to Python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed Oct 5, 2018
1 parent c3066c2 commit 3522518
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 38 deletions.
36 changes: 0 additions & 36 deletions python/core/auto_generated/qgsvectorlayer.sip.in
Expand Up @@ -2239,43 +2239,7 @@ Configuration and logic to apply automatically on any edit happening on this lay
.. versionadded:: 3.4
%End

bool allowCommit() const;
%Docstring
Controls, if the layer is allowed to commit changes. If this is set to false
it will not be possible to commit changes on this layer. This can be used to
define checks on a layer that need to be pass before the layer can be saved.
If you use this API, make sure that:

- the user is visibly informed that his changes were not saved and what he needs
to do in order to be able to save the changes.

- to set the property back to true, once the user has fixed his data.

When calling :py:func:`commitChanges`, this flag is checked just after the

.. seealso:: :py:func:`beforeCommitChanges`

.. versionadded:: 3.4
%End

void setAllowCommit( bool allowCommit );
%Docstring
Controls, if the layer is allowed to commit changes. If this is set to false
it will not be possible to commit changes on this layer. This can be used to
define checks on a layer that need to be pass before the layer can be saved.
If you use this API, make sure that:

- the user is visibly informed that his changes were not saved and what he needs
to do in order to be able to save the changes.

- to set the property back to true, once the user has fixed his data.

When calling :py:func:`commitChanges`, this flag is checked just after the

.. seealso:: :py:func:`beforeCommitChanges`

.. versionadded:: 3.4
%End

public slots:

Expand Down
8 changes: 6 additions & 2 deletions src/core/qgsvectorlayer.h
Expand Up @@ -2024,9 +2024,11 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
* When calling \see commitChanges(), this flag is checked just after the
* \see beforeCommitChanges() signal is emitted, so it's possible to adjust it from there.
*
* \note Not available in Python bindings
*
* \since QGIS 3.4
*/
bool allowCommit() const;
bool allowCommit() const SIP_SKIP;

/**
* Controls, if the layer is allowed to commit changes. If this is set to false
Expand All @@ -2042,9 +2044,11 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte
* When calling \see commitChanges(), this flag is checked just after the
* \see beforeCommitChanges() signal is emitted, so it's possible to adjust it from there.
*
* \note Not available in Python bindings
*
* \since QGIS 3.4
*/
void setAllowCommit( bool allowCommit );
void setAllowCommit( bool allowCommit ) SIP_SKIP;

public slots:

Expand Down

0 comments on commit 3522518

Please sign in to comment.