remove useless invokable methods (#8059)

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
This commit is contained in:
Denis Rouzaud 2018-09-29 03:28:26 -08:00 committed by GitHub
parent 6d97af0d14
commit 8ec5fec280
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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.
@ -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.
@ -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.
@ -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
@ -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 );
};