Skip to content

Commit

Permalink
[QgsQuick] Datetime widget - spelling and banned keywords fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vsklencar authored and wonder-sk committed Sep 11, 2020
1 parent 75795a3 commit 4e6acb6
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/quickgui/plugin/editor/qgsquickdatetime.qml
Expand Up @@ -91,7 +91,7 @@ Item {
// if the field is a QDate, the automatic conversion to JS date [1]
// leads to the creation of date time object with the time zone.
// For instance shapefiles has support for dates but not date/time or time.
// So a date coming from a shapefile as 2001-01-01 will become 2000-12-31 19:00:00 -05 in QML/JS (in the carribeans).
// So a date coming from a shapefile as 2001-01-01 will become 2000-12-31 19:00:00 -05 in QML/JS in UTC -05 zone.
// And when formatting this with the display format, this is shown as 2000-12-31.
// So we detect if the field is a date only and revert the time zone offset.
// [1] http://doc.qt.io/qt-5/qtqml-cppintegration-data.html#basic-qt-data-types
Expand Down
8 changes: 4 additions & 4 deletions src/quickgui/qgsquickutils.cpp
Expand Up @@ -393,19 +393,19 @@ QString QgsQuickUtils::dateTimeFieldFormat( const QString &fieldFormat )
{
if ( QgsDateTimeFieldFormatter::DATE_FORMAT == fieldFormat )
{
return QStringLiteral( "Date" );
return QString( "Date" );
}
else if ( QgsDateTimeFieldFormatter::TIME_FORMAT == fieldFormat )
{
return QStringLiteral( "Time" );
return QString( "Time" );
}
else if ( QgsDateTimeFieldFormatter::DATETIME_FORMAT == fieldFormat )
{
return QStringLiteral( "Date Time" );
return QString( "Date Time" );
}
else
{
return QStringLiteral();
return QString();
}
}

Expand Down

0 comments on commit 4e6acb6

Please sign in to comment.