From 3bc3257c8ba8b0381cb7765fbd847925e83aec79 Mon Sep 17 00:00:00 2001 From: Lauro Neto Date: Tue, 19 Apr 2011 17:09:00 -0300 Subject: 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 Reviewer: Marcelo Lira --- tests/QtGui/qinputcontext_test.py | 4 ++++ 1 file changed, 4 insertions(+) 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) -- cgit v1.2.3