Navigation Menu

Skip to content

Commit

Permalink
also use bool fieldIsoFormat in search widget wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Jan 3, 2018
1 parent bdf744e commit 611ae95
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.cpp
Expand Up @@ -46,8 +46,9 @@ QVariant QgsDateTimeSearchWidgetWrapper::value() const
if ( ! mDateTimeEdit )
return QDateTime();

const bool fieldIsoFormat = config( QStringLiteral( "field_iso_format" ), false ).toBool();
const QString fieldFormat = config( QStringLiteral( "field_format" ), QgsDateTimeFieldFormatter::defaultFormat( layer()->fields().at( mFieldIdx ).type() ) ).toString();
if ( fieldFormat == QgsDateTimeFieldFormatter::QT_ISO_FORMAT )
if ( fieldIsoFormat )
{
return mDateTimeEdit->dateTime().toString( Qt::ISODate );
}
Expand Down

0 comments on commit 611ae95

Please sign in to comment.