Skip to content

Commit 2d0be1c

Browse files
committedDec 11, 2015
Changed the parameter of QgsCoordinateReferenceSystem::readXML() to const
and removed const_cast<> where not needed any longer
1 parent 3e18fda commit 2d0be1c

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed
 

‎python/core/qgscoordinatereferencesystem.sip

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ class QgsCoordinateReferenceSystem
185185
* @param theNode The node from which state will be restored
186186
* @return bool True on success, False on failure
187187
*/
188-
bool readXML( QDomNode & theNode );
188+
bool readXML( const QDomNode & theNode );
189189
/** Stores state to the given Dom node in the given document.
190190
* Below is an example of the generated tag.
191191
\code{.xml}

‎src/core/composer/qgscomposermapgrid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ bool QgsComposerMapGrid::readXML( const QDomElement& itemElem, const QDomDocumen
404404
QDomElement crsElem = itemElem.firstChildElement( "spatialrefsys" );
405405
if ( !crsElem.isNull() )
406406
{
407-
mCRS.readXML( const_cast<QDomElement&>( itemElem ) ); //better would be to change argument in QgsCoordinateReferenceSystem::readXML to const
407+
mCRS.readXML( itemElem );
408408
}
409409
else
410410
{

‎src/core/qgscoordinatereferencesystem.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1145,7 +1145,7 @@ QString QgsCoordinateReferenceSystem::toWkt() const
11451145
return mWkt;
11461146
}
11471147

1148-
bool QgsCoordinateReferenceSystem::readXML( QDomNode & theNode )
1148+
bool QgsCoordinateReferenceSystem::readXML( const QDomNode & theNode )
11491149
{
11501150
QgsDebugMsg( "Reading Spatial Ref Sys from xml ------------------------!" );
11511151
QDomNode srsNode = theNode.namedItem( "spatialrefsys" );

‎src/core/qgscoordinatereferencesystem.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
230230
* @param theNode The node from which state will be restored
231231
* @return bool True on success, False on failure
232232
*/
233-
bool readXML( QDomNode & theNode );
233+
bool readXML( const QDomNode & theNode );
234234
/** Stores state to the given Dom node in the given document.
235235
* Below is an example of the generated tag.
236236
\code{.xml}

0 commit comments

Comments
 (0)
Please sign in to comment.