Changeset View
Changeset View
Standalone View
Standalone View
plugins/messageviewer/bodypartformatter/semantic/datatypes.cpp
Show First 20 Lines • Show All 49 Lines • ▼ Show 20 Line(s) | 49 | { | |||
---|---|---|---|---|---|
50 | return m_iataCode != other.m_iataCode || m_name != other.m_name; | 50 | return m_iataCode != other.m_iataCode || m_name != other.m_name; | ||
51 | } | 51 | } | ||
52 | 52 | | |||
53 | bool TrainStation::operator!=(const TrainStation &other) const | 53 | bool TrainStation::operator!=(const TrainStation &other) const | ||
54 | { | 54 | { | ||
55 | return m_name != other.m_name; | 55 | return m_name != other.m_name; | ||
56 | } | 56 | } | ||
57 | 57 | | |||
58 | bool BusStation::operator!=(const BusStation &other) const | ||||
59 | { | ||||
60 | return m_name != other.m_name; | ||||
61 | } | ||||
62 | | ||||
58 | static QString localizedDateTime(const QDateTime &dt) | 63 | static QString localizedDateTime(const QDateTime &dt) | ||
59 | { | 64 | { | ||
60 | auto s = QLocale().toString(dt, QLocale::ShortFormat); | 65 | auto s = QLocale().toString(dt, QLocale::ShortFormat); | ||
61 | if (dt.timeSpec() == Qt::TimeZone || dt.timeSpec() == Qt::OffsetFromUTC) { | 66 | if (dt.timeSpec() == Qt::TimeZone || dt.timeSpec() == Qt::OffsetFromUTC) { | ||
62 | s += QLatin1Char(' ') + dt.timeZone().abbreviation(dt); | 67 | s += QLatin1Char(' ') + dt.timeZone().abbreviation(dt); | ||
63 | } | 68 | } | ||
64 | return s; | 69 | return s; | ||
65 | } | 70 | } | ||
Show All 31 Lines | |||||
97 | { | 102 | { | ||
98 | return QLocale().toString(m_departureTime, QLocale::ShortFormat); | 103 | return QLocale().toString(m_departureTime, QLocale::ShortFormat); | ||
99 | } | 104 | } | ||
100 | 105 | | |||
101 | QString TrainTrip::arrivalTimeLocalized() const | 106 | QString TrainTrip::arrivalTimeLocalized() const | ||
102 | { | 107 | { | ||
103 | return QLocale().toString(m_arrivalTime, QLocale::ShortFormat); | 108 | return QLocale().toString(m_arrivalTime, QLocale::ShortFormat); | ||
104 | } | 109 | } | ||
110 | | ||||
111 | QString BusTrip::departureTimeLocalized() const | ||||
112 | { | ||||
113 | return QLocale().toString(m_departureTime, QLocale::ShortFormat); | ||||
114 | } | ||||
115 | | ||||
116 | QString BusTrip::arrivalTimeLocalized() const | ||||
117 | { | ||||
118 | return QLocale().toString(m_arrivalTime, QLocale::ShortFormat); | ||||
119 | } |