From 0c36c40a5d77b2fc0246f39029d461e0a8226d08 Mon Sep 17 00:00:00 2001 From: Felix Geyer Date: Sun, 1 Nov 2015 13:37:03 +0100 Subject: [PATCH] Make TestGui work with offscreen QPA. For some reason hasFocus() returns true here. Use isVisible() instead as it's a stronger check anyway. --- tests/gui/TestGui.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp index 5eb8f6f21..5b910b5a7 100644 --- a/tests/gui/TestGui.cpp +++ b/tests/gui/TestGui.cpp @@ -185,7 +185,7 @@ void TestGui::testSearch() QLineEdit* searchEdit = m_dbWidget->findChild("searchEdit"); QToolButton* clearSearch = m_dbWidget->findChild("clearButton"); - QVERIFY(!searchEdit->hasFocus()); + QVERIFY(!searchEdit->isVisible()); // Enter search QTest::mouseClick(searchActionWidget, Qt::LeftButton);