From 63f5fa9c8654585c51dda5693e56cdee449fd49c Mon Sep 17 00:00:00 2001 From: Harrissou Sant-anna Date: Wed, 28 Aug 2019 00:06:04 +0200 Subject: [PATCH] Fix code sample rendering in pyqgis doc --- python/core/auto_generated/qgspathresolver.sip.in | 3 +++ src/core/qgspathresolver.h | 3 +++ 2 files changed, 6 insertions(+) diff --git a/python/core/auto_generated/qgspathresolver.sip.in b/python/core/auto_generated/qgspathresolver.sip.in index 0ccc1acd1c0..d04a59c2b06 100644 --- a/python/core/auto_generated/qgspathresolver.sip.in +++ b/python/core/auto_generated/qgspathresolver.sip.in @@ -54,6 +54,7 @@ The path pre-processor function is called before any bad layer handler. Setting a new ``processor`` replaces any existing processor. Example - replace an outdated folder path with a new one: + .. code-block:: python def my_processor(path): @@ -62,6 +63,7 @@ Example - replace an outdated folder path with a new one: QgsPathResolver.setPathPreprocessor(my_processor) Example - replace a stored database host with a new one: + .. code-block:: python def my_processor(path): @@ -71,6 +73,7 @@ Example - replace a stored database host with a new one: Example - replace stored database credentials with new ones: + .. code-block:: python def my_processor(path): diff --git a/src/core/qgspathresolver.h b/src/core/qgspathresolver.h index 5dbb809003f..583a52de520 100644 --- a/src/core/qgspathresolver.h +++ b/src/core/qgspathresolver.h @@ -79,6 +79,7 @@ class CORE_EXPORT QgsPathResolver * \note Setting a new \a processor replaces any existing processor. * * Example - replace an outdated folder path with a new one: + * * \code{.py} * def my_processor(path): * return path.replace('c:/Users/ClintBarton/Documents/Projects', 'x:/Projects/') @@ -87,6 +88,7 @@ class CORE_EXPORT QgsPathResolver * \endcode * * Example - replace a stored database host with a new one: + * * \code{.py} * def my_processor(path): * return path.replace('host=10.1.1.115', 'host=10.1.1.116') @@ -95,6 +97,7 @@ class CORE_EXPORT QgsPathResolver * \endcode * * Example - replace stored database credentials with new ones: + * * \code{.py} * def my_processor(path): * path = path.replace("user='gis_team'", "user='team_awesome'")