Skip to content

Commit

Permalink
qt6: Update to handle QMetaProperty::isUser change.
Browse files Browse the repository at this point in the history
The qt6 version of this function no longer accepts an argument.
  • Loading branch information
linuxdude42 committed Dec 8, 2021
1 parent 00be2aa commit 8c19737
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 5 deletions.
Expand Up @@ -109,7 +109,13 @@ void MythCBORSerialiser::AddQObject(const QObject* Object)
for (int index = 0; index < count; ++index )
{
QMetaProperty metaProperty = metaobject->property(index);
if (metaProperty.isUser(Object))
if (
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
metaProperty.isUser(Object)
#else
metaProperty.isUser()
#endif
)
{
const char *rawname = metaProperty.name();
QString name(rawname);
Expand Down
Expand Up @@ -90,7 +90,13 @@ void MythJSONSerialiser::AddQObject(const QObject* Object)
for (int index = 0; index < count; ++index )
{
QMetaProperty metaProperty = metaobject->property(index);
if (metaProperty.isUser(Object))
if (
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
metaProperty.isUser(Object)
#else
metaProperty.isUser()
#endif
)
{
const char *rawname = metaProperty.name();
QString name(rawname);
Expand Down
7 changes: 6 additions & 1 deletion mythtv/libs/libmythbase/http/serialisers/mythserialiser.cpp
Expand Up @@ -80,7 +80,12 @@ HTTPData MythSerialiser::Serialise(const QString &Name, const QVariant& Value, c
for (int ix = 0; ix < count; ++ix )
{
QMetaProperty metaproperty = meta->property(ix);
if (metaproperty.isUser(Object))
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
bool user = metaproperty.isUser(Object);
#else
bool user = metaproperty.isUser();
#endif
if (user)
{
const char *rawname = metaproperty.name();
QString name(rawname);
Expand Down
Expand Up @@ -133,7 +133,13 @@ void MythXMLPListSerialiser::AddQObject(const QString &Name, const QObject* Obje
for (int index = 0; index < count; ++index )
{
QMetaProperty metaproperty = meta->property(index);
if (metaproperty.isUser(Object))
if (
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
metaproperty.isUser(Object)
#else
metaproperty.isUser()
#endif
)
{
const char *rawname = metaproperty.name();
QString name(rawname);
Expand Down
Expand Up @@ -93,7 +93,13 @@ void MythXMLSerialiser::AddQObject(const QObject* Object)
for (int index = 0; index < count; ++index )
{
QMetaProperty metaproperty = meta->property(index);
if (metaproperty.isUser(Object))
if (
#if QT_VERSION < QT_VERSION_CHECK(6,0,0)
metaproperty.isUser(Object)
#else
metaproperty.isUser()
#endif
)
{
const char *rawname = metaproperty.name();
QString name(rawname);
Expand Down

0 comments on commit 8c19737

Please sign in to comment.