Skip to content
Permalink
Browse files

Avoid some warnings on Windows

  • Loading branch information
nyalldawson committed Jan 13, 2016
1 parent f0d8efb commit 4181ef85359d614ee08188677686a153a35871a5
@@ -349,7 +349,7 @@ void QwtPolarLayout::activate( const QwtPolarPlot *plot,

QRectF rect( boundingRect ); // undistributed rest of the plot rect
rect.adjust( d_data->margin, d_data->margin,
-d_data->margin, -d_data->margin );
-1.0 * d_data->margin, -1.0 * d_data->margin );

// We extract all layout relevant data from the widgets
// and save them to d_data->layoutData.
@@ -37,6 +37,9 @@

extern "C"
{
#if defined(_MSC_VER) && defined(M_PI_4)
#undef M_PI_4 //avoid redefinition warning
#endif
#include <grass/gprojects.h>
}

@@ -53,10 +53,12 @@ QgsGdalLayerItem::~QgsGdalLayerItem()
{
}

Q_NOWARN_DEPRECATED_PUSH
QgsLayerItem::Capability QgsGdalLayerItem::capabilities()
{
return mCapabilities & SetCrs ? SetCrs : NoCapabilities;
}
Q_NOWARN_DEPRECATED_POP

bool QgsGdalLayerItem::setCrs( QgsCoordinateReferenceSystem crs )
{
@@ -17,6 +17,7 @@

#include "qgsdataitem.h"

Q_NOWARN_DEPRECATED_PUSH
class QgsGdalLayerItem : public QgsLayerItem
{
Q_OBJECT
@@ -32,11 +33,13 @@ class QgsGdalLayerItem : public QgsLayerItem
~QgsGdalLayerItem();

bool setCrs( QgsCoordinateReferenceSystem crs ) override;

Q_DECL_DEPRECATED Capability capabilities() override;

QVector<QgsDataItem*> createChildren() override;

QString layerName() const override;
};
Q_NOWARN_DEPRECATED_POP

#endif // QGSGDALDATAITEMS_H
@@ -105,8 +105,13 @@ QgsGdalProvider::QgsGdalProvider( const QString &uri, QgsError error )
, mYBlockSize( 0 )
, mGdalBaseDataset( nullptr )
, mGdalDataset( nullptr )
, mGeoTransform()
{
mGeoTransform[0] = 0;
mGeoTransform[1] = 1;
mGeoTransform[2] = 0;
mGeoTransform[3] = 0;
mGeoTransform[4] = 0;
mGeoTransform[5] = -1;
setError( error );
}

@@ -123,6 +128,13 @@ QgsGdalProvider::QgsGdalProvider( const QString &uri, bool update )
, mGdalBaseDataset( nullptr )
, mGdalDataset( nullptr )
{
mGeoTransform[0] = 0;
mGeoTransform[1] = 1;
mGeoTransform[2] = 0;
mGeoTransform[3] = 0;
mGeoTransform[4] = 0;
mGeoTransform[5] = -1;

QgsDebugMsg( "constructing with uri '" + uri + "'." );

QgsGdalProviderBase::registerGdalDrivers();
@@ -175,7 +175,7 @@ static int cell_draw( char *name,
size_t raster_size;
#ifdef NAN
double dnul = NAN;
float fnul = NAN;
float fnul = ( float )( NAN );
#else
double dnul = strtod( "NAN", 0 );
float fnul = strtof( "NAN", 0 );
@@ -32,6 +32,9 @@
#include <grass/gis.h>
#include <grass/raster.h>
#include <grass/display.h>
#if defined(_MSC_VER) && defined(M_PI_4)
#undef M_PI_4 //avoid redefinition warning
#endif
#include <grass/gprojects.h>

#if GRASS_VERSION_MAJOR >= 7
@@ -58,6 +58,9 @@ extern "C"
#include <sys/types.h>
#endif
#include <grass/version.h>
#if defined(_MSC_VER) && defined(M_PI_4)
#undef M_PI_4 //avoid redefinition warning
#endif
#include <grass/gprojects.h>

#if GRASS_VERSION_MAJOR < 7
@@ -57,6 +57,9 @@
extern "C"
{
#include <grass/version.h>
#if defined(_MSC_VER) && defined(M_PI_4)
#undef M_PI_4 //avoid redefinition warning
#endif
#include <grass/gprojects.h>
#include <grass/gis.h>
#include <grass/dbmi.h>
@@ -20,6 +20,11 @@
#ifndef QGSGRASSRASTERPROVIDER_H
#define QGSGRASSRASTERPROVIDER_H

#include "qgscoordinatereferencesystem.h"
#include "qgsrasterdataprovider.h"
#include "qgsrectangle.h"
#include "qgscolorrampshader.h"

extern "C"
{
#include <grass/version.h>
@@ -29,11 +34,6 @@ extern "C"
#endif
}

#include "qgscoordinatereferencesystem.h"
#include "qgsrasterdataprovider.h"
#include "qgsrectangle.h"
#include "qgscolorrampshader.h"

#include <QString>
#include <QStringList>
#include <QDomElement>
@@ -28,6 +28,9 @@ extern "C"
#include <unistd.h>
#endif
#include <grass/version.h>
#if defined(_MSC_VER) && defined(M_PI_4)
#undef M_PI_4 //avoid redefinition warning
#endif
#include <grass/gprojects.h>

#if GRASS_VERSION_MAJOR < 7
@@ -32,6 +32,9 @@
extern "C"
{
#include <grass/version.h>
#if defined(_MSC_VER) && defined(M_PI_4)
#undef M_PI_4 //avoid redefinition warning
#endif
#include <grass/gprojects.h>
#include <grass/gis.h>
#include <grass/dbmi.h>
@@ -27,6 +27,9 @@
extern "C"
{
#include <grass/version.h>
#if defined(_MSC_VER) && defined(M_PI_4)
#undef M_PI_4 //avoid redefinition warning
#endif
#include <grass/gprojects.h>
#include <grass/gis.h>
#include <grass/dbmi.h>
@@ -28,6 +28,9 @@
extern "C"
{
#include <grass/version.h>
#if defined(_MSC_VER) && defined(M_PI_4)
#undef M_PI_4 //avoid redefinition warning
#endif
#include <grass/gprojects.h>
#include <grass/gis.h>
#include <grass/dbmi.h>
@@ -59,10 +59,12 @@ QgsOgrLayerItem::~QgsOgrLayerItem()
{
}

Q_NOWARN_DEPRECATED_PUSH
QgsLayerItem::Capability QgsOgrLayerItem::capabilities()
{
return mCapabilities & SetCrs ? SetCrs : NoCapabilities;
}
Q_NOWARN_DEPRECATED_POP

bool QgsOgrLayerItem::setCrs( QgsCoordinateReferenceSystem crs )
{
@@ -19,6 +19,7 @@
#include "qgsdataitem.h"
#include "qgsogrprovider.h"

Q_NOWARN_DEPRECATED_PUSH
class QgsOgrLayerItem : public QgsLayerItem
{
Q_OBJECT
@@ -27,9 +28,11 @@ class QgsOgrLayerItem : public QgsLayerItem
~QgsOgrLayerItem();

bool setCrs( QgsCoordinateReferenceSystem crs ) override;

Q_DECL_DEPRECATED Capability capabilities() override;
QString layerName() const override;
};
Q_NOWARN_DEPRECATED_POP

class QgsOgrDataCollectionItem : public QgsDataCollectionItem
{

0 comments on commit 4181ef8

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