Add missing overrides

This commit is contained in:
Nyall Dawson 2015-07-06 09:28:52 +10:00
parent ee6a924387
commit 217e9e7449
4 changed files with 15 additions and 15 deletions

View File

@ -45,7 +45,7 @@ static QString _rasterLayerName( const QString& filename )
struct QgsAlignRasterDialogProgress : public QgsAlignRaster::ProgressHandler
{
QgsAlignRasterDialogProgress( QProgressBar* pb ) : mPb( pb ) {}
virtual bool progress( double complete )
virtual bool progress( double complete ) override
{
mPb->setValue(( int ) qRound( complete * 100 ) );
qApp->processEvents(); // to actually show the progress in GUI

View File

@ -27,7 +27,7 @@
typedef QList< QPair<QRgb, int> > QgsColorBox; //Color / number of pixels
typedef QMultiMap< int, QgsColorBox > QgsColorBoxMap; // sum of pixels / color box
/**Base class for request handler using HTTP.
/** Base class for request handler using HTTP.
It provides a method to set data to the client*/
class QgsHttpRequestHandler: public QgsRequestHandler
{
@ -46,7 +46,7 @@ class QgsHttpRequestHandler: public QgsRequestHandler
virtual void setGetFeatureResponse( QByteArray* ba ) override;
virtual void endGetFeatureResponse( QByteArray* ba ) override;
virtual void setGetCoverageResponse( QByteArray* ba ) override;
/**Send out HTTP headers and flush output buffer*/
/** Send out HTTP headers and flush output buffer*/
virtual void sendResponse() override;
virtual void setHeader( const QString &name, const QString &value ) override;
virtual int removeHeader( const QString &name ) override;
@ -63,22 +63,22 @@ class QgsHttpRequestHandler: public QgsRequestHandler
virtual void setPluginFilters( QgsServerFiltersMap pluginFilters ) override;
#endif
// TODO: if HAVE_SERVER_PYTHON
QByteArray getResponseHeader( ) { return mResponseHeader; }
QByteArray getResponseBody( ) { return mResponseBody; }
QByteArray getResponseHeader( ) override { return mResponseHeader; }
QByteArray getResponseBody( ) override { return mResponseBody; }
/** Return the response if capture output is activated */
QByteArray getResponse( const bool returnHeaders = TRUE,
const bool returnBody = TRUE );
const bool returnBody = TRUE ) override;
protected:
virtual void sendHeaders( ) override;
virtual void sendBody( ) override;
void setHttpResponse( QByteArray *ba, const QString &format );
/**Converts format to official mimetype (e.g. 'jpg' to 'image/jpeg')
/** Converts format to official mimetype (e.g. 'jpg' to 'image/jpeg')
@return mime string (or the entered string if not found)*/
QString formatToMimeType( const QString& format ) const;
void requestStringToParameterMap( const QString& request, QMap<QString, QString>& parameters );
/**Read CONTENT_LENGTH characters from stdin*/
/** Read CONTENT_LENGTH characters from stdin*/
QString readPostBody() const;
private:
@ -91,7 +91,7 @@ class QgsHttpRequestHandler: public QgsRequestHandler
static bool greenCompare( const QPair<QRgb, int>& c1, const QPair<QRgb, int>& c2 );
static bool blueCompare( const QPair<QRgb, int>& c1, const QPair<QRgb, int>& c2 );
static bool alphaCompare( const QPair<QRgb, int>& c1, const QPair<QRgb, int>& c2 );
/**Calculates a representative color for a box (pixel weighted average)*/
/** Calculates a representative color for a box (pixel weighted average)*/
static QRgb boxColor( const QgsColorBox& box, int boxPixels );
// TODO: if HAVE_SERVER_PYTHON
QByteArray mResponseHeader;

View File

@ -51,7 +51,7 @@ class QgsServerInterfaceImpl : public QgsServerInterface
QgsServerFiltersMap filters( ) override { return mFilters; }
QString getEnv( const QString& name ) const override;
QString configFilePath( ) override { return mConfigFilePath; }
void setConfigFilePath( QString configFilePath );
void setConfigFilePath( QString configFilePath ) override;
private:

View File

@ -26,10 +26,10 @@ class QgsServerStreamingDevice: public QIODevice
QgsServerStreamingDevice( const QString& formatName, QgsRequestHandler* rh, QObject* parent = 0 );
~QgsServerStreamingDevice();
bool isSequential() const { return false; }
bool isSequential() const override { return false; }
bool open( OpenMode mode );
void close();
bool open( OpenMode mode ) override;
void close() override;
protected:
QString mFormatName;
@ -37,8 +37,8 @@ class QgsServerStreamingDevice: public QIODevice
QgsServerStreamingDevice(); //default constructor forbidden
qint64 writeData( const char * data, qint64 maxSize );
qint64 readData ( char * data, qint64 maxSize );
qint64 writeData( const char * data, qint64 maxSize ) override;
qint64 readData( char * data, qint64 maxSize ) override;
};
#endif // QGSSERVERSTREAMINGDEVICE_H