summaryrefslogtreecommitdiffstats
path: root/meta/recipes-qt/qt4/qt-4.7.4/fix-qtbug-20925.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-qt/qt4/qt-4.7.4/fix-qtbug-20925.patch')
-rw-r--r--meta/recipes-qt/qt4/qt-4.7.4/fix-qtbug-20925.patch56
1 files changed, 0 insertions, 56 deletions
diff --git a/meta/recipes-qt/qt4/qt-4.7.4/fix-qtbug-20925.patch b/meta/recipes-qt/qt4/qt-4.7.4/fix-qtbug-20925.patch
deleted file mode 100644
index f99b76455d..0000000000
--- a/meta/recipes-qt/qt4/qt-4.7.4/fix-qtbug-20925.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1From 852abfca6f4c349dce9b895956922f96d82df579 Mon Sep 17 00:00:00 2001
2From: Andrew den Exter <andrew.den-exter@nokia.com>
3Date: Thu, 8 Sep 2011 12:28:49 +1000
4Subject: [PATCH] Fix double click and drag not extending word selection.
5
6mousePressed isn't set on the second press of a double click and so
7can't be used to determine if all selections should be skipped. Instead
8skip only the single click and drag selections if mousePressed is false.
9
10Change-Id: I5e7ba033f38b0f9b98fdca5c61a8548f92991601
11Task-number: QTBUG-20925
12Reviewed-by: Martin Jones
13
14https://bugreports.qt.nokia.com/browse/QTBUG-20925
15
16Original Author:Andrew den Exter <andrew.den-exter@nokia.com>
17Upstream-Status: Integrated in upcoming versions (4.8) as commit 852abfca6f4c349dce9b895956922f96d82df579
18---
19 src/gui/text/qtextcontrol.cpp | 7 +----
20 tests/auto/qtextedit/tst_qtextedit.cpp | 41 ++++++++++++++++++++++++++++++++
21 2 files changed, 43 insertions(+), 5 deletions(-)
22
23diff --git a/src/gui/text/qtextcontrol.cpp b/src/gui/text/qtextcontrol.cpp
24index aacac04..996d488 100644
25--- a/src/gui/text/qtextcontrol.cpp
26+++ b/src/gui/text/qtextcontrol.cpp
27@@ -1628,16 +1628,13 @@ void QTextControlPrivate::mouseMoveEvent(QEvent *e, Qt::MouseButton button, cons
28 return;
29 }
30
31- if (!mousePressed)
32- return;
33-
34 const qreal mouseX = qreal(mousePos.x());
35
36 int newCursorPos = q->hitTest(mousePos, Qt::FuzzyHit);
37 if (newCursorPos == -1)
38 return;
39
40- if (wordSelectionEnabled && !selectedWordOnDoubleClick.hasSelection()) {
41+ if (mousePressed && wordSelectionEnabled && !selectedWordOnDoubleClick.hasSelection()) {
42 selectedWordOnDoubleClick = cursor;
43 selectedWordOnDoubleClick.select(QTextCursor::WordUnderCursor);
44 }
45@@ -1646,7 +1643,7 @@ void QTextControlPrivate::mouseMoveEvent(QEvent *e, Qt::MouseButton button, cons
46 extendBlockwiseSelection(newCursorPos);
47 else if (selectedWordOnDoubleClick.hasSelection())
48 extendWordwiseSelection(newCursorPos, mouseX);
49- else
50+ else if (mousePressed)
51 setCursorPosition(newCursorPos, QTextCursor::KeepAnchor);
52
53 if (interactionFlags & Qt::TextEditable) {
54--
551.6.1
56