50 lines
2.1 KiB
Diff
50 lines
2.1 KiB
Diff
|
From e692d7c6cc5ebe441377875270248cb81c8a5cd3 Mon Sep 17 00:00:00 2001
|
||
|
From: Volker Krause <vkrause@kde.org>
|
||
|
Date: Sun, 15 Dec 2019 20:11:10 +0100
|
||
|
Subject: [PATCH] Adapt to KPublicTransport API changes
|
||
|
|
||
|
---
|
||
|
autotests/timelinedelegatecontrollertest.cpp | 8 ++++----
|
||
|
1 file changed, 4 insertions(+), 4 deletions(-)
|
||
|
|
||
|
diff --git a/autotests/timelinedelegatecontrollertest.cpp b/autotests/timelinedelegatecontrollertest.cpp
|
||
|
index 962cd84..7c91378 100644
|
||
|
--- a/autotests/timelinedelegatecontrollertest.cpp
|
||
|
+++ b/autotests/timelinedelegatecontrollertest.cpp
|
||
|
@@ -68,7 +68,7 @@ private Q_SLOTS:
|
||
|
QCOMPARE(controller.effectiveEndTime(), QDateTime());
|
||
|
QCOMPARE(controller.isLocationChange(), false);
|
||
|
QCOMPARE(controller.isPublicTransport(), false);
|
||
|
- QVERIFY(controller.journeyRequest().isEmpty());
|
||
|
+ QVERIFY(!controller.journeyRequest().isValid());
|
||
|
|
||
|
controller.setBatchId(QStringLiteral("foo"));
|
||
|
QCOMPARE(controller.isCurrent(), false);
|
||
|
@@ -174,20 +174,20 @@ private Q_SLOTS:
|
||
|
TimelineDelegateController controller;
|
||
|
controller.setReservationManager(&mgr);
|
||
|
controller.setBatchId(mgr.batches().at(0)); // flight
|
||
|
- QVERIFY(controller.journeyRequest().isEmpty());
|
||
|
+ QVERIFY(!controller.journeyRequest().isValid());
|
||
|
|
||
|
controller.setBatchId(mgr.batches().at(1)); // first train segment
|
||
|
QCOMPARE(controller.isLocationChange(), true);
|
||
|
QCOMPARE(controller.isPublicTransport(), true);
|
||
|
|
||
|
auto jnyReq = controller.journeyRequest();
|
||
|
- QCOMPARE(jnyReq.isEmpty(), false);
|
||
|
+ QCOMPARE(jnyReq.isValid(), true);
|
||
|
QCOMPARE(jnyReq.from().name(), QStringLiteral("Zürich Flughafen"));
|
||
|
QCOMPARE(jnyReq.to().name(), QLatin1String("Randa"));
|
||
|
|
||
|
controller.setBatchId(mgr.batches().at(2)); // second train segment
|
||
|
jnyReq = controller.journeyRequest();
|
||
|
- QCOMPARE(jnyReq.isEmpty(), false);
|
||
|
+ QCOMPARE(jnyReq.isValid(), true);
|
||
|
QCOMPARE(jnyReq.from().name(), QLatin1String("Visp"));
|
||
|
QCOMPARE(jnyReq.to().name(), QLatin1String("Randa"));
|
||
|
}
|
||
|
--
|
||
|
2.24.1
|
||
|
|