QmlDesigner: Fix compilation for Qt 6

For Qt versions below 5.15 and Qt 6 we can continue to use
the internal version.

Change-Id: Ia314fe9db323b0d5ea6acbb70bf1cb1098b4ae93
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Thomas Hartmann
2021-03-16 10:59:44 +01:00
committed by Eike Ziller
parent 012edb2d77
commit 5b942b9e88

View File

@@ -58,6 +58,8 @@ bool isPropertyBlackListed(const QmlDesigner::PropertyName &propertyName)
return QQuickDesignerSupportProperties::isPropertyBlackListed(propertyName);
}
#if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) && (QT_VERSION >= QT_VERSION_CHECK(5, 15, 0))
static void addToPropertyNameListIfNotBlackListed(
PropertyNameList *propertyNameList, const QQuickDesignerSupport::PropertyName &propertyName)
{
@@ -132,12 +134,19 @@ PropertyNameList allPropertyNamesInline(QObject *object,
return propertyNameList;
}
#endif
PropertyNameList allPropertyNames(QObject *object,
const PropertyName &baseName,
QObjectList *inspectedObjects)
{
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
return QQuickDesignerSupportProperties::allPropertyNames(object, baseName, inspectedObjects);
#elif QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
return allPropertyNamesInline(object, baseName, inspectedObjects);
#else
return QQuickDesignerSupportProperties::allPropertyNames(object, baseName, inspectedObjects);
#endif
}
PropertyNameList propertyNameListForWritableProperties(QObject *object,