Skip to content
Permalink
Browse files

Code quality changes and typo

  • Loading branch information
dmarteau committed Jan 10, 2017
1 parent ea519ff commit ff3487d95797274359a01bf30f9115d3fda57969
@@ -30,9 +30,6 @@
QgsBufferServerResponse::QgsBufferServerResponse()
{
mBuffer.open( QIODevice::ReadWrite );
mHeadersSent = false;
mFinished = false;
mReturnCode = 200;
}

QgsBufferServerResponse::~QgsBufferServerResponse()
@@ -28,7 +28,7 @@

/**
* \ingroup server
* QgsBufferServerResponse
* \class QgsBufferServerResponse
* Class defining buffered response
*/
class QgsBufferServerResponse: public QgsServerResponse
@@ -79,9 +79,9 @@ class QgsBufferServerResponse: public QgsServerResponse
QMap<QString, QString> mHeaders;
QBuffer mBuffer;
QByteArray mBody;
bool mFinished;
bool mHeadersSent;
int mReturnCode;
bool mFinished = false;
bool mHeadersSent = false;
int mReturnCode = 200;
};

/**
@@ -24,7 +24,7 @@

/**
* \ingroup server
* QgsFilterResponseDecorator
* \class QgsFilterResponseDecorator
* Class defining decorator for calling filter's hooks
*/
class QgsFilterResponseDecorator: public QgsServerResponse
@@ -35,7 +35,7 @@ class QgsFilterResponseDecorator: public QgsServerResponse
~QgsFilterResponseDecorator();

/**
* Call flter's requestReady() method
* Call filters requestReady() method
*/
void start();

@@ -543,8 +543,8 @@ void QgsRequestHandler::parseInput()

QDomDocument doc;
QString errorMsg;
int line;
int column;
int line = -1;
int column = -1;
if ( !doc.setContent( inputString, true, &errorMsg, &line, &column ) )
{
// XXX Output error but continue processing request ?
@@ -476,31 +476,6 @@ void QgsServer::handleRequest( QgsServerRequest& request, QgsServerResponse& res
wfsServer.executeRequest();
}
}
/*
else if ( serviceString == QLatin1String( "WMS" ) )
{
QgsWmsConfigParser* p = QgsConfigCache::instance()->wmsConfiguration(
configFilePath
, accessControl
);
if ( !p )
{
theRequestHandler.setServiceException( QgsMapServiceException( QStringLiteral( "WMS configuration error" ), QStringLiteral( "There was an error reading the project file or the SLD configuration" ) ) );
}
else
{
QgsWmsServer wmsServer(
configFilePath
, parameterMap
, p
, &theRequestHandler
, sCapabilitiesCache
, accessControl
);
wmsServer.executeRequest();
}
}
*/
else
{
theRequestHandler.setServiceException( QgsMapServiceException( QStringLiteral( "Service configuration error" ), QStringLiteral( "Service unknown or unsupported" ) ) );
@@ -44,12 +44,6 @@ QgsServerRequest::QgsServerRequest( const QUrl& url, Method method )

}

//! destructor
QgsServerRequest::~QgsServerRequest()
{

}

QString QgsServerRequest::getHeader( const QString& name ) const
{
Q_UNUSED( name );
@@ -29,7 +29,7 @@
* Class defining request interface passed to services QgsService::executeRequest() method
*/

// Note about design: this intreface must be passed along to python and thus signatures methods must be
// Note about design: this interface must be passed along to python and thus signatures methods must be
// compatible with pyQGIS/pyQT api and rules.

class SERVER_EXPORT QgsServerRequest
@@ -66,7 +66,7 @@ class SERVER_EXPORT QgsServerRequest
QgsServerRequest( const QUrl& url, Method method = GetMethod );

//! destructor
virtual ~QgsServerRequest();
virtual ~QgsServerRequest() = default;

/**
* @return the request url
@@ -28,12 +28,6 @@ QgsServerResponse::QgsServerResponse()
}


//! destructor
QgsServerResponse::~QgsServerResponse()
{

}

void QgsServerResponse::write( const QString& data )
{
QIODevice* iodev = io();
@@ -42,7 +42,7 @@ class SERVER_EXPORT QgsServerResponse
QgsServerResponse();

//! destructor
virtual ~QgsServerResponse();
virtual ~QgsServerResponse() = default;

/**
* Set Header entry
@@ -53,7 +53,7 @@ class SERVER_EXPORT QgsServerResponse

/**
* Clear header
* Undo a previous 'set_header' call
* Undo a previous 'setHeader' call
*/
virtual void clearHeader( const QString& key ) = 0;

@@ -26,10 +26,3 @@ QgsService::QgsService()

}

//! Destructor
QgsService::~QgsService()
{

}


@@ -44,7 +44,7 @@ class SERVER_EXPORT QgsService
QgsService();

//! Destructor
virtual ~QgsService();
virtual ~QgsService() = default;

/**
* @return the name of the service

0 comments on commit ff3487d

Please sign in to comment.
You can’t perform that action at this time.