summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2018-12-07 20:25:11 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2018-12-07 20:55:07 +0000
commit153726bc167406414f589f72bea76c3229cfa815 (patch)
tree5c3b86e9f70a00f3a7be4b5fedbe38d974949d41 /src
parente27f52a09893cf494fc9b93452ed160f2effb94b (diff)
parentaec026fe1ef8ff62a6138cc49040dd82d815d3ce (diff)
Merge "Merge remote-tracking branch 'origin/5.12.0' into 5.12" into refs/staging/5.12
Diffstat (limited to 'src')
-rw-r--r--src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java7
-rw-r--r--src/plugins/platforms/windows/qwindowspointerhandler.cpp5
2 files changed, 11 insertions, 1 deletions
diff --git a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
index 8f218d34f0..74b515ef5b 100644
--- a/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
+++ b/src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java
@@ -674,6 +674,13 @@ public class QtActivityDelegate
Bundle extras = m_activity.getIntent().getExtras();
if (extras != null) {
try {
+ // do NOT remove !!!!
+ final String dc = "--Added-by-androiddeployqt--/debugger.command";
+ new BufferedReader(new InputStreamReader(m_activity.getAssets().open(dc))).readLine();
+ // do NOT remove !!!!
+ // The previous lines are needed to check if the debug mode is enabled.
+ // We are not allowed to use extraenvvars or extraappparams in a non debuggable environment.
+
if (extras.containsKey("extraenvvars")) {
try {
m_environmentVariables += "\t" + new String(Base64.decode(extras.getString("extraenvvars"), Base64.DEFAULT), "UTF-8");
diff --git a/src/plugins/platforms/windows/qwindowspointerhandler.cpp b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
index 14559d726a..7935d0c36f 100644
--- a/src/plugins/platforms/windows/qwindowspointerhandler.cpp
+++ b/src/plugins/platforms/windows/qwindowspointerhandler.cpp
@@ -582,6 +582,7 @@ bool QWindowsPointerHandler::translateTouchEvent(QWindow *window, HWND hwnd,
QList<QWindowSystemInterface::TouchPoint> touchPoints;
bool primaryPointer = false;
+ bool pressRelease = false;
if (QWindowsContext::verbose > 1)
qCDebug(lcQpaEvents).noquote().nospace() << showbase
@@ -618,9 +619,11 @@ bool QWindowsPointerHandler::translateTouchEvent(QWindow *window, HWND hwnd,
if (touchInfo[i].pointerInfo.pointerFlags & POINTER_FLAG_DOWN) {
touchPoint.state = Qt::TouchPointPressed;
m_lastTouchPositions.insert(touchPoint.id, touchPoint.normalPosition);
+ pressRelease = true;
} else if (touchInfo[i].pointerInfo.pointerFlags & POINTER_FLAG_UP) {
touchPoint.state = Qt::TouchPointReleased;
m_lastTouchPositions.remove(touchPoint.id);
+ pressRelease = true;
} else {
touchPoint.state = stationaryTouchPoint ? Qt::TouchPointStationary : Qt::TouchPointMoved;
m_lastTouchPositions.insert(touchPoint.id, touchPoint.normalPosition);
@@ -633,7 +636,7 @@ bool QWindowsPointerHandler::translateTouchEvent(QWindow *window, HWND hwnd,
// Avoid getting repeated messages for this frame if there are multiple pointerIds
QWindowsContext::user32dll.skipPointerFrameMessages(touchInfo[i].pointerInfo.pointerId);
}
- if (primaryPointer) {
+ if (primaryPointer && !pressRelease) {
// Postpone event delivery to avoid hanging inside DoDragDrop().
// Only the primary pointer will generate mouse messages.
enqueueTouchEvent(window, touchPoints, QWindowsKeyMapper::queryKeyboardModifiers());