Travis says no to enum class

This commit is contained in:
Nyall Dawson 2020-05-02 08:39:12 +10:00
parent d6637c5dd2
commit 6ec369e6b7
3 changed files with 2 additions and 7 deletions

View File

@ -6,8 +6,3 @@ QgsLabeling.LinePlacementFlag.BelowLine.__doc__ = "Labels can be placed below a
QgsLabeling.LinePlacementFlag.MapOrientation.__doc__ = "Signifies that the AboveLine and BelowLine flags should respect the map's orientation rather than the feature's orientation. For example, AboveLine will always result in label's being placed above a line, regardless of the line's direction."
QgsLabeling.LinePlacementFlag.__doc__ = 'Line placement flags, which control how candidates are generated for a linear feature.\n\n' + '* ``OnLine``: ' + QgsLabeling.LinePlacementFlag.OnLine.__doc__ + '\n' + '* ``AboveLine``: ' + QgsLabeling.LinePlacementFlag.AboveLine.__doc__ + '\n' + '* ``BelowLine``: ' + QgsLabeling.LinePlacementFlag.BelowLine.__doc__ + '\n' + '* ``MapOrientation``: ' + QgsLabeling.LinePlacementFlag.MapOrientation.__doc__
# --
# monkey patching scoped based enum
QgsLabeling.PolygonPlacementFlag.AllowPlacementOutsideOfPolygon.__doc__ = "Labels can be placed outside of a polygon feature"
QgsLabeling.PolygonPlacementFlag.AllowPlacementInsideOfPolygon.__doc__ = "Labels can be placed inside a polygon feature"
QgsLabeling.PolygonPlacementFlag.__doc__ = 'Polygon placement flags, which control how candidates are generated for a polygon feature.\n\n.. versionadded:: 3.14\n\n' + '* ``AllowPlacementOutsideOfPolygon``: ' + QgsLabeling.PolygonPlacementFlag.AllowPlacementOutsideOfPolygon.__doc__ + '\n' + '* ``AllowPlacementInsideOfPolygon``: ' + QgsLabeling.PolygonPlacementFlag.AllowPlacementInsideOfPolygon.__doc__
# --

View File

@ -32,7 +32,7 @@ Contains constants and enums relating to labeling.
typedef QFlags<QgsLabeling::LinePlacementFlag> LinePlacementFlags;
enum class PolygonPlacementFlag
enum PolygonPlacementFlag
{
AllowPlacementOutsideOfPolygon,
AllowPlacementInsideOfPolygon,

View File

@ -49,7 +49,7 @@ class CORE_EXPORT QgsLabeling
*
* \since QGIS 3.14
*/
enum class PolygonPlacementFlag : int
enum PolygonPlacementFlag
{
AllowPlacementOutsideOfPolygon = 1 << 0, //!< Labels can be placed outside of a polygon feature
AllowPlacementInsideOfPolygon = 1 << 1, //!< Labels can be placed inside a polygon feature