| 255 | } |
| 256 | |
| 257 | void MainWindow::iconClicked(QSystemTrayIcon::ActivationReason reason){ |
| 258 | // On Linux, hide/show the app when the tray icon is clicked |
| 259 | // On OSX this just shows the menu |
| 260 | #ifndef Q_OS_MACX |
| 261 | if(reason == QSystemTrayIcon::DoubleClick || reason == QSystemTrayIcon::Trigger){ |
| 262 | if(isVisible()) |
| 263 | hide(); |
| 264 | else |
| 265 | showWindow(); |
| 266 | } |
| 267 | #endif |
| 268 | } |
| 269 | |
| 270 | void MainWindow::showWindow(){ |
| 271 | showNormal(); |
nothing calls this directly
no outgoing calls
no test coverage detected