| 164 | } |
| 165 | |
| 166 | void SettingsDialog::toggleDaemon() { |
| 167 | // assumes defaults if config doesn't exist or lacks the related key(s) |
| 168 | if (settingsFile) { |
| 169 | if (settingsFile->value("AppImageLauncher/enable_daemon", "true").toBool()) { |
| 170 | system("systemctl --user enable appimagelauncherd.service"); |
| 171 | // we want to actually restart the service to apply the new configuration |
| 172 | system("systemctl --user restart appimagelauncherd.service"); |
| 173 | } else { |
| 174 | system("systemctl --user disable appimagelauncherd.service"); |
| 175 | system("systemctl --user stop appimagelauncherd.service"); |
| 176 | } |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | void SettingsDialog::onChooseAppsDirClicked() { |
| 181 | QFileDialog fileDialog(this); |
nothing calls this directly
no outgoing calls
no test coverage detected