summaryrefslogtreecommitdiffstats
path: root/src/widgets/kernel/qwidget.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/widgets/kernel/qwidget.cpp')
-rw-r--r--src/widgets/kernel/qwidget.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/widgets/kernel/qwidget.cpp b/src/widgets/kernel/qwidget.cpp
index b4be9bbfe7..21ec2b2a27 100644
--- a/src/widgets/kernel/qwidget.cpp
+++ b/src/widgets/kernel/qwidget.cpp
@@ -1246,6 +1246,7 @@ void QWidgetPrivate::create()
// in case the extra was already valid.
if (!win) {
createTLSysExtra();
+ Q_ASSERT(topData()->window);
win = topData()->window;
}
@@ -9674,16 +9675,16 @@ QVariant QWidget::inputMethodQuery(Qt::InputMethodQuery query) const
*/
Qt::InputMethodHints QWidget::inputMethodHints() const
{
-#ifndef QT_NO_IM
+#if QT_CONFIG(im)
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
+#else
+ return Qt::ImhNone;
+#endif
}
void QWidget::setInputMethodHints(Qt::InputMethodHints hints)