diff --git a/src/wayland/autotests/server/test_textinputv3_interface.cpp b/src/wayland/autotests/server/test_textinputv3_interface.cpp index bb6bbf2ec8..463f5140f0 100644 --- a/src/wayland/autotests/server/test_textinputv3_interface.cpp +++ b/src/wayland/autotests/server/test_textinputv3_interface.cpp @@ -557,6 +557,7 @@ void TestTextInputV3Interface::testMultipleTextinputs() QVERIFY(m_serverTextInputV3); QVERIFY(!m_serverTextInputV3->isEnabled()); + QSignalSpy doneSpy1(ti1, &TextInputV3::done); QSignalSpy committedSpy(m_serverTextInputV3, &TextInputV3Interface::stateCommitted); // Enable ti1 ti1->enable(); @@ -564,6 +565,7 @@ void TestTextInputV3Interface::testMultipleTextinputs() QVERIFY(committedSpy.wait()); QCOMPARE(committedSpy.last().at(0).value(), 1); QVERIFY(m_serverTextInputV3->isEnabled()); + QVERIFY(doneSpy1.wait()); // Send another three commits on ti1 ti1->enable(); @@ -572,6 +574,7 @@ void TestTextInputV3Interface::testMultipleTextinputs() QVERIFY(committedSpy.wait()); QCOMPARE(committedSpy.last().at(0).value(), 2); QVERIFY(m_serverTextInputV3->isEnabled()); + QVERIFY(doneSpy1.wait()); ti1->enable(); ti1->set_content_type(QtWayland::zwp_text_input_v3::content_hint_none, QtWayland::zwp_text_input_v3::content_purpose_normal); @@ -579,9 +582,9 @@ void TestTextInputV3Interface::testMultipleTextinputs() QVERIFY(committedSpy.wait()); QCOMPARE(committedSpy.last().at(0).value(), 3); QVERIFY(m_serverTextInputV3->isEnabled()); + QVERIFY(doneSpy1.wait()); // at this point total commit count to ti1 is 3 - QSignalSpy doneSpy1(ti1, &TextInputV3::done); QSignalSpy doneSpy2(ti2, &TextInputV3::done); m_serverTextInputV3->commitString("Hello");