Skip to content

Commit

Permalink
invokable return types need to be fully-qualified
Browse files Browse the repository at this point in the history
Idenfied by clazy
  • Loading branch information
m-kuhn authored and nyalldawson committed Nov 3, 2019
1 parent 3701d36 commit c154b2f
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions python/core/auto_generated/qgsunittypes.sip.in
Expand Up @@ -182,7 +182,7 @@ Decodes a unit type from a ``string``.



static DistanceUnitType unitType( QgsUnitTypes::DistanceUnit unit );
static QgsUnitTypes::DistanceUnitType unitType( QgsUnitTypes::DistanceUnit unit );
%Docstring
Returns the type for a distance unit.
%End
Expand Down Expand Up @@ -253,7 +253,7 @@ Returns the conversion factor between the specified distance units.
%End


static DistanceUnitType unitType( QgsUnitTypes::AreaUnit unit );
static QgsUnitTypes::DistanceUnitType unitType( QgsUnitTypes::AreaUnit unit );
%Docstring
Returns the type for an areal unit.
%End
Expand All @@ -269,7 +269,7 @@ Encodes an areal unit to a string.
.. seealso:: :py:func:`decodeAreaUnit`
%End

static AreaUnit decodeAreaUnit( const QString &string, bool *ok /Out/ = 0 );
static QgsUnitTypes::AreaUnit decodeAreaUnit( const QString &string, bool *ok /Out/ = 0 );
%Docstring
Decodes an areal unit from a string.

Expand Down Expand Up @@ -301,7 +301,7 @@ Returns a translated abbreviation representing an areal unit.
.. versionadded:: 3.0
%End

static AreaUnit stringToAreaUnit( const QString &string, bool *ok /Out/ = 0 );
static QgsUnitTypes::AreaUnit stringToAreaUnit( const QString &string, bool *ok /Out/ = 0 );
%Docstring
Converts a translated string to an areal unit.

Expand Down Expand Up @@ -344,7 +344,7 @@ Converts an area unit to its corresponding distance unit, e.g., square meters to
%End


static DistanceUnitType unitType( QgsUnitTypes::VolumeUnit unit );
static QgsUnitTypes::DistanceUnitType unitType( QgsUnitTypes::VolumeUnit unit );
%Docstring
Returns the type for an volume unit.

Expand All @@ -362,7 +362,7 @@ Encodes a volume ``unit`` to a string.
.. versionadded:: 3.10
%End

static VolumeUnit decodeVolumeUnit( const QString &string, bool *ok /Out/ = 0 );
static QgsUnitTypes::VolumeUnit decodeVolumeUnit( const QString &string, bool *ok /Out/ = 0 );
%Docstring
Decodes a volume unit from a ``string``.

Expand Down Expand Up @@ -394,7 +394,7 @@ Returns a translated abbreviation representing a volume ``unit``.
.. versionadded:: 3.10
%End

static VolumeUnit stringToVolumeUnit( const QString &string, bool *ok /Out/ = 0 );
static QgsUnitTypes::VolumeUnit stringToVolumeUnit( const QString &string, bool *ok /Out/ = 0 );
%Docstring
Converts a translated`` ``string to a volume unit.

Expand Down
14 changes: 7 additions & 7 deletions src/core/qgsunittypes.h
Expand Up @@ -241,7 +241,7 @@ class CORE_EXPORT QgsUnitTypes
/**
* Returns the type for a distance unit.
*/
Q_INVOKABLE static DistanceUnitType unitType( QgsUnitTypes::DistanceUnit unit );
Q_INVOKABLE static QgsUnitTypes::DistanceUnitType unitType( QgsUnitTypes::DistanceUnit unit );

/**
* Encodes a distance unit to a string.
Expand Down Expand Up @@ -298,7 +298,7 @@ class CORE_EXPORT QgsUnitTypes
/**
* Returns the type for an areal unit.
*/
Q_INVOKABLE static DistanceUnitType unitType( QgsUnitTypes::AreaUnit unit );
Q_INVOKABLE static QgsUnitTypes::DistanceUnitType unitType( QgsUnitTypes::AreaUnit unit );

/**
* Encodes an areal unit to a string.
Expand All @@ -315,7 +315,7 @@ class CORE_EXPORT QgsUnitTypes
* \returns decoded units
* \see encodeUnit()
*/
Q_INVOKABLE static AreaUnit decodeAreaUnit( const QString &string, bool *ok SIP_OUT = nullptr );
Q_INVOKABLE static QgsUnitTypes::AreaUnit decodeAreaUnit( const QString &string, bool *ok SIP_OUT = nullptr );

/**
* Returns a translated string representing an areal unit.
Expand All @@ -340,7 +340,7 @@ class CORE_EXPORT QgsUnitTypes
* \returns the area unit
* \see toString()
*/
Q_INVOKABLE static AreaUnit stringToAreaUnit( const QString &string, bool *ok SIP_OUT = nullptr );
Q_INVOKABLE static QgsUnitTypes::AreaUnit stringToAreaUnit( const QString &string, bool *ok SIP_OUT = nullptr );

/**
* Returns the conversion factor between the specified areal units.
Expand Down Expand Up @@ -371,7 +371,7 @@ class CORE_EXPORT QgsUnitTypes
* Returns the type for an volume unit.
* \since QGIS 3.10
*/
Q_INVOKABLE static DistanceUnitType unitType( QgsUnitTypes::VolumeUnit unit );
Q_INVOKABLE static QgsUnitTypes::DistanceUnitType unitType( QgsUnitTypes::VolumeUnit unit );

/**
* Encodes a volume \a unit to a string.
Expand All @@ -389,7 +389,7 @@ class CORE_EXPORT QgsUnitTypes
* \see encodeUnit()
* \since QGIS 3.10
*/
Q_INVOKABLE static VolumeUnit decodeVolumeUnit( const QString &string, bool *ok SIP_OUT = nullptr );
Q_INVOKABLE static QgsUnitTypes::VolumeUnit decodeVolumeUnit( const QString &string, bool *ok SIP_OUT = nullptr );

/**
* Returns a translated string representing a volume \a unit.
Expand All @@ -414,7 +414,7 @@ class CORE_EXPORT QgsUnitTypes
* \see toString()
* \since QGIS 3.10
*/
Q_INVOKABLE static VolumeUnit stringToVolumeUnit( const QString &string, bool *ok SIP_OUT = nullptr );
Q_INVOKABLE static QgsUnitTypes::VolumeUnit stringToVolumeUnit( const QString &string, bool *ok SIP_OUT = nullptr );

/**
* Returns the conversion factor between the specified volume units.
Expand Down

0 comments on commit c154b2f

Please sign in to comment.