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
98efafd5
Commit
98efafd5
authored
Oct 13, 2021
by
Volker Krause
Browse files
Support more Austrian double-deck coach variants
parent
fd91ed35
Changes
2
Hide whitespace changes
Inline
Side-by-side
autotests/uicrailwaycoachtest.cpp
View file @
98efafd5
...
...
@@ -37,6 +37,7 @@ private Q_SLOTS:
QCOMPARE
(
UicRailwayCoach
::
deckCount
(
QString
(),
u"DABpza"
),
2
);
QCOMPARE
(
UicRailwayCoach
::
deckCount
(
u"505486720019"
,
u"ABfbdmteeo"
),
2
);
QCOMPARE
(
UicRailwayCoach
::
deckCount
(
u"615485711035"
,
u"ARmpee"
),
1
);
QCOMPARE
(
UicRailwayCoach
::
deckCount
(
u"508126339000"
,
u"Bmpz-dl"
),
2
);
}
void
testFeatures
()
...
...
src/lib/uic/uicrailwaycoach.cpp
View file @
98efafd5
...
...
@@ -93,7 +93,7 @@ struct {
// see https://en.wikipedia.org/wiki/UIC_classification_of_railway_coaches
struct
UicClassificationSecondary
{
const
char
code
[
3
];
const
char
code
[
4
];
VehicleSection
::
Features
features
;
VehicleSection
::
Type
type
;
int
deckCount
;
...
...
@@ -127,6 +127,8 @@ static constexpr const UicClassificationSecondary secondary_81_table[] = {
{
"f"
,
VehicleSection
::
NoFeatures
,
VehicleSection
::
ControlCar
,
1
},
{
"p"
,
VehicleSection
::
NoFeatures
,
VehicleSection
::
PassengerCar
,
1
},
{
"-s"
,
VehicleSection
::
NoFeatures
,
VehicleSection
::
ControlCar
,
1
},
{
"-dl"
,
VehicleSection
::
NoFeatures
,
VehicleSection
::
PassengerCar
,
2
},
{
"-ds"
,
VehicleSection
::
NoFeatures
,
VehicleSection
::
ControlCar
,
2
},
};
struct
{
...
...
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