Skip to content
Permalink
Browse files

fix warnings

  • Loading branch information
jef-n committed Mar 15, 2014
1 parent 8242a04 commit 1c0d5e2f217b16e4fc6f01ed31517302a7503239
Showing with 15 additions and 6 deletions.
  1. +3 −0 src/core/qgsexpression.cpp
  2. +9 −6 src/core/qgsmaplayer.cpp
  3. +3 −0 src/core/symbology-ng/qgssymbollayerv2utils.cpp
@@ -2198,6 +2198,9 @@ int QgsExpression::NodeBinaryOperator::precedence() const
case boGT:
case boRegexp:
case boLike:
case boILike:
case boNotLike:
case boNotILike:
case boIs:
case boIsNot:
return 3;
@@ -577,9 +577,9 @@ bool QgsMapLayer::writeLayerXML( QDomElement& layerElement, QDomDocument& docume

} // bool QgsMapLayer::writeXML

QDomDocument QgsMapLayer::asLayerDefinition ()
QDomDocument QgsMapLayer::asLayerDefinition()
{
QDomDocument doc( "qgis-layer-definition");
QDomDocument doc( "qgis-layer-definition" );
QDomElement maplayer = doc.createElement( "maplayer" );
this->writeLayerXML( maplayer, doc );
maplayer.removeChild( maplayer.firstChildElement( "id" ) );
@@ -589,11 +589,11 @@ QDomDocument QgsMapLayer::asLayerDefinition ()

QgsMapLayer* QgsMapLayer::fromLayerDefinition( QDomDocument& document )
{
QDomNode layernode = document.elementsByTagName( "maplayer" ).at(0);
QDomNode layernode = document.elementsByTagName( "maplayer" ).at( 0 );
QDomElement layerElem = layernode.toElement();

QString type = layerElem.attribute( "type" );
QgsDebugMsg(type);
QgsDebugMsg( type );
QgsMapLayer *layer = NULL;

if ( type == "vector" )
@@ -613,21 +613,24 @@ QgsMapLayer* QgsMapLayer::fromLayerDefinition( QDomDocument& document )
bool ok = layer->readLayerXML( layerElem );
if ( ok )
return layer;

delete layer;
return 0;
}

QgsMapLayer* QgsMapLayer::fromLayerDefinitionFile( const QString qlrfile )
{
QFile file( qlrfile );
if ( !file.open( QIODevice::ReadOnly ) )
{
QgsDebugMsg("Can't open file");
QgsDebugMsg( "Can't open file" );
return 0;
}

QDomDocument doc;
if ( !doc.setContent( &file ) )
{
QgsDebugMsg("Can't set content");
QgsDebugMsg( "Can't set content" );
return 0;
}

@@ -585,6 +585,8 @@ void QgsSymbolLayerV2Utils::drawStippledBackround( QPainter* painter, QRect rect
#include <cfloat>


#if !defined(GEOS_VERSION_MAJOR) || !defined(GEOS_VERSION_MINOR) || \
((GEOS_VERSION_MAJOR<3) || ((GEOS_VERSION_MAJOR==3) && (GEOS_VERSION_MINOR<3)))
// calculate line's angle and tangent
static bool lineInfo( QPointF p1, QPointF p2, double& angle, double& t )
{
@@ -644,6 +646,7 @@ static QPointF linesIntersection( QPointF p1, double t1, QPointF p2, double t2 )
y = p1.y() + t1 * ( x - p1.x() );
return QPointF( x, y );
}
#endif


QPolygonF offsetLine( QPolygonF polyline, double dist )

0 comments on commit 1c0d5e2

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