Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
PIM
Itinerary
Commits
06f702a6
Commit
06f702a6
authored
Jul 21, 2022
by
Volker Krause
Browse files
Add support for boat/ferry trips to the GPX export
parent
e74371e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/app/gpxexport.cpp
View file @
06f702a6
...
...
@@ -8,6 +8,7 @@
#include
"favoritelocationmodel.h"
#include
"transfer.h"
#include
<KItinerary/BoatTrip>
#include
<KItinerary/BusTrip>
#include
<KItinerary/Event>
#include
<KItinerary/Flight>
...
...
@@ -52,6 +53,9 @@ void GpxExport::writeReservation(const QVariant &res, const KPublicTransport::Jo
const
auto
bus
=
res
.
value
<
BusReservation
>
().
reservationFor
().
value
<
BusTrip
>
();
const
QString
n
=
bus
.
busName
()
+
QLatin1Char
(
' '
)
+
bus
.
busNumber
();
m_writer
.
writeName
(
i18n
(
"Bus %1 from %2 to %3"
,
n
.
trimmed
(),
LocationUtil
::
name
(
dep
),
LocationUtil
::
name
(
arr
)));
}
else
if
(
JsonLd
::
isA
<
BoatReservation
>
(
res
))
{
const
auto
boat
=
res
.
value
<
BoatReservation
>
().
reservationFor
().
value
<
BoatTrip
>
();
m_writer
.
writeName
(
i18n
(
"Ferry from %1 to %2"
,
LocationUtil
::
name
(
dep
),
LocationUtil
::
name
(
arr
)));
}
writeTransfer
(
before
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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