Commit 56c7e76e authored by Volker Krause's avatar Volker Krause

Show notifications for pkpass changes too

Can still be improved, as we have fairly little context yet.
parent 569b7f26
......@@ -85,6 +85,7 @@ void LiveDataManager::setReservationManager(ReservationManager *resMgr)
void LiveDataManager::setPkPassManager(PkPassManager *pkPassMgr)
m_pkPassMgr = pkPassMgr;
connect(m_pkPassMgr, &PkPassManager::passUpdated, this, &LiveDataManager::pkPassUpdated);
void LiveDataManager::setPollingEnabled(bool pollingEnabled)
......@@ -555,4 +556,16 @@ QDateTime LiveDataManager::lastDeparturePollTime(const QString &batchId, const Q
return dt;
void LiveDataManager::pkPassUpdated(const QString &passId, const QStringList &changes)
// ### to provide more context, we need to have a passId -> batchId map here eventually
KNotification::event(KNotification::Notification, i18n("Itinerary change"), changes.join(QLatin1Char('\n')), QLatin1String("clock"));
#include "moc_livedatamanager.cpp"
......@@ -105,6 +105,9 @@ private:
/** Last time we queried any kind of departure information for this reservation batch. */
QDateTime lastDeparturePollTime(const QString &batchId, const QVariant &res) const;
/** Notifications handling for pkpass updates. */
void pkPassUpdated(const QString &passId, const QStringList &changes);
ReservationManager *m_resMgr;
PkPassManager *m_pkPassMgr;
std::unique_ptr<KPublicTransport::Manager> m_ptMgr;
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment