Fix bug can not show network tray-icon after switch system user

This commit is contained in:
chenlelin 2021-04-15 16:56:10 +08:00
parent 406af20026
commit c1a13d269a
1 changed files with 7 additions and 1 deletions

View File

@ -38,9 +38,15 @@ int main(int argc, char *argv[])
QApplication a(argc, argv);
openlog(LOG_IDENT, LOG_NDELAY | LOG_NOWAIT | LOG_PID, LOG_USER);
syslog(LOG_DEBUG, "Kylin Network Manager Is Already Launched");
if (!QSystemTrayIcon::isSystemTrayAvailable()) {
qDebug()<<"I couldn't detect any system tray on this system now";
syslog(LOG_DEBUG, "I couldn't detect any system tray on this system now");
return 1;
}
QApplication::setQuitOnLastWindowClosed(false);
// Internationalization
QString locale = QLocale::system().name();
QTranslator trans_global;