QGIS/python/core/auto_additions/qgsdatabaseschemamodel.py
Nyall Dawson 50408edac6
Fix PyQGIS docstrings for monkey patched enum values
We should be using the new name for the enum value instead
of the old one in the enum class docstring.

Move the old compatible name to an extra note
"Available as ``xx.yy`` in older QGIS releases."

Fixes #49171
2024-09-02 11:43:23 +10:00

24 lines
840 B
Python

# The following has been generated automatically from src/core/qgsdatabaseschemamodel.h
QgsDatabaseSchemaModel.Role = QgsDatabaseSchemaModel.CustomRole
# monkey patching scoped based enum
QgsDatabaseSchemaModel.RoleEmpty = QgsDatabaseSchemaModel.CustomRole.Empty
QgsDatabaseSchemaModel.Role.RoleEmpty = QgsDatabaseSchemaModel.CustomRole.Empty
QgsDatabaseSchemaModel.RoleEmpty.is_monkey_patched = True
QgsDatabaseSchemaModel.RoleEmpty.__doc__ = "Entry is an empty entry"
QgsDatabaseSchemaModel.CustomRole.__doc__ = """Custom model roles.
.. note::
Prior to QGIS 3.36 this was available as QgsDatabaseSchemaModel.Role
.. versionadded:: 3.36
* ``Empty``: Entry is an empty entry
Available as ``QgsDatabaseSchemaModel.RoleEmpty`` in older QGIS releases.
"""
# --
QgsDatabaseSchemaModel.CustomRole.baseClass = QgsDatabaseSchemaModel