diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp index 43a53d7cfc..18becd4ab0 100644 --- a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp +++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp @@ -513,7 +513,7 @@ QString QWindowsUiaMainProvider::automationIdForAccessible(const QAccessibleInte while (obj) { QString name = obj->objectName(); if (name.isEmpty()) - return QString(); + return result; if (!result.isEmpty()) result.prepend(u'.'); result.prepend(name);