summaryrefslogtreecommitdiffstats
path: root/src/declarative
diff options
context:
space:
mode:
authorJoona Petrell <joona.t.petrell@nokia.com>2010-05-28 04:06:41 (GMT)
committerJoona Petrell <joona.t.petrell@nokia.com>2010-05-28 04:21:16 (GMT)
commit0da153d47da2dcc59b33bc47ea949ceaf3189579 (patch)
tree45a4b4747085b6fd13fca31d78c2790bd3ef6ce5 /src/declarative
parent79a587d813c2df9c45fea7423e5e6c40e2d2b67b (diff)
downloadQt-0da153d47da2dcc59b33bc47ea949ceaf3189579.zip
Qt-0da153d47da2dcc59b33bc47ea949ceaf3189579.tar.gz
Qt-0da153d47da2dcc59b33bc47ea949ceaf3189579.tar.bz2
Active window focus gain should not open virtual keypad
Task-number: Reviewed-by: Martin Jones
Diffstat (limited to 'src/declarative')
-rw-r--r--src/declarative/QmlChanges.txt3
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextedit.cpp2
-rw-r--r--src/declarative/graphicsitems/qdeclarativetextinput.cpp2
3 files changed, 5 insertions, 2 deletions
diff --git a/src/declarative/QmlChanges.txt b/src/declarative/QmlChanges.txt
index 3eed8d6..142920c 100644
--- a/src/declarative/QmlChanges.txt
+++ b/src/declarative/QmlChanges.txt
@@ -1,6 +1,9 @@
=============================================================================
The changes below are pre Qt 4.7.0 RC
+TextInput and TextEdit:
+ - showInputPanelOnFocus property added
+ - openSoftwareInputPanel() and closeSoftwareInputPanel() functions added
Flickable:
- overShoot is replaced by boundsBehavior enumeration
- flickingHorizontally and flickingVertically properties added
diff --git a/src/declarative/graphicsitems/qdeclarativetextedit.cpp b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
index 167db77..9ccb8d2 100644
--- a/src/declarative/graphicsitems/qdeclarativetextedit.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextedit.cpp
@@ -1335,7 +1335,7 @@ void QDeclarativeTextEdit::setShowInputPanelOnFocus(bool showOnFocus)
void QDeclarativeTextEdit::focusInEvent(QFocusEvent *event)
{
Q_D(const QDeclarativeTextEdit);
- if (d->showInputPanelOnFocus && !isReadOnly()) {
+ if (d->showInputPanelOnFocus && !isReadOnly() && event->reason() != Qt::ActiveWindowFocusReason) {
openSoftwareInputPanel();
}
QDeclarativePaintedItem::focusInEvent(event);
diff --git a/src/declarative/graphicsitems/qdeclarativetextinput.cpp b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
index 18e3595..9c70ea9 100644
--- a/src/declarative/graphicsitems/qdeclarativetextinput.cpp
+++ b/src/declarative/graphicsitems/qdeclarativetextinput.cpp
@@ -1282,7 +1282,7 @@ void QDeclarativeTextInput::setShowInputPanelOnFocus(bool showOnFocus)
void QDeclarativeTextInput::focusInEvent(QFocusEvent *event)
{
Q_D(const QDeclarativeTextInput);
- if (d->showInputPanelOnFocus && !isReadOnly()) {
+ if (d->showInputPanelOnFocus && !isReadOnly() && event->reason() != Qt::ActiveWindowFocusReason) {
openSoftwareInputPanel();
}
QDeclarativePaintedItem::focusInEvent(event);