diff --git a/dataengines/mpris2/playercontainer.cpp b/dataengines/mpris2/playercontainer.cpp index 913cbca2e..d14dccf57 100644 --- a/dataengines/mpris2/playercontainer.cpp +++ b/dataengines/mpris2/playercontainer.cpp @@ -192,9 +192,17 @@ void PlayerContainer::copyProperty(const QString &propName, const QVariant &_val } } if (value.type() != expType) { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) const char *gotTypeCh = QDBusMetaType::typeToSignature(value.userType()); +#else + const char *gotTypeCh = QDBusMetaType::typeToSignature(value.metaType()); +#endif QString gotType = gotTypeCh ? QString::fromLatin1(gotTypeCh) : QStringLiteral(""); +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) const char *expTypeCh = QDBusMetaType::typeToSignature(expType); +#else + const char *expTypeCh = QDBusMetaType::typeToSignature(QMetaType(expType)); +#endif QString expType = expTypeCh ? QString::fromLatin1(expTypeCh) : QStringLiteral(""); qCWarning(MPRIS2) << m_dbusAddress << "exports" << propName << "as D-Bus type" << gotType << "but it should be D-Bus type" << expType; @@ -272,7 +280,11 @@ void PlayerContainer::updateFromMap(const QVariantMap &map, UpdateType updType) m_caps &= ~cap; } } else { +#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) const char *gotTypeCh = QDBusMetaType::typeToSignature(i.value().userType()); +#else + const char *gotTypeCh = QDBusMetaType::typeToSignature(i.value().metaType()); +#endif QString gotType = gotTypeCh ? QString::fromLatin1(gotTypeCh) : QStringLiteral(""); qCWarning(MPRIS2) << m_dbusAddress << "exports" << i.key() << "as D-Bus type" << gotType << "but it should be D-Bus type \"b\"";