Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
also use bool fieldIsoFormat in search widget wrapper
- Loading branch information
Showing
with
2 additions
and
1 deletion.
-
+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 ); |
|
|
} |
|
|