{"action":"created","comment":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments/126994269","pull_request_review_id":49534659,"id":126994269,"diff_hunk":"@@ -878,17 +954,24 @@ void TransferListWidget::displayListMenu(const QPoint&)\n     QList<QAction *> tagsActions;\n     QMenu *tagsMenu = listMenu.addMenu(GuiIconProvider::instance()->getIcon(\"view-categories\"), tr(\"Tags\"));\n     tagsActions << tagsMenu->addAction(GuiIconProvider::instance()->getIcon(\"list-add\"), tr(\"Add...\", \"Add / assign multiple tags...\"));\n-    tagsActions << tagsMenu->addAction(GuiIconProvider::instance()->getIcon(\"edit-clear\"), tr(\"Remove...\", \"Remove multiple tags...\"));\n     tagsActions << tagsMenu->addAction(GuiIconProvider::instance()->getIcon(\"edit-clear\"), tr(\"Remove All\", \"Remove all tags\"));\n     tagsMenu->addSeparator();\n     foreach (QString tag, tags) {\n-        const bool setChecked = tagsInSelection.contains(tag);\n-        tag.replace('&', \"&&\");  // avoid '&' becomes accelerator key\n-        QAction *tagSelection = new QAction(GuiIconProvider::instance()->getIcon(\"inode-directory\"), tag, tagsMenu);\n-        tagSelection->setCheckable(true);\n-        tagSelection->setChecked(setChecked);\n-        tagsMenu->addAction(tagSelection);\n-        tagsActions << tagSelection;\n+        const Qt::CheckState initialState = tagsInAll.contains(tag) ? Qt::Checked\n+                                            : tagsInAny.contains(tag) ? Qt::PartiallyChecked\n+                                            : Qt::Unchecked;\n+\n+        const CheckBoxMenuItem::ToggleFn onToggle = [this, tag](Qt::CheckState newState)\n+        {\n+            if (newState == Qt::CheckState::Checked)\n+                addSelectionTag(tag);\n+            else if (newState == Qt::CheckState::Unchecked)\n+                removeSelectionTag(tag);\n+            else\n+                qWarning() << \"Unexpected checkstate: \" << newState;","path":"src/gui/transferlistwidget.cpp","position":165,"original_position":165,"commit_id":"349e1fbf46615db71211609ff9238e202622209c","original_commit_id":"cd30ed10ef5c079237bc0bc071cbee4b01ae261c","user":{"login":"glassez","id":5063477,"avatar_url":"https://avatars0.githubusercontent.com/u/5063477?v=3","gravatar_id":"","url":"https://api.github.com/users/glassez","html_url":"https://github.com/glassez","followers_url":"https://api.github.com/users/glassez/followers","following_url":"https://api.github.com/users/glassez/following{/other_user}","gists_url":"https://api.github.com/users/glassez/gists{/gist_id}","starred_url":"https://api.github.com/users/glassez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/glassez/subscriptions","organizations_url":"https://api.github.com/users/glassez/orgs","repos_url":"https://api.github.com/users/glassez/repos","events_url":"https://api.github.com/users/glassez/events{/privacy}","received_events_url":"https://api.github.com/users/glassez/received_events","type":"User","site_admin":false},"body":"Will the presence of this debug messages bring us some benefit?","created_at":"2017-07-12T15:50:08Z","updated_at":"2017-07-12T15:50:08Z","html_url":"https://github.com/qbittorrent/qBittorrent/pull/7083#discussion_r126994269","pull_request_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/7083","_links":{"self":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments/126994269"},"html":{"href":"https://github.com/qbittorrent/qBittorrent/pull/7083#discussion_r126994269"},"pull_request":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/7083"}}},"pull_request":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/7083","id":129583535,"html_url":"https://github.com/qbittorrent/qBittorrent/pull/7083","diff_url":"https://github.com/qbittorrent/qBittorrent/pull/7083.diff","patch_url":"https://github.com/qbittorrent/qBittorrent/pull/7083.patch","issue_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/7083","number":7083,"state":"open","locked":false,"title":"Improve tag selection context menu. Closes #7060","user":{"login":"tgregerson","id":6699718,"avatar_url":"https://avatars2.githubusercontent.com/u/6699718?v=3","gravatar_id":"","url":"https://api.github.com/users/tgregerson","html_url":"https://github.com/tgregerson","followers_url":"https://api.github.com/users/tgregerson/followers","following_url":"https://api.github.com/users/tgregerson/following{/other_user}","gists_url":"https://api.github.com/users/tgregerson/gists{/gist_id}","starred_url":"https://api.github.com/users/tgregerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgregerson/subscriptions","organizations_url":"https://api.github.com/users/tgregerson/orgs","repos_url":"https://api.github.com/users/tgregerson/repos","events_url":"https://api.github.com/users/tgregerson/events{/privacy}","received_events_url":"https://api.github.com/users/tgregerson/received_events","type":"User","site_admin":false},"body":"This change replaces the standard QAction context menu items used for displaying / toggling the tags assigned to selected torrents in the transfer list. The custom menu items offer two improvements:\r\n\r\n- They are capable of displaying tristate checkboxes. The 'partially checked' state is used to indicate the case where a given tag is assigned to some, but not all, of the selected torrents.\r\n- You can now toggle multiple tags without needing to reopen the menu. This makes it much faster to perform multiple tag edits on a group of torrents.\r\n\r\nI also got rid of the \"Remove...\" tag dialog option. With the faster system for toggling tags, it is no longer needed.\r\n\r\n![new-tags-menu-final](https://user-images.githubusercontent.com/6699718/27998622-a081ae5a-64d7-11e7-9319-d644d5b230f0.png)\r\n\r\n\r\n","created_at":"2017-07-09T23:54:06Z","updated_at":"2017-07-12T15:50:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"52a0144ee93dffe1bdf67082792d9f17cd16579b","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/7083/commits","review_comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/7083/comments","review_comment_url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments{/number}","comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/7083/comments","statuses_url":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/349e1fbf46615db71211609ff9238e202622209c","head":{"label":"tgregerson:tags","ref":"tags","sha":"349e1fbf46615db71211609ff9238e202622209c","user":{"login":"tgregerson","id":6699718,"avatar_url":"https://avatars2.githubusercontent.com/u/6699718?v=3","gravatar_id":"","url":"https://api.github.com/users/tgregerson","html_url":"https://github.com/tgregerson","followers_url":"https://api.github.com/users/tgregerson/followers","following_url":"https://api.github.com/users/tgregerson/following{/other_user}","gists_url":"https://api.github.com/users/tgregerson/gists{/gist_id}","starred_url":"https://api.github.com/users/tgregerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgregerson/subscriptions","organizations_url":"https://api.github.com/users/tgregerson/orgs","repos_url":"https://api.github.com/users/tgregerson/repos","events_url":"https://api.github.com/users/tgregerson/events{/privacy}","received_events_url":"https://api.github.com/users/tgregerson/received_events","type":"User","site_admin":false},"repo":{"id":92692471,"name":"qBittorrent","full_name":"tgregerson/qBittorrent","owner":{"login":"tgregerson","id":6699718,"avatar_url":"https://avatars2.githubusercontent.com/u/6699718?v=3","gravatar_id":"","url":"https://api.github.com/users/tgregerson","html_url":"https://github.com/tgregerson","followers_url":"https://api.github.com/users/tgregerson/followers","following_url":"https://api.github.com/users/tgregerson/following{/other_user}","gists_url":"https://api.github.com/users/tgregerson/gists{/gist_id}","starred_url":"https://api.github.com/users/tgregerson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tgregerson/subscriptions","organizations_url":"https://api.github.com/users/tgregerson/orgs","repos_url":"https://api.github.com/users/tgregerson/repos","events_url":"https://api.github.com/users/tgregerson/events{/privacy}","received_events_url":"https://api.github.com/users/tgregerson/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tgregerson/qBittorrent","description":"qBittorrent BitTorrent client","fork":true,"url":"https://api.github.com/repos/tgregerson/qBittorrent","forks_url":"https://api.github.com/repos/tgregerson/qBittorrent/forks","keys_url":"https://api.github.com/repos/tgregerson/qBittorrent/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tgregerson/qBittorrent/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tgregerson/qBittorrent/teams","hooks_url":"https://api.github.com/repos/tgregerson/qBittorrent/hooks","issue_events_url":"https://api.github.com/repos/tgregerson/qBittorrent/issues/events{/number}","events_url":"https://api.github.com/repos/tgregerson/qBittorrent/events","assignees_url":"https://api.github.com/repos/tgregerson/qBittorrent/assignees{/user}","branches_url":"https://api.github.com/repos/tgregerson/qBittorrent/branches{/branch}","tags_url":"https://api.github.com/repos/tgregerson/qBittorrent/tags","blobs_url":"https://api.github.com/repos/tgregerson/qBittorrent/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tgregerson/qBittorrent/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tgregerson/qBittorrent/git/refs{/sha}","trees_url":"https://api.github.com/repos/tgregerson/qBittorrent/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tgregerson/qBittorrent/statuses/{sha}","languages_url":"https://api.github.com/repos/tgregerson/qBittorrent/languages","stargazers_url":"https://api.github.com/repos/tgregerson/qBittorrent/stargazers","contributors_url":"https://api.github.com/repos/tgregerson/qBittorrent/contributors","subscribers_url":"https://api.github.com/repos/tgregerson/qBittorrent/subscribers","subscription_url":"https://api.github.com/repos/tgregerson/qBittorrent/subscription","commits_url":"https://api.github.com/repos/tgregerson/qBittorrent/commits{/sha}","git_commits_url":"https://api.github.com/repos/tgregerson/qBittorrent/git/commits{/sha}","comments_url":"https://api.github.com/repos/tgregerson/qBittorrent/comments{/number}","issue_comment_url":"https://api.github.com/repos/tgregerson/qBittorrent/issues/comments{/number}","contents_url":"https://api.github.com/repos/tgregerson/qBittorrent/contents/{+path}","compare_url":"https://api.github.com/repos/tgregerson/qBittorrent/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tgregerson/qBittorrent/merges","archive_url":"https://api.github.com/repos/tgregerson/qBittorrent/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tgregerson/qBittorrent/downloads","issues_url":"https://api.github.com/repos/tgregerson/qBittorrent/issues{/number}","pulls_url":"https://api.github.com/repos/tgregerson/qBittorrent/pulls{/number}","milestones_url":"https://api.github.com/repos/tgregerson/qBittorrent/milestones{/number}","notifications_url":"https://api.github.com/repos/tgregerson/qBittorrent/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tgregerson/qBittorrent/labels{/name}","releases_url":"https://api.github.com/repos/tgregerson/qBittorrent/releases{/id}","deployments_url":"https://api.github.com/repos/tgregerson/qBittorrent/deployments","created_at":"2017-05-28T23:10:28Z","updated_at":"2017-05-28T23:10:33Z","pushed_at":"2017-07-12T11:29:15Z","git_url":"git://github.com/tgregerson/qBittorrent.git","ssh_url":"git@github.com:tgregerson/qBittorrent.git","clone_url":"https://github.com/tgregerson/qBittorrent.git","svn_url":"https://github.com/tgregerson/qBittorrent","homepage":"http://www.qbittorrent.org","size":148652,"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,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"qbittorrent:master","ref":"master","sha":"3d970399d47dd6f9ea02ca22a733dc033a02b745","user":{"login":"qbittorrent","id":2131270,"avatar_url":"https://avatars1.githubusercontent.com/u/2131270?v=3","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://avatars1.githubusercontent.com/u/2131270?v=3","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":"2017-07-12T15:33:59Z","pushed_at":"2017-07-12T14:26:40Z","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":"http://www.qbittorrent.org","size":148849,"stargazers_count":2697,"watchers_count":2697,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":619,"mirror_url":null,"open_issues_count":2115,"forks":619,"open_issues":2115,"watchers":2697,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/7083"},"html":{"href":"https://github.com/qbittorrent/qBittorrent/pull/7083"},"issue":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/7083"},"comments":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/7083/comments"},"review_comments":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/7083/comments"},"review_comment":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/7083/commits"},"statuses":{"href":"https://api.github.com/repos/qbittorrent/qBittorrent/statuses/349e1fbf46615db71211609ff9238e202622209c"}}}}
{"actor":{"display_login":"glassez"}}