From 30b66e1b92b54b8f035da3c66ad086340befcf5b Mon Sep 17 00:00:00 2001 From: Liang QI Date: Thu, 22 Oct 2009 17:37:25 +0200 Subject: QTextEdit: Fix the wrong order for call of Qt::WA_InputMethodEnabled in setReadOnly. Should set Qt::WA_InputMethodEnabled after set the flags, just because shouldEnableInputMethod() will read the flags. Task-number: QTBUG-4917 Reviewed-by: Shane Kearns --- src/gui/widgets/qtextedit.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/gui/widgets/qtextedit.cpp b/src/gui/widgets/qtextedit.cpp index b894aa8..f477fee 100644 --- a/src/gui/widgets/qtextedit.cpp +++ b/src/gui/widgets/qtextedit.cpp @@ -2079,8 +2079,8 @@ void QTextEdit::setReadOnly(bool ro) } else { flags = Qt::TextEditorInteraction; } - setAttribute(Qt::WA_InputMethodEnabled, shouldEnableInputMethod(this)); d->control->setTextInteractionFlags(flags); + setAttribute(Qt::WA_InputMethodEnabled, shouldEnableInputMethod(this)); } /*! -- cgit v0.12