summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-06-02 14:33:56 (GMT)
committerAleksandar Sasha Babic <aleksandar.babic@nokia.com>2009-06-02 14:36:32 (GMT)
commit629c7c2785bc7b371ed8ce1abf016c6c35a4a78f (patch)
tree56dae6b508b0af75d0c3ce4347c1a0bfea7cab62
parent8fd9ad6c82ae4a7017a83fec529b80a0fb21480f (diff)
downloadQt-629c7c2785bc7b371ed8ce1abf016c6c35a4a78f.zip
Qt-629c7c2785bc7b371ed8ce1abf016c6c35a4a78f.tar.gz
Qt-629c7c2785bc7b371ed8ce1abf016c6c35a4a78f.tar.bz2
Fixed incorrect focus detection.
Previously we assumed that focused widget will give us both the parent and the child. Rev By:Axis
-rw-r--r--src/gui/kernel/qapplication_s60.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 308bdbb..3d865d3 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -524,7 +524,14 @@ TKeyResponse QSymbianControl::sendKeyEvent(QWidget *widget, QKeyEvent *keyEvent)
#ifndef QT_NO_IM
TCoeInputCapabilities QSymbianControl::InputCapabilities() const
{
- QWidget *w = qwidget->focusWidget();
+ QWidget *w = 0;
+
+ if(qwidget->hasFocus()) {
+ w = qwidget;
+ } else {
+ w = qwidget->focusWidget();
+ }
+
QCoeFepInputContext *ic;
if (w && w->isEnabled() && w->testAttribute(Qt::WA_InputMethodEnabled)
&& (ic = qobject_cast<QCoeFepInputContext *>(w->inputContext()))) {