Skip to content

Commit

Permalink
[processing] Use QgsMessageLog to put duplicate name warnings in Proc…
Browse files Browse the repository at this point in the history
…essing log
  • Loading branch information
nyalldawson committed Jan 31, 2018
1 parent 2218f65 commit c625d7a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/core/processing/qgsprocessingalgorithm.cpp
Expand Up @@ -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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/core/processing/qgsprocessingprovider.cpp
Expand Up @@ -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;
}

Expand Down

0 comments on commit c625d7a

Please sign in to comment.