Commit 6349b650 authored by Volker Krause's avatar Volker Krause
Browse files

Make ERA SSBv3 issuing/departure day accessors const

parent 796282f7
Pipeline #77018 passed with stage
in 13 minutes and 59 seconds
......@@ -54,7 +54,7 @@ bool SSBv3Ticket::maybeSSB(const QByteArray& data)
return (data.at(0) >> 4) == SSB_VERSION;
}
QDate SSBv3Ticket::issueDate(const QDateTime &contextDate)
QDate SSBv3Ticket::issueDate(const QDateTime &contextDate) const
{
if (m_data.isEmpty() || ticketTypeCode() > SSBv3Ticket::RPT) {
return {};
......@@ -69,7 +69,7 @@ QDate SSBv3Ticket::issueDate(const QDateTime &contextDate)
return d;
}
QDate SSBv3Ticket::type1DepartureDay(const QDateTime& contextDate)
QDate SSBv3Ticket::type1DepartureDay(const QDateTime& contextDate) const
{
if (ticketTypeCode() != SSBv3Ticket::IRT_RES_BOA) {
return {};
......
......@@ -112,9 +112,9 @@ public:
bool isValid() const;
/** Date of issue. */
Q_INVOKABLE QDate issueDate(const QDateTime &contextDate = QDateTime::currentDateTime());
Q_INVOKABLE QDate issueDate(const QDateTime &contextDate = QDateTime::currentDateTime()) const;
/** Departure day for type 1 (IRT/RES/BOA) tickets. */
Q_INVOKABLE QDate type1DepartureDay(const QDateTime &contextDate = QDateTime::currentDateTime());
Q_INVOKABLE QDate type1DepartureDay(const QDateTime &contextDate = QDateTime::currentDateTime()) const;
/** Raw barcode data. */
QByteArray rawData() const;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment