aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@qt.io>2019-02-01 14:31:31 +0100
committerLiang Qi <liang.qi@qt.io>2019-02-01 14:50:06 +0100
commit4b0a030cc9b9fa32383a43e2b971f05a536b8e7f (patch)
treeac4738a7ae6ff491c3afa3171b27c9688635e58a /src/quick
parente09519bad7ff266e466ea2d2d66187fbb13457f9 (diff)
parent5d8d0d7068bc8498ea2a6a4c9bc16e0eeb92836c (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts: src/qml/compiler/qv4codegen.cpp Done-With: Erik Verbruggen <erik.verbruggen@qt.io> Change-Id: I3ae3d64317e4f3fccba6605f4c6da15479ca75e0
Diffstat (limited to 'src/quick')
-rw-r--r--src/quick/handlers/qquicktaphandler.cpp2
-rw-r--r--src/quick/items/qquickevents.cpp2
-rw-r--r--src/quick/items/qquicktextinput.cpp6
-rw-r--r--src/quick/items/qquicktextinput_p_p.h5
4 files changed, 13 insertions, 2 deletions
diff --git a/src/quick/handlers/qquicktaphandler.cpp b/src/quick/handlers/qquicktaphandler.cpp
index 475942b7ac..b4b6bd574e 100644
--- a/src/quick/handlers/qquicktaphandler.cpp
+++ b/src/quick/handlers/qquicktaphandler.cpp
@@ -130,7 +130,7 @@ bool QQuickTapHandler::wantsEventPoint(QQuickEventPoint *point)
case QQuickEventPoint::Updated:
switch (m_gesturePolicy) {
case DragThreshold:
- ret = !overThreshold;
+ ret = !overThreshold && parentContains(point);
break;
case WithinBounds:
ret = parentContains(point);
diff --git a/src/quick/items/qquickevents.cpp b/src/quick/items/qquickevents.cpp
index 31c56b7cb7..2eaab164a0 100644
--- a/src/quick/items/qquickevents.cpp
+++ b/src/quick/items/qquickevents.cpp
@@ -851,7 +851,7 @@ void QQuickEventPoint::setGrabberItem(QQuickItem *grabber)
if (oldGrabberHandler && !oldGrabberHandler->approveGrabTransition(this, grabber))
return;
if (Q_UNLIKELY(lcPointerGrab().isDebugEnabled())) {
- qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << hex << m_pointId << pointStateString(this)
+ qCDebug(lcPointerGrab) << pointDeviceName(this) << "point" << hex << m_pointId << pointStateString(this) << "@" << m_scenePos
<< ": grab" << m_exclusiveGrabber << "->" << grabber;
}
QQuickItem *oldGrabberItem = grabberItem();
diff --git a/src/quick/items/qquicktextinput.cpp b/src/quick/items/qquicktextinput.cpp
index a52cd81ef3..5f6fd8f50f 100644
--- a/src/quick/items/qquicktextinput.cpp
+++ b/src/quick/items/qquicktextinput.cpp
@@ -1242,6 +1242,12 @@ void QQuickTextInput::setEchoMode(QQuickTextInput::EchoMode echo)
d->updateDisplayText();
updateCursorRectangle();
+ // If this control is used for password input, we want to minimize
+ // the possibility of string reallocation not to leak (parts of)
+ // the password.
+ if (d->m_echoMode != QQuickTextInput::Normal)
+ d->m_text.reserve(30);
+
emit echoModeChanged(echoMode());
}
diff --git a/src/quick/items/qquicktextinput_p_p.h b/src/quick/items/qquicktextinput_p_p.h
index a2e2f0f66d..7965f3d3f4 100644
--- a/src/quick/items/qquicktextinput_p_p.h
+++ b/src/quick/items/qquicktextinput_p_p.h
@@ -162,6 +162,11 @@ public:
~QQuickTextInputPrivate()
{
+ // If this control is used for password input, we don't want the
+ // password data to stay in the process memory, therefore we need
+ // to zero it out
+ if (m_echoMode != QQuickTextInput::Normal)
+ m_text.fill(0);
}
void init();