Skip to content

Commit

Permalink
Move some getters which are incorrectly marked as slots,
Browse files Browse the repository at this point in the history
remove some unnecessary 'const's from signals

Thanks to clazy const-signal-or-slot check
  • Loading branch information
nyalldawson committed Oct 9, 2017
1 parent 3d8440c commit 42676dc
Show file tree
Hide file tree
Showing 21 changed files with 968 additions and 969 deletions.
8 changes: 4 additions & 4 deletions python/core/auth/qgsauthmanager.sip
Expand Up @@ -700,7 +700,7 @@ The display name of the Authentication Manager
\param level Message log level
%End

void passwordHelperMessageOut( const QString &message, const QString &tag = QgsAuthManager::AUTH_MAN_TAG, QgsAuthManager::MessageLevel level = QgsAuthManager::INFO ) const;
void passwordHelperMessageOut( const QString &message, const QString &tag = QgsAuthManager::AUTH_MAN_TAG, QgsAuthManager::MessageLevel level = QgsAuthManager::INFO );
%Docstring
Custom logging signal to inform the user about master password <-> password manager interactions
@see QgsMessageLog
Expand All @@ -710,18 +710,18 @@ The display name of the Authentication Manager
%End


void masterPasswordVerified( bool verified ) const;
void masterPasswordVerified( bool verified );
%Docstring
Emitted when a password has been verify (or not)
\param verified The state of password's verification
%End

void authDatabaseEraseRequested() const;
void authDatabaseEraseRequested();
%Docstring
Emitted when a user has indicated they may want to erase the authentication db.
%End

void authDatabaseChanged() const;
void authDatabaseChanged();
%Docstring
Emitted when the authentication db is significantly changed, e.g. large record removal, erased, etc.
%End
Expand Down
36 changes: 18 additions & 18 deletions python/core/composer/qgscomposition.sip
Expand Up @@ -971,6 +971,24 @@ Prepare the printer for printing in a PDF
:rtype: QRectF
%End

virtual QgsExpressionContext createExpressionContext() const;

%Docstring
Creates an expression context relating to the compositions's current state. The context includes
scopes for global, project, composition and atlas properties.
.. versionadded:: 2.12
:rtype: QgsExpressionContext
%End

QgsPropertyCollection &dataDefinedProperties();
%Docstring
Returns a reference to the composition's property collection, used for data defined overrides.
.. versionadded:: 3.0
.. seealso:: setDataDefinedProperties()
:rtype: QgsPropertyCollection
%End


public slots:
void sendItemAddedSignal( QgsComposerItem *item );
%Docstring
Expand Down Expand Up @@ -1018,24 +1036,6 @@ Casts object to the proper subclass type and calls corresponding itemAdded signa
.. versionadded:: 2.5
%End

virtual QgsExpressionContext createExpressionContext() const;

%Docstring
Creates an expression context relating to the compositions's current state. The context includes
scopes for global, project, composition and atlas properties.
.. versionadded:: 2.12
:rtype: QgsExpressionContext
%End

QgsPropertyCollection &dataDefinedProperties();
%Docstring
Returns a reference to the composition's property collection, used for data defined overrides.
.. versionadded:: 3.0
.. seealso:: setDataDefinedProperties()
:rtype: QgsPropertyCollection
%End


void setDataDefinedProperties( const QgsPropertyCollection &collection );
%Docstring
Sets the composition's property collection, used for data defined overrides.
Expand Down
12 changes: 6 additions & 6 deletions python/core/qgsbrowsermodel.sip
Expand Up @@ -134,6 +134,12 @@ Refresh item children
virtual void fetchMore( const QModelIndex &parent );


bool initialized( ) const;
%Docstring
Returns true if the model has been initialized
:rtype: bool
%End

signals:
void stateChanged( const QModelIndex &index, QgsDataItem::State oldState );
%Docstring
Expand Down Expand Up @@ -179,12 +185,6 @@ Reload the whole model
Hide the given path in the browser model
%End

bool initialized( ) const;
%Docstring
Returns true if the model has been initialized
:rtype: bool
%End

void initialize();
%Docstring
Delayed initialization, needed because the provider registry must be already populated
Expand Down
2 changes: 1 addition & 1 deletion python/core/qgsdataprovider.sip
Expand Up @@ -391,7 +391,7 @@ Current time stamp of data source
feature ids should be invalidated.
%End

void notify( const QString &msg ) const;
void notify( const QString &msg );
%Docstring
Emitted when datasource issues a notification

Expand Down
33 changes: 16 additions & 17 deletions python/core/qgsmaplayer.sip
Expand Up @@ -906,6 +906,22 @@ Time stamp of data source in the moment when data/metadata were loaded by provid
:rtype: set of QgsMapLayerDependency
%End

QString refreshOnNotifyMessage() const;
%Docstring
Returns the message that should be notified by the provider to triggerRepaint

.. versionadded:: 3.0
:rtype: str
%End

bool isRefreshOnNotifyEnabled() const;
%Docstring
Returns true if the refresh on provider nofification is enabled

.. versionadded:: 3.0
:rtype: bool
%End

public slots:

void setMinimumScale( double scale );
Expand Down Expand Up @@ -988,23 +1004,6 @@ Time stamp of data source in the moment when data/metadata were loaded by provid
.. versionadded:: 3.0
%End

QString refreshOnNotifyMessage() const;
%Docstring
Returns the message that should be notified by the provider to triggerRepaint

.. versionadded:: 3.0
:rtype: str
%End

bool isRefreshOnNotifyEnabled() const;
%Docstring
Returns true if the refresh on provider nofification is enabled

.. versionadded:: 3.0
:rtype: bool
%End


signals:

void statusChanged( const QString &status );
Expand Down
1 change: 1 addition & 0 deletions python/core/qgsvectordataprovider.sip
Expand Up @@ -533,6 +533,7 @@ Returns a list of available encodings
.. versionadded:: 3.0
:rtype: bool
%End

signals:

void raiseError( const QString &msg ) const;
Expand Down
16 changes: 8 additions & 8 deletions python/core/qgsvectorlayer.sip
Expand Up @@ -1755,6 +1755,14 @@ Returns the current blending mode for features
source has no metadata, false if it's the data provider which determines
it.

.. versionadded:: 3.0
:rtype: bool
%End

bool isEditCommandActive() const;
%Docstring
Test if an edit command is active

.. versionadded:: 3.0
:rtype: bool
%End
Expand Down Expand Up @@ -1821,14 +1829,6 @@ Returns the current blending mode for features
:rtype: bool
%End

bool isEditCommandActive() const;
%Docstring
Test if an edit command is active

.. versionadded:: 3.0
:rtype: bool
%End

signals:

void selectionChanged( const QgsFeatureIds &selected, const QgsFeatureIds &deselected, const bool clearAndSelect );
Expand Down

0 comments on commit 42676dc

Please sign in to comment.