diff options
author | Lauro Neto <lauro.neto@openbossa.org> | 2011-04-19 17:09:00 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:54:13 -0300 |
commit | 3bc3257c8ba8b0381cb7765fbd847925e83aec79 (patch) | |
tree | 37415f14b8290a3faba077fc5c68b133b6d14775 | |
parent | ef05a106c3733a7546dc918eaa9884e1e229f80a (diff) |
Set WA_InputMethodEnabled in test.
If WA_InputMethodMethod is not set, setFocusWidget will fail
in a ASSERT in a debug-compiled Qt.
Reviewer: Hugo Lima <hugo.lima@openbossa.org>
Reviewer: Marcelo Lira <marcelo.lira@openbossa.org>
-rw-r--r-- | tests/QtGui/qinputcontext_test.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/QtGui/qinputcontext_test.py b/tests/QtGui/qinputcontext_test.py index da7ff5050..c29d4465d 100644 --- a/tests/QtGui/qinputcontext_test.py +++ b/tests/QtGui/qinputcontext_test.py @@ -1,6 +1,7 @@ import unittest +from PySide.QtCore import Qt from PySide.QtGui import QPushButton from helper import UsesQApplication @@ -10,6 +11,9 @@ class QInputContextTest(UsesQApplication): widget = QPushButton() widget.show() + if not widget.testAttribute(Qt.WA_InputMethodEnabled): + widget.setAttribute(Qt.WA_InputMethodEnabled) + context = self.app.inputContext() self.assertEqual(context.focusWidget(), None) |