mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-15 00:02:52 -04:00
non-POD static ([class name goes here]) [-Wclazy-non-pod-global-static]
This commit is contained in:
parent
29c2af9add
commit
e17f99c5c3
@ -26,8 +26,6 @@
|
|||||||
const int QgsClassificationMethod::MAX_PRECISION = 15;
|
const int QgsClassificationMethod::MAX_PRECISION = 15;
|
||||||
const int QgsClassificationMethod::MIN_PRECISION = -6;
|
const int QgsClassificationMethod::MIN_PRECISION = -6;
|
||||||
|
|
||||||
static const QRegularExpression RE_TRAILING_ZEROES = QRegularExpression( "[.,]?0*$" );
|
|
||||||
static const QRegularExpression RE_NEGATIVE_ZERO = QRegularExpression( "^\\-0(?:[.,]0*)?$" );
|
|
||||||
|
|
||||||
QList<double> QgsClassificationMethod::rangesToBreaks( const QList<QgsClassificationRange> &classes )
|
QList<double> QgsClassificationMethod::rangesToBreaks( const QList<QgsClassificationRange> &classes )
|
||||||
{
|
{
|
||||||
@ -141,6 +139,8 @@ void QgsClassificationMethod::setLabelPrecision( int precision )
|
|||||||
|
|
||||||
QString QgsClassificationMethod::formatNumber( double value ) const
|
QString QgsClassificationMethod::formatNumber( double value ) const
|
||||||
{
|
{
|
||||||
|
static const QRegularExpression RE_TRAILING_ZEROES = QRegularExpression( "[.,]?0*$" );
|
||||||
|
static const QRegularExpression RE_NEGATIVE_ZERO = QRegularExpression( "^\\-0(?:[.,]0*)?$" );
|
||||||
if ( mLabelPrecision > 0 )
|
if ( mLabelPrecision > 0 )
|
||||||
{
|
{
|
||||||
QString valueStr = QLocale().toString( value, 'f', mLabelPrecision );
|
QString valueStr = QLocale().toString( value, 'f', mLabelPrecision );
|
||||||
|
@ -82,8 +82,8 @@ email : sherman at mrcc.com
|
|||||||
#define OGR_F_IsFieldSetAndNotNull OGR_F_IsFieldSet
|
#define OGR_F_IsFieldSetAndNotNull OGR_F_IsFieldSet
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const QString TEXT_PROVIDER_KEY = QStringLiteral( "ogr" );
|
static constexpr QLatin1String TEXT_PROVIDER_KEY() { return QLatin1String( "ogr" ); }
|
||||||
static const QString TEXT_PROVIDER_DESCRIPTION = QStringLiteral( "OGR data provider" );
|
static constexpr QLatin1String TEXT_PROVIDER_DESCRIPTION() { return QLatin1String( "OGR data provider" ); }
|
||||||
|
|
||||||
static OGRwkbGeometryType ogrWkbGeometryTypeFromName( const QString &typeName );
|
static OGRwkbGeometryType ogrWkbGeometryTypeFromName( const QString &typeName );
|
||||||
|
|
||||||
@ -2785,17 +2785,17 @@ void QgsOgrProvider::computeCapabilities()
|
|||||||
|
|
||||||
QString QgsOgrProvider::name() const
|
QString QgsOgrProvider::name() const
|
||||||
{
|
{
|
||||||
return TEXT_PROVIDER_KEY;
|
return TEXT_PROVIDER_KEY();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QgsOgrProvider::providerKey()
|
QString QgsOgrProvider::providerKey()
|
||||||
{
|
{
|
||||||
return TEXT_PROVIDER_KEY;
|
return TEXT_PROVIDER_KEY();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString QgsOgrProvider::description() const
|
QString QgsOgrProvider::description() const
|
||||||
{
|
{
|
||||||
return TEXT_PROVIDER_DESCRIPTION;
|
return TEXT_PROVIDER_DESCRIPTION();
|
||||||
} // QgsOgrProvider::description()
|
} // QgsOgrProvider::description()
|
||||||
|
|
||||||
|
|
||||||
@ -6694,7 +6694,7 @@ void QgsOgrProviderMetadata::cleanupProvider()
|
|||||||
|
|
||||||
|
|
||||||
QgsOgrProviderMetadata::QgsOgrProviderMetadata()
|
QgsOgrProviderMetadata::QgsOgrProviderMetadata()
|
||||||
: QgsProviderMetadata( TEXT_PROVIDER_KEY, TEXT_PROVIDER_DESCRIPTION )
|
: QgsProviderMetadata( TEXT_PROVIDER_KEY(), TEXT_PROVIDER_DESCRIPTION() )
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -27,11 +27,11 @@
|
|||||||
#include <sqlite3.h>
|
#include <sqlite3.h>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
|
|
||||||
const QString AS_JOINFIELD = "ASPK";
|
static constexpr QLatin1String AS_JOINFIELD() { return QLatin1String( "ASPK" ); }
|
||||||
const QString AS_EXTENSION = "qgd";
|
static constexpr QLatin1String AS_EXTENSION() { return QLatin1String( "qgd" ); }
|
||||||
const QString AS_JOINPREFIX = "auxiliary_storage_";
|
static constexpr QLatin1String AS_JOINPREFIX() { return QLatin1String( "auxiliary_storage_" ); }
|
||||||
|
typedef QVector<QgsPalLayerSettings::Property> PalPropertyList;
|
||||||
const QVector<QgsPalLayerSettings::Property> palHiddenProperties
|
Q_GLOBAL_STATIC_WITH_ARGS( PalPropertyList, palHiddenProperties, (
|
||||||
{
|
{
|
||||||
QgsPalLayerSettings::PositionX,
|
QgsPalLayerSettings::PositionX,
|
||||||
QgsPalLayerSettings::PositionY,
|
QgsPalLayerSettings::PositionY,
|
||||||
@ -57,7 +57,7 @@ const QVector<QgsPalLayerSettings::Property> palHiddenProperties
|
|||||||
QgsPalLayerSettings::AlwaysShow,
|
QgsPalLayerSettings::AlwaysShow,
|
||||||
QgsPalLayerSettings::CalloutDraw,
|
QgsPalLayerSettings::CalloutDraw,
|
||||||
QgsPalLayerSettings::LabelAllParts
|
QgsPalLayerSettings::LabelAllParts
|
||||||
};
|
} ) )
|
||||||
|
|
||||||
//
|
//
|
||||||
// QgsAuxiliaryLayer
|
// QgsAuxiliaryLayer
|
||||||
@ -71,9 +71,9 @@ QgsAuxiliaryLayer::QgsAuxiliaryLayer( const QString &pkField, const QString &fil
|
|||||||
, mLayer( vlayer )
|
, mLayer( vlayer )
|
||||||
{
|
{
|
||||||
// init join info
|
// init join info
|
||||||
mJoinInfo.setPrefix( AS_JOINPREFIX );
|
mJoinInfo.setPrefix( AS_JOINPREFIX() );
|
||||||
mJoinInfo.setJoinLayer( this );
|
mJoinInfo.setJoinLayer( this );
|
||||||
mJoinInfo.setJoinFieldName( AS_JOINFIELD );
|
mJoinInfo.setJoinFieldName( AS_JOINFIELD() );
|
||||||
mJoinInfo.setTargetFieldName( pkField );
|
mJoinInfo.setTargetFieldName( pkField );
|
||||||
mJoinInfo.setEditable( true );
|
mJoinInfo.setEditable( true );
|
||||||
mJoinInfo.setUpsertOnEdit( true );
|
mJoinInfo.setUpsertOnEdit( true );
|
||||||
@ -107,7 +107,7 @@ QgsVectorLayer *QgsAuxiliaryLayer::toSpatialLayer() const
|
|||||||
layer->startEditing();
|
layer->startEditing();
|
||||||
while ( it.nextFeature( joinFeature ) )
|
while ( it.nextFeature( joinFeature ) )
|
||||||
{
|
{
|
||||||
QString filter = QgsExpression::createFieldEqualityExpression( pkField, joinFeature.attribute( AS_JOINFIELD ) );
|
QString filter = QgsExpression::createFieldEqualityExpression( pkField, joinFeature.attribute( AS_JOINFIELD() ) );
|
||||||
|
|
||||||
QgsFeatureRequest request;
|
QgsFeatureRequest request;
|
||||||
request.setFilterExpression( filter );
|
request.setFilterExpression( filter );
|
||||||
@ -289,7 +289,8 @@ bool QgsAuxiliaryLayer::isHiddenProperty( int index ) const
|
|||||||
|
|
||||||
if ( def.origin().compare( QLatin1String( "labeling" ) ) == 0 )
|
if ( def.origin().compare( QLatin1String( "labeling" ) ) == 0 )
|
||||||
{
|
{
|
||||||
for ( const QgsPalLayerSettings::Property &p : palHiddenProperties )
|
const PalPropertyList &palProps = *palHiddenProperties();
|
||||||
|
for ( const QgsPalLayerSettings::Property &p : palProps )
|
||||||
{
|
{
|
||||||
const QString propName = QgsPalLayerSettings::propertyDefinitions()[ p ].name();
|
const QString propName = QgsPalLayerSettings::propertyDefinitions()[ p ].name();
|
||||||
if ( propName.compare( def.name() ) == 0 )
|
if ( propName.compare( def.name() ) == 0 )
|
||||||
@ -372,7 +373,7 @@ QString QgsAuxiliaryLayer::nameFromProperty( const QgsPropertyDefinition &def, b
|
|||||||
fieldName = QStringLiteral( "%1_%2" ).arg( fieldName, def.comment() );
|
fieldName = QStringLiteral( "%1_%2" ).arg( fieldName, def.comment() );
|
||||||
|
|
||||||
if ( joined )
|
if ( joined )
|
||||||
fieldName = QStringLiteral( "%1%2" ).arg( AS_JOINPREFIX, fieldName );
|
fieldName = QStringLiteral( "%1%2" ).arg( AS_JOINPREFIX(), fieldName );
|
||||||
|
|
||||||
return fieldName;
|
return fieldName;
|
||||||
}
|
}
|
||||||
@ -674,7 +675,7 @@ bool QgsAuxiliaryStorage::saveAs( const QgsProject &project )
|
|||||||
|
|
||||||
QString QgsAuxiliaryStorage::extension()
|
QString QgsAuxiliaryStorage::extension()
|
||||||
{
|
{
|
||||||
return AS_EXTENSION;
|
return AS_EXTENSION();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QgsAuxiliaryStorage::exists( const QgsProject &project )
|
bool QgsAuxiliaryStorage::exists( const QgsProject &project )
|
||||||
@ -715,7 +716,7 @@ void QgsAuxiliaryStorage::debugMsg( const QString &sql, sqlite3 *handler )
|
|||||||
|
|
||||||
bool QgsAuxiliaryStorage::createTable( const QString &type, const QString &table, sqlite3 *handler )
|
bool QgsAuxiliaryStorage::createTable( const QString &type, const QString &table, sqlite3 *handler )
|
||||||
{
|
{
|
||||||
const QString sql = QStringLiteral( "CREATE TABLE IF NOT EXISTS '%1' ( '%2' %3 )" ).arg( table, AS_JOINFIELD, type );
|
const QString sql = QStringLiteral( "CREATE TABLE IF NOT EXISTS '%1' ( '%2' %3 )" ).arg( table, AS_JOINFIELD(), type );
|
||||||
|
|
||||||
if ( !exec( sql, handler ) )
|
if ( !exec( sql, handler ) )
|
||||||
return false;
|
return false;
|
||||||
|
@ -37,8 +37,10 @@ Q_GLOBAL_STATIC( EllipsoidDefinitionCache, sDefinitionCache )
|
|||||||
|
|
||||||
static bool sDisableCache = false;
|
static bool sDisableCache = false;
|
||||||
|
|
||||||
|
QgsEllipsoidUtils::EllipsoidParameters QgsEllipsoidUtils::ellipsoidParameters( const QString &e )
|
||||||
|
{
|
||||||
// maps older QGIS ellipsoid acronyms to proj acronyms/names
|
// maps older QGIS ellipsoid acronyms to proj acronyms/names
|
||||||
const QMap< QString, QString > sProj6EllipsoidAcronymMap
|
static const QMap< QString, QString > sProj6EllipsoidAcronymMap
|
||||||
{
|
{
|
||||||
{ "clrk80", "clrk80ign" },
|
{ "clrk80", "clrk80ign" },
|
||||||
{"Adrastea2000", "ESRI:107909"},
|
{"Adrastea2000", "ESRI:107909"},
|
||||||
@ -167,8 +169,6 @@ const QMap< QString, QString > sProj6EllipsoidAcronymMap
|
|||||||
{"WGS60", "PROJ:WGS60"}
|
{"WGS60", "PROJ:WGS60"}
|
||||||
};
|
};
|
||||||
|
|
||||||
QgsEllipsoidUtils::EllipsoidParameters QgsEllipsoidUtils::ellipsoidParameters( const QString &e )
|
|
||||||
{
|
|
||||||
QString ellipsoid = e;
|
QString ellipsoid = e;
|
||||||
#if PROJ_VERSION_MAJOR >= 6
|
#if PROJ_VERSION_MAJOR >= 6
|
||||||
// ensure ellipsoid database is populated when first called
|
// ensure ellipsoid database is populated when first called
|
||||||
|
@ -37,10 +37,10 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
static const QString GML_NAMESPACE = QStringLiteral( "http://www.opengis.net/gml" );
|
static constexpr QLatin1String GML_NAMESPACE() { return QLatin1String( "http://www.opengis.net/gml" ); }
|
||||||
static const QString GML32_NAMESPACE = QStringLiteral( "http://www.opengis.net/gml/3.2" );
|
static constexpr QLatin1String GML32_NAMESPACE() { return QLatin1String( "http://www.opengis.net/gml/3.2" ); }
|
||||||
static const QString OGC_NAMESPACE = QStringLiteral( "http://www.opengis.net/ogc" );
|
static constexpr QLatin1String OGC_NAMESPACE() { return QLatin1String( "http://www.opengis.net/ogc" ); }
|
||||||
static const QString FES_NAMESPACE = QStringLiteral( "http://www.opengis.net/fes/2.0" );
|
static constexpr QLatin1String FES_NAMESPACE() { return QLatin1String( "http://www.opengis.net/fes/2.0" ); }
|
||||||
|
|
||||||
QgsOgcUtilsExprToFilter::QgsOgcUtilsExprToFilter( QDomDocument &doc,
|
QgsOgcUtilsExprToFilter::QgsOgcUtilsExprToFilter( QDomDocument &doc,
|
||||||
QgsOgcUtils::GMLVersion gmlVersion,
|
QgsOgcUtils::GMLVersion gmlVersion,
|
||||||
@ -136,7 +136,7 @@ QgsGeometry QgsOgcUtils::geometryFromGML( const QDomNode &geometryNode )
|
|||||||
QgsGeometry QgsOgcUtils::geometryFromGML( const QString &xmlString )
|
QgsGeometry QgsOgcUtils::geometryFromGML( const QString &xmlString )
|
||||||
{
|
{
|
||||||
// wrap the string into a root tag to have "gml" namespace (and also as a default namespace)
|
// wrap the string into a root tag to have "gml" namespace (and also as a default namespace)
|
||||||
QString xml = QStringLiteral( "<tmp xmlns=\"%1\" xmlns:gml=\"%1\">%2</tmp>" ).arg( GML_NAMESPACE, xmlString );
|
QString xml = QStringLiteral( "<tmp xmlns=\"%1\" xmlns:gml=\"%1\">%2</tmp>" ).arg( GML_NAMESPACE(), xmlString );
|
||||||
QDomDocument doc;
|
QDomDocument doc;
|
||||||
if ( !doc.setContent( xml, true ) )
|
if ( !doc.setContent( xml, true ) )
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -149,7 +149,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLPoint( const QDomElement &geometryElemen
|
|||||||
{
|
{
|
||||||
QgsPolylineXY pointCoordinate;
|
QgsPolylineXY pointCoordinate;
|
||||||
|
|
||||||
QDomNodeList coordList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
QDomNodeList coordList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( !coordList.isEmpty() )
|
if ( !coordList.isEmpty() )
|
||||||
{
|
{
|
||||||
QDomElement coordElement = coordList.at( 0 ).toElement();
|
QDomElement coordElement = coordList.at( 0 ).toElement();
|
||||||
@ -160,7 +160,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLPoint( const QDomElement &geometryElemen
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QDomNodeList posList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "pos" ) );
|
QDomNodeList posList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "pos" ) );
|
||||||
if ( posList.size() < 1 )
|
if ( posList.size() < 1 )
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -204,7 +204,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLLineString( const QDomElement &geometryE
|
|||||||
{
|
{
|
||||||
QgsPolylineXY lineCoordinates;
|
QgsPolylineXY lineCoordinates;
|
||||||
|
|
||||||
QDomNodeList coordList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
QDomNodeList coordList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( !coordList.isEmpty() )
|
if ( !coordList.isEmpty() )
|
||||||
{
|
{
|
||||||
QDomElement coordElement = coordList.at( 0 ).toElement();
|
QDomElement coordElement = coordList.at( 0 ).toElement();
|
||||||
@ -215,7 +215,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLLineString( const QDomElement &geometryE
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QDomNodeList posList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "posList" ) );
|
QDomNodeList posList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "posList" ) );
|
||||||
if ( posList.size() < 1 )
|
if ( posList.size() < 1 )
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -268,7 +268,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLPolygon( const QDomElement &geometryElem
|
|||||||
|
|
||||||
//read coordinates for outer boundary
|
//read coordinates for outer boundary
|
||||||
QgsPolylineXY exteriorPointList;
|
QgsPolylineXY exteriorPointList;
|
||||||
QDomNodeList outerBoundaryList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "outerBoundaryIs" ) );
|
QDomNodeList outerBoundaryList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "outerBoundaryIs" ) );
|
||||||
if ( !outerBoundaryList.isEmpty() ) //outer ring is necessary
|
if ( !outerBoundaryList.isEmpty() ) //outer ring is necessary
|
||||||
{
|
{
|
||||||
QDomElement coordinatesElement = outerBoundaryList.at( 0 ).firstChild().firstChild().toElement();
|
QDomElement coordinatesElement = outerBoundaryList.at( 0 ).firstChild().firstChild().toElement();
|
||||||
@ -283,7 +283,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLPolygon( const QDomElement &geometryElem
|
|||||||
ringCoordinates.push_back( exteriorPointList );
|
ringCoordinates.push_back( exteriorPointList );
|
||||||
|
|
||||||
//read coordinates for inner boundary
|
//read coordinates for inner boundary
|
||||||
QDomNodeList innerBoundaryList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "innerBoundaryIs" ) );
|
QDomNodeList innerBoundaryList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "innerBoundaryIs" ) );
|
||||||
for ( int i = 0; i < innerBoundaryList.size(); ++i )
|
for ( int i = 0; i < innerBoundaryList.size(); ++i )
|
||||||
{
|
{
|
||||||
QgsPolylineXY interiorPointList;
|
QgsPolylineXY interiorPointList;
|
||||||
@ -302,7 +302,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLPolygon( const QDomElement &geometryElem
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//read coordinates for exterior
|
//read coordinates for exterior
|
||||||
QDomNodeList exteriorList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "exterior" ) );
|
QDomNodeList exteriorList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "exterior" ) );
|
||||||
if ( exteriorList.size() < 1 ) //outer ring is necessary
|
if ( exteriorList.size() < 1 ) //outer ring is necessary
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -319,7 +319,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLPolygon( const QDomElement &geometryElem
|
|||||||
ringCoordinates.push_back( exteriorPointList );
|
ringCoordinates.push_back( exteriorPointList );
|
||||||
|
|
||||||
//read coordinates for inner boundary
|
//read coordinates for inner boundary
|
||||||
QDomNodeList interiorList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "interior" ) );
|
QDomNodeList interiorList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "interior" ) );
|
||||||
for ( int i = 0; i < interiorList.size(); ++i )
|
for ( int i = 0; i < interiorList.size(); ++i )
|
||||||
{
|
{
|
||||||
QgsPolylineXY interiorPointList;
|
QgsPolylineXY interiorPointList;
|
||||||
@ -392,7 +392,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPoint( const QDomElement &geometryE
|
|||||||
{
|
{
|
||||||
QgsPolylineXY pointList;
|
QgsPolylineXY pointList;
|
||||||
QgsPolylineXY currentPoint;
|
QgsPolylineXY currentPoint;
|
||||||
QDomNodeList pointMemberList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "pointMember" ) );
|
QDomNodeList pointMemberList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "pointMember" ) );
|
||||||
if ( pointMemberList.size() < 1 )
|
if ( pointMemberList.size() < 1 )
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -404,13 +404,13 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPoint( const QDomElement &geometryE
|
|||||||
for ( int i = 0; i < pointMemberList.size(); ++i )
|
for ( int i = 0; i < pointMemberList.size(); ++i )
|
||||||
{
|
{
|
||||||
//<Point> element
|
//<Point> element
|
||||||
pointNodeList = pointMemberList.at( i ).toElement().elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "Point" ) );
|
pointNodeList = pointMemberList.at( i ).toElement().elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "Point" ) );
|
||||||
if ( pointNodeList.size() < 1 )
|
if ( pointNodeList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
//<coordinates> element
|
//<coordinates> element
|
||||||
coordinatesList = pointNodeList.at( 0 ).toElement().elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
coordinatesList = pointNodeList.at( 0 ).toElement().elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( !coordinatesList.isEmpty() )
|
if ( !coordinatesList.isEmpty() )
|
||||||
{
|
{
|
||||||
currentPoint.clear();
|
currentPoint.clear();
|
||||||
@ -428,7 +428,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPoint( const QDomElement &geometryE
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//<pos> element
|
//<pos> element
|
||||||
posList = pointNodeList.at( 0 ).toElement().elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "pos" ) );
|
posList = pointNodeList.at( 0 ).toElement().elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "pos" ) );
|
||||||
if ( posList.size() < 1 )
|
if ( posList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -502,18 +502,18 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiLineString( const QDomElement &geom
|
|||||||
QDomNodeList currentCoordList;
|
QDomNodeList currentCoordList;
|
||||||
QDomNodeList currentPosList;
|
QDomNodeList currentPosList;
|
||||||
|
|
||||||
QDomNodeList lineStringMemberList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "lineStringMember" ) );
|
QDomNodeList lineStringMemberList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "lineStringMember" ) );
|
||||||
if ( !lineStringMemberList.isEmpty() ) //geoserver
|
if ( !lineStringMemberList.isEmpty() ) //geoserver
|
||||||
{
|
{
|
||||||
for ( int i = 0; i < lineStringMemberList.size(); ++i )
|
for ( int i = 0; i < lineStringMemberList.size(); ++i )
|
||||||
{
|
{
|
||||||
QDomNodeList lineStringNodeList = lineStringMemberList.at( i ).toElement().elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "LineString" ) );
|
QDomNodeList lineStringNodeList = lineStringMemberList.at( i ).toElement().elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "LineString" ) );
|
||||||
if ( lineStringNodeList.size() < 1 )
|
if ( lineStringNodeList.size() < 1 )
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
}
|
}
|
||||||
currentLineStringElement = lineStringNodeList.at( 0 ).toElement();
|
currentLineStringElement = lineStringNodeList.at( 0 ).toElement();
|
||||||
currentCoordList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
currentCoordList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( !currentCoordList.isEmpty() )
|
if ( !currentCoordList.isEmpty() )
|
||||||
{
|
{
|
||||||
QgsPolylineXY currentPointList;
|
QgsPolylineXY currentPointList;
|
||||||
@ -525,7 +525,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiLineString( const QDomElement &geom
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currentPosList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "posList" ) );
|
currentPosList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "posList" ) );
|
||||||
if ( currentPosList.size() < 1 )
|
if ( currentPosList.size() < 1 )
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -541,13 +541,13 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiLineString( const QDomElement &geom
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
QDomNodeList lineStringList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "LineString" ) );
|
QDomNodeList lineStringList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "LineString" ) );
|
||||||
if ( !lineStringList.isEmpty() ) //mapserver
|
if ( !lineStringList.isEmpty() ) //mapserver
|
||||||
{
|
{
|
||||||
for ( int i = 0; i < lineStringList.size(); ++i )
|
for ( int i = 0; i < lineStringList.size(); ++i )
|
||||||
{
|
{
|
||||||
currentLineStringElement = lineStringList.at( i ).toElement();
|
currentLineStringElement = lineStringList.at( i ).toElement();
|
||||||
currentCoordList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
currentCoordList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( !currentCoordList.isEmpty() )
|
if ( !currentCoordList.isEmpty() )
|
||||||
{
|
{
|
||||||
QgsPolylineXY currentPointList;
|
QgsPolylineXY currentPointList;
|
||||||
@ -560,7 +560,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiLineString( const QDomElement &geom
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
currentPosList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "posList" ) );
|
currentPosList = currentLineStringElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "posList" ) );
|
||||||
if ( currentPosList.size() < 1 )
|
if ( currentPosList.size() < 1 )
|
||||||
{
|
{
|
||||||
return QgsGeometry();
|
return QgsGeometry();
|
||||||
@ -656,13 +656,13 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
|
|||||||
QDomNodeList currentCoordinateList;
|
QDomNodeList currentCoordinateList;
|
||||||
QDomNodeList currentPosList;
|
QDomNodeList currentPosList;
|
||||||
|
|
||||||
QDomNodeList polygonMemberList = geometryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "polygonMember" ) );
|
QDomNodeList polygonMemberList = geometryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "polygonMember" ) );
|
||||||
QgsPolygonXY currentPolygonList;
|
QgsPolygonXY currentPolygonList;
|
||||||
for ( int i = 0; i < polygonMemberList.size(); ++i )
|
for ( int i = 0; i < polygonMemberList.size(); ++i )
|
||||||
{
|
{
|
||||||
currentPolygonList.resize( 0 ); // preserve capacity - don't use clear
|
currentPolygonList.resize( 0 ); // preserve capacity - don't use clear
|
||||||
currentPolygonMemberElement = polygonMemberList.at( i ).toElement();
|
currentPolygonMemberElement = polygonMemberList.at( i ).toElement();
|
||||||
polygonList = currentPolygonMemberElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "Polygon" ) );
|
polygonList = currentPolygonMemberElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "Polygon" ) );
|
||||||
if ( polygonList.size() < 1 )
|
if ( polygonList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -670,19 +670,19 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
|
|||||||
currentPolygonElement = polygonList.at( 0 ).toElement();
|
currentPolygonElement = polygonList.at( 0 ).toElement();
|
||||||
|
|
||||||
//find exterior ring
|
//find exterior ring
|
||||||
outerBoundaryList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "outerBoundaryIs" ) );
|
outerBoundaryList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "outerBoundaryIs" ) );
|
||||||
if ( !outerBoundaryList.isEmpty() )
|
if ( !outerBoundaryList.isEmpty() )
|
||||||
{
|
{
|
||||||
currentOuterBoundaryElement = outerBoundaryList.at( 0 ).toElement();
|
currentOuterBoundaryElement = outerBoundaryList.at( 0 ).toElement();
|
||||||
QgsPolylineXY ringCoordinates;
|
QgsPolylineXY ringCoordinates;
|
||||||
|
|
||||||
linearRingNodeList = currentOuterBoundaryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "LinearRing" ) );
|
linearRingNodeList = currentOuterBoundaryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "LinearRing" ) );
|
||||||
if ( linearRingNodeList.size() < 1 )
|
if ( linearRingNodeList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
||||||
currentCoordinateList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
currentCoordinateList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( currentCoordinateList.size() < 1 )
|
if ( currentCoordinateList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -694,18 +694,18 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
|
|||||||
currentPolygonList.push_back( ringCoordinates );
|
currentPolygonList.push_back( ringCoordinates );
|
||||||
|
|
||||||
//find interior rings
|
//find interior rings
|
||||||
QDomNodeList innerBoundaryList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "innerBoundaryIs" ) );
|
QDomNodeList innerBoundaryList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "innerBoundaryIs" ) );
|
||||||
for ( int j = 0; j < innerBoundaryList.size(); ++j )
|
for ( int j = 0; j < innerBoundaryList.size(); ++j )
|
||||||
{
|
{
|
||||||
QgsPolylineXY ringCoordinates;
|
QgsPolylineXY ringCoordinates;
|
||||||
currentInnerBoundaryElement = innerBoundaryList.at( j ).toElement();
|
currentInnerBoundaryElement = innerBoundaryList.at( j ).toElement();
|
||||||
linearRingNodeList = currentInnerBoundaryElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "LinearRing" ) );
|
linearRingNodeList = currentInnerBoundaryElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "LinearRing" ) );
|
||||||
if ( linearRingNodeList.size() < 1 )
|
if ( linearRingNodeList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
||||||
currentCoordinateList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "coordinates" ) );
|
currentCoordinateList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "coordinates" ) );
|
||||||
if ( currentCoordinateList.size() < 1 )
|
if ( currentCoordinateList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -720,7 +720,7 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
//find exterior ring
|
//find exterior ring
|
||||||
exteriorList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "exterior" ) );
|
exteriorList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "exterior" ) );
|
||||||
if ( exteriorList.size() < 1 )
|
if ( exteriorList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -729,13 +729,13 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
|
|||||||
currentExteriorElement = exteriorList.at( 0 ).toElement();
|
currentExteriorElement = exteriorList.at( 0 ).toElement();
|
||||||
QgsPolylineXY ringPositions;
|
QgsPolylineXY ringPositions;
|
||||||
|
|
||||||
linearRingNodeList = currentExteriorElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "LinearRing" ) );
|
linearRingNodeList = currentExteriorElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "LinearRing" ) );
|
||||||
if ( linearRingNodeList.size() < 1 )
|
if ( linearRingNodeList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
||||||
currentPosList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "posList" ) );
|
currentPosList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "posList" ) );
|
||||||
if ( currentPosList.size() < 1 )
|
if ( currentPosList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -747,18 +747,18 @@ QgsGeometry QgsOgcUtils::geometryFromGMLMultiPolygon( const QDomElement &geometr
|
|||||||
currentPolygonList.push_back( ringPositions );
|
currentPolygonList.push_back( ringPositions );
|
||||||
|
|
||||||
//find interior rings
|
//find interior rings
|
||||||
QDomNodeList interiorList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "interior" ) );
|
QDomNodeList interiorList = currentPolygonElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "interior" ) );
|
||||||
for ( int j = 0; j < interiorList.size(); ++j )
|
for ( int j = 0; j < interiorList.size(); ++j )
|
||||||
{
|
{
|
||||||
QgsPolylineXY ringPositions;
|
QgsPolylineXY ringPositions;
|
||||||
currentInteriorElement = interiorList.at( j ).toElement();
|
currentInteriorElement = interiorList.at( j ).toElement();
|
||||||
linearRingNodeList = currentInteriorElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "LinearRing" ) );
|
linearRingNodeList = currentInteriorElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "LinearRing" ) );
|
||||||
if ( linearRingNodeList.size() < 1 )
|
if ( linearRingNodeList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
currentLinearRingElement = linearRingNodeList.at( 0 ).toElement();
|
||||||
currentPosList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "posList" ) );
|
currentPosList = currentLinearRingElement.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "posList" ) );
|
||||||
if ( currentPosList.size() < 1 )
|
if ( currentPosList.size() < 1 )
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
@ -972,11 +972,11 @@ QgsRectangle QgsOgcUtils::rectangleFromGMLEnvelope( const QDomNode &envelopeNode
|
|||||||
if ( envelopeElem.tagName() != QLatin1String( "Envelope" ) )
|
if ( envelopeElem.tagName() != QLatin1String( "Envelope" ) )
|
||||||
return rect;
|
return rect;
|
||||||
|
|
||||||
QDomNodeList lowerCornerList = envelopeElem.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "lowerCorner" ) );
|
QDomNodeList lowerCornerList = envelopeElem.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "lowerCorner" ) );
|
||||||
if ( lowerCornerList.size() < 1 )
|
if ( lowerCornerList.size() < 1 )
|
||||||
return rect;
|
return rect;
|
||||||
|
|
||||||
QDomNodeList upperCornerList = envelopeElem.elementsByTagNameNS( GML_NAMESPACE, QStringLiteral( "upperCorner" ) );
|
QDomNodeList upperCornerList = envelopeElem.elementsByTagNameNS( GML_NAMESPACE(), QStringLiteral( "upperCorner" ) );
|
||||||
if ( upperCornerList.size() < 1 )
|
if ( upperCornerList.size() < 1 )
|
||||||
return rect;
|
return rect;
|
||||||
|
|
||||||
@ -1822,15 +1822,15 @@ QDomElement QgsOgcUtils::expressionToOgcFilter( const QgsExpression &expression,
|
|||||||
|
|
||||||
QDomElement filterElem =
|
QDomElement filterElem =
|
||||||
( filterVersion == FILTER_FES_2_0 ) ?
|
( filterVersion == FILTER_FES_2_0 ) ?
|
||||||
doc.createElementNS( FES_NAMESPACE, QStringLiteral( "fes:Filter" ) ) :
|
doc.createElementNS( FES_NAMESPACE(), QStringLiteral( "fes:Filter" ) ) :
|
||||||
doc.createElementNS( OGC_NAMESPACE, QStringLiteral( "ogc:Filter" ) );
|
doc.createElementNS( OGC_NAMESPACE(), QStringLiteral( "ogc:Filter" ) );
|
||||||
if ( utils.GMLNamespaceUsed() )
|
if ( utils.GMLNamespaceUsed() )
|
||||||
{
|
{
|
||||||
QDomAttr attr = doc.createAttribute( QStringLiteral( "xmlns:gml" ) );
|
QDomAttr attr = doc.createAttribute( QStringLiteral( "xmlns:gml" ) );
|
||||||
if ( gmlVersion == GML_3_2_1 )
|
if ( gmlVersion == GML_3_2_1 )
|
||||||
attr.setValue( GML32_NAMESPACE );
|
attr.setValue( GML32_NAMESPACE() );
|
||||||
else
|
else
|
||||||
attr.setValue( GML_NAMESPACE );
|
attr.setValue( GML_NAMESPACE() );
|
||||||
filterElem.setAttributeNode( attr );
|
filterElem.setAttributeNode( attr );
|
||||||
}
|
}
|
||||||
filterElem.appendChild( exprRootElem );
|
filterElem.appendChild( exprRootElem );
|
||||||
@ -1908,15 +1908,15 @@ QDomElement QgsOgcUtils::SQLStatementToOgcFilter( const QgsSQLStatement &stateme
|
|||||||
|
|
||||||
QDomElement filterElem =
|
QDomElement filterElem =
|
||||||
( filterVersion == FILTER_FES_2_0 ) ?
|
( filterVersion == FILTER_FES_2_0 ) ?
|
||||||
doc.createElementNS( FES_NAMESPACE, QStringLiteral( "fes:Filter" ) ) :
|
doc.createElementNS( FES_NAMESPACE(), QStringLiteral( "fes:Filter" ) ) :
|
||||||
doc.createElementNS( OGC_NAMESPACE, QStringLiteral( "ogc:Filter" ) );
|
doc.createElementNS( OGC_NAMESPACE(), QStringLiteral( "ogc:Filter" ) );
|
||||||
if ( utils.GMLNamespaceUsed() )
|
if ( utils.GMLNamespaceUsed() )
|
||||||
{
|
{
|
||||||
QDomAttr attr = doc.createAttribute( QStringLiteral( "xmlns:gml" ) );
|
QDomAttr attr = doc.createAttribute( QStringLiteral( "xmlns:gml" ) );
|
||||||
if ( gmlVersion == GML_3_2_1 )
|
if ( gmlVersion == GML_3_2_1 )
|
||||||
attr.setValue( GML32_NAMESPACE );
|
attr.setValue( GML32_NAMESPACE() );
|
||||||
else
|
else
|
||||||
attr.setValue( GML_NAMESPACE );
|
attr.setValue( GML_NAMESPACE() );
|
||||||
filterElem.setAttributeNode( attr );
|
filterElem.setAttributeNode( attr );
|
||||||
}
|
}
|
||||||
filterElem.appendChild( exprRootElem );
|
filterElem.appendChild( exprRootElem );
|
||||||
|
@ -20,7 +20,6 @@
|
|||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <limits>
|
#include <limits>
|
||||||
|
|
||||||
static const QRegExp IDENTIFIER_RE( "^[A-Za-z_\x80-\xff][A-Za-z0-9_\x80-\xff]*$" );
|
|
||||||
|
|
||||||
// from parser
|
// from parser
|
||||||
extern QgsSQLStatement::Node *parse( const QString &str, QString &parserErrorMsg );
|
extern QgsSQLStatement::Node *parse( const QString &str, QString &parserErrorMsg );
|
||||||
@ -90,6 +89,7 @@ QString QgsSQLStatement::quotedIdentifierIfNeeded( const QString &name )
|
|||||||
return quotedIdentifier( name );
|
return quotedIdentifier( name );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
static const QRegExp IDENTIFIER_RE( "^[A-Za-z_\x80-\xff][A-Za-z0-9_\x80-\xff]*$" );
|
||||||
return IDENTIFIER_RE.exactMatch( name ) ? name : quotedIdentifier( name );
|
return IDENTIFIER_RE.exactMatch( name ) ? name : quotedIdentifier( name );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,7 +98,6 @@ void QgsSymbolLayer::initPropertyDefinitions()
|
|||||||
{ QgsSymbolLayer::PropertyPointCount, QgsPropertyDefinition( "pointCount", QObject::tr( "Point count" ), QgsPropertyDefinition::IntegerPositive, origin )},
|
{ QgsSymbolLayer::PropertyPointCount, QgsPropertyDefinition( "pointCount", QObject::tr( "Point count" ), QgsPropertyDefinition::IntegerPositive, origin )},
|
||||||
{ QgsSymbolLayer::PropertyRandomSeed, QgsPropertyDefinition( "randomSeed", QgsPropertyDefinition::DataTypeNumeric, QObject::tr( "Random number seed" ), QObject::tr( "integer > 0, or 0 for completely random sequence" ), origin )},
|
{ QgsSymbolLayer::PropertyRandomSeed, QgsPropertyDefinition( "randomSeed", QgsPropertyDefinition::DataTypeNumeric, QObject::tr( "Random number seed" ), QObject::tr( "integer > 0, or 0 for completely random sequence" ), origin )},
|
||||||
{ QgsSymbolLayer::PropertyClipPoints, QgsPropertyDefinition( "clipPoints", QObject::tr( "Clip markers" ), QgsPropertyDefinition::Boolean, origin )},
|
{ QgsSymbolLayer::PropertyClipPoints, QgsPropertyDefinition( "clipPoints", QObject::tr( "Clip markers" ), QgsPropertyDefinition::Boolean, origin )},
|
||||||
{ QgsSymbolLayer::PropertyClipPoints, QgsPropertyDefinition( "densityArea", QObject::tr( "Density area" ), QgsPropertyDefinition::DoublePositive, origin )},
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -267,6 +266,8 @@ QgsProperty propertyFromMap( const QgsStringMap &map, const QString &baseName )
|
|||||||
return QgsProperty::fromField( field, active );
|
return QgsProperty::fromField( field, active );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void QgsSymbolLayer::restoreOldDataDefinedProperties( const QgsStringMap &stringMap )
|
||||||
|
{
|
||||||
// property string to type upgrade map
|
// property string to type upgrade map
|
||||||
static const QMap< QString, QgsSymbolLayer::Property > OLD_PROPS
|
static const QMap< QString, QgsSymbolLayer::Property > OLD_PROPS
|
||||||
{
|
{
|
||||||
@ -343,8 +344,6 @@ static const QMap< QString, QgsSymbolLayer::Property > OLD_PROPS
|
|||||||
{ "vertical_anchor_point", QgsSymbolLayer::PropertyVerticalAnchor },
|
{ "vertical_anchor_point", QgsSymbolLayer::PropertyVerticalAnchor },
|
||||||
};
|
};
|
||||||
|
|
||||||
void QgsSymbolLayer::restoreOldDataDefinedProperties( const QgsStringMap &stringMap )
|
|
||||||
{
|
|
||||||
QgsStringMap::const_iterator propIt = stringMap.constBegin();
|
QgsStringMap::const_iterator propIt = stringMap.constBegin();
|
||||||
for ( ; propIt != stringMap.constEnd(); ++propIt )
|
for ( ; propIt != stringMap.constEnd(); ++propIt )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user