Fix QT_LINUX_ACCESSIBILITY_ALWAYS_ON

The current behavior was that accessibility is enabled if the variable
is _not_ set, which causes accessibility to be enabled all the time even
if a screen reader isn't present.

Change-Id: I73286622fb5abe1cedce420e760306ab7f200e69
Reviewed-by: Adam Majer <adamm@zombino.com>
Reviewed-by: Tomasz Olszak <olszak.tomasz@gmail.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
This commit is contained in:
Jocelyn Turcotte 2014-09-10 18:25:00 +02:00
parent 6ecc1e8006
commit 18b0aaab77

View File

@ -87,7 +87,7 @@ void DBusConnection::serviceRegistered()
//The variable was introduced because on some embedded platforms there are custom accessibility
//clients which don't set Status.ScreenReaderEnabled to true. The variable is also useful for
//debugging.
static const bool a11yAlwaysOn = !qEnvironmentVariableIsSet("QT_LINUX_ACCESSIBILITY_ALWAYS_ON");
static const bool a11yAlwaysOn = qEnvironmentVariableIsSet("QT_LINUX_ACCESSIBILITY_ALWAYS_ON");
// a11yStatus->isEnabled() returns always true (since Gnome 3.6)
bool enabled = a11yAlwaysOn || a11yStatus->screenReaderEnabled();