{"action":"created","issue":{"url":"https://api.github.com/repos/mattanger/ckb-next/issues/90","repository_url":"https://api.github.com/repos/mattanger/ckb-next","labels_url":"https://api.github.com/repos/mattanger/ckb-next/issues/90/labels{/name}","comments_url":"https://api.github.com/repos/mattanger/ckb-next/issues/90/comments","events_url":"https://api.github.com/repos/mattanger/ckb-next/issues/90/events","html_url":"https://github.com/mattanger/ckb-next/pull/90","id":210333170,"number":90,"title":"Testing 61 ckb next doesnt remember settings after restart","user":{"login":"frickler24","id":6292952,"avatar_url":"https://avatars0.githubusercontent.com/u/6292952?v=3","gravatar_id":"","url":"https://api.github.com/users/frickler24","html_url":"https://github.com/frickler24","followers_url":"https://api.github.com/users/frickler24/followers","following_url":"https://api.github.com/users/frickler24/following{/other_user}","gists_url":"https://api.github.com/users/frickler24/gists{/gist_id}","starred_url":"https://api.github.com/users/frickler24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frickler24/subscriptions","organizations_url":"https://api.github.com/users/frickler24/orgs","repos_url":"https://api.github.com/users/frickler24/repos","events_url":"https://api.github.com/users/frickler24/events{/privacy}","received_events_url":"https://api.github.com/users/frickler24/received_events","type":"User","site_admin":false},"labels":[{"id":323810462,"url":"https://api.github.com/repos/mattanger/ckb-next/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":527511997,"url":"https://api.github.com/repos/mattanger/ckb-next/labels/Linux","name":"Linux","color":"fbca04","default":false},{"id":527511533,"url":"https://api.github.com/repos/mattanger/ckb-next/labels/macOS","name":"macOS","color":"5319e7","default":false}],"state":"open","locked":false,"assignee":{"login":"frickler24","id":6292952,"avatar_url":"https://avatars0.githubusercontent.com/u/6292952?v=3","gravatar_id":"","url":"https://api.github.com/users/frickler24","html_url":"https://github.com/frickler24","followers_url":"https://api.github.com/users/frickler24/followers","following_url":"https://api.github.com/users/frickler24/following{/other_user}","gists_url":"https://api.github.com/users/frickler24/gists{/gist_id}","starred_url":"https://api.github.com/users/frickler24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frickler24/subscriptions","organizations_url":"https://api.github.com/users/frickler24/orgs","repos_url":"https://api.github.com/users/frickler24/repos","events_url":"https://api.github.com/users/frickler24/events{/privacy}","received_events_url":"https://api.github.com/users/frickler24/received_events","type":"User","site_admin":false},"assignees":[{"login":"frickler24","id":6292952,"avatar_url":"https://avatars0.githubusercontent.com/u/6292952?v=3","gravatar_id":"","url":"https://api.github.com/users/frickler24","html_url":"https://github.com/frickler24","followers_url":"https://api.github.com/users/frickler24/followers","following_url":"https://api.github.com/users/frickler24/following{/other_user}","gists_url":"https://api.github.com/users/frickler24/gists{/gist_id}","starred_url":"https://api.github.com/users/frickler24/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/frickler24/subscriptions","organizations_url":"https://api.github.com/users/frickler24/orgs","repos_url":"https://api.github.com/users/frickler24/repos","events_url":"https://api.github.com/users/frickler24/events{/privacy}","received_events_url":"https://api.github.com/users/frickler24/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2017-02-26T17:25:35Z","updated_at":"2017-05-07T16:40:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mattanger/ckb-next/pulls/90","html_url":"https://github.com/mattanger/ckb-next/pull/90","diff_url":"https://github.com/mattanger/ckb-next/pull/90.diff","patch_url":"https://github.com/mattanger/ckb-next/pull/90.patch"},"body":"At the suggestion of @tatokis, not only the writability of the config file itself is evaluated,\r\nbut also reasons why the file could not be created.\r\n\r\nThis means that the original functions of QSettings are not enough, but we want to save the system independency given by QSettings.\r\n\r\nSo first try is to create a test entry in the Config.\r\nIf this test entry can be read after closing and reopening the config file, the file is writable or can be created. \r\n\r\nThis PR fixes issue #61 and replaces PR #71  which was based on master. This one is based on testing."},"comment":{"url":"https://api.github.com/repos/mattanger/ckb-next/issues/comments/299718262","html_url":"https://github.com/mattanger/ckb-next/pull/90#issuecomment-299718262","issue_url":"https://api.github.com/repos/mattanger/ckb-next/issues/90","id":299718262,"user":{"login":"fleischie","id":2211050,"avatar_url":"https://avatars2.githubusercontent.com/u/2211050?v=3","gravatar_id":"","url":"https://api.github.com/users/fleischie","html_url":"https://github.com/fleischie","followers_url":"https://api.github.com/users/fleischie/followers","following_url":"https://api.github.com/users/fleischie/following{/other_user}","gists_url":"https://api.github.com/users/fleischie/gists{/gist_id}","starred_url":"https://api.github.com/users/fleischie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/fleischie/subscriptions","organizations_url":"https://api.github.com/users/fleischie/orgs","repos_url":"https://api.github.com/users/fleischie/repos","events_url":"https://api.github.com/users/fleischie/events{/privacy}","received_events_url":"https://api.github.com/users/fleischie/received_events","type":"User","site_admin":false},"created_at":"2017-05-07T16:40:45Z","updated_at":"2017-05-07T16:40:45Z","body":"Hey, I have done some testing on Mac OS (El Capitan 10.11.6). First of all, it took me like 2 hours to find the settings file. 😅\r\n\r\nNevertheless I conducted the following test cases with the following results:\r\n\r\n# Tests\r\n\r\n## Settings file does not exist (prior to test)\r\n\r\n### Directory permission permutations\r\n\r\n| dir readable | dir writeable | dir executable | result |\r\n| --- | --- | --- | --- |\r\n| true | true | true | default behavior |\r\n| true | true | false | open dialog |\r\n| true | false | true | open dialog |\r\n| true | false | false | open dialog |\r\n| false | true | true | default behavior |\r\n| false | true | false | open dialog |\r\n| false | false | true | open dialog |\r\n| false | false | false | open dialog |\r\n\r\nConclusion: If directory is writeable and executable the default behavior is triggered, in any other case the dialog box is opened. Strangely `ckb` is not asking for the keyboard layout.\r\n\r\n## Settings file exists\r\n\r\n### File permission permutations\r\n\r\nPrerequisite: Directory is 700 with karl:staff ownership.\r\n\r\n| file readable | file writeable | result |\r\n| --- | --- | --- |\r\n| true | true | default behavior |\r\n| true | false | default behavior |\r\n| false | true | initial start |\r\n| false | false | initial start |\r\n\r\nConclusion: File readability determines, whether the default or the initial behavior is triggered.\r\n\r\n### Dir permission permutations\r\n\r\nPrerequisite: File mode is 400 and has karl:staff ownership.\r\n\r\n| dir readable | dir writeable | dir executable | result |\r\n| --- | --- | --- | --- |\r\n| true | true | true | default behavior |\r\n| true | true | false | open dialog |\r\n| true | false | true | open dialog |\r\n| true | false | false | open dialog |\r\n| false | true | true | default behavior |\r\n| false | true | false | open dialog |\r\n| false | false | true | open dialog |\r\n| false | false | false | open dialog |\r\n\r\nConclusion: If directory is writeable and executable the default behavior is triggered, in any other case the dialog box is opened.\r\n\r\n----\r\n\r\nI did some more permutations with file/dir permissions + ownerships but it boils down to the above-mentioned tables.\r\n\r\nAdditionally I don't think the operating system flavor (mac vs. linux) has an effect on this table, as the rwx-permissions are pretty much the same and it's all in user-spaced territory (the settings file is not stored on global directories).\r\n\r\nP.S.: I might have over-engineered the tests for such a simple PR. 😄 "}}
{"actor":{"display_login":"fleischie"}}