Skip to content

Commit fcacb28

Browse files
committed
Fix coding style and update comments
1 parent 689f3b1 commit fcacb28

10 files changed

+28
-26
lines changed

python/server/qgsserverinterface.sip

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ typedef QMultiMap<int, QgsServerFilter*> QgsServerFiltersMap;
3939
class QgsServerInterface
4040
{
4141
%TypeHeaderCode
42-
#include "qgsserverinterface.h"
42+
#include "qgsserverinterface.h"
4343
%End
4444

4545
public:
@@ -61,26 +61,26 @@ class QgsServerInterface
6161
* Get pointer to the capabiblities cache
6262
* @return QgsCapabilitiesCache
6363
*/
64-
virtual QgsCapabilitiesCache* capabilitiesCache() = 0 /KeepReference/;
64+
virtual QgsCapabilitiesCache* capabilitiesCache() = 0 / KeepReference /;
6565

6666
/**
6767
* Get pointer to the request handler
6868
* @return QgsRequestHandler
6969
*/
70-
virtual QgsRequestHandler* requestHandler() = 0 /KeepReference/;
70+
virtual QgsRequestHandler* requestHandler() = 0 / KeepReference /;
7171

7272
/**
7373
* Register a QgsServerFilter
7474
* @param filter the QgsServerFilter to add
7575
* @param priority an optional priority for the filter order
7676
*/
77-
virtual void registerFilter( QgsServerFilter* filter /Transfer/, int priority = 0 ) = 0;
77+
virtual void registerFilter( QgsServerFilter* filter / Transfer / , int priority = 0 ) = 0;
7878

7979
/**
8080
* Set the filters map
8181
* @param filters the QgsServerFiltersMap
8282
*/
83-
virtual void setFilters( QgsServerFiltersMap* filters /Transfer/) = 0;
83+
virtual void setFilters( QgsServerFiltersMap* filters / Transfer / ) = 0;
8484

8585
/**
8686
* Return the list of current QgsServerFilter
@@ -92,13 +92,13 @@ class QgsServerInterface
9292
* @param accessControl the access control to register
9393
* @param priority the priority used to order them
9494
*/
95-
virtual void registerAccessControl( QgsAccessControlFilter* accessControl /Transfer/, int priority = 0 ) = 0;
95+
virtual void registerAccessControl( QgsAccessControlFilter* accessControl / Transfer / , int priority = 0 ) = 0;
9696

9797
/** Gets the registred access control filters */
9898
virtual const QgsAccessControl* accessControls() const = 0;
9999

100100
//! Return an enrironment variable, used to pass environment variables to python
101-
virtual QString getEnv(const QString& name ) const = 0;
101+
virtual QString getEnv( const QString& name ) const = 0;
102102

103103
/**
104104
* Return the configuration file path
@@ -110,7 +110,7 @@ class QgsServerInterface
110110
* Set the configuration file path
111111
* @param configFilePath QString with the configuration file path
112112
*/
113-
virtual void setConfigFilePath( const QString& configFilePath) = 0;
113+
virtual void setConfigFilePath( const QString& configFilePath ) = 0;
114114

115115
/**
116116
* Remove entry from config cache
@@ -125,10 +125,10 @@ class QgsServerInterface
125125
virtual void removeProjectLayers( const QString& path ) = 0;
126126

127127
/**
128-
* Return the service registry
128+
* Return the service registry
129129
* @return QgsServiceResgistry
130130
*/
131-
virtual QgsServiceRegistry* serviceRegistry() = 0 /KeepReference/;
131+
virtual QgsServiceRegistry* serviceRegistry() = 0 / KeepReference /;
132132

133133
private:
134134
/** Constructor */

python/server/qgsserverrequest.sip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ class QgsServerRequest
7070
Method method() const;
7171

7272
/**
73-
* * @return query params
74-
* */
73+
* @return query params
74+
*/
7575
QMap<QString, QString> parameters() const;
7676

7777
/**

python/server/qgsserverresponse.sip

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class QgsServerResponse
5151
* Send error
5252
* This method delegates error handling at the server level. This is different
5353
* from calling setReturnCode() along with and a specific response body.
54-
* @param code HHTP return code value
54+
* @param code HTTP return code value
5555
* @param message An informative error message
5656
*/
5757
virtual void sendError( int code, const QString& message ) = 0;
@@ -61,15 +61,15 @@ class QgsServerResponse
6161
* This is a convenient method that will write directly
6262
* to the underlying I/O device
6363
*/
64-
virtual void write(const QString& data );
64+
virtual void write( const QString& data );
6565

6666
/**
6767
* Write chunk of data
6868
* This is a convenient method that will write directly to the
6969
* underlying I/O device
7070
* @return the number of bytes that were actually written
7171
*/
72-
virtual qint64 write(const QByteArray& byteArray );
72+
virtual qint64 write( const QByteArray& byteArray );
7373

7474
/**
7575
* Return the underlying QIODevice

src/server/qgsserver.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ class SERVER_EXPORT QgsServer
6060
* @param var environment variable name
6161
* @param val value
6262
* @note added in 2.14
63-
/ */
63+
*/
6464
void putenv( const QString &var, const QString &val );
6565

6666
/** Handles the request. The output is normally printed trough FCGI printf
@@ -129,7 +129,7 @@ class SERVER_EXPORT QgsServer
129129

130130
//! service registry
131131
static QgsServiceRegistry sServiceRegistry;
132-
132+
133133
};
134134
#endif // QGSSERVER_H
135135

src/server/qgsserverinterface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ class SERVER_EXPORT QgsServerInterface
134134
virtual void removeProjectLayers( const QString& path ) = 0;
135135

136136
/**
137-
* Return the service registry
137+
* Return the service registry
138138
* @return QgsServiceResgistry
139139
*/
140140
virtual QgsServiceRegistry* serviceRegistry() = 0;

src/server/qgsserverinterfaceimpl.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
//! Constructor
2525
QgsServerInterfaceImpl::QgsServerInterfaceImpl( QgsCapabilitiesCache* capCache, QgsServiceRegistry* srvRegistry )
2626
: mCapabilitiesCache( capCache )
27-
, mServiceRegistry(srvRegistry)
27+
, mServiceRegistry( srvRegistry )
2828
{
2929
mRequestHandler = nullptr;
3030
mAccessControls = new QgsAccessControl();
@@ -92,6 +92,6 @@ void QgsServerInterfaceImpl::removeProjectLayers( const QString& path )
9292

9393
QgsServiceRegistry* QgsServerInterfaceImpl::serviceRegistry()
9494
{
95-
return mServiceRegistry;
95+
return mServiceRegistry;
9696
}
9797

src/server/qgsserverresponse.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,9 @@ class SERVER_EXPORT QgsServerResponse
5656
/**
5757
* Send error
5858
* This method delegates error handling at the server level. This is different
59-
* from calling setReturnCode() along with and a specific response body.
59+
* from calling setReturnCode() wich let you return a specific response body.
60+
* Calling sendError() will end the transaction and any attempt to write data
61+
* or set headers will be an error.
6062
* @param code HHTP return code value
6163
* @param message An informative error message
6264
*/

src/server/qgsservicenativeloader.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ QgsServiceNativeLoader::~QgsServiceNativeLoader()
5555
}
5656

5757
void QgsServiceNativeLoader::loadModules( const QString& modulePath, QgsServiceRegistry& registrar,
58-
QgsServerInterface* serverIface )
58+
QgsServerInterface* serverIface )
5959
{
6060
QDir moduleDir( modulePath );
6161
moduleDir.setSorting( QDir::Name | QDir::IgnoreCase );

src/server/qgsservicenativeloader.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,10 @@ class SERVER_EXPORT QgsServiceNativeLoader
4949
* Lead all medules from path
5050
* @param modulePath the path to look for module
5151
* @param registrar QgsServiceRegistry instance for registering services
52-
* @param serverIface QgsServerInterface instarce
52+
* @param serverIface QgsServerInterface instarce
5353
*/
5454
void loadModules( const QString& modulePath, QgsServiceRegistry& registrar,
55-
QgsServerInterface* serverIface = nullptr );
55+
QgsServerInterface* serverIface = nullptr );
5656

5757
/**
5858
* Unload all modules

src/server/qgsserviceregistry.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ class SERVER_EXPORT QgsServiceRegistry
8989

9090
/**
9191
* Initialize registry, load modules and auto register services
92-
* @param serverIface the server interface
92+
* @param serverIface the server interface
9393
* @param nativeModulepath the native module path
9494
*/
95-
void init( const QString& nativeModulepath, QgsServerInterface* serverIface =nullptr );
95+
void init( const QString& nativeModulepath, QgsServerInterface* serverIface = nullptr );
9696

9797
/**
9898
* Clean up registered service and unregister modules

0 commit comments

Comments
 (0)