Skip to content

Commit

Permalink
Changed the parameter of QgsCoordinateReferenceSystem::readXML() to c…
Browse files Browse the repository at this point in the history
…onst

and removed const_cast<> where not needed any longer
  • Loading branch information
SebDieBln committed Dec 11, 2015
1 parent 3e18fda commit 2d0be1c
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion python/core/qgscoordinatereferencesystem.sip
Expand Up @@ -185,7 +185,7 @@ class QgsCoordinateReferenceSystem
* @param theNode The node from which state will be restored
* @return bool True on success, False on failure
*/
bool readXML( QDomNode & theNode );
bool readXML( const QDomNode & theNode );
/** Stores state to the given Dom node in the given document.
* Below is an example of the generated tag.
\code{.xml}
Expand Down
2 changes: 1 addition & 1 deletion src/core/composer/qgscomposermapgrid.cpp
Expand Up @@ -404,7 +404,7 @@ bool QgsComposerMapGrid::readXML( const QDomElement& itemElem, const QDomDocumen
QDomElement crsElem = itemElem.firstChildElement( "spatialrefsys" );
if ( !crsElem.isNull() )
{
mCRS.readXML( const_cast<QDomElement&>( itemElem ) ); //better would be to change argument in QgsCoordinateReferenceSystem::readXML to const
mCRS.readXML( itemElem );
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgscoordinatereferencesystem.cpp
Expand Up @@ -1145,7 +1145,7 @@ QString QgsCoordinateReferenceSystem::toWkt() const
return mWkt;
}

bool QgsCoordinateReferenceSystem::readXML( QDomNode & theNode )
bool QgsCoordinateReferenceSystem::readXML( const QDomNode & theNode )
{
QgsDebugMsg( "Reading Spatial Ref Sys from xml ------------------------!" );
QDomNode srsNode = theNode.namedItem( "spatialrefsys" );
Expand Down
2 changes: 1 addition & 1 deletion src/core/qgscoordinatereferencesystem.h
Expand Up @@ -230,7 +230,7 @@ class CORE_EXPORT QgsCoordinateReferenceSystem
* @param theNode The node from which state will be restored
* @return bool True on success, False on failure
*/
bool readXML( QDomNode & theNode );
bool readXML( const QDomNode & theNode );
/** Stores state to the given Dom node in the given document.
* Below is an example of the generated tag.
\code{.xml}
Expand Down

0 comments on commit 2d0be1c

Please sign in to comment.