From 68a8a1b99c8114f7d072437b6cee5bddb0414c18 Mon Sep 17 00:00:00 2001 From: Alexander Bruy Date: Tue, 12 Nov 2024 06:25:11 +0000 Subject: [PATCH] address review comments --- .../processing/qgsmetadataalgorithms.cpp | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/src/analysis/processing/qgsmetadataalgorithms.cpp b/src/analysis/processing/qgsmetadataalgorithms.cpp index 94cc78a96f02..5a191e073a2a 100644 --- a/src/analysis/processing/qgsmetadataalgorithms.cpp +++ b/src/analysis/processing/qgsmetadataalgorithms.cpp @@ -36,17 +36,17 @@ QStringList QgsCopyLayerMetadataAlgorithm::tags() const QString QgsCopyLayerMetadataAlgorithm::group() const { - return QObject::tr( "Layer tools" ); + return QObject::tr( "Metadata tools" ); } QString QgsCopyLayerMetadataAlgorithm::groupId() const { - return QStringLiteral( "layertools" ); + return QStringLiteral( "metadatatools" ); } QString QgsCopyLayerMetadataAlgorithm::shortHelpString() const { - return QObject::tr( "Copies metadata from an input layer to a target layer." ); + return QObject::tr( "Copies metadata from an input layer to a target layer.\n\nAny existing metadata in the target layer will be replaced." ); } QgsCopyLayerMetadataAlgorithm *QgsCopyLayerMetadataAlgorithm::createInstance() const @@ -76,8 +76,7 @@ bool QgsCopyLayerMetadataAlgorithm::prepareAlgorithm( const QVariantMap ¶met mLayerId = targetLayer->id(); - QgsLayerMetadata *metadata = inputLayer->metadata().clone(); - targetLayer->setMetadata( *metadata ); + targetLayer->setMetadata( *inputLayer->metadata() ); if ( saveAsDefault ) { bool ok; @@ -119,17 +118,17 @@ QStringList QgsApplyLayerMetadataAlgorithm::tags() const QString QgsApplyLayerMetadataAlgorithm::group() const { - return QObject::tr( "Layer tools" ); + return QObject::tr( "Metadata tools" ); } QString QgsApplyLayerMetadataAlgorithm::groupId() const { - return QStringLiteral( "layertools" ); + return QStringLiteral( "metadatatools" ); } QString QgsApplyLayerMetadataAlgorithm::shortHelpString() const { - return QObject::tr( "Applies the metadata to a layer. The metadata must be defined as QMD file." ); + return QObject::tr( "Applies the metadata to a layer. The metadata must be defined as QMD file.\n\nAny existing metadata in the layer will be replaced." ); } QgsApplyLayerMetadataAlgorithm *QgsApplyLayerMetadataAlgorithm::createInstance() const @@ -205,12 +204,12 @@ QStringList QgsExportLayerMetadataAlgorithm::tags() const QString QgsExportLayerMetadataAlgorithm::group() const { - return QObject::tr( "Layer tools" ); + return QObject::tr( "Metadata tools" ); } QString QgsExportLayerMetadataAlgorithm::groupId() const { - return QStringLiteral( "layertools" ); + return QStringLiteral( "metadatatools" ); } QString QgsExportLayerMetadataAlgorithm::shortHelpString() const