From 1f919391eee10e888a811ff1cd8676f55ca78692 Mon Sep 17 00:00:00 2001 From: Peter Varga Date: Tue, 28 Apr 2020 08:42:08 +0200 Subject: Fix -no-accessibility build Change-Id: Icbae79fd0f48fb9351ee8cc12b35ead7e99b09e2 Pick-to: 5.15 Reviewed-by: Mitch Curtis --- src/quicktemplates2/qquickcombobox.cpp | 2 ++ src/quicktemplates2/qquickcontrol.cpp | 2 ++ 2 files changed, 4 insertions(+) (limited to 'src') diff --git a/src/quicktemplates2/qquickcombobox.cpp b/src/quicktemplates2/qquickcombobox.cpp index eb1a7be8..f55aabb6 100644 --- a/src/quicktemplates2/qquickcombobox.cpp +++ b/src/quicktemplates2/qquickcombobox.cpp @@ -789,10 +789,12 @@ void QQuickComboBoxPrivate::hideOldPopup(QQuickPopup *popup) popup->setVisible(false); popup->setParentItem(nullptr); +#if QT_CONFIG(accessibility) // Remove the item from the accessibility tree. QQuickAccessibleAttached *accessible = accessibleAttached(popup); if (accessible) accessible->setIgnored(true); +#endif } QQuickComboBox::QQuickComboBox(QQuickItem *parent) diff --git a/src/quicktemplates2/qquickcontrol.cpp b/src/quicktemplates2/qquickcontrol.cpp index 6b3580de..c5a5fd7a 100644 --- a/src/quicktemplates2/qquickcontrol.cpp +++ b/src/quicktemplates2/qquickcontrol.cpp @@ -773,10 +773,12 @@ void QQuickControlPrivate::hideOldItem(QQuickItem *item) item->setVisible(false); item->setParentItem(nullptr); +#if QT_CONFIG(accessibility) // Remove the item from the accessibility tree. QQuickAccessibleAttached *accessible = accessibleAttached(item); if (accessible) accessible->setIgnored(true); +#endif } void QQuickControlPrivate::updateBaselineOffset() -- cgit v1.2.3