Skip to content
Permalink
Browse files

Add missing overrides

  • Loading branch information
nyalldawson committed Jul 5, 2015
1 parent ee6a924 commit 217e9e7449333aace6f2ed5457aaaf0b8a9fd042
@@ -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
@@ -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;
@@ -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:

@@ -26,19 +26,19 @@ 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;
QgsRequestHandler* mRequestHandler;

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

0 comments on commit 217e9e7

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