Skip to content
Permalink
Browse files

[sipify] Correctly convert doxygen warning blocks to sphinx warnings

  • Loading branch information
nyalldawson committed Dec 23, 2017
1 parent 87b8a37 commit c7e37e89eb2b4e8aa577116aba72812e4bdf6cac
@@ -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.

@@ -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()`
@@ -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
@@ -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.

@@ -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()`
@@ -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()`
@@ -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

};
@@ -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();
@@ -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";
}

0 comments on commit c7e37e8

Please sign in to comment.
You can’t perform that action at this time.