Skip to content

Commit

Permalink
Remove disableCache argument from python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
nyalldawson committed Jul 19, 2019
1 parent 9015a17 commit d439484
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 8 deletions.
Expand Up @@ -705,15 +705,13 @@ Returns a list of recently used projections
.. versionadded:: 2.7
%End

static void invalidateCache( bool disableCache = false );

static void invalidateCache();
%Docstring
Clears the internal cache used to initialize QgsCoordinateReferenceSystem objects.
This should be called whenever the srs database has been modified in order to ensure
that outdated CRS objects are not created.

If ``disableCache`` is ``True`` then the inbuilt cache will be completely disabled. This
argument is for internal use only.

.. versionadded:: 3.0
%End

Expand Down
6 changes: 2 additions & 4 deletions python/core/auto_generated/qgscoordinatetransform.sip.in
Expand Up @@ -392,15 +392,13 @@ Calling this method will overwrite any automatically calculated datum transform.
.. deprecated:: Unused on builds based on Proj 6.0 or later
%End

static void invalidateCache( bool disableCache = false );

static void invalidateCache();
%Docstring
Clears the internal cache used to initialize QgsCoordinateTransform objects.
This should be called whenever the srs database has
been modified in order to ensure that outdated CRS transforms are not created.

If ``disableCache`` is ``True`` then the inbuilt cache will be completely disabled. This
argument is for internal use only.

.. versionadded:: 3.0
%End

Expand Down
13 changes: 13 additions & 0 deletions src/core/qgscoordinatereferencesystem.h
Expand Up @@ -671,6 +671,8 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
*/
static QStringList recentProjections();

#ifndef SIP_RUN

/**
* Clears the internal cache used to initialize QgsCoordinateReferenceSystem objects.
* This should be called whenever the srs database has been modified in order to ensure
Expand All @@ -682,6 +684,17 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
* \since QGIS 3.0
*/
static void invalidateCache( bool disableCache = false );
#else

/**
* Clears the internal cache used to initialize QgsCoordinateReferenceSystem objects.
* This should be called whenever the srs database has been modified in order to ensure
* that outdated CRS objects are not created.
*
* \since QGIS 3.0
*/
static void invalidateCache( bool disableCache SIP_PYARGREMOVE = false );
#endif

// Mutators -----------------------------------
// We don't want to expose these to the public api since they won't create
Expand Down
13 changes: 13 additions & 0 deletions src/core/qgscoordinatetransform.h
Expand Up @@ -419,6 +419,8 @@ class CORE_EXPORT QgsCoordinateTransform
*/
Q_DECL_DEPRECATED void setDestinationDatumTransformId( int datumId ) SIP_DEPRECATED;

#ifndef SIP_RUN

/**
* Clears the internal cache used to initialize QgsCoordinateTransform objects.
* This should be called whenever the srs database has
Expand All @@ -430,6 +432,17 @@ class CORE_EXPORT QgsCoordinateTransform
* \since QGIS 3.0
*/
static void invalidateCache( bool disableCache = false );
#else

/**
* Clears the internal cache used to initialize QgsCoordinateTransform objects.
* This should be called whenever the srs database has
* been modified in order to ensure that outdated CRS transforms are not created.
*
* \since QGIS 3.0
*/
static void invalidateCache( bool disableCache SIP_PYARGREMOVE = false );
#endif

/**
* Computes an *estimated* conversion factor between source and destination units:
Expand Down

0 comments on commit d439484

Please sign in to comment.