Skip to content

Commit ee2f1bd

Browse files
committed
Use QString::number with QDomElement::setAttribute with double/float (fixes #5749)
1 parent dbe8853 commit ee2f1bd

19 files changed

+92
-92
lines changed

src/core/composer/qgscomposerarrow.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,8 @@ void QgsComposerArrow::adaptItemSceneRect()
284284
bool QgsComposerArrow::writeXML( QDomElement& elem, QDomDocument & doc ) const
285285
{
286286
QDomElement composerArrowElem = doc.createElement( "ComposerArrow" );
287-
composerArrowElem.setAttribute( "outlineWidth", outlineWidth() );
288-
composerArrowElem.setAttribute( "arrowHeadWidth", mArrowHeadWidth );
287+
composerArrowElem.setAttribute( "outlineWidth", QString::number( outlineWidth() ) );
288+
composerArrowElem.setAttribute( "arrowHeadWidth", QString::number( mArrowHeadWidth ) );
289289
composerArrowElem.setAttribute( "markerMode", mMarkerMode );
290290
composerArrowElem.setAttribute( "startMarkerFile", mStartMarkerFile );
291291
composerArrowElem.setAttribute( "endMarkerFile", mEndMarkerFile );
@@ -300,14 +300,14 @@ bool QgsComposerArrow::writeXML( QDomElement& elem, QDomDocument & doc ) const
300300

301301
//start point
302302
QDomElement startPointElem = doc.createElement( "StartPoint" );
303-
startPointElem.setAttribute( "x", mStartPoint.x() );
304-
startPointElem.setAttribute( "y", mStartPoint.y() );
303+
startPointElem.setAttribute( "x", QString::number( mStartPoint.x() ) );
304+
startPointElem.setAttribute( "y", QString::number( mStartPoint.y() ) );
305305
composerArrowElem.appendChild( startPointElem );
306306

307307
//stop point
308308
QDomElement stopPointElem = doc.createElement( "StopPoint" );
309-
stopPointElem.setAttribute( "x", mStopPoint.x() );
310-
stopPointElem.setAttribute( "y", mStopPoint.y() );
309+
stopPointElem.setAttribute( "x", QString::number( mStopPoint.x() ) );
310+
stopPointElem.setAttribute( "y", QString::number( mStopPoint.y() ) );
311311
composerArrowElem.appendChild( stopPointElem );
312312

313313
elem.appendChild( composerArrowElem );

src/core/composer/qgscomposeritem.cpp

+6-6
Original file line numberDiff line numberDiff line change
@@ -124,13 +124,13 @@ bool QgsComposerItem::_writeXML( QDomElement& itemElem, QDomDocument& doc ) cons
124124
}
125125

126126
//scene rect
127-
composerItemElem.setAttribute( "x", transform().dx() );
128-
composerItemElem.setAttribute( "y", transform().dy() );
129-
composerItemElem.setAttribute( "width", rect().width() );
130-
composerItemElem.setAttribute( "height", rect().height() );
127+
composerItemElem.setAttribute( "x", QString::number( transform().dx() ) );
128+
composerItemElem.setAttribute( "y", QString::number( transform().dy() ) );
129+
composerItemElem.setAttribute( "width", QString::number( rect().width() ) );
130+
composerItemElem.setAttribute( "height", QString::number( rect().height() ) );
131131
composerItemElem.setAttribute( "zValue", QString::number( zValue() ) );
132132
composerItemElem.setAttribute( "outlineWidth", QString::number( pen().widthF() ) );
133-
composerItemElem.setAttribute( "rotation", mRotation );
133+
composerItemElem.setAttribute( "rotation", QString::number( mRotation ) );
134134
composerItemElem.setAttribute( "id", mId );
135135
//position lock for mouse moves/resizes
136136
if ( mItemPositionLocked )
@@ -142,7 +142,7 @@ bool QgsComposerItem::_writeXML( QDomElement& itemElem, QDomDocument& doc ) cons
142142
composerItemElem.setAttribute( "positionLock", "false" );
143143
}
144144

145-
composerItemElem.setAttribute( "lastValidViewScaleFactor", mLastValidViewScaleFactor );
145+
composerItemElem.setAttribute( "lastValidViewScaleFactor", QString::number( mLastValidViewScaleFactor ) );
146146

147147

148148
//frame color

src/core/composer/qgscomposerlegend.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -681,8 +681,8 @@ bool QgsComposerLegend::writeXML( QDomElement& elem, QDomDocument & doc ) const
681681
composerLegendElem.setAttribute( "layerSpace", QString::number( mLayerSpace ) );
682682
composerLegendElem.setAttribute( "symbolSpace", QString::number( mSymbolSpace ) );
683683
composerLegendElem.setAttribute( "iconLabelSpace", QString::number( mIconLabelSpace ) );
684-
composerLegendElem.setAttribute( "symbolWidth", mSymbolWidth );
685-
composerLegendElem.setAttribute( "symbolHeight", mSymbolHeight );
684+
composerLegendElem.setAttribute( "symbolWidth", QString::number( mSymbolWidth ) );
685+
composerLegendElem.setAttribute( "symbolHeight", QString::number( mSymbolHeight ) );
686686
composerLegendElem.setAttribute( "wrapChar", mWrapChar );
687687

688688
if ( mComposerMap )

src/core/composer/qgscomposermap.cpp

+11-11
Original file line numberDiff line numberDiff line change
@@ -659,10 +659,10 @@ bool QgsComposerMap::writeXML( QDomElement& elem, QDomDocument & doc ) const
659659

660660
//extent
661661
QDomElement extentElem = doc.createElement( "Extent" );
662-
extentElem.setAttribute( "xmin", mExtent.xMinimum() );
663-
extentElem.setAttribute( "xmax", mExtent.xMaximum() );
664-
extentElem.setAttribute( "ymin", mExtent.yMinimum() );
665-
extentElem.setAttribute( "ymax", mExtent.yMaximum() );
662+
extentElem.setAttribute( "xmin", QString::number( mExtent.xMinimum() ) );
663+
extentElem.setAttribute( "xmax", QString::number( mExtent.xMaximum() ) );
664+
extentElem.setAttribute( "ymin", QString::number( mExtent.yMinimum() ) );
665+
extentElem.setAttribute( "ymax", QString::number( mExtent.yMaximum() ) );
666666
composerMapElem.appendChild( extentElem );
667667

668668
//layer set
@@ -681,21 +681,21 @@ bool QgsComposerMap::writeXML( QDomElement& elem, QDomDocument & doc ) const
681681
QDomElement gridElem = doc.createElement( "Grid" );
682682
gridElem.setAttribute( "show", mGridEnabled );
683683
gridElem.setAttribute( "gridStyle", mGridStyle );
684-
gridElem.setAttribute( "intervalX", mGridIntervalX );
685-
gridElem.setAttribute( "intervalY", mGridIntervalY );
686-
gridElem.setAttribute( "offsetX", mGridOffsetX );
687-
gridElem.setAttribute( "offsetY", mGridOffsetY );
688-
gridElem.setAttribute( "penWidth", mGridPen.widthF() );
684+
gridElem.setAttribute( "intervalX", QString::number( mGridIntervalX ) );
685+
gridElem.setAttribute( "intervalY", QString::number( mGridIntervalY ) );
686+
gridElem.setAttribute( "offsetX", QString::number( mGridOffsetX ) );
687+
gridElem.setAttribute( "offsetY", QString::number( mGridOffsetY ) );
688+
gridElem.setAttribute( "penWidth", QString::number( mGridPen.widthF() ) );
689689
gridElem.setAttribute( "penColorRed", mGridPen.color().red() );
690690
gridElem.setAttribute( "penColorGreen", mGridPen.color().green() );
691691
gridElem.setAttribute( "penColorBlue", mGridPen.color().blue() );
692-
gridElem.setAttribute( "crossLength", mCrossLength );
692+
gridElem.setAttribute( "crossLength", QString::number( mCrossLength ) );
693693

694694
//grid annotation
695695
QDomElement annotationElem = doc.createElement( "Annotation" );
696696
annotationElem.setAttribute( "show", mShowGridAnnotation );
697697
annotationElem.setAttribute( "position", mGridAnnotationPosition );
698-
annotationElem.setAttribute( "frameDistance", mAnnotationFrameDistance );
698+
annotationElem.setAttribute( "frameDistance", QString::number( mAnnotationFrameDistance ) );
699699
annotationElem.setAttribute( "direction", mGridAnnotationDirection );
700700
annotationElem.setAttribute( "font", mGridAnnotationFont.toString() );
701701
annotationElem.setAttribute( "precision", mGridAnnotationPrecision );

src/core/composer/qgscomposerpicture.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -268,8 +268,8 @@ bool QgsComposerPicture::writeXML( QDomElement& elem, QDomDocument & doc ) const
268268
}
269269
QDomElement composerPictureElem = doc.createElement( "ComposerPicture" );
270270
composerPictureElem.setAttribute( "file", QgsProject::instance()->writePath( mSourceFile.fileName() ) );
271-
composerPictureElem.setAttribute( "pictureWidth", mPictureWidth );
272-
composerPictureElem.setAttribute( "pictureHeight", mPictureHeight );
271+
composerPictureElem.setAttribute( "pictureWidth", QString::number( mPictureWidth ) );
272+
composerPictureElem.setAttribute( "pictureHeight", QString::number( mPictureHeight ) );
273273
if ( !mRotationMap )
274274
{
275275
composerPictureElem.setAttribute( "mapId", -1 );

src/core/composer/qgscomposerscalebar.cpp

+7-7
Original file line numberDiff line numberDiff line change
@@ -347,16 +347,16 @@ bool QgsComposerScaleBar::writeXML( QDomElement& elem, QDomDocument & doc ) cons
347347
}
348348

349349
QDomElement composerScaleBarElem = doc.createElement( "ComposerScaleBar" );
350-
composerScaleBarElem.setAttribute( "height", mHeight );
351-
composerScaleBarElem.setAttribute( "labelBarSpace", mLabelBarSpace );
352-
composerScaleBarElem.setAttribute( "boxContentSpace", mBoxContentSpace );
350+
composerScaleBarElem.setAttribute( "height", QString::number( mHeight ) );
351+
composerScaleBarElem.setAttribute( "labelBarSpace", QString::number( mLabelBarSpace ) );
352+
composerScaleBarElem.setAttribute( "boxContentSpace", QString::number( mBoxContentSpace ) );
353353
composerScaleBarElem.setAttribute( "numSegments", mNumSegments );
354354
composerScaleBarElem.setAttribute( "numSegmentsLeft", mNumSegmentsLeft );
355-
composerScaleBarElem.setAttribute( "numUnitsPerSegment", mNumUnitsPerSegment );
356-
composerScaleBarElem.setAttribute( "segmentMillimeters", mSegmentMillimeters );
357-
composerScaleBarElem.setAttribute( "numMapUnitsPerScaleBarUnit", mNumMapUnitsPerScaleBarUnit );
355+
composerScaleBarElem.setAttribute( "numUnitsPerSegment", QString::number( mNumUnitsPerSegment ) );
356+
composerScaleBarElem.setAttribute( "segmentMillimeters", QString::number( mSegmentMillimeters ) );
357+
composerScaleBarElem.setAttribute( "numMapUnitsPerScaleBarUnit", QString::number( mNumMapUnitsPerScaleBarUnit ) );
358358
composerScaleBarElem.setAttribute( "font", mFont.toString() );
359-
composerScaleBarElem.setAttribute( "outlineWidth", mPen.widthF() );
359+
composerScaleBarElem.setAttribute( "outlineWidth", QString::number( mPen.widthF() ) );
360360
composerScaleBarElem.setAttribute( "unitLabel", mUnitLabeling );
361361

362362
//style

src/core/composer/qgscomposershape.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -87,10 +87,10 @@ bool QgsComposerShape::writeXML( QDomElement& elem, QDomDocument & doc ) const
8787
{
8888
QDomElement composerShapeElem = doc.createElement( "ComposerShape" );
8989
composerShapeElem.setAttribute( "shapeType", mShape );
90-
composerShapeElem.setAttribute( "outlineWidth", mPen.widthF() );
90+
composerShapeElem.setAttribute( "outlineWidth", QString::number( mPen.widthF() ) );
9191
composerShapeElem.setAttribute( "transparentFill", mBrush.style() == Qt::NoBrush );
92-
composerShapeElem.setAttribute( "shapeWidth", mShapeWidth );
93-
composerShapeElem.setAttribute( "shapeHeight", mShapeHeight );
92+
composerShapeElem.setAttribute( "shapeWidth", QString::number( mShapeWidth ) );
93+
composerShapeElem.setAttribute( "shapeHeight", QString::number( mShapeHeight ) );
9494
QDomElement outlineColorElem = doc.createElement( "OutlineColor" );
9595
outlineColorElem.setAttribute( "red", mPen.color().red() );
9696
outlineColorElem.setAttribute( "green", mPen.color().green() );

src/core/composer/qgscomposertable.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,10 @@ void QgsComposerTable::adjustFrameToSize()
134134

135135
bool QgsComposerTable::tableWriteXML( QDomElement& elem, QDomDocument & doc ) const
136136
{
137-
elem.setAttribute( "lineTextDist", mLineTextDistance );
137+
elem.setAttribute( "lineTextDist", QString::number( mLineTextDistance ) );
138138
elem.setAttribute( "headerFont", mHeaderFont.toString() );
139139
elem.setAttribute( "contentFont", mContentFont.toString() );
140-
elem.setAttribute( "gridStrokeWidth", mGridStrokeWidth );
140+
elem.setAttribute( "gridStrokeWidth", QString::number( mGridStrokeWidth ) );
141141
elem.setAttribute( "gridColorRed", mGridColor.red() );
142142
elem.setAttribute( "gridColorGreen", mGridColor.green() );
143143
elem.setAttribute( "gridColorBlue", mGridColor.blue() );

src/core/composer/qgscomposition.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,8 @@ bool QgsComposition::writeXML( QDomElement& composerElem, QDomDocument& doc )
189189
QDomElement compositionElem = doc.createElement( "Composition" );
190190
if ( mPaperItem )
191191
{
192-
compositionElem.setAttribute( "paperWidth", mPaperItem->rect().width() );
193-
compositionElem.setAttribute( "paperHeight", mPaperItem->rect().height() );
192+
compositionElem.setAttribute( "paperWidth", QString::number( mPaperItem->rect().width() ) );
193+
compositionElem.setAttribute( "paperHeight", QString::number( mPaperItem->rect().height() ) );
194194
}
195195

196196
//snapping
@@ -202,9 +202,9 @@ bool QgsComposition::writeXML( QDomElement& composerElem, QDomDocument& doc )
202202
{
203203
compositionElem.setAttribute( "snapping", "0" );
204204
}
205-
compositionElem.setAttribute( "snapGridResolution", mSnapGridResolution );
206-
compositionElem.setAttribute( "snapGridOffsetX", mSnapGridOffsetX );
207-
compositionElem.setAttribute( "snapGridOffsetY", mSnapGridOffsetY );
205+
compositionElem.setAttribute( "snapGridResolution", QString::number( mSnapGridResolution ) );
206+
compositionElem.setAttribute( "snapGridOffsetX", QString::number( mSnapGridOffsetX ) );
207+
compositionElem.setAttribute( "snapGridOffsetY", QString::number( mSnapGridOffsetY ) );
208208

209209
compositionElem.setAttribute( "printResolution", mPrintResolution );
210210
compositionElem.setAttribute( "printAsRaster", mPrintAsRaster );

src/core/qgsdiagramrendererv2.cpp

+12-12
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ void QgsDiagramLayerSettings::writeXML( QDomElement& layerElem, QDomDocument& do
3737
diagramLayerElem.setAttribute( "linePlacementFlags", placementFlags );
3838
diagramLayerElem.setAttribute( "priority", priority );
3939
diagramLayerElem.setAttribute( "obstacle", obstacle );
40-
diagramLayerElem.setAttribute( "dist", dist );
40+
diagramLayerElem.setAttribute( "dist", QString::number( dist ) );
4141
diagramLayerElem.setAttribute( "xPosColumn", xPosColumn );
4242
diagramLayerElem.setAttribute( "yPosColumn", yPosColumn );
4343
layerElem.appendChild( diagramLayerElem );
@@ -90,12 +90,12 @@ void QgsDiagramSettings::writeXML( QDomElement& rendererElem, QDomDocument& doc
9090
categoryElem.setAttribute( "font", font.toString() );
9191
categoryElem.setAttribute( "backgroundColor", backgroundColor.name() );
9292
categoryElem.setAttribute( "backgroundAlpha", backgroundColor.alpha() );
93-
categoryElem.setAttribute( "width", size.width() );
94-
categoryElem.setAttribute( "height", size.height() );
93+
categoryElem.setAttribute( "width", QString::number( size.width() ) );
94+
categoryElem.setAttribute( "height", QString::number( size.height() ) );
9595
categoryElem.setAttribute( "penColor", penColor.name() );
96-
categoryElem.setAttribute( "penWidth", penWidth );
97-
categoryElem.setAttribute( "minScaleDenominator", minScaleDenominator );
98-
categoryElem.setAttribute( "maxScaleDenominator", maxScaleDenominator );
96+
categoryElem.setAttribute( "penWidth", QString::number( penWidth ) );
97+
categoryElem.setAttribute( "minScaleDenominator", QString::number( minScaleDenominator ) );
98+
categoryElem.setAttribute( "maxScaleDenominator", QString::number( maxScaleDenominator ) );
9999
if ( sizeType == MM )
100100
{
101101
categoryElem.setAttribute( "sizeType", "MM" );
@@ -346,12 +346,12 @@ void QgsLinearlyInterpolatedDiagramRenderer::readXML( const QDomElement& elem )
346346
void QgsLinearlyInterpolatedDiagramRenderer::writeXML( QDomElement& layerElem, QDomDocument& doc ) const
347347
{
348348
QDomElement rendererElem = doc.createElement( "LinearlyInterpolatedDiagramRenderer" );
349-
rendererElem.setAttribute( "lowerValue", mLowerValue );
350-
rendererElem.setAttribute( "upperValue", mUpperValue );
351-
rendererElem.setAttribute( "lowerWidth", mLowerSize.width() );
352-
rendererElem.setAttribute( "lowerHeight", mLowerSize.height() );
353-
rendererElem.setAttribute( "upperWidth", mUpperSize.width() );
354-
rendererElem.setAttribute( "upperHeight", mUpperSize.height() );
349+
rendererElem.setAttribute( "lowerValue", QString::number( mLowerValue ) );
350+
rendererElem.setAttribute( "upperValue", QString::number( mUpperValue ) );
351+
rendererElem.setAttribute( "lowerWidth", QString::number( mLowerSize.width() ) );
352+
rendererElem.setAttribute( "lowerHeight", QString::number( mLowerSize.height() ) );
353+
rendererElem.setAttribute( "upperWidth", QString::number( mUpperSize.width() ) );
354+
rendererElem.setAttribute( "upperHeight", QString::number( mUpperSize.height() ) );
355355
rendererElem.setAttribute( "classificationAttribute", mClassificationAttribute );
356356
mSettings.writeXML( rendererElem, doc );
357357
_writeXML( rendererElem, doc );

src/core/qgslabel.cpp

+5-5
Original file line numberDiff line numberDiff line change
@@ -1077,7 +1077,7 @@ void QgsLabel::writeXML( QDomNode & layer_node, QDomDocument & document ) const
10771077

10781078
// size and units
10791079
QDomElement size = document.createElement( "size" );
1080-
size.setAttribute( "value", mLabelAttributes->size() );
1080+
size.setAttribute( "value", QString::number( mLabelAttributes->size() ) );
10811081
if ( mLabelAttributes->sizeIsSet() )
10821082
{
10831083
if ( mLabelFieldIdx[Size] != -1 )
@@ -1244,9 +1244,9 @@ void QgsLabel::writeXML( QDomNode & layer_node, QDomDocument & document ) const
12441244
{
12451245
QDomElement offset = document.createElement( "offset" );
12461246
offset.setAttribute( "units", QgsLabelAttributes::unitsName( mLabelAttributes->offsetType() ) );
1247-
offset.setAttribute( "x", mLabelAttributes->xOffset() );
1247+
offset.setAttribute( "x", QString::number( mLabelAttributes->xOffset() ) );
12481248
offset.setAttribute( "xfieldname", labelField( XOffset ) );
1249-
offset.setAttribute( "y", mLabelAttributes->yOffset() );
1249+
offset.setAttribute( "y", QString::number( mLabelAttributes->yOffset() ) );
12501250
offset.setAttribute( "yfieldname", labelField( YOffset ) );
12511251
labelattributes.appendChild( offset );
12521252
}
@@ -1255,7 +1255,7 @@ void QgsLabel::writeXML( QDomNode & layer_node, QDomDocument & document ) const
12551255
QDomElement angle = document.createElement( "angle" );
12561256
if ( mLabelAttributes->angleIsSet() )
12571257
{
1258-
angle.setAttribute( "value", mLabelAttributes->angle() );
1258+
angle.setAttribute( "value", QString::number( mLabelAttributes->angle() ) );
12591259
if ( mLabelFieldIdx[Angle] != -1 )
12601260
{
12611261
angle.setAttribute( "fieldname", labelField( Angle ) );
@@ -1311,7 +1311,7 @@ void QgsLabel::writeXML( QDomNode & layer_node, QDomDocument & document ) const
13111311
QDomElement buffersize = document.createElement( "buffersize" );
13121312
if ( mLabelAttributes->bufferSizeIsSet() )
13131313
{
1314-
buffersize.setAttribute( "value", mLabelAttributes->bufferSize() );
1314+
buffersize.setAttribute( "value", QString::number( mLabelAttributes->bufferSize() ) );
13151315
buffersize.setAttribute( "units", QgsLabelAttributes::unitsName( mLabelAttributes->bufferSizeType() ) );
13161316
if ( mLabelFieldIdx[BufferSize] != -1 )
13171317
{

src/core/qgsmaplayer.cpp

+4-4
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ bool QgsMapLayer::writeXML( QDomNode & layer_node, QDomDocument & document )
302302

303303
// use scale dependent visibility flag
304304
maplayer.setAttribute( "hasScaleBasedVisibilityFlag", hasScaleBasedVisibility() ? 1 : 0 );
305-
maplayer.setAttribute( "minimumScale", minimumScale() );
306-
maplayer.setAttribute( "maximumScale", maximumScale() );
305+
maplayer.setAttribute( "minimumScale", QString::number( minimumScale() ) );
306+
maplayer.setAttribute( "maximumScale", QString::number( maximumScale() ) );
307307

308308
// ID
309309
QDomElement layerId = document.createElement( "id" );
@@ -745,8 +745,8 @@ QString QgsMapLayer::saveNamedStyle( const QString theURI, bool & theResultFlag
745745

746746
// use scale dependent visibility flag
747747
myRootNode.setAttribute( "hasScaleBasedVisibilityFlag", hasScaleBasedVisibility() ? 1 : 0 );
748-
myRootNode.setAttribute( "minimumScale", minimumScale() );
749-
myRootNode.setAttribute( "maximumScale", maximumScale() );
748+
myRootNode.setAttribute( "minimumScale", QString::number( minimumScale() ) );
749+
myRootNode.setAttribute( "maximumScale", QString::number( maximumScale() ) );
750750

751751
// <transparencyLevelInt>
752752
QDomElement transparencyLevelIntElement = myDocument.createElement( "transparencyLevelInt" );

src/core/qgsvectorlayer.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3219,8 +3219,8 @@ bool QgsVectorLayer::writeSymbology( QDomNode& node, QDomDocument& doc, QString&
32193219
{
32203220
// use scale dependent visibility flag
32213221
mapLayerNode.setAttribute( "scaleBasedLabelVisibilityFlag", mLabel->scaleBasedVisibility() ? 1 : 0 );
3222-
mapLayerNode.setAttribute( "minLabelScale", mLabel->minScale() );
3223-
mapLayerNode.setAttribute( "maxLabelScale", mLabel->maxScale() );
3222+
mapLayerNode.setAttribute( "minLabelScale", QString::number( mLabel->minScale() ) );
3223+
mapLayerNode.setAttribute( "maxLabelScale", QString::number( mLabel->maxScale() ) );
32243224

32253225
//classification field(s)
32263226
QgsAttributeList attributes = mRenderer->classificationAttributes();

src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -948,8 +948,8 @@ QDomElement QgsGraduatedSymbolRendererV2::save( QDomDocument& doc )
948948
symbols.insert( symbolName, range.symbol() );
949949

950950
QDomElement rangeElem = doc.createElement( "range" );
951-
rangeElem.setAttribute( "lower", range.lowerValue() );
952-
rangeElem.setAttribute( "upper", range.upperValue() );
951+
rangeElem.setAttribute( "lower", QString::number( range.lowerValue() ) );
952+
rangeElem.setAttribute( "upper", QString::number( range.upperValue() ) );
953953
rangeElem.setAttribute( "symbol", symbolName );
954954
rangeElem.setAttribute( "label", range.label() );
955955
rangesElem.appendChild( rangeElem );

0 commit comments

Comments
 (0)