diff options
author | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-28 01:00:14 +0100 |
---|---|---|
committer | Qt Forward Merge Bot <qt_forward_merge_bot@qt-project.org> | 2019-02-28 01:00:15 +0100 |
commit | 043f99954faa8355c9f0d78d441099a6f7e1ad8b (patch) | |
tree | 3543e16fef20cb6f71b1374594477a4b145f9bab /src/gui | |
parent | f6ce77f3e4dbc67531db7eeaf271c5416b4a4934 (diff) | |
parent | f657c7426329d3763bbf3373b986378c22020269 (diff) |
Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Icc9b061c56e969756f0351c936cdeb8063c86079
Diffstat (limited to 'src/gui')
-rw-r--r-- | src/gui/configure.json | 2 | ||||
-rw-r--r-- | src/gui/configure.pri | 11 | ||||
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface.cpp | 20 | ||||
-rw-r--r-- | src/gui/kernel/qwindowsysteminterface_p.h | 1 | ||||
-rw-r--r-- | src/gui/text/qsyntaxhighlighter.cpp | 2 |
5 files changed, 32 insertions, 4 deletions
diff --git a/src/gui/configure.json b/src/gui/configure.json index b5bfdc4a33..59c06af97f 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -448,7 +448,7 @@ ], "sources": [ { "type": "pkgConfig", "args": "gl", "condition": "!config.darwin" }, - { "type": "makeSpec", "spec": "OPENGL" } + { "type": "openglMakeSpec" } ] }, "opengl_es2": { diff --git a/src/gui/configure.pri b/src/gui/configure.pri index 1b95449a10..0db106597e 100644 --- a/src/gui/configure.pri +++ b/src/gui/configure.pri @@ -15,6 +15,17 @@ defineTest(qtConfLibrary_freetype) { return(true) } +defineTest(qtConfLibrary_openglMakeSpec) { + darwin:sdk { + sysrootified = + for(val, QMAKE_INCDIR_OPENGL): sysrootified += $${QMAKE_MAC_SDK_PATH}$$val + QMAKE_INCDIR_OPENGL = $$sysrootified + } + $${1}.spec = OPENGL + !qtConfLibrary_makeSpec($$1, $$2): return(false) + return(true) +} + # Check for Direct X shader compiler 'fxc'. # Up to Direct X SDK June 2010 and for MinGW, this is pointed to by the # DXSDK_DIR variable. Starting with Windows Kit 8, it is included in diff --git a/src/gui/kernel/qwindowsysteminterface.cpp b/src/gui/kernel/qwindowsysteminterface.cpp index 5b32405f5e..7067ece1d8 100644 --- a/src/gui/kernel/qwindowsysteminterface.cpp +++ b/src/gui/kernel/qwindowsysteminterface.cpp @@ -695,13 +695,29 @@ QList<QTouchEvent::TouchPoint> } if (states == Qt::TouchPointReleased) { - g_nextPointId = 1; - g_pointIdMap->clear(); + // All points on deviceId have been released. + // Remove all points associated with that device from g_pointIdMap. + // (On other devices, some touchpoints might still be pressed. + // But this function is only called with points from one device at a time.) + for (auto it = g_pointIdMap->begin(); it != g_pointIdMap->end();) { + if (it.key() >> 32 == quint64(deviceId)) + it = g_pointIdMap->erase(it); + else + ++it; + } + if (g_pointIdMap->isEmpty()) + g_nextPointId = 1; } return touchPoints; } +void QWindowSystemInterfacePrivate::clearPointIdMap() +{ + g_pointIdMap->clear(); + g_nextPointId = 1; +} + QList<QWindowSystemInterface::TouchPoint> QWindowSystemInterfacePrivate::toNativeTouchPoints(const QList<QTouchEvent::TouchPoint>& pointList, const QWindow *window) diff --git a/src/gui/kernel/qwindowsysteminterface_p.h b/src/gui/kernel/qwindowsysteminterface_p.h index 563ca8f922..6c818a9030 100644 --- a/src/gui/kernel/qwindowsysteminterface_p.h +++ b/src/gui/kernel/qwindowsysteminterface_p.h @@ -537,6 +537,7 @@ public: static QList<QWindowSystemInterface::TouchPoint> toNativeTouchPoints(const QList<QTouchEvent::TouchPoint>& pointList, const QWindow *window); + static void clearPointIdMap(); static void installWindowSystemEventHandler(QWindowSystemEventHandler *handler); static void removeWindowSystemEventhandler(QWindowSystemEventHandler *handler); diff --git a/src/gui/text/qsyntaxhighlighter.cpp b/src/gui/text/qsyntaxhighlighter.cpp index 0e07b69868..102a776ed3 100644 --- a/src/gui/text/qsyntaxhighlighter.cpp +++ b/src/gui/text/qsyntaxhighlighter.cpp @@ -297,7 +297,7 @@ void QSyntaxHighlighterPrivate::reformatBlock(const QTextBlock &block) QSyntaxHighlighter::QSyntaxHighlighter(QObject *parent) : QObject(*new QSyntaxHighlighterPrivate, parent) { - if (parent->inherits("QTextEdit")) { + if (parent && parent->inherits("QTextEdit")) { QTextDocument *doc = parent->property("document").value<QTextDocument *>(); if (doc) setDocument(doc); |