diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-08-04 09:47:52 +0200 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-08-04 09:51:36 +0200 |
commit | 0936bc54f907066644503c7d4c390968711c73a7 (patch) | |
tree | 6eb8c614e7083eae6ca619435f901dcb1380108f /src/gui | |
parent | 83080e8a7cb7aaa794a9659eeaf34690afe71ddb (diff) | |
parent | ffd44acd0de4fc7079e76f1fe4689b655f9dc763 (diff) |
Merge remote-tracking branch 'origin/5.3' into dev
Conflicts:
config.tests/arch/arch.cpp
src/opengl/qgl_qpa.cpp
src/widgets/kernel/qapplication.cpp
Change-Id: I80b442a4c2c9632743a5b5c7319ff201ec5bc4fd
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/kernel/qguiapplication.cpp | 25 | ||||
-rw-r--r-- | src/gui/painting/qblendfunctions_p.h | 4 |
2 files changed, 26 insertions, 3 deletions
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp index 68e87a024f..831ebd19c0 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) @@ -1209,6 +1213,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 @@ -1259,6 +1264,8 @@ void QGuiApplicationPrivate::init() is_session_restored = true; } #endif + } else if (arg == "-testability") { + loadTestability = true; } else { argv[j++] = argv[i]; } @@ -1319,6 +1326,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(); @@ -1792,7 +1815,7 @@ void QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::Mo } if (doubleClick) { mousePressButton = Qt::NoButton; - if (!e->window.isNull()) { // QTBUG-36364, check if window closed in response to press + if (!e->window.isNull() || e->nullWindow) { // QTBUG-36364, check if window closed in response to press const QEvent::Type doubleClickType = frameStrut ? QEvent::NonClientAreaMouseButtonDblClick : QEvent::MouseButtonDblClick; QMouseEvent dblClickEvent(doubleClickType, localPoint, localPoint, globalPoint, button, buttons, e->modifiers); diff --git a/src/gui/painting/qblendfunctions_p.h b/src/gui/painting/qblendfunctions_p.h index 98e9e10bd8..e08c74ab88 100644 --- a/src/gui/painting/qblendfunctions_p.h +++ b/src/gui/painting/qblendfunctions_p.h @@ -147,7 +147,7 @@ void qt_scale_image_16bit(uchar *destPixels, int dbpl, while (h--) { const SRC *src = (const SRC *) (srcPixels + (srcy >> 16) * sbpl); - int srcx = basex; + quint32 srcx = basex; int x = 0; for (; x<w-7; x+=8) { blender.write(&dst[x], src[srcx >> 16]); srcx += ix; @@ -258,7 +258,7 @@ template <typename T> void qt_scale_image_32bit(uchar *destPixels, int dbpl, while (h--) { const uint *src = (const quint32 *) (srcPixels + (srcy >> 16) * sbpl); - int srcx = basex; + quint32 srcx = basex; int x = 0; for (; x<w; ++x) { blender.write(&dst[x], src[srcx >> 16]); |