From b5f37997533793ae53773c58e33fa308a76bbf96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20=C3=81ngel=20San=20Mart=C3=ADn?= Date: Sat, 21 Sep 2019 10:44:03 +0200 Subject: [PATCH] Restore the code to start the app into the system tray --- YACReaderLibrary/main.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/YACReaderLibrary/main.cpp b/YACReaderLibrary/main.cpp index 966e6efc..62f68584 100644 --- a/YACReaderLibrary/main.cpp +++ b/YACReaderLibrary/main.cpp @@ -245,7 +245,15 @@ int main(int argc, char **argv) //connections to localServer - mw->show(); + // start as tray + if (!settings->value(START_TO_TRAY, false).toBool() || !settings->value(CLOSE_TO_TRAY, false).toBool()) { + mw->show(); + } +#ifdef Q_OS_MACOS + else { + OSXHideDockIcon(); + } +#endif int ret = app.exec();