diff options
Diffstat (limited to 'src/gui/kernel/qwidget.cpp')
-rw-r--r-- | src/gui/kernel/qwidget.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget.cpp b/src/gui/kernel/qwidget.cpp index 580c3c8..88dcac5 100644 --- a/src/gui/kernel/qwidget.cpp +++ b/src/gui/kernel/qwidget.cpp @@ -306,6 +306,8 @@ QInputContext *QWidget::inputContext() This function sets the input context \a context on this widget. + Qt takes ownership of the given input \a context. + \sa inputContext() */ void QWidget::setInputContext(QInputContext *context) @@ -314,6 +316,8 @@ void QWidget::setInputContext(QInputContext *context) if (!testAttribute(Qt::WA_InputMethodEnabled)) return; #ifndef QT_NO_IM + if (context == d->ic) + return; if (d->ic) delete d->ic; d->ic = context; |