summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@nokia.com>2011-02-25 10:51:57 (GMT)
committerGunnar Sletta <gunnar.sletta@nokia.com>2011-02-25 10:51:57 (GMT)
commit0a022996bd138553360562444d8b85a6141ab0ae (patch)
tree664c1239a58c4136940e662ddd5a173a40d0b26d /src/gui/kernel
parent53ab13a1a403ebe7e7c4c59ce9f605bacf3e2b18 (diff)
parent52211876f610cf81c47f32bda6a271d9e9875bff (diff)
downloadQt-0a022996bd138553360562444d8b85a6141ab0ae.zip
Qt-0a022996bd138553360562444d8b85a6141ab0ae.tar.gz
Qt-0a022996bd138553360562444d8b85a6141ab0ae.tar.bz2
Merge branch 'master' of scm.dev.nokia.troll.no:qt/qt-fire-team
Diffstat (limited to 'src/gui/kernel')
-rw-r--r--src/gui/kernel/qwidget.cpp21
-rw-r--r--src/gui/kernel/qwidget_p.h1
-rw-r--r--src/gui/kernel/qwidget_s60.cpp14
3 files changed, 31 insertions, 5 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 475d4da..bf9f6f9 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -403,11 +403,24 @@ void QWidgetPrivate::scrollChildren(int dx, int dy)
}
}
+QInputContext *QWidgetPrivate::assignedInputContext() const
+{
+#ifndef QT_NO_IM
+ const QWidget *widget = q_func();
+ while (widget) {
+ if (QInputContext *qic = widget->d_func()->ic)
+ return qic;
+ widget = widget->parentWidget();
+ }
+#endif
+ return 0;
+}
+
QInputContext *QWidgetPrivate::inputContext() const
{
#ifndef QT_NO_IM
- if (ic)
- return ic;
+ if (QInputContext *qic = assignedInputContext())
+ return qic;
return qApp->inputContext();
#else
return 0;
@@ -10782,7 +10795,7 @@ void QWidget::setAttribute(Qt::WidgetAttribute attribute, bool on)
case Qt::WA_InputMethodEnabled: {
#ifndef QT_NO_IM
QWidget *focusWidget = d->effectiveFocusWidget();
- QInputContext *ic = focusWidget->d_func()->ic;
+ QInputContext *ic = focusWidget->d_func()->assignedInputContext();
if (!ic && (!on || hasFocus()))
ic = focusWidget->d_func()->inputContext();
if (ic) {
@@ -11269,7 +11282,7 @@ void QWidget::updateMicroFocus()
#if !defined(QT_NO_IM) && (defined(Q_WS_X11) || defined(Q_WS_QWS) || defined(Q_OS_SYMBIAN))
Q_D(QWidget);
// and optimization to update input context only it has already been created.
- if (d->ic || qApp->d_func()->inputContext) {
+ if (d->assignedInputContext() || qApp->d_func()->inputContext) {
QInputContext *ic = inputContext();
if (ic)
ic->update();
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 0ac66cb..1083a1f 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -568,6 +568,7 @@ public:
// sub-classes that their internals are about to be released.
virtual void aboutToDestroy() {}
+ QInputContext *assignedInputContext() const;
QInputContext *inputContext() const;
inline QWidget *effectiveFocusWidget() {
QWidget *w = q_func();
diff --git a/src/gui/kernel/qwidget_s60.cpp b/src/gui/kernel/qwidget_s60.cpp
index d8779c8..85164d2 100644
--- a/src/gui/kernel/qwidget_s60.cpp
+++ b/src/gui/kernel/qwidget_s60.cpp
@@ -54,7 +54,6 @@
#ifdef Q_WS_S60
#include <aknappui.h>
-#include <akntoolbar.h>
#include <eikbtgpc.h>
#endif
@@ -64,6 +63,19 @@
// CCoeControl objects until after the CONE event handler has finished running.
Q_DECLARE_METATYPE(WId)
+// Workaround for the fact that S60 SDKs 3.x do not contain the akntoolbar.h
+// header, even though the documentation says that it should be there, and indeed
+// it is present in the library.
+class CAknToolbar : public CAknControl,
+ public MCoeControlObserver,
+ public MCoeControlBackground,
+ public MEikCommandObserver,
+ public MAknFadedComponent
+{
+public:
+ IMPORT_C void SetToolbarVisibility(const TBool visible);
+};
+
QT_BEGIN_NAMESPACE
extern bool qt_nograb();