From 17bc7d5f6db7470475425f9dc41260f0c2fbb262 Mon Sep 17 00:00:00 2001 From: Nyall Dawson Date: Thu, 29 Aug 2024 09:45:48 +1000 Subject: [PATCH] Don't use copydoc for methods exposed to SIP Fixes #54429 --- .../core/auto_additions/qgsapplication.py | 2 +- .../auto_additions/qgsmapthemecollection.py | 2 +- .../actions/qgsactionscope.sip.in | 47 ++++++++++++++--- .../core/auto_generated/qgsapplication.sip.in | 34 ++++++++++--- .../qgsmapthemecollection.sip.in | 16 ++++-- .../vector/qgsvectorlayer.sip.in | 13 ++++- python/core/auto_additions/qgsapplication.py | 2 +- .../auto_additions/qgsmapthemecollection.py | 2 +- .../actions/qgsactionscope.sip.in | 47 ++++++++++++++--- .../core/auto_generated/qgsapplication.sip.in | 34 ++++++++++--- .../qgsmapthemecollection.sip.in | 16 ++++-- .../vector/qgsvectorlayer.sip.in | 13 ++++- src/core/actions/qgsactionscope.h | 50 ++++++++++++++++--- src/core/qgsapplication.h | 25 +++++++--- src/core/qgsmapthemecollection.h | 12 +++-- src/core/vector/qgsvectorlayer.h | 14 ++++-- 16 files changed, 267 insertions(+), 62 deletions(-) diff --git a/python/PyQt6/core/auto_additions/qgsapplication.py b/python/PyQt6/core/auto_additions/qgsapplication.py index ae031b817c8..9e89b359a23 100644 --- a/python/PyQt6/core/auto_additions/qgsapplication.py +++ b/python/PyQt6/core/auto_additions/qgsapplication.py @@ -11,7 +11,7 @@ QgsApplication.Sampler = QgsApplication.Cursor.Sampler QgsApplication.XDR = QgsApplication.endian_t.XDR QgsApplication.NDR = QgsApplication.endian_t.NDR try: - QgsApplication.__attribute_docs__ = {'customVariablesChanged': 'Emitted whenever a custom global variable changes.\n', 'nullRepresentationChanged': '\\copydoc :py:func:`~QgsApplication.nullRepresentation`\n', 'requestForTranslatableObjects': 'Emitted when project strings which require translation are being collected for inclusion in a .ts file.\nIn order to register translatable strings, connect to this signal and register the strings within the specified ``translationContext``.\n\n.. versionadded:: 3.4\n', 'localeChanged': 'Emitted when project locale has been changed.\n\n.. versionadded:: 3.22.2\n'} + QgsApplication.__attribute_docs__ = {'customVariablesChanged': 'Emitted whenever a custom global variable changes.\n', 'nullRepresentationChanged': 'Emitted when the string representating the `NULL` value is changed.\n\n.. seealso:: :py:func:`setNullRepresentation`\n\n.. seealso:: :py:func:`nullRepresentation`\n', 'requestForTranslatableObjects': 'Emitted when project strings which require translation are being collected for inclusion in a .ts file.\nIn order to register translatable strings, connect to this signal and register the strings within the specified ``translationContext``.\n\n.. versionadded:: 3.4\n', 'localeChanged': 'Emitted when project locale has been changed.\n\n.. versionadded:: 3.22.2\n'} except NameError: pass QgsApplication.instance = staticmethod(QgsApplication.instance) diff --git a/python/PyQt6/core/auto_additions/qgsmapthemecollection.py b/python/PyQt6/core/auto_additions/qgsmapthemecollection.py index 08496349a60..3dbae2e847b 100644 --- a/python/PyQt6/core/auto_additions/qgsmapthemecollection.py +++ b/python/PyQt6/core/auto_additions/qgsmapthemecollection.py @@ -4,7 +4,7 @@ try: except NameError: pass try: - QgsMapThemeCollection.__attribute_docs__ = {'mapThemesChanged': 'Emitted when map themes within the collection are changed.\n', 'mapThemeChanged': 'Emitted when a map theme changes definition.\n', 'mapThemeRenamed': 'Emitted when a map theme within the collection is renamed.\n\n.. versionadded:: 3.14\n', 'projectChanged': 'Emitted when the project changes\n\n\\copydoc :py:func:`~QgsMapThemeCollection.project`\n'} + QgsMapThemeCollection.__attribute_docs__ = {'mapThemesChanged': 'Emitted when map themes within the collection are changed.\n', 'mapThemeChanged': 'Emitted when a map theme changes definition.\n', 'mapThemeRenamed': 'Emitted when a map theme within the collection is renamed.\n\n.. versionadded:: 3.14\n', 'projectChanged': 'Emitted when the project changes\n\n.. seealso:: :py:func:`project`\n\n.. seealso:: :py:func:`setProject`\n'} except NameError: pass QgsMapThemeCollection.createThemeFromCurrentState = staticmethod(QgsMapThemeCollection.createThemeFromCurrentState) diff --git a/python/PyQt6/core/auto_generated/actions/qgsactionscope.sip.in b/python/PyQt6/core/auto_generated/actions/qgsactionscope.sip.in index de585c9ff1f..013bdc805f5 100644 --- a/python/PyQt6/core/auto_generated/actions/qgsactionscope.sip.in +++ b/python/PyQt6/core/auto_generated/actions/qgsactionscope.sip.in @@ -63,50 +63,85 @@ of the corresponding properties. QgsExpressionContextScope expressionContextScope() const; %Docstring +Returns the expression context scope for the action scope. + An expression scope may offer additional variables for an action scope. This can be an `field_name` for the attribute which was clicked or `click_x` and `click_y` for actions which are available as map canvas clicks. + +.. seealso:: :py:func:`setExpressionContextScope` %End void setExpressionContextScope( const QgsExpressionContextScope &expressionContextScope ); %Docstring -\copydoc :py:func:`~QgsActionScope.expressionContextScope` +Sets the expression context scope for the action scope. + +An expression scope may offer additional variables for an action scope. +This can be an `field_name` for the attribute which was clicked or +`click_x` and `click_y` for actions which are available as map canvas clicks. + +.. seealso:: :py:func:`expressionContextScope` %End QString id() const; %Docstring -A unique identifier for this action scope. +Returns the unique identifier for this action scope. + +.. seealso:: :py:func:`setId` %End void setId( const QString &id ); %Docstring -\copydoc :py:func:`~QgsActionScope.id` +Sets the unique ``id`` for this action scope. + +.. seealso:: :py:func:`id` %End QString title() const; %Docstring +Returns the action scope's title. + The title is a human readable and translated string that will be presented to the user in the properties dialog. + +.. seealso:: :py:func:`setTitle` %End + void setTitle( const QString &title ); %Docstring -\copydoc :py:func:`~QgsActionScope.title` +Sets the action scope's ``title``. + +The title should be a human readable and translated string that will be +presented to the user in the properties dialog. + +.. seealso:: :py:func:`title` %End QString description() const; %Docstring +Returns the action scope's description. + The description should be a longer description of where actions in this scope are available. It is not necessary to list the available expression variables in here, they are extracted automatically from the :py:func:`~QgsActionScope.expressionContextScope`. + +.. seealso:: :py:func:`setDescription` %End + void setDescription( const QString &description ); %Docstring -\copydoc :py:func:`~QgsActionScope.description` +Sets the action scope's ``description``. + +The description should be a longer description of where actions in this scope +are available. It is not necessary to list the available expression variables +in here, they are extracted automatically from the :py:func:`~QgsActionScope.expressionContextScope`. + +.. seealso:: :py:func:`description` %End bool isValid() const; %Docstring -Returns if this scope is valid. +Returns ``True`` if this scope is valid. %End Py_hash_t __hash__(); %MethodCode diff --git a/python/PyQt6/core/auto_generated/qgsapplication.sip.in b/python/PyQt6/core/auto_generated/qgsapplication.sip.in index 46ebf07eda5..4a32057936c 100644 --- a/python/PyQt6/core/auto_generated/qgsapplication.sip.in +++ b/python/PyQt6/core/auto_generated/qgsapplication.sip.in @@ -986,17 +986,32 @@ differently across work stations. static QString nullRepresentation(); %Docstring -This string is used to represent the value `NULL` throughout QGIS. +Returns the string used to represent the value `NULL` throughout QGIS. -In general, when passing values around, prefer to use a null QVariant -`QVariant( field.type() )` or `QVariant( QVariant.Int )`. This value -should only be used in the final presentation step when showing values -in a widget or sending it to a web browser. +.. note:: + + In general, when passing values around, prefer to use an invalid QVariant. + The :py:func:`~QgsApplication.nullRepresentation` value should only be used in the final presentation step when showing values + in a widget or sending it to a web browser. + +.. seealso:: :py:func:`setNullRepresentation` + +.. seealso:: :py:func:`nullRepresentationChanged` %End static void setNullRepresentation( const QString &nullRepresentation ); %Docstring -\copydoc :py:func:`~QgsApplication.nullRepresentation` +Sets the string used to represent the value `NULL` throughout QGIS. + +.. note:: + + In general, when passing values around, prefer to use an invalid QVariant. + The :py:func:`~QgsApplication.nullRepresentation` value should only be used in the final presentation step when showing values + in a widget or sending it to a web browser. + +.. seealso:: :py:func:`nullRepresentation` + +.. seealso:: :py:func:`nullRepresentationChanged` %End static QVariantMap customVariables(); @@ -1080,10 +1095,13 @@ Emits the signal to collect all the strings of .qgs to be included in ts file Emitted whenever a custom global variable changes. %End - void nullRepresentationChanged(); %Docstring -\copydoc :py:func:`~QgsApplication.nullRepresentation` +Emitted when the string representating the `NULL` value is changed. + +.. seealso:: :py:func:`setNullRepresentation` + +.. seealso:: :py:func:`nullRepresentation` %End void requestForTranslatableObjects( QgsTranslationContext *translationContext ); diff --git a/python/PyQt6/core/auto_generated/qgsmapthemecollection.sip.in b/python/PyQt6/core/auto_generated/qgsmapthemecollection.sip.in index 5d889a2626f..6bf586535c8 100644 --- a/python/PyQt6/core/auto_generated/qgsmapthemecollection.sip.in +++ b/python/PyQt6/core/auto_generated/qgsmapthemecollection.sip.in @@ -274,12 +274,20 @@ legend items of passed layer tree model. QgsProject *project(); %Docstring -The :py:class:`QgsProject` on which this map theme collection works. +Returns the :py:class:`QgsProject` on which this map theme collection works. + +.. seealso:: :py:func:`setProject` + +.. seealso:: :py:func:`projectChanged` %End void setProject( QgsProject *project ); %Docstring -\copydoc :py:func:`~QgsMapThemeCollection.project` +Sets the ``project`` on which this map theme collection works. + +.. seealso:: :py:func:`project` + +.. seealso:: :py:func:`projectChanged` %End QList< QgsMapLayer * > masterLayerOrder() const; @@ -322,7 +330,9 @@ Emitted when a map theme within the collection is renamed. %Docstring Emitted when the project changes -\copydoc :py:func:`~QgsMapThemeCollection.project` +.. seealso:: :py:func:`project` + +.. seealso:: :py:func:`setProject` %End }; diff --git a/python/PyQt6/core/auto_generated/vector/qgsvectorlayer.sip.in b/python/PyQt6/core/auto_generated/vector/qgsvectorlayer.sip.in index 119257bc5f9..3c3c4d64bbc 100644 --- a/python/PyQt6/core/auto_generated/vector/qgsvectorlayer.sip.in +++ b/python/PyQt6/core/auto_generated/vector/qgsvectorlayer.sip.in @@ -2282,13 +2282,22 @@ Returns the configuration flags of the field at given index void setEditorWidgetSetup( int index, const QgsEditorWidgetSetup &setup ); %Docstring -\copydoc editorWidgetSetup +Sets the editor widget ``setup`` for the field at the specified ``index``. + +The editor widget setup defines which :py:class:`QgsFieldFormatter` and editor widget will be used +for the field. + +.. seealso:: :py:func:`editorWidgetSetup` %End QgsEditorWidgetSetup editorWidgetSetup( int index ) const; %Docstring +Returns the editor widget setup for the field at the specified ``index``. + The editor widget setup defines which :py:class:`QgsFieldFormatter` and editor widget will be used -for the field at `index`. +for the field. + +.. seealso:: :py:func:`setEditorWidgetSetup` %End virtual QSet uniqueValues( int fieldIndex, int limit = -1 ) const ${SIP_FINAL}; diff --git a/python/core/auto_additions/qgsapplication.py b/python/core/auto_additions/qgsapplication.py index 0f97206af25..e8cf424a5cd 100644 --- a/python/core/auto_additions/qgsapplication.py +++ b/python/core/auto_additions/qgsapplication.py @@ -1,6 +1,6 @@ # The following has been generated automatically from src/core/qgsapplication.h try: - QgsApplication.__attribute_docs__ = {'customVariablesChanged': 'Emitted whenever a custom global variable changes.\n', 'nullRepresentationChanged': '\\copydoc :py:func:`~QgsApplication.nullRepresentation`\n', 'requestForTranslatableObjects': 'Emitted when project strings which require translation are being collected for inclusion in a .ts file.\nIn order to register translatable strings, connect to this signal and register the strings within the specified ``translationContext``.\n\n.. versionadded:: 3.4\n', 'localeChanged': 'Emitted when project locale has been changed.\n\n.. versionadded:: 3.22.2\n'} + QgsApplication.__attribute_docs__ = {'customVariablesChanged': 'Emitted whenever a custom global variable changes.\n', 'nullRepresentationChanged': 'Emitted when the string representating the `NULL` value is changed.\n\n.. seealso:: :py:func:`setNullRepresentation`\n\n.. seealso:: :py:func:`nullRepresentation`\n', 'requestForTranslatableObjects': 'Emitted when project strings which require translation are being collected for inclusion in a .ts file.\nIn order to register translatable strings, connect to this signal and register the strings within the specified ``translationContext``.\n\n.. versionadded:: 3.4\n', 'localeChanged': 'Emitted when project locale has been changed.\n\n.. versionadded:: 3.22.2\n'} except NameError: pass QgsApplication.instance = staticmethod(QgsApplication.instance) diff --git a/python/core/auto_additions/qgsmapthemecollection.py b/python/core/auto_additions/qgsmapthemecollection.py index 08496349a60..3dbae2e847b 100644 --- a/python/core/auto_additions/qgsmapthemecollection.py +++ b/python/core/auto_additions/qgsmapthemecollection.py @@ -4,7 +4,7 @@ try: except NameError: pass try: - QgsMapThemeCollection.__attribute_docs__ = {'mapThemesChanged': 'Emitted when map themes within the collection are changed.\n', 'mapThemeChanged': 'Emitted when a map theme changes definition.\n', 'mapThemeRenamed': 'Emitted when a map theme within the collection is renamed.\n\n.. versionadded:: 3.14\n', 'projectChanged': 'Emitted when the project changes\n\n\\copydoc :py:func:`~QgsMapThemeCollection.project`\n'} + QgsMapThemeCollection.__attribute_docs__ = {'mapThemesChanged': 'Emitted when map themes within the collection are changed.\n', 'mapThemeChanged': 'Emitted when a map theme changes definition.\n', 'mapThemeRenamed': 'Emitted when a map theme within the collection is renamed.\n\n.. versionadded:: 3.14\n', 'projectChanged': 'Emitted when the project changes\n\n.. seealso:: :py:func:`project`\n\n.. seealso:: :py:func:`setProject`\n'} except NameError: pass QgsMapThemeCollection.createThemeFromCurrentState = staticmethod(QgsMapThemeCollection.createThemeFromCurrentState) diff --git a/python/core/auto_generated/actions/qgsactionscope.sip.in b/python/core/auto_generated/actions/qgsactionscope.sip.in index cab2a40da02..48c50b4159f 100644 --- a/python/core/auto_generated/actions/qgsactionscope.sip.in +++ b/python/core/auto_generated/actions/qgsactionscope.sip.in @@ -63,50 +63,85 @@ of the corresponding properties. QgsExpressionContextScope expressionContextScope() const; %Docstring +Returns the expression context scope for the action scope. + An expression scope may offer additional variables for an action scope. This can be an `field_name` for the attribute which was clicked or `click_x` and `click_y` for actions which are available as map canvas clicks. + +.. seealso:: :py:func:`setExpressionContextScope` %End void setExpressionContextScope( const QgsExpressionContextScope &expressionContextScope ); %Docstring -\copydoc :py:func:`~QgsActionScope.expressionContextScope` +Sets the expression context scope for the action scope. + +An expression scope may offer additional variables for an action scope. +This can be an `field_name` for the attribute which was clicked or +`click_x` and `click_y` for actions which are available as map canvas clicks. + +.. seealso:: :py:func:`expressionContextScope` %End QString id() const; %Docstring -A unique identifier for this action scope. +Returns the unique identifier for this action scope. + +.. seealso:: :py:func:`setId` %End void setId( const QString &id ); %Docstring -\copydoc :py:func:`~QgsActionScope.id` +Sets the unique ``id`` for this action scope. + +.. seealso:: :py:func:`id` %End QString title() const; %Docstring +Returns the action scope's title. + The title is a human readable and translated string that will be presented to the user in the properties dialog. + +.. seealso:: :py:func:`setTitle` %End + void setTitle( const QString &title ); %Docstring -\copydoc :py:func:`~QgsActionScope.title` +Sets the action scope's ``title``. + +The title should be a human readable and translated string that will be +presented to the user in the properties dialog. + +.. seealso:: :py:func:`title` %End QString description() const; %Docstring +Returns the action scope's description. + The description should be a longer description of where actions in this scope are available. It is not necessary to list the available expression variables in here, they are extracted automatically from the :py:func:`~QgsActionScope.expressionContextScope`. + +.. seealso:: :py:func:`setDescription` %End + void setDescription( const QString &description ); %Docstring -\copydoc :py:func:`~QgsActionScope.description` +Sets the action scope's ``description``. + +The description should be a longer description of where actions in this scope +are available. It is not necessary to list the available expression variables +in here, they are extracted automatically from the :py:func:`~QgsActionScope.expressionContextScope`. + +.. seealso:: :py:func:`description` %End bool isValid() const; %Docstring -Returns if this scope is valid. +Returns ``True`` if this scope is valid. %End long __hash__(); %MethodCode diff --git a/python/core/auto_generated/qgsapplication.sip.in b/python/core/auto_generated/qgsapplication.sip.in index 53b9ea16cd8..8cf16388874 100644 --- a/python/core/auto_generated/qgsapplication.sip.in +++ b/python/core/auto_generated/qgsapplication.sip.in @@ -986,17 +986,32 @@ differently across work stations. static QString nullRepresentation(); %Docstring -This string is used to represent the value `NULL` throughout QGIS. +Returns the string used to represent the value `NULL` throughout QGIS. -In general, when passing values around, prefer to use a null QVariant -`QVariant( field.type() )` or `QVariant( QVariant.Int )`. This value -should only be used in the final presentation step when showing values -in a widget or sending it to a web browser. +.. note:: + + In general, when passing values around, prefer to use an invalid QVariant. + The :py:func:`~QgsApplication.nullRepresentation` value should only be used in the final presentation step when showing values + in a widget or sending it to a web browser. + +.. seealso:: :py:func:`setNullRepresentation` + +.. seealso:: :py:func:`nullRepresentationChanged` %End static void setNullRepresentation( const QString &nullRepresentation ); %Docstring -\copydoc :py:func:`~QgsApplication.nullRepresentation` +Sets the string used to represent the value `NULL` throughout QGIS. + +.. note:: + + In general, when passing values around, prefer to use an invalid QVariant. + The :py:func:`~QgsApplication.nullRepresentation` value should only be used in the final presentation step when showing values + in a widget or sending it to a web browser. + +.. seealso:: :py:func:`nullRepresentation` + +.. seealso:: :py:func:`nullRepresentationChanged` %End static QVariantMap customVariables(); @@ -1080,10 +1095,13 @@ Emits the signal to collect all the strings of .qgs to be included in ts file Emitted whenever a custom global variable changes. %End - void nullRepresentationChanged(); %Docstring -\copydoc :py:func:`~QgsApplication.nullRepresentation` +Emitted when the string representating the `NULL` value is changed. + +.. seealso:: :py:func:`setNullRepresentation` + +.. seealso:: :py:func:`nullRepresentation` %End void requestForTranslatableObjects( QgsTranslationContext *translationContext ); diff --git a/python/core/auto_generated/qgsmapthemecollection.sip.in b/python/core/auto_generated/qgsmapthemecollection.sip.in index 5d889a2626f..6bf586535c8 100644 --- a/python/core/auto_generated/qgsmapthemecollection.sip.in +++ b/python/core/auto_generated/qgsmapthemecollection.sip.in @@ -274,12 +274,20 @@ legend items of passed layer tree model. QgsProject *project(); %Docstring -The :py:class:`QgsProject` on which this map theme collection works. +Returns the :py:class:`QgsProject` on which this map theme collection works. + +.. seealso:: :py:func:`setProject` + +.. seealso:: :py:func:`projectChanged` %End void setProject( QgsProject *project ); %Docstring -\copydoc :py:func:`~QgsMapThemeCollection.project` +Sets the ``project`` on which this map theme collection works. + +.. seealso:: :py:func:`project` + +.. seealso:: :py:func:`projectChanged` %End QList< QgsMapLayer * > masterLayerOrder() const; @@ -322,7 +330,9 @@ Emitted when a map theme within the collection is renamed. %Docstring Emitted when the project changes -\copydoc :py:func:`~QgsMapThemeCollection.project` +.. seealso:: :py:func:`project` + +.. seealso:: :py:func:`setProject` %End }; diff --git a/python/core/auto_generated/vector/qgsvectorlayer.sip.in b/python/core/auto_generated/vector/qgsvectorlayer.sip.in index 119257bc5f9..3c3c4d64bbc 100644 --- a/python/core/auto_generated/vector/qgsvectorlayer.sip.in +++ b/python/core/auto_generated/vector/qgsvectorlayer.sip.in @@ -2282,13 +2282,22 @@ Returns the configuration flags of the field at given index void setEditorWidgetSetup( int index, const QgsEditorWidgetSetup &setup ); %Docstring -\copydoc editorWidgetSetup +Sets the editor widget ``setup`` for the field at the specified ``index``. + +The editor widget setup defines which :py:class:`QgsFieldFormatter` and editor widget will be used +for the field. + +.. seealso:: :py:func:`editorWidgetSetup` %End QgsEditorWidgetSetup editorWidgetSetup( int index ) const; %Docstring +Returns the editor widget setup for the field at the specified ``index``. + The editor widget setup defines which :py:class:`QgsFieldFormatter` and editor widget will be used -for the field at `index`. +for the field. + +.. seealso:: :py:func:`setEditorWidgetSetup` %End virtual QSet uniqueValues( int fieldIndex, int limit = -1 ) const ${SIP_FINAL}; diff --git a/src/core/actions/qgsactionscope.h b/src/core/actions/qgsactionscope.h index 5355e3e2bac..f2bee80883e 100644 --- a/src/core/actions/qgsactionscope.h +++ b/src/core/actions/qgsactionscope.h @@ -70,49 +70,85 @@ class CORE_EXPORT QgsActionScope bool operator==( const QgsActionScope &other ) const; /** + * Returns the expression context scope for the action scope. + * * An expression scope may offer additional variables for an action scope. * This can be an `field_name` for the attribute which was clicked or * `click_x` and `click_y` for actions which are available as map canvas clicks. * + * \see setExpressionContextScope() */ QgsExpressionContextScope expressionContextScope() const; /** - * \copydoc expressionContextScope() + * Sets the expression context scope for the action scope. + * + * An expression scope may offer additional variables for an action scope. + * This can be an `field_name` for the attribute which was clicked or + * `click_x` and `click_y` for actions which are available as map canvas clicks. + * + * \see expressionContextScope() */ void setExpressionContextScope( const QgsExpressionContextScope &expressionContextScope ); /** - * A unique identifier for this action scope. + * Returns the unique identifier for this action scope. * + * \see setId() */ QString id() const; - //! \copydoc id() + /** + * Sets the unique \a id for this action scope. + * + * \see id() + */ void setId( const QString &id ); /** + * Returns the action scope's title. + * * The title is a human readable and translated string that will be * presented to the user in the properties dialog. * + * \see setTitle() */ QString title() const; - //! \copydoc title() + + /** + * Sets the action scope's \a title. + * + * The title should be a human readable and translated string that will be + * presented to the user in the properties dialog. + * + * \see title() + */ void setTitle( const QString &title ); /** + * Returns the action scope's description. + * * The description should be a longer description of where actions in this scope * are available. It is not necessary to list the available expression variables * in here, they are extracted automatically from the expressionContextScope(). * + * \see setDescription() */ QString description() const; - //! \copydoc description() + + /** + * Sets the action scope's \a description. + * + * The description should be a longer description of where actions in this scope + * are available. It is not necessary to list the available expression variables + * in here, they are extracted automatically from the expressionContextScope(). + * + * \see description() + */ void setDescription( const QString &description ); /** - * Returns if this scope is valid. - * + * Returns TRUE if this scope is valid. */ bool isValid() const; #ifdef SIP_RUN diff --git a/src/core/qgsapplication.h b/src/core/qgsapplication.h index 842e97961fb..138d50b5c84 100644 --- a/src/core/qgsapplication.h +++ b/src/core/qgsapplication.h @@ -964,17 +964,26 @@ class CORE_EXPORT QgsApplication : public QApplication static QgsLocalizedDataPathRegistry *localizedDataPathRegistry() SIP_KEEPREFERENCE; /** - * This string is used to represent the value `NULL` throughout QGIS. + * Returns the string used to represent the value `NULL` throughout QGIS. * - * In general, when passing values around, prefer to use a null QVariant - * `QVariant( field.type() )` or `QVariant( QVariant::Int )`. This value - * should only be used in the final presentation step when showing values + * \note In general, when passing values around, prefer to use an invalid QVariant. + * The nullRepresentation() value should only be used in the final presentation step when showing values * in a widget or sending it to a web browser. + * + * \see setNullRepresentation() + * \see nullRepresentationChanged() */ static QString nullRepresentation(); /** - * \copydoc nullRepresentation() + * Sets the string used to represent the value `NULL` throughout QGIS. + * + * \note In general, when passing values around, prefer to use an invalid QVariant. + * The nullRepresentation() value should only be used in the final presentation step when showing values + * in a widget or sending it to a web browser. + * + * \see nullRepresentation() + * \see nullRepresentationChanged() */ static void setNullRepresentation( const QString &nullRepresentation ); @@ -1072,9 +1081,11 @@ class CORE_EXPORT QgsApplication : public QApplication */ void customVariablesChanged(); - /** - * \copydoc nullRepresentation() + * Emitted when the string representating the `NULL` value is changed. + * + * \see setNullRepresentation() + * \see nullRepresentation() */ void nullRepresentationChanged(); diff --git a/src/core/qgsmapthemecollection.h b/src/core/qgsmapthemecollection.h index 47758ec5b74..63cf0a98308 100644 --- a/src/core/qgsmapthemecollection.h +++ b/src/core/qgsmapthemecollection.h @@ -324,13 +324,18 @@ class CORE_EXPORT QgsMapThemeCollection : public QObject void applyTheme( const QString &name, QgsLayerTreeGroup *root, QgsLayerTreeModel *model ); /** - * The QgsProject on which this map theme collection works. + * Returns the QgsProject on which this map theme collection works. * + * \see setProject() + * \see projectChanged() */ QgsProject *project(); /** - * \copydoc project() + * Sets the \a project on which this map theme collection works. + * + * \see project() + * \see projectChanged() */ void setProject( QgsProject *project ); @@ -370,7 +375,8 @@ class CORE_EXPORT QgsMapThemeCollection : public QObject /** * Emitted when the project changes * - * \copydoc project() + * \see project() + * \see setProject() */ void projectChanged(); diff --git a/src/core/vector/qgsvectorlayer.h b/src/core/vector/qgsvectorlayer.h index 4440d5dd096..3b001f09015 100644 --- a/src/core/vector/qgsvectorlayer.h +++ b/src/core/vector/qgsvectorlayer.h @@ -2191,14 +2191,22 @@ class CORE_EXPORT QgsVectorLayer : public QgsMapLayer, public QgsExpressionConte Qgis::FieldConfigurationFlags fieldConfigurationFlags( int index ) const; /** - * \copydoc editorWidgetSetup + * Sets the editor widget \a setup for the field at the specified \a index. + * + * The editor widget setup defines which QgsFieldFormatter and editor widget will be used + * for the field. + * + * \see editorWidgetSetup() */ void setEditorWidgetSetup( int index, const QgsEditorWidgetSetup &setup ); /** - * The editor widget setup defines which QgsFieldFormatter and editor widget will be used - * for the field at `index`. + * Returns the editor widget setup for the field at the specified \a index. * + * The editor widget setup defines which QgsFieldFormatter and editor widget will be used + * for the field. + * + * \see setEditorWidgetSetup() */ QgsEditorWidgetSetup editorWidgetSetup( int index ) const;