Commit 8284740c authored by Arjen Hiemstra's avatar Arjen Hiemstra
Browse files

InputMethodTest: Only create the windowAddedSpy when actually needed

We don't really care about the window showing up until we're calling
showInputPanel, but since Workspace::windowAdded is triggered for any
window that gets added, the test sometimes fails because count() is 2
instead of 1. To avoid that, only create the spy when it's actually
relevant instead of all the way at the start before any other setup is
parent c050716a
Pipeline #204584 passed with stage
in 13 minutes and 41 seconds
......@@ -201,7 +201,6 @@ void InputMethodTest::testEnableActive()
QSignalSpy windowAddedSpy(workspace(), &Workspace::windowAdded);
QSignalSpy windowRemovedSpy(workspace(), &Workspace::windowRemoved);
QSignalSpy activateSpy(InputMethod::self(), &InputMethod::activeChanged);
......@@ -223,9 +222,9 @@ void InputMethodTest::testEnableActive()
QCOMPARE(windowAddedSpy.count(), 1);
// Show the keyboard
QSignalSpy windowAddedSpy(workspace(), &Workspace::windowAdded);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment