Skip to content
Permalink
Browse files

Merge pull request #2612 from SebDieBln/FixWarningsOnWindows

Avoid some compiler warnings on Windows
  • Loading branch information
jef-n committed Dec 25, 2015
2 parents 036eada + 7ccbe1b commit 5605eafa406b89da169d9f769e6eacba978fab34
@@ -39,7 +39,7 @@
#include <QHash>

#define ERR(message) QGS_ERROR_MESSAGE(message,"GRASS provider")
#define ERROR(message) QgsError(message,"GRASS provider")
#define QGS_ERROR(message) QgsError(message,"GRASS provider")

// Do not use warning dialogs, providers are also created on threads (rendering) where dialogs connot be used (constructing QPixmap icon)

@@ -473,7 +473,7 @@ QgsRasterIdentifyResult QgsGrassRasterProvider::identify( const QgsPoint & thePo

if ( theFormat != QgsRaster::IdentifyFormatValue )
{
return QgsRasterIdentifyResult( ERROR( tr( "Format not supported" ) ) );
return QgsRasterIdentifyResult( QGS_ERROR( tr( "Format not supported" ) ) );
}

if ( !extent().contains( thePoint ) )
@@ -490,7 +490,7 @@ QgsRasterIdentifyResult QgsGrassRasterProvider::identify( const QgsPoint & thePo

if ( !ok )
{
return QgsRasterIdentifyResult( ERROR( tr( "Cannot read data" ) ) );
return QgsRasterIdentifyResult( QGS_ERROR( tr( "Cannot read data" ) ) );
}

// no data?
@@ -102,7 +102,7 @@ void qgsGeometryToSpatialiteBlob( const QgsGeometry& geom, int32_t srid, char *&
p += wkb_size - 1;

// end marker
*p = 0xFE;
*p = '\xFE';
}

//
@@ -66,7 +66,7 @@

#define ERR(message) QGS_ERROR_MESSAGE(message,"WCS provider")
#define SRVERR(message) QGS_ERROR_MESSAGE(message,"WCS server")
#define ERROR(message) QgsError(message,"WCS provider")
#define QGS_ERROR(message) QgsError(message,"WCS provider")

static QString WCS_KEY = "wcs";
static QString WCS_DESCRIPTION = "OGC Web Coverage Service version 1.0/1.1 data provider";
@@ -1370,7 +1370,7 @@ QgsRasterIdentifyResult QgsWcsProvider::identify( const QgsPoint & thePoint, Qgs

if ( theFormat != QgsRaster::IdentifyFormatValue )
{
return QgsRasterIdentifyResult( ERROR( tr( "Format not supported" ) ) );
return QgsRasterIdentifyResult( QGS_ERROR( tr( "Format not supported" ) ) );
}

if ( !extent().contains( thePoint ) )
@@ -1491,7 +1491,7 @@ QgsRasterIdentifyResult QgsWcsProvider::identify( const QgsPoint & thePoint, Qgs
if ( !mCachedGdalDataset ||
!mCachedViewExtent.contains( thePoint ) )
{
return QgsRasterIdentifyResult( ERROR( tr( "Read data error" ) ) );
return QgsRasterIdentifyResult( QGS_ERROR( tr( "Read data error" ) ) );
}

double x = thePoint.x();
@@ -1518,7 +1518,7 @@ QgsRasterIdentifyResult QgsWcsProvider::identify( const QgsPoint & thePoint, Qgs
if ( err != CPLE_None )
{
QgsLogger::warning( "RasterIO error: " + QString::fromUtf8( CPLGetLastErrorMsg() ) );
return QgsRasterIdentifyResult( ERROR( tr( "RasterIO error: " ) + QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
return QgsRasterIdentifyResult( QGS_ERROR( tr( "RasterIO error: " ) + QString::fromUtf8( CPLGetLastErrorMsg() ) ) );
}

// Apply no data and user no data
@@ -80,7 +80,7 @@
#endif

#define ERR(message) QGS_ERROR_MESSAGE(message,"WMS provider")
#define ERROR(message) QgsError(message,"WMS provider")
#define QGS_ERROR(message) QgsError(message,"WMS provider")

static QString WMS_KEY = "wms";
static QString WMS_DESCRIPTION = "OGC Web Map Service version 1.3 data provider";
@@ -2047,7 +2047,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
format = mCaps.mIdentifyFormats.value( theFormat );
if ( format.isEmpty() )
{
return QgsRasterIdentifyResult( ERROR( tr( "Format not supported" ) ) );
return QgsRasterIdentifyResult( QGS_ERROR( tr( "Format not supported" ) ) );
}

QgsDebugMsg( QString( "theFormat = %1 format = %2" ).arg( theFormat ).arg( format ) );
@@ -2067,7 +2067,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
// are not, because we don't know original resolution
if ( theWidth == 0 || theHeight == 0 )
{
return QgsRasterIdentifyResult( ERROR( tr( "Context not fully specified (extent was defined but width and/or height was not)." ) ) );
return QgsRasterIdentifyResult( QGS_ERROR( tr( "Context not fully specified (extent was defined but width and/or height was not)." ) ) );
}
}
else // context (theExtent, theWidth, theHeight) not defined
@@ -2620,7 +2620,7 @@ QgsRasterIdentifyResult QgsWmsProvider::identify( const QgsPoint & thePoint, Qgs
// Report it as error so that user can switch to another format in results dialog.
if ( xsdPart < 0 && !featureTypeNames.isEmpty() && featureStoreList.isEmpty() )
{
QgsError err = ERROR( tr( "Cannot identify" ) );
QgsError err = QGS_ERROR( tr( "Cannot identify" ) );
err.append( tr( "Result parsing failed. %1 feature types were guessed from gml (%2) but no features were parsed." ).arg( featureTypeNames.size() ).arg( featureTypeNames.join( "," ) ) );
QgsDebugMsg( "parsing GML error: " + err.message() );
return QgsRasterIdentifyResult( err );

0 comments on commit 5605eaf

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