Skip to content
Permalink
Browse files

Changed the parameter of QgsCoordinateReferenceSystem::readXML() to c…

…onst

and removed const_cast<> where not needed any longer
  • Loading branch information
SebDieBln committed Dec 11, 2015
1 parent 3e18fda commit 2d0be1cf69e561510525a63ab07233c6a3ce40ab
@@ -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}
@@ -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
{
@@ -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" );
@@ -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}

0 comments on commit 2d0be1c

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