Skip to content
Permalink
Browse files

also use bool fieldIsoFormat in search widget wrapper

  • Loading branch information
3nids committed Jan 3, 2018
1 parent bdf744e commit 611ae9523ea7a2e966cc44e16a65a29665f59521
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/gui/editorwidgets/qgsdatetimesearchwidgetwrapper.cpp
@@ -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 );
}

0 comments on commit 611ae95

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