disable system tray if not available

This commit is contained in:
csoler 2019-08-24 20:21:09 +02:00
parent cd070dea46
commit 56fcd38851
No known key found for this signature in database
GPG Key ID: 7BCA522266C0804C

View File

@ -81,6 +81,13 @@ GeneralPage::GeneralPage(QWidget * parent, Qt::WindowFlags flags) :
ui.checkCloseToTray->setChecked(false) ; // default should be false because some systems to not support this. ui.checkCloseToTray->setChecked(false) ; // default should be false because some systems to not support this.
if(!QSystemTrayIcon::isSystemTrayAvailable())
{
ui.checkCloseToTray->setChecked(false) ; // default should be false because some systems to not support this.
ui.checkCloseToTray->setToolTip(tr("No Qt-compatible system tray was found on this system."));
Settings->setCloseToTray(false);
}
/* Connect signals */ /* Connect signals */
connect(ui.useLocalServer, SIGNAL(toggled(bool)), this,SLOT(updateUseLocalServer())) ; connect(ui.useLocalServer, SIGNAL(toggled(bool)), this,SLOT(updateUseLocalServer())) ;
connect(ui.idleSpinBox, SIGNAL(valueChanged(int)), this,SLOT(updateMaxTimeBeforeIdle())) ; connect(ui.idleSpinBox, SIGNAL(valueChanged(int)), this,SLOT(updateMaxTimeBeforeIdle())) ;