{"action":"opened","number":21,"pull_request":{"url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/pulls/21","id":38560371,"html_url":"https://github.com/AbletonAG/aqt-stylesheets/pull/21","diff_url":"https://github.com/AbletonAG/aqt-stylesheets/pull/21.diff","patch_url":"https://github.com/AbletonAG/aqt-stylesheets/pull/21.patch","issue_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/issues/21","number":21,"state":"open","locked":false,"title":"Make the fontIdCache owned by the StyleEngineHost","user":{"login":"nsh-ableton","id":7703111,"avatar_url":"https://avatars.githubusercontent.com/u/7703111?v=3","gravatar_id":"","url":"https://api.github.com/users/nsh-ableton","html_url":"https://github.com/nsh-ableton","followers_url":"https://api.github.com/users/nsh-ableton/followers","following_url":"https://api.github.com/users/nsh-ableton/following{/other_user}","gists_url":"https://api.github.com/users/nsh-ableton/gists{/gist_id}","starred_url":"https://api.github.com/users/nsh-ableton/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nsh-ableton/subscriptions","organizations_url":"https://api.github.com/users/nsh-ableton/orgs","repos_url":"https://api.github.com/users/nsh-ableton/repos","events_url":"https://api.github.com/users/nsh-ableton/events{/privacy}","received_events_url":"https://api.github.com/users/nsh-ableton/received_events","type":"User","site_admin":false},"body":"When using `qmltestrunner` to run QML unit tests, the QML engine is\r\ndestroyed and recreated.  This means that the `QFontDatabase` used by\r\nthe `StyleEngine` is also destroyed and recreated.  Unfortunately, the\r\n`QFontDatabase` does not ask the window manager to remove fonts when it is\r\ndestroyed.  Therefore, if a `StyleEngine` has previously loaded a font,\r\nand then tries to load the same font in the next test run, `QFontDatabase`\r\nwill call the OS-specific font loading code, which (at least on Mac OS)\r\nwill generate an error.\r\n\r\nThe solution here is to make the `fontIdCache` that the `StyleEngine` uses a\r\nmember of the `StyleEngineHost`, which is a singleton that is preserved\r\nacross destruction and recreation of the QML engine.  The `StyleEngine` thus\r\n\"knows\" which fonts have previously been loaded, and will not try to load\r\nthem again.","created_at":"2015-06-25T15:30:54Z","updated_at":"2015-06-25T15:30:54Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2a9e99957750cc143fdad42320a5cd71d14e7c4a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/pulls/21/commits","review_comments_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/pulls/21/comments","review_comment_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/issues/21/comments","statuses_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/statuses/aa8ce65472ca442668dfbff06809fe13ed07d29c","head":{"label":"AbletonAG:fix-fontid-caching","ref":"fix-fontid-caching","sha":"aa8ce65472ca442668dfbff06809fe13ed07d29c","user":{"login":"AbletonAG","id":1170127,"avatar_url":"https://avatars.githubusercontent.com/u/1170127?v=3","gravatar_id":"","url":"https://api.github.com/users/AbletonAG","html_url":"https://github.com/AbletonAG","followers_url":"https://api.github.com/users/AbletonAG/followers","following_url":"https://api.github.com/users/AbletonAG/following{/other_user}","gists_url":"https://api.github.com/users/AbletonAG/gists{/gist_id}","starred_url":"https://api.github.com/users/AbletonAG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbletonAG/subscriptions","organizations_url":"https://api.github.com/users/AbletonAG/orgs","repos_url":"https://api.github.com/users/AbletonAG/repos","events_url":"https://api.github.com/users/AbletonAG/events{/privacy}","received_events_url":"https://api.github.com/users/AbletonAG/received_events","type":"Organization","site_admin":false},"repo":{"id":26809156,"name":"aqt-stylesheets","full_name":"AbletonAG/aqt-stylesheets","owner":{"login":"AbletonAG","id":1170127,"avatar_url":"https://avatars.githubusercontent.com/u/1170127?v=3","gravatar_id":"","url":"https://api.github.com/users/AbletonAG","html_url":"https://github.com/AbletonAG","followers_url":"https://api.github.com/users/AbletonAG/followers","following_url":"https://api.github.com/users/AbletonAG/following{/other_user}","gists_url":"https://api.github.com/users/AbletonAG/gists{/gist_id}","starred_url":"https://api.github.com/users/AbletonAG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbletonAG/subscriptions","organizations_url":"https://api.github.com/users/AbletonAG/orgs","repos_url":"https://api.github.com/users/AbletonAG/repos","events_url":"https://api.github.com/users/AbletonAG/events{/privacy}","received_events_url":"https://api.github.com/users/AbletonAG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AbletonAG/aqt-stylesheets","description":"Apply CSS style sheets to QML applications","fork":false,"url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets","forks_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/forks","keys_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/teams","hooks_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/hooks","issue_events_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/issues/events{/number}","events_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/events","assignees_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/assignees{/user}","branches_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/branches{/branch}","tags_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/tags","blobs_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/git/refs{/sha}","trees_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/statuses/{sha}","languages_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/languages","stargazers_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/stargazers","contributors_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/contributors","subscribers_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/subscribers","subscription_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/subscription","commits_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/commits{/sha}","git_commits_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/git/commits{/sha}","comments_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/comments{/number}","issue_comment_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/issues/comments{/number}","contents_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/contents/{+path}","compare_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/merges","archive_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/downloads","issues_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/issues{/number}","pulls_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/pulls{/number}","milestones_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/milestones{/number}","notifications_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/labels{/name}","releases_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/releases{/id}","created_at":"2014-11-18T12:55:20Z","updated_at":"2015-06-13T09:34:40Z","pushed_at":"2015-06-25T15:30:54Z","git_url":"git://github.com/AbletonAG/aqt-stylesheets.git","ssh_url":"git@github.com:AbletonAG/aqt-stylesheets.git","clone_url":"https://github.com/AbletonAG/aqt-stylesheets.git","svn_url":"https://github.com/AbletonAG/aqt-stylesheets","homepage":"","size":933,"stargazers_count":31,"watchers_count":31,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":31,"default_branch":"master"}},"base":{"label":"AbletonAG:master","ref":"master","sha":"cc02c187539be658e786eed8dcaec47c1ab61107","user":{"login":"AbletonAG","id":1170127,"avatar_url":"https://avatars.githubusercontent.com/u/1170127?v=3","gravatar_id":"","url":"https://api.github.com/users/AbletonAG","html_url":"https://github.com/AbletonAG","followers_url":"https://api.github.com/users/AbletonAG/followers","following_url":"https://api.github.com/users/AbletonAG/following{/other_user}","gists_url":"https://api.github.com/users/AbletonAG/gists{/gist_id}","starred_url":"https://api.github.com/users/AbletonAG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbletonAG/subscriptions","organizations_url":"https://api.github.com/users/AbletonAG/orgs","repos_url":"https://api.github.com/users/AbletonAG/repos","events_url":"https://api.github.com/users/AbletonAG/events{/privacy}","received_events_url":"https://api.github.com/users/AbletonAG/received_events","type":"Organization","site_admin":false},"repo":{"id":26809156,"name":"aqt-stylesheets","full_name":"AbletonAG/aqt-stylesheets","owner":{"login":"AbletonAG","id":1170127,"avatar_url":"https://avatars.githubusercontent.com/u/1170127?v=3","gravatar_id":"","url":"https://api.github.com/users/AbletonAG","html_url":"https://github.com/AbletonAG","followers_url":"https://api.github.com/users/AbletonAG/followers","following_url":"https://api.github.com/users/AbletonAG/following{/other_user}","gists_url":"https://api.github.com/users/AbletonAG/gists{/gist_id}","starred_url":"https://api.github.com/users/AbletonAG/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AbletonAG/subscriptions","organizations_url":"https://api.github.com/users/AbletonAG/orgs","repos_url":"https://api.github.com/users/AbletonAG/repos","events_url":"https://api.github.com/users/AbletonAG/events{/privacy}","received_events_url":"https://api.github.com/users/AbletonAG/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/AbletonAG/aqt-stylesheets","description":"Apply CSS style sheets to QML applications","fork":false,"url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets","forks_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/forks","keys_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/teams","hooks_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/hooks","issue_events_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/issues/events{/number}","events_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/events","assignees_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/assignees{/user}","branches_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/branches{/branch}","tags_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/tags","blobs_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/git/refs{/sha}","trees_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/statuses/{sha}","languages_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/languages","stargazers_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/stargazers","contributors_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/contributors","subscribers_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/subscribers","subscription_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/subscription","commits_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/commits{/sha}","git_commits_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/git/commits{/sha}","comments_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/comments{/number}","issue_comment_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/issues/comments{/number}","contents_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/contents/{+path}","compare_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/merges","archive_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/downloads","issues_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/issues{/number}","pulls_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/pulls{/number}","milestones_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/milestones{/number}","notifications_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/labels{/name}","releases_url":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/releases{/id}","created_at":"2014-11-18T12:55:20Z","updated_at":"2015-06-13T09:34:40Z","pushed_at":"2015-06-25T15:30:54Z","git_url":"git://github.com/AbletonAG/aqt-stylesheets.git","ssh_url":"git@github.com:AbletonAG/aqt-stylesheets.git","clone_url":"https://github.com/AbletonAG/aqt-stylesheets.git","svn_url":"https://github.com/AbletonAG/aqt-stylesheets","homepage":"","size":933,"stargazers_count":31,"watchers_count":31,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":5,"mirror_url":null,"open_issues_count":4,"forks":5,"open_issues":4,"watchers":31,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/pulls/21"},"html":{"href":"https://github.com/AbletonAG/aqt-stylesheets/pull/21"},"issue":{"href":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/issues/21"},"comments":{"href":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/AbletonAG/aqt-stylesheets/statuses/aa8ce65472ca442668dfbff06809fe13ed07d29c"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":14,"deletions":1,"changed_files":2}}