Skip to content

Commit

Permalink
Address review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Aug 5, 2020
1 parent 6b7bc82 commit ca384b2
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 12 deletions.
Expand Up @@ -22,15 +22,15 @@ Abstract base class for annotation items which are drawn with QgsAnnotationLayer
#include "qgsannotationitem.h"
%End
%ConvertToSubClassCode
if ( sipCpp->type() == "marker" )
if ( sipCpp->type() == QLatin1String( "marker" ) )
{
sipType = sipType_QgsAnnotationMarkerItem;
}
else if ( sipCpp->type() == "linestring" )
else if ( sipCpp->type() == QLatin1String( "linestring" ) )
{
sipType = sipType_QgsAnnotationLineStringItem;
}
else if ( sipCpp->type() == "polygon" )
else if ( sipCpp->type() == QLatin1String( "polygon" ) )
{
sipType = sipType_QgsAnnotationPolygonItem;
}
Expand Down Expand Up @@ -91,7 +91,7 @@ render operations.

virtual bool writeXml( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const = 0;
%Docstring
Writes the item's state the an XML ``element``.
Writes the item's state into an XML ``element``.
%End

virtual bool readXml( const QDomElement &element, const QgsReadWriteContext &context ) = 0;
Expand Down
Expand Up @@ -75,7 +75,7 @@ Returns the symbol used to render the item.

void setSymbol( QgsFillSymbol *symbol /Transfer/ );
%Docstring
Sets the ``symbol`` used to render the marker item.
Sets the ``symbol`` used to render the polygon item.

The item takes ownership of the symbol.

Expand Down
2 changes: 1 addition & 1 deletion python/core/auto_generated/qgsapplication.sip.in
Expand Up @@ -743,7 +743,7 @@ Returns the application's layout item registry, used for layout item types.
%Docstring
Returns the application's annotation item registry, used for annotation item types.

.. versionadded:: 3.12
.. versionadded:: 3.16
%End

static QgsGpsConnectionRegistry *gpsConnectionRegistry() /KeepReference/;
Expand Down
8 changes: 4 additions & 4 deletions src/core/annotations/qgsannotationitem.h
Expand Up @@ -40,15 +40,15 @@ class CORE_EXPORT QgsAnnotationItem

#ifdef SIP_RUN
SIP_CONVERT_TO_SUBCLASS_CODE
if ( sipCpp->type() == "marker" )
if ( sipCpp->type() == QLatin1String( "marker" ) )
{
sipType = sipType_QgsAnnotationMarkerItem;
}
else if ( sipCpp->type() == "linestring" )
else if ( sipCpp->type() == QLatin1String( "linestring" ) )
{
sipType = sipType_QgsAnnotationLineStringItem;
}
else if ( sipCpp->type() == "polygon" )
else if ( sipCpp->type() == QLatin1String( "polygon" ) )
{
sipType = sipType_QgsAnnotationPolygonItem;
}
Expand Down Expand Up @@ -116,7 +116,7 @@ class CORE_EXPORT QgsAnnotationItem
virtual void render( QgsRenderContext &context, QgsFeedback *feedback ) = 0;

/**
* Writes the item's state the an XML \a element.
* Writes the item's state into an XML \a element.
*/
virtual bool writeXml( QDomElement &element, QDomDocument &document, const QgsReadWriteContext &context ) const = 0;

Expand Down
2 changes: 1 addition & 1 deletion src/core/annotations/qgsannotationpolygonitem.h
Expand Up @@ -78,7 +78,7 @@ class CORE_EXPORT QgsAnnotationPolygonItem : public QgsAnnotationItem
const QgsFillSymbol *symbol() const;

/**
* Sets the \a symbol used to render the marker item.
* Sets the \a symbol used to render the polygon item.
*
* The item takes ownership of the symbol.
*
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsapplication.h
Expand Up @@ -685,7 +685,7 @@ class CORE_EXPORT QgsApplication : public QApplication

/**
* Returns the application's annotation item registry, used for annotation item types.
* \since QGIS 3.12
* \since QGIS 3.16
*/
static QgsAnnotationItemRegistry *annotationItemRegistry() SIP_KEEPREFERENCE;

Expand Down

0 comments on commit ca384b2

Please sign in to comment.