Add some context to obscure warning, reduce message logs noise

This commit is contained in:
Mathieu Pellerin 2023-03-03 12:30:38 +07:00
parent 06b3678a57
commit 301793678d

View File

@ -355,7 +355,10 @@ void QgsLayoutItemPicture::refreshPicture( const QgsExpressionContext *context )
{
mHasExpressionError = true;
source = QString();
QgsMessageLog::logMessage( tr( "Picture expression eval error" ) );
if ( scopedContext.feature().isValid() )
{
QgsMessageLog::logMessage( QStringLiteral( "%1: %2" ).arg( tr( "Picture expression eval error" ), sourceProperty.asExpression() ) );
}
}
else if ( source.type() != QVariant::ByteArray )
{