diff options
author | Pekka Vuorela <pekka.ta.vuorela@nokia.com> | 2012-02-23 15:49:11 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-24 02:38:04 +0100 |
commit | 194899df2443c72ff38aaed9b1b26fc3a192a6f0 (patch) | |
tree | 6d2f7d5d2c5c0ee3335113fff3b0cdd2f62ea57b /tests/auto | |
parent | bd5096d012327d4acb44449464cb00c488450cc5 (diff) |
Reverted part of "Refactor input context tests"
This commit reverts partly 7401832a7d45de99562b94340375393a39267f41
There is something wrong with DummyWindow/XCB/Metacity, Metacity
crashes quite often when QWindow is activated.
Change-Id: I611af2678814f41c941cb697054135f561a77878
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp | 19 |
1 files changed, 5 insertions, 14 deletions
diff --git a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp index c906ebaabe..bc364e37f1 100644 --- a/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp +++ b/tests/auto/gui/kernel/qinputmethod/tst_qinputmethod.cpp @@ -212,18 +212,12 @@ void tst_qinputmethod::cursorRectangle() { QCOMPARE(qApp->inputMethod()->cursorRectangle(), QRectF()); - DummyWindow window; - window.show(); - QTest::qWaitForWindowShown(&window); - window.requestActivateWindow(); - QTRY_COMPARE(qApp->focusWindow(), &window); - window.setFocusObject(&m_inputItem); - QTransform transform; transform.translate(10, 10); transform.scale(2, 2); transform.shear(2, 2); qApp->inputMethod()->setInputItemTransform(transform); + qApp->inputMethod()->setInputItem(&m_inputItem); QCOMPARE(qApp->inputMethod()->cursorRectangle(), transform.mapRect(QRectF(1, 2, 3, 4))); @@ -232,6 +226,7 @@ void tst_qinputmethod::cursorRectangle() // reset m_inputItem.cursorRectangle = QRectF(1, 2, 3, 4); + qApp->inputMethod()->setInputItem(0); qApp->inputMethod()->setInputItemTransform(QTransform()); } @@ -269,13 +264,6 @@ void tst_qinputmethod::commit() void tst_qinputmethod::update() { - DummyWindow window; - window.show(); - QTest::qWaitForWindowShown(&window); - window.requestActivateWindow(); - QTRY_COMPARE(qApp->focusWindow(), &window); - window.setFocusObject(&m_inputItem); - QCOMPARE(m_platformInputContext.m_updateCallCount, 0); QCOMPARE(int(m_platformInputContext.m_lastQueries), int(Qt::ImhNone)); @@ -288,6 +276,9 @@ void tst_qinputmethod::update() QCOMPARE(int(m_platformInputContext.m_lastQueries), int(Qt::ImQueryAll)); QCOMPARE(qApp->inputMethod()->keyboardRectangle(), QRectF(10, 20, 30, 40)); + + // reset + qApp->inputMethod()->setInputItem(0); } void tst_qinputmethod::query() |