Skip to content

Commit

Permalink
remove useless invokable methods (#8059)
Browse files Browse the repository at this point in the history
having invokable on overloaded methods taking enum as parameter is pretty useless as it is seen as an integer
the last declared was used: e.g. the one with LayoutUnit for toAbbreviatedSring
this commit only keeps the ones for DistanceUnit which is the most likely to be used
  • Loading branch information
3nids committed Sep 29, 2018
1 parent 6d97af0 commit 8ec5fec
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/core/qgsunittypes.h
Expand Up @@ -267,7 +267,7 @@ class CORE_EXPORT QgsUnitTypes
* \param unit unit to convert to string
* \see stringToAreaUnit()
*/
Q_INVOKABLE static QString toString( QgsUnitTypes::AreaUnit unit );
static QString toString( QgsUnitTypes::AreaUnit unit );

/**
* Returns a translated abbreviation representing an areal unit.
Expand All @@ -276,7 +276,7 @@ class CORE_EXPORT QgsUnitTypes
*
* \since QGIS 3.0
*/
Q_INVOKABLE static QString toAbbreviatedString( QgsUnitTypes::AreaUnit unit );
static QString toAbbreviatedString( QgsUnitTypes::AreaUnit unit );

/**
* Converts a translated string to an areal unit.
Expand Down Expand Up @@ -324,7 +324,7 @@ class CORE_EXPORT QgsUnitTypes
* Returns a translated string representing an angular unit.
* \param unit unit to convert to string
*/
Q_INVOKABLE static QString toString( QgsUnitTypes::AngleUnit unit );
static QString toString( QgsUnitTypes::AngleUnit unit );

/**
* Returns the conversion factor between the specified angular units.
Expand Down Expand Up @@ -415,7 +415,7 @@ class CORE_EXPORT QgsUnitTypes
* Returns a translated string representing a render \a unit.
* \since QGIS 3.0
*/
Q_INVOKABLE static QString toString( QgsUnitTypes::RenderUnit unit );
static QString toString( QgsUnitTypes::RenderUnit unit );


// LAYOUT UNITS
Expand Down Expand Up @@ -451,14 +451,14 @@ class CORE_EXPORT QgsUnitTypes
*
* \since QGIS 3.0
*/
Q_INVOKABLE static QString toAbbreviatedString( QgsUnitTypes::LayoutUnit unit );
static QString toAbbreviatedString( QgsUnitTypes::LayoutUnit unit );

/**
* Returns a translated string representing a layout \a unit.
*
* \since QGIS 3.0
*/
Q_INVOKABLE static QString toString( QgsUnitTypes::LayoutUnit unit );
static QString toString( QgsUnitTypes::LayoutUnit unit );

};

Expand Down

0 comments on commit 8ec5fec

Please sign in to comment.