{"action":"created","comment":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments/173698979","pull_request_review_id":102928551,"id":173698979,"diff_hunk":"@@ -145,20 +145,21 @@ void FileSystemWatcher::processPartialTorrents()\n     QStringList noLongerPartial;\n \n     // Check which torrents are still partial\n-    foreach (const QString &torrentPath, m_partialTorrents.keys()) {\n+    for (auto i = m_partialTorrents.begin(); i != m_partialTorrents.end(); ) {","path":"src/base/filesystemwatcher.cpp","position":5,"original_position":5,"commit_id":"f592de240f353d0bc21b32bbbdfe935e5d5427d0","original_commit_id":"e08cca3377d641cfafb3c023026fefd9f1029348","user":{"login":"Chocobo1","id":9395168,"avatar_url":"https://avatars2.githubusercontent.com/u/9395168?v=4","gravatar_id":"","url":"https://api.github.com/users/Chocobo1","html_url":"https://github.com/Chocobo1","followers_url":"https://api.github.com/users/Chocobo1/followers","following_url":"https://api.github.com/users/Chocobo1/following{/other_user}","gists_url":"https://api.github.com/users/Chocobo1/gists{/gist_id}","starred_url":"https://api.github.com/users/Chocobo1/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Chocobo1/subscriptions","organizations_url":"https://api.github.com/users/Chocobo1/orgs","repos_url":"https://api.github.com/users/Chocobo1/repos","events_url":"https://api.github.com/users/Chocobo1/events{/privacy}","received_events_url":"https://api.github.com/users/Chocobo1/received_events","type":"User","site_admin":false},"body":"The `removeIf()` sounds good +1.","created_at":"2018-03-12T05:54:16Z","updated_at":"2018-03-12T05:54:16Z","html_url":"https://github.com/qbittorrent/qBittorrent/pull/8558#discussion_r173698979","pull_request_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8558","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments/173698979"},"html":{"href":"https://github.com/qbittorrent/qBittorrent/pull/8558#discussion_r173698979"},"pull_request":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8558"}},"in_reply_to_id":173372233},"pull_request":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8558","id":173543840,"html_url":"https://github.com/qbittorrent/qBittorrent/pull/8558","diff_url":"https://github.com/qbittorrent/qBittorrent/pull/8558.diff","patch_url":"https://github.com/qbittorrent/qBittorrent/pull/8558.patch","issue_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/8558","number":8558,"state":"open","locked":false,"title":"Don't create temporary containers just to iterate over them","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":"Stops temporary containers being created needlessly due to API misuse.\r\nFor example, it’s common for developers to assume QHash::values() and\r\nQHash::keys() are free and abuse them, failing to realize their\r\nimplementation internally actually iterates the whole container, allocates\r\nmemory, and fills a new QList.\r\n\r\nFound using clazy.","created_at":"2018-03-07T19:00:52Z","updated_at":"2018-03-12T05:54:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f6793dde9fc909b0a6402bbaef8a5c5f95241093","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8558/commits","review_comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8558/comments","review_comment_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/8558/comments","statuses_url":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/f592de240f353d0bc21b32bbbdfe935e5d5427d0","head":{"label":"luis-pereira:containter-anti-pattern","ref":"containter-anti-pattern","sha":"f592de240f353d0bc21b32bbbdfe935e5d5427d0","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-03-09T13:17:17Z","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":161620,"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":"0cacd71503344630fca0314200abc59e55d79091","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-03-12T02:01:42Z","pushed_at":"2018-03-12T05:52:34Z","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":161652,"stargazers_count":3993,"watchers_count":3993,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":786,"mirror_url":null,"archived":false,"open_issues_count":2911,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":786,"open_issues":2911,"watchers":3993,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8558"},"html":{"href":"https://github.com/qbittorrent/qBittorrent/pull/8558"},"issue":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/8558"},"comments":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/8558/comments"},"review_comments":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8558/comments"},"review_comment":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/8558/commits"},"statuses":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/f592de240f353d0bc21b32bbbdfe935e5d5427d0"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Chocobo1"}}