Skip the tray restore/hide test of #1595 if there's no tray (fix CI build).

This commit is contained in:
Joan Bruguera 2018-03-11 16:27:26 +01:00 committed by TheZ3ro
parent 8646586c1a
commit f305517724

View File

@ -1095,8 +1095,11 @@ void TestGui::testDragAndDropKdbxFiles()
void TestGui::testTrayRestoreHide()
{
QSystemTrayIcon *trayIcon = m_mainWindow->findChild<QSystemTrayIcon*>();
if (!QSystemTrayIcon::isSystemTrayAvailable()) {
QSKIP("QSystemTrayIcon::isSystemTrayAvailable() = false, skipping tray restore/hide test...");
}
QSystemTrayIcon* trayIcon = m_mainWindow->findChild<QSystemTrayIcon*>();
QVERIFY(m_mainWindow->isVisible());
trayIcon->activated(QSystemTrayIcon::Trigger);