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
Libraries
KPublicTransport
Commits
0893f62e
Commit
0893f62e
authored
Jun 05, 2021
by
Volker Krause
Browse files
Handle carpool location type to silence missing case warnings
parent
f005117b
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lib/datatypes/location.cpp
View file @
0893f62e
...
...
@@ -362,6 +362,7 @@ Location Location::merge(const Location &lhs, const Location &rhs)
switch
(
l
.
type
())
{
case
Place
:
case
CarpoolPickupDropoff
:
case
Stop
:
break
;
case
RentedVehicleStation
:
...
...
@@ -419,6 +420,7 @@ QJsonObject Location::toJson(const Location &loc)
obj
.
remove
(
QLatin1String
(
"type"
));
[[
fallthrough
]];
case
Stop
:
case
CarpoolPickupDropoff
:
break
;
case
RentedVehicleStation
:
obj
.
insert
(
QStringLiteral
(
"rentalVehicleStation"
),
RentalVehicleStation
::
toJson
(
loc
.
rentalVehicleStation
()));
...
...
@@ -455,6 +457,7 @@ Location Location::fromJson(const QJsonObject &obj)
switch
(
loc
.
type
())
{
case
Place
:
case
Stop
:
case
CarpoolPickupDropoff
:
break
;
case
RentedVehicleStation
:
loc
.
setData
(
RentalVehicleStation
::
fromJson
(
obj
.
value
(
QLatin1String
(
"rentalVehicleStation"
)).
toObject
()));
...
...
Write
Preview
Markdown
is supported
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