Skip to content

Commit 8ec5fec

Browse files
authored
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
1 parent 6d97af0 commit 8ec5fec

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/core/qgsunittypes.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -267,7 +267,7 @@ class CORE_EXPORT QgsUnitTypes
267267
* \param unit unit to convert to string
268268
* \see stringToAreaUnit()
269269
*/
270-
Q_INVOKABLE static QString toString( QgsUnitTypes::AreaUnit unit );
270+
static QString toString( QgsUnitTypes::AreaUnit unit );
271271

272272
/**
273273
* Returns a translated abbreviation representing an areal unit.
@@ -276,7 +276,7 @@ class CORE_EXPORT QgsUnitTypes
276276
*
277277
* \since QGIS 3.0
278278
*/
279-
Q_INVOKABLE static QString toAbbreviatedString( QgsUnitTypes::AreaUnit unit );
279+
static QString toAbbreviatedString( QgsUnitTypes::AreaUnit unit );
280280

281281
/**
282282
* Converts a translated string to an areal unit.
@@ -324,7 +324,7 @@ class CORE_EXPORT QgsUnitTypes
324324
* Returns a translated string representing an angular unit.
325325
* \param unit unit to convert to string
326326
*/
327-
Q_INVOKABLE static QString toString( QgsUnitTypes::AngleUnit unit );
327+
static QString toString( QgsUnitTypes::AngleUnit unit );
328328

329329
/**
330330
* Returns the conversion factor between the specified angular units.
@@ -415,7 +415,7 @@ class CORE_EXPORT QgsUnitTypes
415415
* Returns a translated string representing a render \a unit.
416416
* \since QGIS 3.0
417417
*/
418-
Q_INVOKABLE static QString toString( QgsUnitTypes::RenderUnit unit );
418+
static QString toString( QgsUnitTypes::RenderUnit unit );
419419

420420

421421
// LAYOUT UNITS
@@ -451,14 +451,14 @@ class CORE_EXPORT QgsUnitTypes
451451
*
452452
* \since QGIS 3.0
453453
*/
454-
Q_INVOKABLE static QString toAbbreviatedString( QgsUnitTypes::LayoutUnit unit );
454+
static QString toAbbreviatedString( QgsUnitTypes::LayoutUnit unit );
455455

456456
/**
457457
* Returns a translated string representing a layout \a unit.
458458
*
459459
* \since QGIS 3.0
460460
*/
461-
Q_INVOKABLE static QString toString( QgsUnitTypes::LayoutUnit unit );
461+
static QString toString( QgsUnitTypes::LayoutUnit unit );
462462

463463
};
464464

0 commit comments

Comments
 (0)