summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget.cpp
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2011-03-15 14:09:06 (GMT)
committerFabien Freling <fabien.freling@nokia.com>2011-03-15 14:09:06 (GMT)
commitb36f947147e3f5acf444c94d6e2a608506b7e753 (patch)
treea0bf253b8e315305cfada01871f3a1cbf54aef43 /src/gui/kernel/qwidget.cpp
parentd524e983c60ba59f3c65d811ec92f02c97d1a8ab (diff)
parentc0cd8db0498daaa8151d1f80143b6849016bdc7c (diff)
downloadQt-b36f947147e3f5acf444c94d6e2a608506b7e753.zip
Qt-b36f947147e3f5acf444c94d6e2a608506b7e753.tar.gz
Qt-b36f947147e3f5acf444c94d6e2a608506b7e753.tar.bz2
Merge remote branch 'mainline/master' into merge_raster
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r--src/gui/kernel/qwidget.cpp27
1 files changed, 23 insertions, 4 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index 198d4e5..4e18940 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -310,6 +310,8 @@ QWidgetPrivate::QWidgetPrivate(int version)
, needWindowChange(0)
, window_event(0)
, qd_hd(0)
+#elif defined(Q_OS_SYMBIAN)
+ , symbianScreenNumber(0)
#endif
{
if (!qApp) {
@@ -404,11 +406,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;
@@ -1282,6 +1297,10 @@ void QWidgetPrivate::init(QWidget *parentWidget, Qt::WindowFlags f)
// programmer specified desktop widget
xinfo = desktopWidget->d_func()->xinfo;
}
+#elif defined(Q_OS_SYMBIAN)
+ if (desktopWidget) {
+ symbianScreenNumber = qt_widget_private(desktopWidget)->symbianScreenNumber;
+ }
#elif defined(Q_WS_QPA)
if (desktopWidget) {
int screen = desktopWidget->d_func()->topData()->screenIndex;
@@ -10822,7 +10841,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) {
@@ -11309,7 +11328,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();