mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-04 00:04:03 -04:00
return empty string to signal error
This commit is contained in:
parent
545e264c70
commit
9bacaee3c6
@ -873,11 +873,9 @@ QString QgsModelParameterGraphicItem::linkPointText( Qt::Edge, int index ) const
|
|||||||
|
|
||||||
QString QgsModelParameterGraphicItem::getLinkedParamDataType( Qt::Edge /* unused in this implementation because parameters only have a bottom edge */, int index )
|
QString QgsModelParameterGraphicItem::getLinkedParamDataType( Qt::Edge /* unused in this implementation because parameters only have a bottom edge */, int index )
|
||||||
{
|
{
|
||||||
QString unknownType = QString( "unknown" );
|
|
||||||
|
|
||||||
if ( index < 0 )
|
if ( index < 0 )
|
||||||
{
|
{
|
||||||
return unknownType;
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( const QgsProcessingModelParameter *parameter = dynamic_cast< const QgsProcessingModelParameter * >( component() ) )
|
if ( const QgsProcessingModelParameter *parameter = dynamic_cast< const QgsProcessingModelParameter * >( component() ) )
|
||||||
@ -885,7 +883,7 @@ QString QgsModelParameterGraphicItem::getLinkedParamDataType( Qt::Edge /* unused
|
|||||||
return this->model()->parameterDefinition( parameter->parameterName() )->type();
|
return this->model()->parameterDefinition( parameter->parameterName() )->type();
|
||||||
}
|
}
|
||||||
|
|
||||||
return unknownType;
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1130,13 +1128,11 @@ int QgsModelChildAlgorithmGraphicItem::linkPointCount( Qt::Edge edge ) const
|
|||||||
|
|
||||||
QString QgsModelComponentGraphicItem::getLinkedParamDataType( Qt::Edge edge, int index )
|
QString QgsModelComponentGraphicItem::getLinkedParamDataType( Qt::Edge edge, int index )
|
||||||
{
|
{
|
||||||
QString unknownType = QString( "unknown" );
|
|
||||||
|
|
||||||
if ( const QgsProcessingModelChildAlgorithm *child = dynamic_cast<const QgsProcessingModelChildAlgorithm *>( component() ) )
|
if ( const QgsProcessingModelChildAlgorithm *child = dynamic_cast<const QgsProcessingModelChildAlgorithm *>( component() ) )
|
||||||
{
|
{
|
||||||
if ( !child->algorithm() )
|
if ( !child->algorithm() )
|
||||||
{
|
{
|
||||||
return unknownType;
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
switch ( edge )
|
switch ( edge )
|
||||||
@ -1147,7 +1143,7 @@ QString QgsModelComponentGraphicItem::getLinkedParamDataType( Qt::Edge edge, int
|
|||||||
{
|
{
|
||||||
return child->algorithm()->outputDefinitions().at( index )->type();
|
return child->algorithm()->outputDefinitions().at( index )->type();
|
||||||
}
|
}
|
||||||
return unknownType;
|
return QString();
|
||||||
}
|
}
|
||||||
case Qt::TopEdge:
|
case Qt::TopEdge:
|
||||||
{
|
{
|
||||||
@ -1158,7 +1154,7 @@ QString QgsModelComponentGraphicItem::getLinkedParamDataType( Qt::Edge edge, int
|
|||||||
return params.at( index )->type();
|
return params.at( index )->type();
|
||||||
}
|
}
|
||||||
|
|
||||||
return unknownType;
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
case Qt::LeftEdge:
|
case Qt::LeftEdge:
|
||||||
@ -1167,7 +1163,7 @@ QString QgsModelComponentGraphicItem::getLinkedParamDataType( Qt::Edge edge, int
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return unknownType;
|
return QString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user