From 5b942b9e887e5afbe3bcc57a7f8933c7a966021a Mon Sep 17 00:00:00 2001 From: Thomas Hartmann Date: Tue, 16 Mar 2021 10:59:44 +0100 Subject: [PATCH] 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 Reviewed-by: Eike Ziller --- .../qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp index 467e85c3b15..7e5af01944c 100644 --- a/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp +++ b/share/qtcreator/qml/qmlpuppet/qmlprivategate/qmlprivategate_56.cpp @@ -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,