Skip to content

Commit

Permalink
Rename 'clone' method to 'copyTo'
Browse files Browse the repository at this point in the history
  • Loading branch information
dmarteau committed Sep 17, 2021
1 parent ca4e507 commit aeab4e8
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Expand Up @@ -215,7 +215,7 @@ Constructor - Creates a Map Layer QGIS Server Properties
:param layer: The map layer
%End

void clone( QgsMapLayerServerProperties *properties ) const;
void copyTo( QgsMapLayerServerProperties *properties ) const;
%Docstring
Copy properties to another instance

Expand Down
2 changes: 1 addition & 1 deletion src/core/qgsmaplayer.cpp
Expand Up @@ -134,7 +134,7 @@ void QgsMapLayer::clone( QgsMapLayer *layer ) const
layer->setCustomProperties( mCustomProperties );
layer->setOpacity( mLayerOpacity );
layer->setMetadata( mMetadata );
layer->serverProperties()->clone( mServerProperties.get() );
layer->serverProperties()->copyTo( mServerProperties.get() );
}

QgsMapLayerType QgsMapLayer::type() const
Expand Down
10 changes: 5 additions & 5 deletions src/core/qgsmaplayerserverproperties.cpp
Expand Up @@ -30,7 +30,7 @@ bool QgsServerMetadataUrlProperties::MetadataUrl::operator==( const QgsServerMet
format == other.format;
}

void QgsServerMetadataUrlProperties::clone( QgsServerMetadataUrlProperties *properties ) const
void QgsServerMetadataUrlProperties::copyTo( QgsServerMetadataUrlProperties *properties ) const
{
properties->setMetadataUrls( metadataUrls() );
}
Expand Down Expand Up @@ -72,7 +72,7 @@ void QgsServerMetadataUrlProperties::writeXml( QDomNode &layer_node, QDomDocumen

// QgsServerWmsDimensionProperties

void QgsServerWmsDimensionProperties::clone( QgsServerWmsDimensionProperties *properties ) const
void QgsServerWmsDimensionProperties::copyTo( QgsServerWmsDimensionProperties *properties ) const
{
properties->setWmsDimensions( wmsDimensions() );
}
Expand Down Expand Up @@ -213,10 +213,10 @@ QgsMapLayerServerProperties::QgsMapLayerServerProperties( QgsMapLayer *layer )
{
}

void QgsMapLayerServerProperties::clone( QgsMapLayerServerProperties *properties ) const
void QgsMapLayerServerProperties::copyTo( QgsMapLayerServerProperties *properties ) const
{
QgsServerMetadataUrlProperties::clone( properties );
QgsServerWmsDimensionProperties::clone( properties );
QgsServerMetadataUrlProperties::copyTo( properties );
QgsServerWmsDimensionProperties::copyTo( properties );
}

void QgsMapLayerServerProperties::reset()
Expand Down
6 changes: 3 additions & 3 deletions src/core/qgsmaplayerserverproperties.h
Expand Up @@ -116,7 +116,7 @@ class CORE_EXPORT QgsServerMetadataUrlProperties
*
* \param properties The properties to copy to
*/
void clone( QgsServerMetadataUrlProperties *properties ) const SIP_SKIP;
void copyTo( QgsServerMetadataUrlProperties *properties ) const SIP_SKIP;

//! Reset properties to default
void reset() SIP_SKIP;
Expand Down Expand Up @@ -251,7 +251,7 @@ class CORE_EXPORT QgsServerWmsDimensionProperties
*
* \param properties The properties to copy to
*/
void clone( QgsServerWmsDimensionProperties *properties ) const SIP_SKIP;
void copyTo( QgsServerWmsDimensionProperties *properties ) const SIP_SKIP;

/**
* Reset properties to default
Expand Down Expand Up @@ -287,7 +287,7 @@ class CORE_EXPORT QgsMapLayerServerProperties: public QgsServerMetadataUrlProper
*
* \param properties The properties to copy to
*/
void clone( QgsMapLayerServerProperties *properties ) const;
void copyTo( QgsMapLayerServerProperties *properties ) const;

/**
* Saves server properties to xml under the layer node
Expand Down

0 comments on commit aeab4e8

Please sign in to comment.