From fdbf89dac86f70d2a9078a37d5e017d6679e41d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 23 Jan 2013 11:45:03 +0100 Subject: [PATCH] Ensure we destroy our test windows --- tests/test_client_machine.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_client_machine.cpp b/tests/test_client_machine.cpp index bccb691c3b..67cad0a797 100644 --- a/tests/test_client_machine.cpp +++ b/tests/test_client_machine.cpp @@ -156,14 +156,14 @@ void TestClientMachine::hostName_data() void TestClientMachine::hostName() { - xcb_window_t window = createWindow(); + m_testWindow = createWindow(); QFETCH(QByteArray, hostName); QFETCH(bool, local); - setClientMachineProperty(window, hostName); + setClientMachineProperty(m_testWindow, hostName); ClientMachine clientMachine; QSignalSpy spy(&clientMachine, SIGNAL(localhostChanged())); - clientMachine.resolve(window, XCB_WINDOW_NONE); + clientMachine.resolve(m_testWindow, XCB_WINDOW_NONE); QTEST(clientMachine.hostName(), "expectedHost"); int i=0; @@ -178,10 +178,10 @@ void TestClientMachine::hostName() void TestClientMachine::emptyHostName() { - xcb_window_t window = createWindow(); + m_testWindow = createWindow(); ClientMachine clientMachine; QSignalSpy spy(&clientMachine, SIGNAL(localhostChanged())); - clientMachine.resolve(window, XCB_WINDOW_NONE); + clientMachine.resolve(m_testWindow, XCB_WINDOW_NONE); QCOMPARE(clientMachine.hostName(), ClientMachine::localhost()); QVERIFY(clientMachine.isLocal()); // should be local