{"action":"opened","number":8409,"pull_request":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8409","id":169211588,"html_url":"https://github.com/qbittorrent/qBittorrent/pull/8409","diff_url":"https://github.com/qbittorrent/qBittorrent/pull/8409.diff","patch_url":"https://github.com/qbittorrent/qBittorrent/pull/8409.patch","issue_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/8409","number":8409,"state":"open","locked":false,"title":"Don't implicitly cast iterator to const_iterator","user":{"login":"luis-pereira","id":62877,"avatar_url":"https://avatars2.githubusercontent.com/u/62877?v=4","gravatar_id":"","url":"https://api.github.com/users/luis-pereira","html_url":"https://github.com/luis-pereira","followers_url":"https://api.github.com/users/luis-pereira/followers","following_url":"https://api.github.com/users/luis-pereira/following{/other_user}","gists_url":"https://api.github.com/users/luis-pereira/gists{/gist_id}","starred_url":"https://api.github.com/users/luis-pereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luis-pereira/subscriptions","organizations_url":"https://api.github.com/users/luis-pereira/orgs","repos_url":"https://api.github.com/users/luis-pereira/repos","events_url":"https://api.github.com/users/luis-pereira/events{/privacy}","received_events_url":"https://api.github.com/users/luis-pereira/received_events","type":"User","site_admin":false},"body":"It prevents detachments:\r\nTo illustrate:\r\n\r\nQMap<QString, QString> map;\r\n/* code compiles and works fine but find() returns the non-const\r\n   QMap::iterator that detaches!\r\n*/\r\nQMap<QString, QString>::const_iterator it = map.find(\"girish\");\r\n\r\nbut also some subtle bugs:\r\n\r\nQHash<int, int> wrong;\r\nif (wrong.find(1) == wrong.cend()) {\r\n    qDebug() << \"Not found\";\r\n} else {\r\n    /* find() detached the container before cend() was called, so it\r\n       prints \"Found\"\r\n    */\r\n    qDebug() << \"Found\";\r\n}\r\n\r\nQHash<int, int> right;\r\nif (right.constFind(1) == right.cend()) {\r\n    qDebug() << \"Not found\"; // This is correct now !\r\n} else {\r\n    qDebug() << \"Found\";\r\n}\r\n\r\nEnforced by QT_STRICT_ITERATORS definition.","created_at":"2018-02-14T20:17:58Z","updated_at":"2018-02-14T20:17:58Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8409/commits","review_comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8409/comments","review_comment_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/8409/comments","statuses_url":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/92c5027fcd1f9f7e9a01eb5150ad5d96166fe279","head":{"label":"luis-pereira:master","ref":"master","sha":"92c5027fcd1f9f7e9a01eb5150ad5d96166fe279","user":{"login":"luis-pereira","id":62877,"avatar_url":"https://avatars2.githubusercontent.com/u/62877?v=4","gravatar_id":"","url":"https://api.github.com/users/luis-pereira","html_url":"https://github.com/luis-pereira","followers_url":"https://api.github.com/users/luis-pereira/followers","following_url":"https://api.github.com/users/luis-pereira/following{/other_user}","gists_url":"https://api.github.com/users/luis-pereira/gists{/gist_id}","starred_url":"https://api.github.com/users/luis-pereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luis-pereira/subscriptions","organizations_url":"https://api.github.com/users/luis-pereira/orgs","repos_url":"https://api.github.com/users/luis-pereira/repos","events_url":"https://api.github.com/users/luis-pereira/events{/privacy}","received_events_url":"https://api.github.com/users/luis-pereira/received_events","type":"User","site_admin":false},"repo":{"id":118933609,"name":"qBittorrent","full_name":"luis-pereira/qBittorrent","owner":{"login":"luis-pereira","id":62877,"avatar_url":"https://avatars2.githubusercontent.com/u/62877?v=4","gravatar_id":"","url":"https://api.github.com/users/luis-pereira","html_url":"https://github.com/luis-pereira","followers_url":"https://api.github.com/users/luis-pereira/followers","following_url":"https://api.github.com/users/luis-pereira/following{/other_user}","gists_url":"https://api.github.com/users/luis-pereira/gists{/gist_id}","starred_url":"https://api.github.com/users/luis-pereira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luis-pereira/subscriptions","organizations_url":"https://api.github.com/users/luis-pereira/orgs","repos_url":"https://api.github.com/users/luis-pereira/repos","events_url":"https://api.github.com/users/luis-pereira/events{/privacy}","received_events_url":"https://api.github.com/users/luis-pereira/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/luis-pereira/qBittorrent","description":"qBittorrent BitTorrent client","fork":true,"url":"https://api.github.com/repos/luis-pereira/qBittorrent","forks_url":"https://api.github.com/repos/luis-pereira/qBittorrent/forks","keys_url":"https://api.github.com/repos/luis-pereira/qBittorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/luis-pereira/qBittorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/luis-pereira/qBittorrent/teams","hooks_url":"https://api.github.com/repos/luis-pereira/qBittorrent/hooks","issue_events_url":"https://api.github.com/repos/luis-pereira/qBittorrent/issues/events{/number}","events_url":"https://api.github.com/repos/luis-pereira/qBittorrent/events","assignees_url":"https://api.github.com/repos/luis-pereira/qBittorrent/assignees{/user}","branches_url":"https://api.github.com/repos/luis-pereira/qBittorrent/branches{/branch}","tags_url":"https://api.github.com/repos/luis-pereira/qBittorrent/tags","blobs_url":"https://api.github.com/repos/luis-pereira/qBittorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/luis-pereira/qBittorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/luis-pereira/qBittorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/luis-pereira/qBittorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/luis-pereira/qBittorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/luis-pereira/qBittorrent/languages","stargazers_url":"https://api.github.com/repos/luis-pereira/qBittorrent/stargazers","contributors_url":"https://api.github.com/repos/luis-pereira/qBittorrent/contributors","subscribers_url":"https://api.github.com/repos/luis-pereira/qBittorrent/subscribers","subscription_url":"https://api.github.com/repos/luis-pereira/qBittorrent/subscription","commits_url":"https://api.github.com/repos/luis-pereira/qBittorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/luis-pereira/qBittorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/luis-pereira/qBittorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/luis-pereira/qBittorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/luis-pereira/qBittorrent/contents/{+path}","compare_url":"https://api.github.com/repos/luis-pereira/qBittorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/luis-pereira/qBittorrent/merges","archive_url":"https://api.github.com/repos/luis-pereira/qBittorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/luis-pereira/qBittorrent/downloads","issues_url":"https://api.github.com/repos/luis-pereira/qBittorrent/issues{/number}","pulls_url":"https://api.github.com/repos/luis-pereira/qBittorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/luis-pereira/qBittorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/luis-pereira/qBittorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/luis-pereira/qBittorrent/labels{/name}","releases_url":"https://api.github.com/repos/luis-pereira/qBittorrent/releases{/id}","deployments_url":"https://api.github.com/repos/luis-pereira/qBittorrent/deployments","created_at":"2018-01-25T15:51:21Z","updated_at":"2018-01-25T15:51:27Z","pushed_at":"2018-02-14T20:16:51Z","git_url":"git://github.com/luis-pereira/qBittorrent.git","ssh_url":"git@github.com:luis-pereira/qBittorrent.git","clone_url":"https://github.com/luis-pereira/qBittorrent.git","svn_url":"https://github.com/luis-pereira/qBittorrent","homepage":"https://www.qbittorrent.org","size":161349,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"qbittorrent:master","ref":"master","sha":"c59d2575c85a9960034782ae042a731af8c00e0c","user":{"login":"qbittorrent","id":2131270,"avatar_url":"https://avatars2.githubusercontent.com/u/2131270?v=4","gravatar_id":"","url":"https://api.github.com/users/qbittorrent","html_url":"https://github.com/qbittorrent","followers_url":"https://api.github.com/users/qbittorrent/followers","following_url":"https://api.github.com/users/qbittorrent/following{/other_user}","gists_url":"https://api.github.com/users/qbittorrent/gists{/gist_id}","starred_url":"https://api.github.com/users/qbittorrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qbittorrent/subscriptions","organizations_url":"https://api.github.com/users/qbittorrent/orgs","repos_url":"https://api.github.com/users/qbittorrent/repos","events_url":"https://api.github.com/users/qbittorrent/events{/privacy}","received_events_url":"https://api.github.com/users/qbittorrent/received_events","type":"Organization","site_admin":false},"repo":{"id":3351871,"name":"qBittorrent","full_name":"qbittorrent/qBittorrent","owner":{"login":"qbittorrent","id":2131270,"avatar_url":"https://avatars2.githubusercontent.com/u/2131270?v=4","gravatar_id":"","url":"https://api.github.com/users/qbittorrent","html_url":"https://github.com/qbittorrent","followers_url":"https://api.github.com/users/qbittorrent/followers","following_url":"https://api.github.com/users/qbittorrent/following{/other_user}","gists_url":"https://api.github.com/users/qbittorrent/gists{/gist_id}","starred_url":"https://api.github.com/users/qbittorrent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/qbittorrent/subscriptions","organizations_url":"https://api.github.com/users/qbittorrent/orgs","repos_url":"https://api.github.com/users/qbittorrent/repos","events_url":"https://api.github.com/users/qbittorrent/events{/privacy}","received_events_url":"https://api.github.com/users/qbittorrent/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/qbittorrent/qBittorrent","description":"qBittorrent BitTorrent client","fork":false,"url":"https://api.github.com/repos/qbittorrent/qBittorrent","forks_url":"https://api.github.com/repos/qbittorrent/qBittorrent/forks","keys_url":"https://api.github.com/repos/qbittorrent/qBittorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/qbittorrent/qBittorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/qbittorrent/qBittorrent/teams","hooks_url":"https://api.github.com/repos/qbittorrent/qBittorrent/hooks","issue_events_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/events{/number}","events_url":"https://api.github.com/repos/qbittorrent/qBittorrent/events","assignees_url":"https://api.github.com/repos/qbittorrent/qBittorrent/assignees{/user}","branches_url":"https://api.github.com/repos/qbittorrent/qBittorrent/branches{/branch}","tags_url":"https://api.github.com/repos/qbittorrent/qBittorrent/tags","blobs_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/qbittorrent/qBittorrent/languages","stargazers_url":"https://api.github.com/repos/qbittorrent/qBittorrent/stargazers","contributors_url":"https://api.github.com/repos/qbittorrent/qBittorrent/contributors","subscribers_url":"https://api.github.com/repos/qbittorrent/qBittorrent/subscribers","subscription_url":"https://api.github.com/repos/qbittorrent/qBittorrent/subscription","commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/qbittorrent/qBittorrent/contents/{+path}","compare_url":"https://api.github.com/repos/qbittorrent/qBittorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/qbittorrent/qBittorrent/merges","archive_url":"https://api.github.com/repos/qbittorrent/qBittorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/qbittorrent/qBittorrent/downloads","issues_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues{/number}","pulls_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/qbittorrent/qBittorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/qbittorrent/qBittorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/qbittorrent/qBittorrent/labels{/name}","releases_url":"https://api.github.com/repos/qbittorrent/qBittorrent/releases{/id}","deployments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/deployments","created_at":"2012-02-04T09:37:46Z","updated_at":"2018-02-14T17:49:38Z","pushed_at":"2018-02-14T12:59:02Z","git_url":"git://github.com/qbittorrent/qBittorrent.git","ssh_url":"git@github.com:qbittorrent/qBittorrent.git","clone_url":"https://github.com/qbittorrent/qBittorrent.git","svn_url":"https://github.com/qbittorrent/qBittorrent","homepage":"https://www.qbittorrent.org","size":161343,"stargazers_count":3825,"watchers_count":3825,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":763,"mirror_url":null,"archived":false,"open_issues_count":2821,"license":{"key":"gpl-2.0","name":"GNU General Public License v2.0","spdx_id":"GPL-2.0","url":"https://api.github.com/licenses/gpl-2.0"},"forks":763,"open_issues":2821,"watchers":3825,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8409"},"html":{"href":"https://github.com/qbittorrent/qBittorrent/pull/8409"},"issue":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/8409"},"comments":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/8409/comments"},"review_comments":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8409/comments"},"review_comment":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8409/commits"},"statuses":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/92c5027fcd1f9f7e9a01eb5150ad5d96166fe279"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":5,"deletions":4,"changed_files":4}}
{"actor":{"display_login":"luis-pereira"}}