Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
KItinerary
Commits
6349b650
Commit
6349b650
authored
Aug 28, 2021
by
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
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
src/lib/era/ssbv3ticket.cpp
View file @
6349b650
...
...
@@ -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
{};
...
...
src/lib/era/ssbv3ticket.h
View file @
6349b650
...
...
@@ -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
;
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment