Skip to content

Commit 4e6acb6

Browse files
vsklencarwonder-sk
vsklencar
authored andcommittedSep 11, 2020
[QgsQuick] Datetime widget - spelling and banned keywords fix
1 parent 75795a3 commit 4e6acb6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed
 

‎src/quickgui/plugin/editor/qgsquickdatetime.qml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ Item {
9191
// if the field is a QDate, the automatic conversion to JS date [1]
9292
// leads to the creation of date time object with the time zone.
9393
// For instance shapefiles has support for dates but not date/time or time.
94-
// 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).
94+
// 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.
9595
// And when formatting this with the display format, this is shown as 2000-12-31.
9696
// So we detect if the field is a date only and revert the time zone offset.
9797
// [1] http://doc.qt.io/qt-5/qtqml-cppintegration-data.html#basic-qt-data-types

‎src/quickgui/qgsquickutils.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,19 +393,19 @@ QString QgsQuickUtils::dateTimeFieldFormat( const QString &fieldFormat )
393393
{
394394
if ( QgsDateTimeFieldFormatter::DATE_FORMAT == fieldFormat )
395395
{
396-
return QStringLiteral( "Date" );
396+
return QString( "Date" );
397397
}
398398
else if ( QgsDateTimeFieldFormatter::TIME_FORMAT == fieldFormat )
399399
{
400-
return QStringLiteral( "Time" );
400+
return QString( "Time" );
401401
}
402402
else if ( QgsDateTimeFieldFormatter::DATETIME_FORMAT == fieldFormat )
403403
{
404-
return QStringLiteral( "Date Time" );
404+
return QString( "Date Time" );
405405
}
406406
else
407407
{
408-
return QStringLiteral();
408+
return QString();
409409
}
410410
}
411411

0 commit comments

Comments
 (0)
Please sign in to comment.