summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qguiapplication.cpp
diff options
context:
space:
mode:
authorTimo Jyrinki <timo.jyrinki@canonical.com>2015-02-24 14:12:38 +0000
committerTimo Jyrinki <timo.jyrinki@canonical.com>2015-05-15 11:47:21 +0000
commit03281150b9c49f7f0a08b004e5638831bdb91e52 (patch)
treeb0e256df412d4576743477a7d74eb099329b6a2f /src/gui/kernel/qguiapplication.cpp
parentec93ea4a6fcf0fb4db1c0526bdfef6edace99b13 (diff)
Add environment variable support for testability library use.
Add the option to load the testability library based on whether an environment variable QT_LOAD_TESTABILITY is set, in addition to the current "-testability" flag. This improves the use of testability library together with the autopilot functional testing tool. Task-number: QTBUG-32974 Change-Id: I6abf2c004cbff2ce0aff44e24a99bcc8188a52ae Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Diffstat (limited to 'src/gui/kernel/qguiapplication.cpp')
-rw-r--r--src/gui/kernel/qguiapplication.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index af93a93cfe..4146ddd8ba 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1329,6 +1329,9 @@ void QGuiApplicationPrivate::init()
#endif
#ifndef QT_NO_LIBRARY
+ if (qEnvironmentVariableIntValue("QT_LOAD_TESTABILITY") > 0)
+ loadTestability = true;
+
if (loadTestability) {
QLibrary testLib(QStringLiteral("qttestability"));
if (testLib.load()) {