summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/uiautomation
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/windows/uiautomation')
-rw-r--r--src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
index cc293b777c..5f564f81c2 100644
--- a/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
+++ b/src/plugins/platforms/windows/uiautomation/qwindowsuiamainprovider.cpp
@@ -393,12 +393,14 @@ HRESULT QWindowsUiaMainProvider::GetPropertyValue(PROPERTYID idProp, VARIANT *pR
// Control type converted from role.
auto controlType = roleToControlTypeId(accessible->role());
- // The native OSK should be disbled if the Qt OSK is in use.
+ // The native OSK should be disbled if the Qt OSK is in use,
+ // or if disabled via application attribute.
static bool imModuleEmpty = qEnvironmentVariableIsEmpty("QT_IM_MODULE");
+ bool nativeVKDisabled = QCoreApplication::testAttribute(Qt::AA_MSWindowsDisableVirtualKeyboard);
// If we want to disable the native OSK auto-showing
// we have to report text fields as non-editable.
- if (controlType == UIA_EditControlTypeId && !imModuleEmpty)
+ if (controlType == UIA_EditControlTypeId && (!imModuleEmpty || nativeVKDisabled))
controlType = UIA_TextControlTypeId;
setVariantI4(controlType, pRetVal);
@@ -473,7 +475,7 @@ QString QWindowsUiaMainProvider::automationIdForAccessible(const QAccessibleInte
if (name.isEmpty())
return QString();
if (!result.isEmpty())
- result.prepend(QLatin1Char('.'));
+ result.prepend(u'.');
result.prepend(name);
obj = obj->parent();
}