summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-10-08 23:00:27 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-10-08 23:00:27 (GMT)
commit6a786ab4bb4a5e1d80ce511461f2018237f1614a (patch)
tree708ec88d4b3d44c56da5e3a6a5c4587fa0d7aae8 /src
parent4b14e87b72e7cd52841c5fc3183accf35c0395d1 (diff)
parent0fcee2f495eb2e1c4b76aa8c3e5462595aed0ab3 (diff)
downloadQt-6a786ab4bb4a5e1d80ce511461f2018237f1614a.zip
Qt-6a786ab4bb4a5e1d80ce511461f2018237f1614a.tar.gz
Qt-6a786ab4bb4a5e1d80ce511461f2018237f1614a.tar.bz2
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/qt-s60-public: Account for native child widgets when handling focus events Added support for using inputMethodHints in QInputDialog edit widget. Fixed some preprocessor parameters for Mac support. Fixed missing QMAKE_MOC definition in certain mkspecs.
Diffstat (limited to 'src')
-rw-r--r--src/gui/dialogs/qinputdialog.cpp6
-rw-r--r--src/gui/kernel/qapplication_s60.cpp7
-rw-r--r--src/gui/kernel/qwidget.cpp11
-rw-r--r--src/gui/kernel/qwidget_p.h3
4 files changed, 22 insertions, 5 deletions
diff --git a/src/gui/dialogs/qinputdialog.cpp b/src/gui/dialogs/qinputdialog.cpp
index e996ee9..700b234 100644
--- a/src/gui/dialogs/qinputdialog.cpp
+++ b/src/gui/dialogs/qinputdialog.cpp
@@ -244,6 +244,9 @@ void QInputDialogPrivate::ensureLineEdit()
Q_Q(QInputDialog);
if (!lineEdit) {
lineEdit = new QLineEdit(q);
+#ifndef QT_NO_IM
+ qt_widget_private(lineEdit)->inheritsInputMethodHints = 1;
+#endif
lineEdit->hide();
QObject::connect(lineEdit, SIGNAL(textChanged(QString)),
q, SLOT(_q_textChanged(QString)));
@@ -255,6 +258,9 @@ void QInputDialogPrivate::ensureComboBox()
Q_Q(QInputDialog);
if (!comboBox) {
comboBox = new QComboBox(q);
+#ifndef QT_NO_IM
+ qt_widget_private(comboBox)->inheritsInputMethodHints = 1;
+#endif
comboBox->hide();
QObject::connect(comboBox, SIGNAL(editTextChanged(QString)),
q, SLOT(_q_textChanged(QString)));
diff --git a/src/gui/kernel/qapplication_s60.cpp b/src/gui/kernel/qapplication_s60.cpp
index 296f24f..5ff2fd4 100644
--- a/src/gui/kernel/qapplication_s60.cpp
+++ b/src/gui/kernel/qapplication_s60.cpp
@@ -1237,10 +1237,11 @@ void QSymbianControl::FocusChanged(TDrawNow /* aDrawNow */)
qwidget->d_func()->setWindowTitle_sys(qwidget->windowTitle());
#ifdef Q_WS_S60
// If widget is fullscreen/minimized, hide status pane and button container otherwise show them.
- const bool visible = !(qwidget->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
+ QWidget *const window = qwidget->window();
+ const bool visible = !(window->windowState() & (Qt::WindowFullScreen | Qt::WindowMinimized));
const bool statusPaneVisibility = visible;
- const bool isFullscreen = qwidget->windowState() & Qt::WindowFullScreen;
- const bool cbaVisibilityHint = qwidget->windowFlags() & Qt::WindowSoftkeysVisibleHint;
+ const bool isFullscreen = window->windowState() & Qt::WindowFullScreen;
+ const bool cbaVisibilityHint = window->windowFlags() & Qt::WindowSoftkeysVisibleHint;
const bool buttonGroupVisibility = (visible || (isFullscreen && cbaVisibilityHint));
S60->setStatusPaneAndButtonGroupVisibility(statusPaneVisibility, buttonGroupVisibility);
#endif
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp
index dc0dbf4..330d699 100644
--- a/src/gui/kernel/qwidget.cpp
+++ b/src/gui/kernel/qwidget.cpp
@@ -273,6 +273,9 @@ QWidgetPrivate::QWidgetPrivate(int version)
, isMoved(0)
, isGLWidget(0)
, usesDoubleBufferedGLContext(0)
+#ifndef QT_NO_IM
+ , inheritsInputMethodHints(0)
+#endif
#if defined(Q_WS_X11)
, picture(0)
#elif defined(Q_WS_WIN)
@@ -9228,9 +9231,13 @@ QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const
*/
Qt::InputMethodHints QWidget::inputMethodHints() const
{
- Q_D(const QWidget);
#ifndef QT_NO_IM
- return d->imHints;
+ const QWidgetPrivate *priv = d_func();
+ while (priv->inheritsInputMethodHints) {
+ priv = priv->q_func()->parentWidget()->d_func();
+ Q_ASSERT(priv);
+ }
+ return priv->imHints;
#else //QT_NO_IM
return 0;
#endif //QT_NO_IM
diff --git a/src/gui/kernel/qwidget_p.h b/src/gui/kernel/qwidget_p.h
index 4a79dc7..6c89659 100644
--- a/src/gui/kernel/qwidget_p.h
+++ b/src/gui/kernel/qwidget_p.h
@@ -748,6 +748,9 @@ public:
uint isMoved : 1;
uint isGLWidget : 1;
uint usesDoubleBufferedGLContext : 1;
+#ifndef QT_NO_IM
+ uint inheritsInputMethodHints : 1;
+#endif
// *************************** Platform specific ************************************
#if defined(Q_WS_X11) // <----------------------------------------------------------- X11