Skip to content
Permalink
Browse files

[QgsQuick] Datetime widget - spelling and banned keywords fix

  • Loading branch information
vsklencar authored and wonder-sk committed Sep 11, 2020
1 parent 75795a3 commit 4e6acb6da35f64b71ef88f1d6564c54476f134a1
Showing with 5 additions and 5 deletions.
  1. +1 −1 src/quickgui/plugin/editor/qgsquickdatetime.qml
  2. +4 −4 src/quickgui/qgsquickutils.cpp
@@ -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
@@ -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();
}
}

0 comments on commit 4e6acb6

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