Skip to content

Commit cb84b83

Browse files
m-kuhnnyalldawson
authored andcommittedMar 6, 2018
Add log output in case of loading models with missing parameters
1 parent 6bad21f commit cb84b83

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed
 

‎src/core/processing/models/qgsprocessingmodelalgorithm.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -859,6 +859,14 @@ bool QgsProcessingModelAlgorithm::loadVariant( const QVariant &model )
859859
// with no way for users to repair them
860860
if ( param )
861861
addParameter( param.release() );
862+
else
863+
{
864+
QVariantMap map = paramDefIt.value().toMap();
865+
QString type = map.value( QStringLiteral( "parameter_type" ) ).toString();
866+
QString name = map.value( QStringLiteral( "name" ) ).toString();
867+
868+
QgsMessageLog::logMessage( QCoreApplication::translate( "Processing", "Could not load parameter %1 of type %2." ).arg( name, type ), QCoreApplication::translate( "Processing", "Processing" ) );
869+
}
862870
}
863871

864872
updateDestinationParameters();

0 commit comments

Comments
 (0)
Please sign in to comment.