From 3cf7c341460e91289eacecee0d5817ca2ab50c77 Mon Sep 17 00:00:00 2001 From: Blottiere Paul Date: Mon, 9 Jul 2018 16:54:42 +0100 Subject: [PATCH] Update doc for QgsConfigCache --- python/server/auto_generated/qgsconfigcache.sip.in | 9 ++++++++- src/server/qgsconfigcache.h | 11 +++++++++-- 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/python/server/auto_generated/qgsconfigcache.sip.in b/python/server/auto_generated/qgsconfigcache.sip.in index 031fdbcd360..0186721f478 100644 --- a/python/server/auto_generated/qgsconfigcache.sip.in +++ b/python/server/auto_generated/qgsconfigcache.sip.in @@ -21,13 +21,20 @@ Cache for server configuration. #include "qgsconfigcache.h" %End public: + static QgsConfigCache *instance(); +%Docstring +Returns the current instance. +%End void removeEntry( const QString &path ); +%Docstring +Removes an entry from cache. +%End const QgsProject *project( const QString &path ); %Docstring -If the project is not cached yet, then the project is read thank to the +If the project is not cached yet, then the project is read thanks to the path. If the project is not available, then a None is returned. :param path: the filename of the QGIS project diff --git a/src/server/qgsconfigcache.h b/src/server/qgsconfigcache.h index 19be168c78e..544fdf125c6 100644 --- a/src/server/qgsconfigcache.h +++ b/src/server/qgsconfigcache.h @@ -38,13 +38,20 @@ class SERVER_EXPORT QgsConfigCache : public QObject { Q_OBJECT public: + + /** + * Returns the current instance. + */ static QgsConfigCache *instance(); + /** + * Removes an entry from cache. + */ void removeEntry( const QString &path ); /** - * If the project is not cached yet, then the project is read thank to the - * path. If the project is not available, then a nullptr is returned. + * If the project is not cached yet, then the project is read thanks to the + * path. If the project is not available, then a nullptr is returned. * \param path the filename of the QGIS project * \returns the project or nullptr if an error happened * \since QGIS 3.0