Skip to content

Commit

Permalink
fix windows build and some warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Jul 19, 2016
1 parent c9d6269 commit 3142c84
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/app/ogr/qgsvectorlayersaveasdialog.cpp
Expand Up @@ -286,7 +286,7 @@ void QgsVectorLayerSaveAsDialog::on_mFormatComboBox_currentIndexChanged( int idx

if ( foundFieldThatCanBeExportedAsDisplayedValue )
{
QgsEditorWidgetFactory *factory;
QgsEditorWidgetFactory *factory = nullptr;
if ( flags == Qt::ItemIsEnabled &&
mLayer->editFormConfig()->widgetType( i ) != "TextEdit" &&
( factory = QgsEditorWidgetRegistry::instance()->factory( mLayer->editFormConfig()->widgetType( i ) ) ) )
Expand Down
6 changes: 2 additions & 4 deletions src/core/geometry/qgsgeos.cpp
Expand Up @@ -1066,11 +1066,9 @@ GEOSGeometry* QgsGeos::asGeos( const QgsAbstractGeometryV2* geom, double precisi

if ( QgsWKBTypes::isMultiType( geom->wkbType() ) || QgsWKBTypes::flatType( geom->wkbType() ) == QgsWKBTypes::GeometryCollection )
{
int geosType;
int geosType = GEOS_GEOMETRYCOLLECTION;

if ( QgsWKBTypes::flatType( geom->wkbType() ) == QgsWKBTypes::GeometryCollection )
geosType = GEOS_GEOMETRYCOLLECTION;
else
if ( QgsWKBTypes::flatType( geom->wkbType() ) != QgsWKBTypes::GeometryCollection )
{
switch ( QgsWKBTypes::geometryType( geom->wkbType() ) )
{
Expand Down
2 changes: 2 additions & 0 deletions src/core/qgsaggregatecalculator.cpp
Expand Up @@ -231,7 +231,9 @@ QVariant QgsAggregateCalculator::calculate( QgsAggregateCalculator::Aggregate ag
}
}

#ifndef _MSC_VER
return QVariant();
#endif
}

QgsStatisticalSummary::Statistic QgsAggregateCalculator::numericStatFromAggregate( QgsAggregateCalculator::Aggregate aggregate, bool* ok )
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaplayer.h
Expand Up @@ -31,8 +31,8 @@
#include "qgsobjectcustomproperties.h"
#include "qgsrectangle.h"
#include "qgscoordinatereferencesystem.h"
#include "qgsrendercontext.h"

class QgsRenderContext;
class QgsMapLayerLegend;
class QgsMapLayerRenderer;
class QgsMapLayerStyleManager;
Expand Down
8 changes: 4 additions & 4 deletions src/plugins/globe/globe_plugin.cpp
Expand Up @@ -617,7 +617,7 @@ QgsRectangle GlobePlugin::getQGISLayerExtent() const
void GlobePlugin::showCurrentCoordinates( const osgEarth::GeoPoint& geoPoint )
{
osg::Vec3d pos = geoPoint.vec3d();
emit xyCoordinates( QgsCoordinateTransformCache::instance()->transform( GEO_EPSG_CRS_AUTHID, mQGisIface->mapCanvas()->mapSettings().destinationCrs().authid() )->transform( QgsPoint( pos.x(), pos.y() ) ) );
emit xyCoordinates( QgsCoordinateTransformCache::instance()->transform( GEO_EPSG_CRS_AUTHID, mQGisIface->mapCanvas()->mapSettings().destinationCrs().authid() ).transform( QgsPoint( pos.x(), pos.y() ) ) );
}

void GlobePlugin::setSelectedCoordinates( const osg::Vec3d &coords )
Expand Down Expand Up @@ -932,7 +932,7 @@ void GlobePlugin::updateLayers()
else
{
drapedLayers.append( mapLayer->id() );
QgsRectangle extent = QgsCoordinateTransformCache::instance()->transform( mapLayer->crs().authid(), GEO_EPSG_CRS_AUTHID )->transform( mapLayer->extent() );
QgsRectangle extent = QgsCoordinateTransformCache::instance()->transform( mapLayer->crs().authid(), GEO_EPSG_CRS_AUTHID ).transform( mapLayer->extent() );
mLayerExtents.insert( mapLayer->id(), extent );
}
}
Expand Down Expand Up @@ -994,12 +994,12 @@ void GlobePlugin::layerChanged( QgsMapLayer* mapLayer )
}
}
mTileSource->setLayerSet( layerSet );
QgsRectangle extent = QgsCoordinateTransformCache::instance()->transform( mapLayer->crs().authid(), GEO_EPSG_CRS_AUTHID )->transform( mapLayer->extent() );
QgsRectangle extent = QgsCoordinateTransformCache::instance()->transform( mapLayer->crs().authid(), GEO_EPSG_CRS_AUTHID ).transform( mapLayer->extent() );
mLayerExtents.insert( mapLayer->id(), extent );
}
// Remove any model layer of that layer, in case one existed
mMapNode->getMap()->removeModelLayer( mMapNode->getMap()->getModelLayerByName( mapLayer->id().toStdString() ) );
QgsRectangle layerExtent = QgsCoordinateTransformCache::instance()->transform( mapLayer->crs().authid(), GEO_EPSG_CRS_AUTHID )->transform( mapLayer->extent() );
QgsRectangle layerExtent = QgsCoordinateTransformCache::instance()->transform( mapLayer->crs().authid(), GEO_EPSG_CRS_AUTHID ).transform( mapLayer->extent() );
QgsRectangle dirtyExtent = layerExtent;
if ( mLayerExtents.contains( mapLayer->id() ) )
{
Expand Down
4 changes: 2 additions & 2 deletions src/python/qgspythonutils.h
Expand Up @@ -50,11 +50,11 @@ class PYTHON_EXPORT QgsPythonUtils
virtual bool isEnabled() = 0;

//! initialize python and import bindings
virtual void initPython( QgisInterface* interface ) = 0;
virtual void initPython( QgisInterface *iface ) = 0;

#ifdef HAVE_SERVER_PYTHON_PLUGINS
//! initialize python and import server bindings
virtual void initServerPython( QgsServerInterface* interface ) = 0;
virtual void initServerPython( QgsServerInterface *iface ) = 0;

//! start server plugin: call plugin's classServerFactory(serverInterface) add to active plugins
virtual bool startServerPlugin( QString packageName ) = 0;
Expand Down
2 changes: 2 additions & 0 deletions tests/src/core/testqgspainteffectregistry.cpp
Expand Up @@ -18,6 +18,8 @@
#include "qgspainteffectregistry.h"
#include "qgspainteffect.h"
#include "qgseffectstack.h"
#include "qgsrendercontext.h"

#include <QObject>
#include <QtTest/QtTest>

Expand Down

0 comments on commit 3142c84

Please sign in to comment.