Move a SystemTray test after tryinjg to create one.

This commit is contained in:
Julien Wadel 2020-05-10 12:43:23 +02:00
parent 1c890a3556
commit 4f9e6a7be2

View file

@ -563,8 +563,6 @@ void App::registerSharedToolTypes () {
// -----------------------------------------------------------------------------
void App::setTrayIcon () {
if(!QSystemTrayIcon::isSystemTrayAvailable())
qInfo() << "System tray is not available";
QQuickWindow *root = getMainWindow();
QSystemTrayIcon *systemTrayIcon = new QSystemTrayIcon(mEngine);
@ -619,6 +617,8 @@ void App::setTrayIcon () {
systemTrayIcon->setToolTip(APPLICATION_NAME);
systemTrayIcon->show();
mSystemTrayIcon = systemTrayIcon;
if(!QSystemTrayIcon::isSystemTrayAvailable())
qInfo() << "System tray is not available";
}
// -----------------------------------------------------------------------------