summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qwidgettextcontrol.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@theqtcompany.com>2014-12-10 07:58:06 +0100
committerSimon Hausmann <simon.hausmann@theqtcompany.com>2014-12-10 07:58:06 +0100
commit015002fec9abff6a4c1bb3fa4b9de87279a079c3 (patch)
treead93af535a503d0a49d6c6367e990a8fbca163d3 /src/widgets/widgets/qwidgettextcontrol.cpp
parentf1e00262321cc8daa3c7506153653453e2779886 (diff)
parentb9547af45ea2bbbc634722c1ef41afdb54216ce2 (diff)
Merge remote-tracking branch 'origin/5.4' into dev
Conflicts: doc/global/template/style/online.css mkspecs/android-g++/qmake.conf Change-Id: Ib39ea7bd42f5ae12e82a3bc59a66787a16bdfc61
Diffstat (limited to 'src/widgets/widgets/qwidgettextcontrol.cpp')
-rw-r--r--src/widgets/widgets/qwidgettextcontrol.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp
index 93835156da..eabaa160a0 100644
--- a/src/widgets/widgets/qwidgettextcontrol.cpp
+++ b/src/widgets/widgets/qwidgettextcontrol.cpp
@@ -110,7 +110,7 @@ QWidgetTextControlPrivate::QWidgetTextControlPrivate()
#ifndef Q_OS_ANDROID
interactionFlags(Qt::TextEditorInteraction),
#else
- interactionFlags(Qt::TextEditable),
+ interactionFlags(Qt::TextEditable | Qt::TextSelectableByKeyboard),
#endif
dragEnabled(true),
#ifndef QT_NO_DRAGANDDROP
@@ -1582,10 +1582,8 @@ void QWidgetTextControlPrivate::mousePressEvent(QEvent *e, Qt::MouseButton butto
cursor.clearSelection();
}
}
- // Do not start selection on a mouse event synthesized from a touch event.
if (!(button & Qt::LeftButton) ||
- !((interactionFlags & Qt::TextSelectableByMouse) || (interactionFlags & Qt::TextEditable))
- || QApplicationPrivate::mouseEventSource(e) != Qt::MouseEventNotSynthesized) {
+ !((interactionFlags & Qt::TextSelectableByMouse) || (interactionFlags & Qt::TextEditable))) {
e->ignore();
return;
}
@@ -1756,11 +1754,6 @@ void QWidgetTextControlPrivate::mouseReleaseEvent(QEvent *e, Qt::MouseButton but
{
Q_Q(QWidgetTextControl);
- if (QApplicationPrivate::mouseEventSource(e) != Qt::MouseEventNotSynthesized) {
- setCursorPosition(pos); // Emulate Tap to set cursor for events synthesized from touch.
- return;
- }
-
const QTextCursor oldSelection = cursor;
if (sendMouseEventToInputContext(
e, QEvent::MouseButtonRelease, button, pos, modifiers, buttons, globalPos)) {