forked from qt-creator/qt-creator
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:
committed by
Eike Ziller
parent
012edb2d77
commit
5b942b9e88
@@ -58,6 +58,8 @@ bool isPropertyBlackListed(const QmlDesigner::PropertyName &propertyName)
|
|||||||
return QQuickDesignerSupportProperties::isPropertyBlackListed(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(
|
static void addToPropertyNameListIfNotBlackListed(
|
||||||
PropertyNameList *propertyNameList, const QQuickDesignerSupport::PropertyName &propertyName)
|
PropertyNameList *propertyNameList, const QQuickDesignerSupport::PropertyName &propertyName)
|
||||||
{
|
{
|
||||||
@@ -132,12 +134,19 @@ PropertyNameList allPropertyNamesInline(QObject *object,
|
|||||||
|
|
||||||
return propertyNameList;
|
return propertyNameList;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
PropertyNameList allPropertyNames(QObject *object,
|
PropertyNameList allPropertyNames(QObject *object,
|
||||||
const PropertyName &baseName,
|
const PropertyName &baseName,
|
||||||
QObjectList *inspectedObjects)
|
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);
|
return allPropertyNamesInline(object, baseName, inspectedObjects);
|
||||||
|
#else
|
||||||
|
return QQuickDesignerSupportProperties::allPropertyNames(object, baseName, inspectedObjects);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
PropertyNameList propertyNameListForWritableProperties(QObject *object,
|
PropertyNameList propertyNameListForWritableProperties(QObject *object,
|
||||||
|
Reference in New Issue
Block a user