mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Use consistent Date format across the whole GUI
This commit is contained in:
parent
ad178db57e
commit
3d01424f44
@ -1307,14 +1307,14 @@ void GUI::statistics()
|
||||
+ l.toString(_areaCount) + "<br>");
|
||||
|
||||
if (_dateRange.first.isValid()) {
|
||||
QString format = l.dateFormat(QLocale::ShortFormat);
|
||||
if (_dateRange.first == _dateRange.second)
|
||||
text.append("<b>" + tr("Date") + ":</b> "
|
||||
+ _dateRange.first.toString(format) + "<br>");
|
||||
+ l.toString(_dateRange.first, QLocale::ShortFormat) + "<br>");
|
||||
else
|
||||
text.append("<b>" + tr("Date") + ":</b> "
|
||||
+ QString("%1 - %2").arg(_dateRange.first.toString(format),
|
||||
_dateRange.second.toString(format)) + "<br>");
|
||||
+ QString("%1 - %2").arg(l.toString(_dateRange.first,
|
||||
QLocale::NarrowFormat), l.toString(_dateRange.second,
|
||||
QLocale::NarrowFormat)) + "<br>");
|
||||
}
|
||||
|
||||
if (distance() > 0)
|
||||
@ -1372,14 +1372,13 @@ void GUI::statistics()
|
||||
|
||||
if (_dateRange.first.isValid()) {
|
||||
if (_dateRange.first == _dateRange.second) {
|
||||
QString format = l.dateFormat(QLocale::LongFormat);
|
||||
text.append("<tr><td>" + tr("Date") + ":</td><td>"
|
||||
+ _dateRange.first.toString(format) + "</td></tr>");
|
||||
+ l.toString(_dateRange.first, QLocale::ShortFormat) + "</td></tr>");
|
||||
} else {
|
||||
QString format = l.dateFormat(QLocale::ShortFormat);
|
||||
text.append("<tr><td>" + tr("Date") + ":</td><td>"
|
||||
+ QString("%1 - %2").arg(_dateRange.first.toString(format),
|
||||
_dateRange.second.toString(format)) + "</td></tr>");
|
||||
+ QString("%1 - %2").arg(l.toString(_dateRange.first,
|
||||
QLocale::NarrowFormat), l.toString(_dateRange.second,
|
||||
QLocale::NarrowFormat)) + "</td></tr>");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -24,7 +24,8 @@ ToolTip TrackItem::info() const
|
||||
if (_movingTime > 0)
|
||||
tt.insert(tr("Moving time"), Format::timeSpan(_movingTime));
|
||||
if (!_date.isNull())
|
||||
tt.insert(tr("Date"), l.toString(_date.toTimeZone(_timeZone)));
|
||||
tt.insert(tr("Date"), l.toString(_date.toTimeZone(_timeZone),
|
||||
QLocale::ShortFormat));
|
||||
if (!_links.isEmpty()) {
|
||||
QString links;
|
||||
for (int i = 0; i < _links.size(); i++) {
|
||||
|
Loading…
Reference in New Issue
Block a user