Changed the parameter of QgsCoordinateReferenceSystem::readXML() to const

and removed const_cast<> where not needed any longer
This commit is contained in:
Sebastian Dietrich 2015-12-11 23:24:31 +01:00
parent 3e18fda4ce
commit 2d0be1cf69
4 changed files with 4 additions and 4 deletions

View File

@ -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}

View File

@ -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
{

View File

@ -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" );

View File

@ -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}