summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRobert Griebl <rgriebl@trolltech.com>2009-12-02 15:52:51 (GMT)
committerRobert Griebl <rgriebl@trolltech.com>2009-12-03 10:31:38 (GMT)
commit68f4b46426e715540864046128617250a521d38a (patch)
tree4e81a4617f7ba3a97fc5a8d8efbd4bbc9dae467f /src
parent635a9da9c42834c0c9c3b2329db4aae408ce820a (diff)
downloadQt-68f4b46426e715540864046128617250a521d38a.zip
Qt-68f4b46426e715540864046128617250a521d38a.tar.gz
Qt-68f4b46426e715540864046128617250a521d38a.tar.bz2
Fix for virtual keyboard poping up when it should not.
Pressing and releasing the finger/stylus on an editable text widget should only trigger the input method if the release position is still within the widget's boundaries. Reviewed-by: axis
Diffstat (limited to 'src')
-rw-r--r--src/gui/graphicsview/qgraphicsitem.cpp2
-rw-r--r--src/gui/widgets/qlineedit.cpp2
-rw-r--r--src/gui/widgets/qplaintextedit.cpp2
-rw-r--r--src/gui/widgets/qtextedit.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/src/gui/graphicsview/qgraphicsitem.cpp b/src/gui/graphicsview/qgraphicsitem.cpp
index bb45e7e..bc47872 100644
--- a/src/gui/graphicsview/qgraphicsitem.cpp
+++ b/src/gui/graphicsview/qgraphicsitem.cpp
@@ -9713,7 +9713,7 @@ void QGraphicsTextItem::mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
}
QWidget *widget = event->widget();
- if (widget) {
+ if (widget && (dd->control->textInteractionFlags() & Qt::TextEditable) && boundingRect().contains(event->pos())) {
qt_widget_private(widget)->handleSoftwareInputPanel(event->button(), dd->clickCausedFocus);
}
dd->clickCausedFocus = 0;
diff --git a/src/gui/widgets/qlineedit.cpp b/src/gui/widgets/qlineedit.cpp
index 650b0ab..2c1acdb 100644
--- a/src/gui/widgets/qlineedit.cpp
+++ b/src/gui/widgets/qlineedit.cpp
@@ -1549,7 +1549,7 @@ void QLineEdit::mouseReleaseEvent(QMouseEvent* e)
}
#endif
- if (!isReadOnly())
+ if (!isReadOnly() && rect().contains(e->pos()))
d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus);
d->clickCausedFocus = 0;
}
diff --git a/src/gui/widgets/qplaintextedit.cpp b/src/gui/widgets/qplaintextedit.cpp
index eae8b7d..89fe7b8 100644
--- a/src/gui/widgets/qplaintextedit.cpp
+++ b/src/gui/widgets/qplaintextedit.cpp
@@ -1969,7 +1969,7 @@ void QPlainTextEdit::mouseReleaseEvent(QMouseEvent *e)
d->ensureCursorVisible();
}
- if (!isReadOnly())
+ if (!isReadOnly() && rect().contains(e->pos()))
d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus);
d->clickCausedFocus = 0;
}
diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp
index 1c49ef0..1bc0bf1 100644
--- a/src/gui/widgets/qtextedit.cpp
+++ b/src/gui/widgets/qtextedit.cpp
@@ -1578,7 +1578,7 @@ void QTextEdit::mouseReleaseEvent(QMouseEvent *e)
d->autoScrollTimer.stop();
ensureCursorVisible();
}
- if (!isReadOnly())
+ if (!isReadOnly() && rect().contains(e->pos()))
d->handleSoftwareInputPanel(e->button(), d->clickCausedFocus);
d->clickCausedFocus = 0;
}