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
Itinerary
Commits
5af4059f
Commit
5af4059f
authored
Oct 28, 2021
by
Volker Krause
Browse files
Also do provider-based backend selection when querying alternatives
parent
83bbce94
Changes
2
Show whitespace changes
Inline
Side-by-side
autotests/timelinedelegatecontrollertest.cpp
View file @
5af4059f
...
...
@@ -157,6 +157,7 @@ private Q_SLOTS:
{
ReservationManager
mgr
;
Test
::
clearAll
(
&
mgr
);
LiveDataManager
ldm
;
ApplicationController
ctrl
;
ctrl
.
setReservationManager
(
&
mgr
);
ctrl
.
importFromUrl
(
QUrl
::
fromLocalFile
(
QLatin1String
(
SOURCE_DIR
"/../tests/randa2017.json"
)));
...
...
@@ -164,6 +165,7 @@ private Q_SLOTS:
TimelineDelegateController
controller
;
controller
.
setReservationManager
(
&
mgr
);
controller
.
setBatchId
(
mgr
.
batches
().
at
(
0
));
// flight
controller
.
setLiveDataManager
(
&
ldm
);
QVERIFY
(
!
controller
.
journeyRequest
().
isValid
());
controller
.
setBatchId
(
mgr
.
batches
().
at
(
1
));
// first train segment
...
...
src/app/timelinedelegatecontroller.cpp
View file @
5af4059f
...
...
@@ -403,7 +403,7 @@ static bool isLayover(const QVariant &res1, const QVariant &res2)
KPublicTransport
::
JourneyRequest
TimelineDelegateController
::
journeyRequest
()
const
{
if
(
!
m_resMgr
||
m_batchId
.
isEmpty
())
{
if
(
!
m_resMgr
||
m_batchId
.
isEmpty
()
||
!
m_liveDataMgr
)
{
return
{};
}
...
...
@@ -420,6 +420,7 @@ KPublicTransport::JourneyRequest TimelineDelegateController::journeyRequest() co
req
.
setDownloadAssets
(
true
);
req
.
setIncludeIntermediateStops
(
true
);
req
.
setIncludePaths
(
true
);
PublicTransport
::
selectBackends
(
req
,
m_liveDataMgr
->
publicTransportManager
(),
res
);
// find full journey by looking at subsequent elements
auto
prevRes
=
res
;
...
...
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