{"action":"created","issue":{"url":"https://api.github.com/repos/keepassx/keepassx/issues/169","repository_url":"https://api.github.com/repos/keepassx/keepassx","labels_url":"https://api.github.com/repos/keepassx/keepassx/issues/169/labels{/name}","comments_url":"https://api.github.com/repos/keepassx/keepassx/issues/169/comments","events_url":"https://api.github.com/repos/keepassx/keepassx/issues/169/events","html_url":"https://github.com/keepassx/keepassx/pull/169","id":166201643,"number":169,"title":"Implementing \"close to minimize\" by throwing out quit() from MainWindow's close event handler","user":{"login":"xavery","id":127875,"avatar_url":"https://avatars.githubusercontent.com/u/127875?v=3","gravatar_id":"","url":"https://api.github.com/users/xavery","html_url":"https://github.com/xavery","followers_url":"https://api.github.com/users/xavery/followers","following_url":"https://api.github.com/users/xavery/following{/other_user}","gists_url":"https://api.github.com/users/xavery/gists{/gist_id}","starred_url":"https://api.github.com/users/xavery/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xavery/subscriptions","organizations_url":"https://api.github.com/users/xavery/orgs","repos_url":"https://api.github.com/users/xavery/repos","events_url":"https://api.github.com/users/xavery/events{/privacy}","received_events_url":"https://api.github.com/users/xavery/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2016-07-18T21:48:45Z","updated_at":"2016-07-19T14:45:19Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/keepassx/keepassx/pulls/169","html_url":"https://github.com/keepassx/keepassx/pull/169","diff_url":"https://github.com/keepassx/keepassx/pull/169.diff","patch_url":"https://github.com/keepassx/keepassx/pull/169.patch"},"body":"Although pull requests #100 and #140 both mention this issue, I would like to bring it to the developers' attention once again.\r\nQt natively supports \"persistent\" applications, e.g. ones that don't quit after closing their main window. This is done by calling `QApplication::setQuitOnLastWindowClosed(false)`, which has been present in `main.cxx` since commit 4cdb9a645d8af65ea37e3af41e668540f8a1b30c. However, because `MainWindow::closeEvent` calls `QApplication::quit`, the fact that the application should remain running after closing its last window is effectively ignored.\r\nSince `MainWindow::closeEvent` automatically ceases being synonymous with closing the main application when \"close to minimize\" is in effect, it is not possible to call `QApplication::quit` from within it, as it brings down the entire application. My solution proposes moving code related to quitting the application to a dedicated function that's only called when the `actionQuit` object is triggered : effectively, when choosing \"Quit Application\" from the file menu or the analogous option from within the tray icon's right-click menu.\r\nYou'll notice that this commit does not introduce a configuration option for selecting whether the application should remain running after clicking \"close\" : since KeePassX is an application that the user should want running all the time, I don't think that there's any value in introducing it. If you disagree, it can be added without much hassle - simply call `QApplication::setQuitOnLastWindowClosed()` again."},"comment":{"url":"https://api.github.com/repos/keepassx/keepassx/issues/comments/233655700","html_url":"https://github.com/keepassx/keepassx/pull/169#issuecomment-233655700","issue_url":"https://api.github.com/repos/keepassx/keepassx/issues/169","id":233655700,"user":{"login":"VukoDrakkeinen","id":1265912,"avatar_url":"https://avatars.githubusercontent.com/u/1265912?v=3","gravatar_id":"","url":"https://api.github.com/users/VukoDrakkeinen","html_url":"https://github.com/VukoDrakkeinen","followers_url":"https://api.github.com/users/VukoDrakkeinen/followers","following_url":"https://api.github.com/users/VukoDrakkeinen/following{/other_user}","gists_url":"https://api.github.com/users/VukoDrakkeinen/gists{/gist_id}","starred_url":"https://api.github.com/users/VukoDrakkeinen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/VukoDrakkeinen/subscriptions","organizations_url":"https://api.github.com/users/VukoDrakkeinen/orgs","repos_url":"https://api.github.com/users/VukoDrakkeinen/repos","events_url":"https://api.github.com/users/VukoDrakkeinen/events{/privacy}","received_events_url":"https://api.github.com/users/VukoDrakkeinen/received_events","type":"User","site_admin":false},"created_at":"2016-07-19T14:45:19Z","updated_at":"2016-07-19T14:45:19Z","body":"It is said that great minds think alike. It seems that we had the same idea :D I would withdraw my pull request, since you were faster, but mine also adds a toggle in the settings widget. Anyways, I hope either gets merged."}}
{"actor":{"display_login":"VukoDrakkeinen"}}