Skip to content
Permalink
Browse files

[processing] Use QgsMessageLog to put duplicate name warnings in Proc…

…essing log
  • Loading branch information
nyalldawson committed Jan 31, 2018
1 parent 2218f65 commit c625d7a14d4e9ad4ad07ba93202443bafd4216c6
Showing with 2 additions and 2 deletions.
  1. +1 −1 src/core/processing/qgsprocessingalgorithm.cpp
  2. +1 −1 src/core/processing/qgsprocessingprovider.cpp
@@ -246,7 +246,7 @@ bool QgsProcessingAlgorithm::addParameter( QgsProcessingParameterDefinition *def
const QgsProcessingParameterDefinition *existingDef = QgsProcessingAlgorithm::parameterDefinition( definition->name() );
if ( existingDef && existingDef->name() == definition->name() ) // parameterDefinition is case-insensitive, but we DO allow case-different duplicate names
{
QgsLogger::warning( QStringLiteral( "Duplicate parameter %1 registered for alg %2" ).arg( definition->name(), id() ) );
QgsMessageLog::logMessage( QObject::tr( "Duplicate parameter %1 registered for alg %2" ).arg( definition->name(), id() ), QObject::tr( "Processing" ) );
return false;
}

@@ -76,7 +76,7 @@ bool QgsProcessingProvider::addAlgorithm( QgsProcessingAlgorithm *algorithm )

if ( mAlgorithms.contains( algorithm->name() ) )
{
QgsLogger::warning( QStringLiteral( "Duplicate algorithm name %1 for provider %2" ).arg( algorithm->name(), id() ) );
QgsMessageLog::logMessage( tr( "Duplicate algorithm name %1 for provider %2" ).arg( algorithm->name(), id() ), QObject::tr( "Processing" ) );
return false;
}

0 comments on commit c625d7a

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