From f305517724cff7fad84eff5798228fcd6058e1a7 Mon Sep 17 00:00:00 2001 From: Joan Bruguera Date: Sun, 11 Mar 2018 16:27:26 +0100 Subject: [PATCH] Skip the tray restore/hide test of #1595 if there's no tray (fix CI build). --- tests/gui/TestGui.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/gui/TestGui.cpp b/tests/gui/TestGui.cpp index 25c6f0c7d..54203c284 100644 --- a/tests/gui/TestGui.cpp +++ b/tests/gui/TestGui.cpp @@ -1095,8 +1095,11 @@ void TestGui::testDragAndDropKdbxFiles() void TestGui::testTrayRestoreHide() { - QSystemTrayIcon *trayIcon = m_mainWindow->findChild(); + if (!QSystemTrayIcon::isSystemTrayAvailable()) { + QSKIP("QSystemTrayIcon::isSystemTrayAvailable() = false, skipping tray restore/hide test..."); + } + QSystemTrayIcon* trayIcon = m_mainWindow->findChild(); QVERIFY(m_mainWindow->isVisible()); trayIcon->activated(QSystemTrayIcon::Trigger);