diff options
author | Oswald Buddenhagen <oswald.buddenhagen@digia.com> | 2014-07-31 16:36:25 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-07-31 17:29:06 +0200 |
commit | a5cf862f612bfd3db91ab1a6974d7c02aa823857 (patch) | |
tree | 7a0103c0743328edf01ea92e8089a9350e9897ef /src/gui | |
parent | c0429719c1a28bb1a0d88862b3a8c84525ee9a48 (diff) | |
parent | 87d15f2c1b5f890d5477c2979227a872e3ce207b (diff) |
Merge "Merge remote-tracking branch 'origin/stable' into 5.3" into refs/staging/5.3
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 8e0fdd561f..e5cf48dd6b 100644 --- a/src/gui/kernel/qguiapplication.cpp +++ b/src/gui/kernel/qguiapplication.cpp @@ -96,6 +96,10 @@ #include <QtGui/QClipboard> #endif +#ifndef QT_NO_LIBRARY +#include <QtCore/QLibrary> +#endif + #if defined(Q_OS_MAC) # include "private/qcore_mac_p.h" #elif defined(Q_OS_WIN) && !defined(Q_OS_WINCE) @@ -1187,6 +1191,7 @@ void QGuiApplicationPrivate::init() QCoreApplicationPrivate::is_app_running = false; // Starting up. bool doGrabUnderDebugger = false; + bool loadTestability = false; QList<QByteArray> pluginList; // Get command line params #ifndef QT_NO_SESSIONMANAGER @@ -1237,6 +1242,8 @@ void QGuiApplicationPrivate::init() is_session_restored = true; } #endif + } else if (arg == "-testability") { + loadTestability = true; } else { argv[j++] = argv[i]; } @@ -1297,6 +1304,22 @@ void QGuiApplicationPrivate::init() session_manager = new QSessionManager(q, session_id, session_key); #endif +#ifndef QT_NO_LIBRARY + if (loadTestability) { + QLibrary testLib(QStringLiteral("qttestability")); + if (testLib.load()) { + typedef void (*TasInitialize)(void); + TasInitialize initFunction = (TasInitialize)testLib.resolve("qt_testability_init"); + if (initFunction) { + initFunction(); + } else { + qCritical() << "Library qttestability resolve failed!"; + } + } else { + qCritical() << "Library qttestability load failed:" << testLib.errorString(); + } + } +#endif // QT_NO_LIBRARY } extern void qt_cleanupFontDatabase(); |