Skip to content

Commit

Permalink
Code quality changes and typo
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarteau committed Jan 10, 2017
1 parent ea519ff commit ff3487d
Show file tree
Hide file tree
Showing 11 changed files with 13 additions and 60 deletions.
3 changes: 0 additions & 3 deletions src/server/qgsbufferserverresponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
QgsBufferServerResponse::QgsBufferServerResponse()
{
mBuffer.open( QIODevice::ReadWrite );
mHeadersSent = false;
mFinished = false;
mReturnCode = 200;
}

QgsBufferServerResponse::~QgsBufferServerResponse()
Expand Down
8 changes: 4 additions & 4 deletions src/server/qgsbufferserverresponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

/**
* \ingroup server
* QgsBufferServerResponse
* \class QgsBufferServerResponse
* Class defining buffered response
*/
class QgsBufferServerResponse: public QgsServerResponse
Expand Down Expand Up @@ -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;
};

/**
Expand Down
4 changes: 2 additions & 2 deletions src/server/qgsfilterresponsedecorator.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

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

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

Expand Down
4 changes: 2 additions & 2 deletions src/server/qgsrequesthandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ?
Expand Down
25 changes: 0 additions & 25 deletions src/server/qgsserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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" ) ) );
Expand Down
6 changes: 0 additions & 6 deletions src/server/qgsserverrequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ QgsServerRequest::QgsServerRequest( const QUrl& url, Method method )

}

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

}

QString QgsServerRequest::getHeader( const QString& name ) const
{
Q_UNUSED( name );
Expand Down
4 changes: 2 additions & 2 deletions src/server/qgsserverrequest.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions src/server/qgsserverresponse.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,6 @@ QgsServerResponse::QgsServerResponse()
}


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

}

void QgsServerResponse::write( const QString& data )
{
QIODevice* iodev = io();
Expand Down
4 changes: 2 additions & 2 deletions src/server/qgsserverresponse.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ class SERVER_EXPORT QgsServerResponse
QgsServerResponse();

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

/**
* Set Header entry
Expand All @@ -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;

Expand Down
7 changes: 0 additions & 7 deletions src/server/qgsservice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,3 @@ QgsService::QgsService()

}

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

}


2 changes: 1 addition & 1 deletion src/server/qgsservice.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class SERVER_EXPORT QgsService
QgsService();

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

/**
* @return the name of the service
Expand Down

0 comments on commit ff3487d

Please sign in to comment.