Skip to content

Commit

Permalink
[Server] Fixing spelling and doc coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
rldhont committed Aug 21, 2018
1 parent 9463d04 commit 65f9c91
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
13 changes: 7 additions & 6 deletions src/server/qgsservercachefilter.h
Expand Up @@ -37,6 +37,7 @@ class QgsServerInterface;
* \ingroup server
* \class QgsServerCacheFilter
* \brief Class defining cache interface for QGIS Server plugins.
* \since QGIS 3.4
*/
class SERVER_EXPORT QgsServerCacheFilter
{
Expand All @@ -56,7 +57,7 @@ class SERVER_EXPORT QgsServerCacheFilter
* Returns cached document (or 0 if document not in cache) like capabilities
* \param project the project used to generate the document to provide path
* \param request the request used to generate the document to provider parameters or data
* \param key the key provided by the access control to identify differents documents for the same request
* \param key the key provided by the access control to identify different documents for the same request
* \returns QByteArray of the cached document or an empty one if no corresponding document found
*/
virtual QByteArray getCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
Expand All @@ -66,7 +67,7 @@ class SERVER_EXPORT QgsServerCacheFilter
* \param doc the document to cache
* \param project the project used to generate the document to provide path
* \param request the request used to generate the document to provider parameters or data
* \param key the key provided by the access control to identify differents documents for the same request
* \param key the key provided by the access control to identify different documents for the same request
* \returns true if the document has been cached
*/
virtual bool setCachedDocument( const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
Expand All @@ -75,7 +76,7 @@ class SERVER_EXPORT QgsServerCacheFilter
* Deletes the cached document
* \param project the project used to generate the document to provide path
* \param request the request used to generate the document to provider parameters or data
* \param key the key provided by the access control to identify differents documents for the same request
* \param key the key provided by the access control to identify different documents for the same request
* \returns true if the document has been deleted
*/
virtual bool deleteCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
Expand All @@ -91,7 +92,7 @@ class SERVER_EXPORT QgsServerCacheFilter
* Returns cached image (or 0 if document not in cache) like tiles
* \param project the project used to generate the image to provide path
* \param request the request used to generate the image to provider parameters or data
* \param key the key provided by the access control to identify differents images for the same request
* \param key the key provided by the access control to identify different images for the same request
* \returns QByteArray of the cached image or an empty one if no corresponding image found
*/
virtual QByteArray getCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
Expand All @@ -101,7 +102,7 @@ class SERVER_EXPORT QgsServerCacheFilter
* \param img the document to cache
* \param project the project used to generate the image to provide path
* \param request the request used to generate the image to provider parameters or data
* \param key the key provided by the access control to identify differents images for the same request
* \param key the key provided by the access control to identify different images for the same request
* \returns true if the image has been cached
*/
virtual bool setCachedImage( const QByteArray *img, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
Expand All @@ -110,7 +111,7 @@ class SERVER_EXPORT QgsServerCacheFilter
* Deletes the cached image
* \param project the project used to generate the image to provide path
* \param request the request used to generate the image to provider parameters or data
* \param key the key provided by the access control to identify differents images for the same request
* \param key the key provided by the access control to identify different images for the same request
* \returns true if the image has been deleted
*/
virtual bool deleteCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
Expand Down
12 changes: 6 additions & 6 deletions src/server/qgsservercachemanager.h
Expand Up @@ -70,7 +70,7 @@ class SERVER_EXPORT QgsServerCacheManager
* Returns cached document (or 0 if document not in cache) like capabilities
* \param project the project used to generate the document to provide path
* \param request the request used to generate the document to provider parameters or data
* \param key the key provided by the access control to identify differents documents for the same request
* \param key the key provided by the access control to identify different documents for the same request
* \returns the cached document or 0 if no corresponding document found
*/
QByteArray getCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
Expand All @@ -80,7 +80,7 @@ class SERVER_EXPORT QgsServerCacheManager
* \param doc the document to cache
* \param project the project used to generate the document to provide path
* \param request the request used to generate the document to provider parameters or data
* \param key the key provided by the access control to identify differents documents for the same request
* \param key the key provided by the access control to identify different documents for the same request
* \returns true if the document has been cached
*/
bool setCachedDocument( const QDomDocument *doc, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
Expand All @@ -89,7 +89,7 @@ class SERVER_EXPORT QgsServerCacheManager
* Deletes the cached document
* \param project the project used to generate the document to provide path
* \param request the request used to generate the document to provider parameters or data
* \param key the key provided by the access control to identify differents documents for the same request
* \param key the key provided by the access control to identify different documents for the same request
* \returns true if the document has been deleted
*/
bool deleteCachedDocument( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
Expand All @@ -105,7 +105,7 @@ class SERVER_EXPORT QgsServerCacheManager
* Returns cached image (or 0 if image not in cache) like tiles
* \param project the project used to generate the image to provide path
* \param request the request used to generate the image to provider parameters or data
* \param key the key provided by the access control to identify differents images for the same request
* \param key the key provided by the access control to identify different images for the same request
* \returns the cached image or 0 if no corresponding image found
*/
QByteArray getCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
Expand All @@ -115,7 +115,7 @@ class SERVER_EXPORT QgsServerCacheManager
* \param img the image to cache
* \param project the project used to generate the image to provide path
* \param request the request used to generate the image to provider parameters or data
* \param key the key provided by the access control to identify differents images for the same request
* \param key the key provided by the access control to identify different images for the same request
* \returns true if the image has been cached
*/
bool setCachedImage( const QByteArray *img, const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
Expand All @@ -124,7 +124,7 @@ class SERVER_EXPORT QgsServerCacheManager
* Deletes the cached image
* \param project the project used to generate the image to provide path
* \param request the request used to generate the image to provider parameters or data
* \param key the key provided by the access control to identify differents images for the same request
* \param key the key provided by the access control to identify different images for the same request
* \returns true if the image has been deleted
*/
bool deleteCachedImage( const QgsProject *project, const QgsServerRequest &request, const QString &key ) const;
Expand Down
2 changes: 1 addition & 1 deletion src/server/services/wmts/qgswmtsgetcapabilities.cpp
Expand Up @@ -216,7 +216,7 @@ namespace QgsWmts
serviceElem.appendChild( onlineResourceElem );
}

//Contact informations
//Contact information
QString contactPerson = QgsServerProjectUtils::owsServiceContactPerson( *project );
QString contactPosition = QgsServerProjectUtils::owsServiceContactPosition( *project );
QString contactMail = QgsServerProjectUtils::owsServiceContactMail( *project );
Expand Down
6 changes: 3 additions & 3 deletions tests/src/python/test_qgsserver_cachemanager.py
Expand Up @@ -250,7 +250,7 @@ def test_getcapabilities(self):

cacheManager = self._server_iface.cacheManager()

self.assertTrue(cacheManager.deleteCachedDocuments(None), 'deleteCachedDocuments does not retrun True')
self.assertTrue(cacheManager.deleteCachedDocuments(None), 'deleteCachedDocuments does not return True')

filelist = [f for f in os.listdir(self._servercache._cache_dir) if f.endswith(".xml")]
self.assertEqual(len(filelist), 0, 'All files in cache are not deleted ')
Expand All @@ -275,7 +275,7 @@ def test_getcapabilities(self):
self.assertTrue(cDoc.setContent(cContent), 'cachedDocument not XML doc')
self.assertEqual(doc.documentElement().tagName(), cDoc.documentElement().tagName(), 'cachedDocument not equal to provide document')

self.assertTrue(cacheManager.deleteCachedDocuments(None), 'deleteCachedDocuments does not retrun True')
self.assertTrue(cacheManager.deleteCachedDocuments(None), 'deleteCachedDocuments does not return True')

def test_gettile(self):
project = self._project_path
Expand Down Expand Up @@ -386,7 +386,7 @@ def test_gettile(self):

cacheManager = self._server_iface.cacheManager()

self.assertTrue(cacheManager.deleteCachedImages(None), 'deleteCachedImages does not retrun True')
self.assertTrue(cacheManager.deleteCachedImages(None), 'deleteCachedImages does not return True')

filelist = [f for f in os.listdir(self._servercache._tile_cache_dir) if f.endswith(".png")]
self.assertEqual(len(filelist), 0, 'All images in cache are not deleted ')
Expand Down

0 comments on commit 65f9c91

Please sign in to comment.