mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-19 00:04:52 -04:00
Add extra parameter QgsProject* to QgsService::executeRequest
This commit is contained in:
parent
bac1890f9c
commit
ec226eeab8
@ -62,9 +62,8 @@ class QgsService
|
||||
|
||||
/**
|
||||
* Execute the requests and set result in QgsServerRequest
|
||||
* @param request a QgsServerRequest instance
|
||||
* @param response a QgsServerResponse instance
|
||||
*/
|
||||
virtual void executeRequest( const QgsServerRequest& request, QgsServerResponse& response ) = 0;
|
||||
virtual void executeRequest( const QgsServerRequest& request, QgsServerResponse& response,
|
||||
QgsProject* project = nullptr ) = 0;
|
||||
};
|
||||
|
||||
|
@ -24,6 +24,8 @@
|
||||
#include "qgsserverrequest.h"
|
||||
#include "qgsserverresponse.h"
|
||||
|
||||
class QgsProject;
|
||||
|
||||
/**
|
||||
* \ingroup server
|
||||
* QgsService
|
||||
@ -61,10 +63,9 @@ class SERVER_EXPORT QgsService
|
||||
|
||||
/**
|
||||
* Execute the requests and set result in QgsServerRequest
|
||||
* @param request a QgsServerRequest instance
|
||||
* @param response a QgsServerResponse instance
|
||||
*/
|
||||
virtual void executeRequest( const QgsServerRequest& request, QgsServerResponse& response ) = 0;
|
||||
virtual void executeRequest( const QgsServerRequest& request, QgsServerResponse& response,
|
||||
QgsProject* project = nullptr ) = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@ -31,8 +31,10 @@ class SampleService: public QgsService
|
||||
return method == QgsServerRequest::GetMethod;
|
||||
}
|
||||
|
||||
void executeRequest( const QgsServerRequest& request, QgsServerResponse& response )
|
||||
void executeRequest( const QgsServerRequest& request, QgsServerResponse& response,
|
||||
QgsProject* project )
|
||||
{
|
||||
Q_UNUSED( project );
|
||||
Q_UNUSED( request );
|
||||
QgsDebugMsg( "SampleService::executeRequest called" );
|
||||
response.write( QString( "Hello world from myService" ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user