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
c8e64303
Commit
c8e64303
authored
Sep 04, 2021
by
Volker Krause
Browse files
Be more tolerant to invalid GBFS feed list data
parent
a986b702
Changes
1
Show whitespace changes
Inline
Side-by-side
src/lib/gbfs/gbfsjob.cpp
View file @
c8e64303
...
...
@@ -97,6 +97,9 @@ void GBFSJob::parseDiscoverData()
if
(
data
.
size
()
==
1
)
{
// only one set of feeds
m_feeds
=
data
.
begin
().
value
().
toObject
().
value
(
QLatin1String
(
"feeds"
)).
toArray
();
if
(
m_feeds
.
isEmpty
())
{
// invalid format for single feeds
m_feeds
=
data
.
value
(
QLatin1String
(
"feeds"
)).
toArray
();
}
}
else
if
(
!
data
.
empty
())
{
const
auto
localeLangs
=
QLocale
().
uiLanguages
();
for
(
const
auto
&
l
:
localeLangs
)
{
...
...
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