Changeset View
Changeset View
Standalone View
Standalone View
dataengines/mpris2/playercontainer.cpp
Show First 20 Lines • Show All 225 Lines • ▼ Show 20 Line(s) | 190 | { | |||
---|---|---|---|---|---|
226 | if (value.convert(expType)) { | 226 | if (value.convert(expType)) { | ||
227 | if (propName == QLatin1String("Position")) { | 227 | if (propName == QLatin1String("Position")) { | ||
228 | 228 | | |||
229 | setData(POS_UPD_STRING, QDateTime::currentDateTimeUtc()); | 229 | setData(POS_UPD_STRING, QDateTime::currentDateTimeUtc()); | ||
230 | 230 | | |||
231 | } else if (propName == QLatin1String("Metadata")) { | 231 | } else if (propName == QLatin1String("Metadata")) { | ||
232 | 232 | | |||
233 | if (updType == UpdatedSignal) { | 233 | if (updType == UpdatedSignal) { | ||
234 | QDBusObjectPath oldTrackId(data().value(QStringLiteral("Metadata")).toMap().value(QStringLiteral("mpris:trackid")).toString()); | 234 | const QString oldTrackId = data().value(QStringLiteral("Metadata")).toMap().value(QStringLiteral("mpris:trackid")).toString(); | ||
235 | QDBusObjectPath newTrackId(value.toMap().value(QStringLiteral("mpris:trackid")).toString()); | 235 | const QString newTrackId = value.toMap().value(QStringLiteral("mpris:trackid")).toString(); | ||
236 | if (oldTrackId != newTrackId) { | 236 | if (oldTrackId != newTrackId) { | ||
237 | setData(QStringLiteral("Position"), static_cast<qlonglong>(0)); | 237 | setData(QStringLiteral("Position"), static_cast<qlonglong>(0)); | ||
238 | setData(POS_UPD_STRING, QDateTime::currentDateTimeUtc()); | 238 | setData(POS_UPD_STRING, QDateTime::currentDateTimeUtc()); | ||
239 | } | 239 | } | ||
240 | } | 240 | } | ||
241 | 241 | | |||
242 | if (value.toMap().value(QStringLiteral("mpris:length")).toLongLong() <= 0) { | 242 | if (value.toMap().value(QStringLiteral("mpris:length")).toLongLong() <= 0) { | ||
243 | QMap<QString, QVariant> metadataMap = value.toMap(); | 243 | QMap<QString, QVariant> metadataMap = value.toMap(); | ||
▲ Show 20 Lines • Show All 170 Lines • Show Last 20 Lines |