Changeset View
Changeset View
Standalone View
Standalone View
src/context.cpp
Show First 20 Lines • Show All 492 Lines • ▼ Show 20 Line(s) | 488 | { | |||
---|---|---|---|---|---|
493 | const int eventRoleIndex = 1; | 493 | const int eventRoleIndex = 1; | ||
494 | StreamRestore *obj = qobject_cast<StreamRestore *>(m_streamRestores.data().value(eventRoleIndex)); | 494 | StreamRestore *obj = qobject_cast<StreamRestore *>(m_streamRestores.data().value(eventRoleIndex)); | ||
495 | 495 | | |||
496 | if (!obj) { | 496 | if (!obj) { | ||
497 | QVariantMap props; | 497 | QVariantMap props; | ||
498 | props.insert(QStringLiteral("application.icon_name"), | 498 | props.insert(QStringLiteral("application.icon_name"), | ||
499 | QStringLiteral("preferences-desktop-notification")); | 499 | QStringLiteral("preferences-desktop-notification")); | ||
500 | obj = new StreamRestore(eventRoleIndex, props, this); | 500 | obj = new StreamRestore(eventRoleIndex, props, this); | ||
501 | obj->update(info); | ||||
501 | m_streamRestores.insert(obj); | 502 | m_streamRestores.insert(obj); | ||
502 | } | 503 | } else { | ||
503 | | ||||
504 | obj->update(info); | 504 | obj->update(info); | ||
505 | } | 505 | } | ||
506 | } | ||||
506 | 507 | | |||
507 | void Context::serverCallback(const pa_server_info *info) | 508 | void Context::serverCallback(const pa_server_info *info) | ||
508 | { | 509 | { | ||
509 | m_server->update(info); | 510 | m_server->update(info); | ||
510 | } | 511 | } | ||
511 | 512 | | |||
512 | void Context::setCardProfile(quint32 index, const QString &profile) | 513 | void Context::setCardProfile(quint32 index, const QString &profile) | ||
513 | { | 514 | { | ||
▲ Show 20 Lines • Show All 121 Lines • Show Last 20 Lines |