diff --git a/python/core/geocms/geonode/qgsgeonoderequest.sip b/python/core/geocms/geonode/qgsgeonoderequest.sip index 046ef65f01c..e89e82998bf 100644 --- a/python/core/geocms/geonode/qgsgeonoderequest.sip +++ b/python/core/geocms/geonode/qgsgeonoderequest.sip @@ -103,7 +103,9 @@ Any existing request will be aborted. Calling this method does not block while waiting for a result. -\warning When using the non-blocking methods in this class, sending +.. warning:: + + When using the non-blocking methods in this class, sending overlapping requests results in undefined behavior. Use separate instances of QgsGeoNodeRequest instead to avoid this. @@ -129,7 +131,9 @@ with the result. This method is non-blocking and returns immediately. -\warning When using the non-blocking methods in this class, sending +.. warning:: + + When using the non-blocking methods in this class, sending overlapping requests results in undefined behavior. Use separate instances of QgsGeoNodeRequest instead to avoid this. diff --git a/python/core/locator/qgslocator.sip b/python/core/locator/qgslocator.sip index 51d42930cfd..9ab35c620b6 100644 --- a/python/core/locator/qgslocator.sip +++ b/python/core/locator/qgslocator.sip @@ -52,7 +52,10 @@ Destructor for QgsLocator. Destruction will block while any currently running qu %Docstring Registers a ``filter`` within the locator. Ownership of the filter is transferred to the locator. -\warning Plugins which register filters to the locator must take care to correctly call + +.. warning:: + + Plugins which register filters to the locator must take care to correctly call deregisterFilter() and deregister their filters upon plugin unload to avoid crashes. .. seealso:: :py:func:`deregisterFilter()` diff --git a/python/core/qgscoordinatetransform.sip b/python/core/qgscoordinatetransform.sip index 68583cb1b91..9e4dbac9812 100644 --- a/python/core/qgscoordinatetransform.sip +++ b/python/core/qgscoordinatetransform.sip @@ -65,7 +65,9 @@ to utilize. Python scripts should generally use the constructor variant which accepts a QgsProject instance instead of this constructor. -\warning Do NOT use an empty/default constructed QgsCoordinateTransformContext() +.. warning:: + + Do NOT use an empty/default constructed QgsCoordinateTransformContext() object when creating QgsCoordinateTransform objects. This prevents correct datum transform handling and may result in inaccurate transformations. Always ensure that the QgsCoordinateTransformContext object is correctly retrieved diff --git a/python/core/qgscoordinatetransformcontext.sip b/python/core/qgscoordinatetransformcontext.sip index 34249cb7c87..a4334d60791 100644 --- a/python/core/qgscoordinatetransformcontext.sip +++ b/python/core/qgscoordinatetransformcontext.sip @@ -79,7 +79,9 @@ The map keys will be :py:func:`QgsCoordinateReferenceSystems.authid()`s. If either the source transform ID or destination transform ID is -1, then no datum transform is required for transformations for that source or destination. -\warning This method should not be used to calculate the corresponding datum transforms +.. warning:: + + This method should not be used to calculate the corresponding datum transforms to use for a coordinate transform. Instead, always use calculateDatumTransforms() to determine this. diff --git a/python/core/symbology/qgsrenderer.sip b/python/core/symbology/qgsrenderer.sip index 0e80f02c43e..2791b46c179 100644 --- a/python/core/symbology/qgsrenderer.sip +++ b/python/core/symbology/qgsrenderer.sip @@ -115,7 +115,10 @@ be followed by a corresponding call to stopRender() after all features have been .. seealso:: :py:func:`stopRender()` -\warning This method is not thread safe. Before calling startRender() in a non-main thread, + +.. warning:: + + This method is not thread safe. Before calling startRender() in a non-main thread, the renderer should instead be cloned and startRender()/stopRender() called on the clone. %End @@ -125,7 +128,9 @@ Must be called when a render cycle has finished, to allow the renderer to clean Calls to stopRender() must always be preceded by a call to startRender(). -\warning This method is not thread safe. Before calling startRender() in a non-main thread, +.. warning:: + + This method is not thread safe. Before calling startRender() in a non-main thread, the renderer should instead be cloned and startRender()/stopRender() called on the clone. .. seealso:: :py:func:`startRender()` diff --git a/python/gui/qgisinterface.sip b/python/gui/qgisinterface.sip index 613ed1bef58..0cf92cba9f7 100644 --- a/python/gui/qgisinterface.sip +++ b/python/gui/qgisinterface.sip @@ -912,7 +912,10 @@ More information here: http://qt-project.org/forums/viewthread/27098 %Docstring Registers a locator ``filter`` for the app's locator bar. Ownership of the filter is transferred to the locator. -\warning Plugins which register filters to the locator bar must take care to correctly call + +.. warning:: + + Plugins which register filters to the locator bar must take care to correctly call deregisterLocatorFilter() and deregister their filters upon plugin unload to avoid crashes. .. seealso:: :py:func:`deregisterLocatorFilter()` diff --git a/python/gui/qgsprojectionselectiondialog.sip b/python/gui/qgsprojectionselectiondialog.sip index b3efb63415a..e64f2b0673c 100644 --- a/python/gui/qgsprojectionselectiondialog.sip +++ b/python/gui/qgsprojectionselectiondialog.sip @@ -97,7 +97,9 @@ by the given Coordinate Reference Systems. list of projections by. This is useful in (e.g.) WMS situations where you just want to offer what the WMS server can support. -\warning This function's behavior is undefined if it is called after the dialog is shown. +.. warning:: + + This function's behavior is undefined if it is called after the dialog is shown. %End }; diff --git a/python/gui/qgsprojectionselectiontreewidget.sip b/python/gui/qgsprojectionselectiontreewidget.sip index a16d7ee24d0..9d67a596aef 100644 --- a/python/gui/qgsprojectionselectiontreewidget.sip +++ b/python/gui/qgsprojectionselectiontreewidget.sip @@ -135,7 +135,9 @@ by the given Coordinate Reference Systems. list of projections by. This is useful in (e.g.) WMS situations where you just want to offer what the WMS server can support. -\warning This function's behavior is undefined if it is called after the widget is shown. +.. warning:: + + This function's behavior is undefined if it is called after the widget is shown. %End void pushProjectionToFront(); diff --git a/scripts/sipify.pl b/scripts/sipify.pl index 3e1e7136452..0a7deafdccc 100755 --- a/scripts/sipify.pl +++ b/scripts/sipify.pl @@ -203,6 +203,9 @@ sub processDoxygenLine { if ( $line =~ m/[\\@]note (.*)/ ) { return "\n.. note::\n\n $1\n"; } + if ( $line =~ m/[\\@]warning (.*)/ ) { + return "\n.. warning::\n\n $1\n"; + } if ( $line =~ m/[\\@]brief (.*)/ ) { return " $1\n"; }