Skip to content
Permalink
Browse files

fix crash when using a script with a QgsProcessingParameterDateTime i…

…n the modeler (#35080)
  • Loading branch information
3nids committed Mar 14, 2020
1 parent b134c77 commit 77fcfe9306fb292e3fc8534303026a77ec160528
Showing with 10 additions and 7 deletions.
  1. +10 −7 src/gui/processing/qgsprocessingwidgetwrapperimpl.cpp
@@ -3859,16 +3859,19 @@ QList<int> QgsProcessingDateTimeWidgetWrapper::compatibleDataTypes() const
QString QgsProcessingDateTimeWidgetWrapper::modelerExpressionFormatString() const
{
const QgsProcessingParameterDateTime *dateTimeParam = dynamic_cast< const QgsProcessingParameterDateTime *>( parameterDefinition() );
switch ( dateTimeParam->dataType() )
if ( dateTimeParam )
{
case QgsProcessingParameterDateTime::DateTime:
return tr( "datetime value, or a ISO string representation of a datetime" );
switch ( dateTimeParam->dataType() )
{
case QgsProcessingParameterDateTime::DateTime:
return tr( "datetime value, or a ISO string representation of a datetime" );

case QgsProcessingParameterDateTime::Date:
return tr( "date value, or a ISO string representation of a date" );
case QgsProcessingParameterDateTime::Date:
return tr( "date value, or a ISO string representation of a date" );

case QgsProcessingParameterDateTime::Time:
return tr( "time value, or a ISO string representation of a time" );
case QgsProcessingParameterDateTime::Time:
return tr( "time value, or a ISO string representation of a time" );
}
}
return QString();
}

0 comments on commit 77fcfe9

Please sign in to comment.
You can’t perform that action at this time.