Skip to content

Commit

Permalink
Add log output in case of loading models with missing parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn authored and nyalldawson committed Mar 6, 2018
1 parent 6bad21f commit cb84b83
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/core/processing/models/qgsprocessingmodelalgorithm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -859,6 +859,14 @@ bool QgsProcessingModelAlgorithm::loadVariant( const QVariant &model )
// with no way for users to repair them
if ( param )
addParameter( param.release() );
else
{
QVariantMap map = paramDefIt.value().toMap();
QString type = map.value( QStringLiteral( "parameter_type" ) ).toString();
QString name = map.value( QStringLiteral( "name" ) ).toString();

QgsMessageLog::logMessage( QCoreApplication::translate( "Processing", "Could not load parameter %1 of type %2." ).arg( name, type ), QCoreApplication::translate( "Processing", "Processing" ) );
}
}

updateDestinationParameters();
Expand Down

0 comments on commit cb84b83

Please sign in to comment.