{"action":"created","comment":{"url":"https://api.github.com/repos/KDAB/hotspot/pulls/comments/98431103","pull_request_review_id":19070027,"id":98431103,"diff_hunk":"@@ -0,0 +1,46 @@\n+/*\n+ * Copyright 2016-2017 Milian Wolff <mail@milianw.de>\n+ *\n+ * This program is free software; you can redistribute it and/or modify\n+ * it under the terms of the GNU Library General Public License as\n+ * published by the Free Software Foundation; either version 2 of the\n+ * License, or (at your option) any later version.\n+ *\n+ * This program is distributed in the hope that it will be useful,\n+ * but WITHOUT ANY WARRANTY; without even the implied warranty of\n+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n+ * GNU General Public License for more details.\n+ *\n+ * You should have received a copy of the GNU General Public\n+ * License along with this program; if not, write to the\n+ * Free Software Foundation, Inc.,\n+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.\n+ */\n+\n+#include \"topproxy.h\"\n+\n+TopProxy::TopProxy(QObject* parent)\n+    : QSortFilterProxyModel(parent)\n+{\n+    sort(2, Qt::DescendingOrder);\n+}\n+\n+TopProxy::~TopProxy() = default;\n+\n+bool TopProxy::filterAcceptsColumn(int source_column, const QModelIndex& /*source_parent*/) const\n+{\n+    return source_column == CostModel::Symbol || source_column == CostModel::Binary || source_column == CostModel::SelfCost;\n+}\n+\n+int TopProxy::rowCount(const QModelIndex& parent) const\n+{\n+    return 5;","path":"src/models/topproxy.cpp","position":37,"original_position":37,"commit_id":"2bdc82e19a4cba2c7a77498092da1c7abc181f14","original_commit_id":"2bdc82e19a4cba2c7a77498092da1c7abc181f14","user":{"login":"milianw","id":57207,"avatar_url":"https://avatars.githubusercontent.com/u/57207?v=3","gravatar_id":"","url":"https://api.github.com/users/milianw","html_url":"https://github.com/milianw","followers_url":"https://api.github.com/users/milianw/followers","following_url":"https://api.github.com/users/milianw/following{/other_user}","gists_url":"https://api.github.com/users/milianw/gists{/gist_id}","starred_url":"https://api.github.com/users/milianw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milianw/subscriptions","organizations_url":"https://api.github.com/users/milianw/orgs","repos_url":"https://api.github.com/users/milianw/repos","events_url":"https://api.github.com/users/milianw/events{/privacy}","received_events_url":"https://api.github.com/users/milianw/received_events","type":"User","site_admin":false},"body":"it will return at most 5, no? so this has to be something like:\r\n\r\n```\r\nif (parent.isValid()) {\r\n    return 0; // this is a flat list, not a tree\r\n}\r\nreturn std::min(5, sourceModel()->rowCount(parent));\r\n```","created_at":"2017-01-30T12:30:15Z","updated_at":"2017-01-30T12:32:26Z","html_url":"https://github.com/KDAB/hotspot/pull/22#discussion_r98431103","pull_request_url":"https://api.github.com/repos/KDAB/hotspot/pulls/22","_links":{"self":{"href":"https://api.github.com/repos/KDAB/hotspot/pulls/comments/98431103"},"html":{"href":"https://github.com/KDAB/hotspot/pull/22#discussion_r98431103"},"pull_request":{"href":"https://api.github.com/repos/KDAB/hotspot/pulls/22"}}},"pull_request":{"url":"https://api.github.com/repos/KDAB/hotspot/pulls/22","id":103487911,"html_url":"https://github.com/KDAB/hotspot/pull/22","diff_url":"https://github.com/KDAB/hotspot/pull/22.diff","patch_url":"https://github.com/KDAB/hotspot/pull/22.patch","issue_url":"https://api.github.com/repos/KDAB/hotspot/issues/22","number":22,"state":"open","locked":false,"title":"Add data to summary tab","user":{"login":"nwrogers","id":24959653,"avatar_url":"https://avatars.githubusercontent.com/u/24959653?v=3","gravatar_id":"","url":"https://api.github.com/users/nwrogers","html_url":"https://github.com/nwrogers","followers_url":"https://api.github.com/users/nwrogers/followers","following_url":"https://api.github.com/users/nwrogers/following{/other_user}","gists_url":"https://api.github.com/users/nwrogers/gists{/gist_id}","starred_url":"https://api.github.com/users/nwrogers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwrogers/subscriptions","organizations_url":"https://api.github.com/users/nwrogers/orgs","repos_url":"https://api.github.com/users/nwrogers/repos","events_url":"https://api.github.com/users/nwrogers/events{/privacy}","received_events_url":"https://api.github.com/users/nwrogers/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-01-27T13:00:04Z","updated_at":"2017-01-30T12:32:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3fb89c46257f7665ebd49ed4455b71fb6cc78886","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/KDAB/hotspot/pulls/22/commits","review_comments_url":"https://api.github.com/repos/KDAB/hotspot/pulls/22/comments","review_comment_url":"https://api.github.com/repos/KDAB/hotspot/pulls/comments{/number}","comments_url":"https://api.github.com/repos/KDAB/hotspot/issues/22/comments","statuses_url":"https://api.github.com/repos/KDAB/hotspot/statuses/2bdc82e19a4cba2c7a77498092da1c7abc181f14","head":{"label":"nwrogers:summary-tab","ref":"summary-tab","sha":"2bdc82e19a4cba2c7a77498092da1c7abc181f14","user":{"login":"nwrogers","id":24959653,"avatar_url":"https://avatars.githubusercontent.com/u/24959653?v=3","gravatar_id":"","url":"https://api.github.com/users/nwrogers","html_url":"https://github.com/nwrogers","followers_url":"https://api.github.com/users/nwrogers/followers","following_url":"https://api.github.com/users/nwrogers/following{/other_user}","gists_url":"https://api.github.com/users/nwrogers/gists{/gist_id}","starred_url":"https://api.github.com/users/nwrogers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwrogers/subscriptions","organizations_url":"https://api.github.com/users/nwrogers/orgs","repos_url":"https://api.github.com/users/nwrogers/repos","events_url":"https://api.github.com/users/nwrogers/events{/privacy}","received_events_url":"https://api.github.com/users/nwrogers/received_events","type":"User","site_admin":false},"repo":{"id":78857753,"name":"hotspot","full_name":"nwrogers/hotspot","owner":{"login":"nwrogers","id":24959653,"avatar_url":"https://avatars.githubusercontent.com/u/24959653?v=3","gravatar_id":"","url":"https://api.github.com/users/nwrogers","html_url":"https://github.com/nwrogers","followers_url":"https://api.github.com/users/nwrogers/followers","following_url":"https://api.github.com/users/nwrogers/following{/other_user}","gists_url":"https://api.github.com/users/nwrogers/gists{/gist_id}","starred_url":"https://api.github.com/users/nwrogers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nwrogers/subscriptions","organizations_url":"https://api.github.com/users/nwrogers/orgs","repos_url":"https://api.github.com/users/nwrogers/repos","events_url":"https://api.github.com/users/nwrogers/events{/privacy}","received_events_url":"https://api.github.com/users/nwrogers/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/nwrogers/hotspot","description":"The Qt GUI for performance analysis.","fork":true,"url":"https://api.github.com/repos/nwrogers/hotspot","forks_url":"https://api.github.com/repos/nwrogers/hotspot/forks","keys_url":"https://api.github.com/repos/nwrogers/hotspot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nwrogers/hotspot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nwrogers/hotspot/teams","hooks_url":"https://api.github.com/repos/nwrogers/hotspot/hooks","issue_events_url":"https://api.github.com/repos/nwrogers/hotspot/issues/events{/number}","events_url":"https://api.github.com/repos/nwrogers/hotspot/events","assignees_url":"https://api.github.com/repos/nwrogers/hotspot/assignees{/user}","branches_url":"https://api.github.com/repos/nwrogers/hotspot/branches{/branch}","tags_url":"https://api.github.com/repos/nwrogers/hotspot/tags","blobs_url":"https://api.github.com/repos/nwrogers/hotspot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nwrogers/hotspot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nwrogers/hotspot/git/refs{/sha}","trees_url":"https://api.github.com/repos/nwrogers/hotspot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nwrogers/hotspot/statuses/{sha}","languages_url":"https://api.github.com/repos/nwrogers/hotspot/languages","stargazers_url":"https://api.github.com/repos/nwrogers/hotspot/stargazers","contributors_url":"https://api.github.com/repos/nwrogers/hotspot/contributors","subscribers_url":"https://api.github.com/repos/nwrogers/hotspot/subscribers","subscription_url":"https://api.github.com/repos/nwrogers/hotspot/subscription","commits_url":"https://api.github.com/repos/nwrogers/hotspot/commits{/sha}","git_commits_url":"https://api.github.com/repos/nwrogers/hotspot/git/commits{/sha}","comments_url":"https://api.github.com/repos/nwrogers/hotspot/comments{/number}","issue_comment_url":"https://api.github.com/repos/nwrogers/hotspot/issues/comments{/number}","contents_url":"https://api.github.com/repos/nwrogers/hotspot/contents/{+path}","compare_url":"https://api.github.com/repos/nwrogers/hotspot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nwrogers/hotspot/merges","archive_url":"https://api.github.com/repos/nwrogers/hotspot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nwrogers/hotspot/downloads","issues_url":"https://api.github.com/repos/nwrogers/hotspot/issues{/number}","pulls_url":"https://api.github.com/repos/nwrogers/hotspot/pulls{/number}","milestones_url":"https://api.github.com/repos/nwrogers/hotspot/milestones{/number}","notifications_url":"https://api.github.com/repos/nwrogers/hotspot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nwrogers/hotspot/labels{/name}","releases_url":"https://api.github.com/repos/nwrogers/hotspot/releases{/id}","deployments_url":"https://api.github.com/repos/nwrogers/hotspot/deployments","created_at":"2017-01-13T14:46:53Z","updated_at":"2017-01-13T14:46:55Z","pushed_at":"2017-01-30T05:49:18Z","git_url":"git://github.com/nwrogers/hotspot.git","ssh_url":"git@github.com:nwrogers/hotspot.git","clone_url":"https://github.com/nwrogers/hotspot.git","svn_url":"https://github.com/nwrogers/hotspot","homepage":null,"size":89,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"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":"KDAB:master","ref":"master","sha":"9265847cbdd6888c04c4d29f7b941b1e8197c9a5","user":{"login":"KDAB","id":402842,"avatar_url":"https://avatars.githubusercontent.com/u/402842?v=3","gravatar_id":"","url":"https://api.github.com/users/KDAB","html_url":"https://github.com/KDAB","followers_url":"https://api.github.com/users/KDAB/followers","following_url":"https://api.github.com/users/KDAB/following{/other_user}","gists_url":"https://api.github.com/users/KDAB/gists{/gist_id}","starred_url":"https://api.github.com/users/KDAB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KDAB/subscriptions","organizations_url":"https://api.github.com/users/KDAB/orgs","repos_url":"https://api.github.com/users/KDAB/repos","events_url":"https://api.github.com/users/KDAB/events{/privacy}","received_events_url":"https://api.github.com/users/KDAB/received_events","type":"Organization","site_admin":false},"repo":{"id":76978254,"name":"hotspot","full_name":"KDAB/hotspot","owner":{"login":"KDAB","id":402842,"avatar_url":"https://avatars.githubusercontent.com/u/402842?v=3","gravatar_id":"","url":"https://api.github.com/users/KDAB","html_url":"https://github.com/KDAB","followers_url":"https://api.github.com/users/KDAB/followers","following_url":"https://api.github.com/users/KDAB/following{/other_user}","gists_url":"https://api.github.com/users/KDAB/gists{/gist_id}","starred_url":"https://api.github.com/users/KDAB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/KDAB/subscriptions","organizations_url":"https://api.github.com/users/KDAB/orgs","repos_url":"https://api.github.com/users/KDAB/repos","events_url":"https://api.github.com/users/KDAB/events{/privacy}","received_events_url":"https://api.github.com/users/KDAB/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/KDAB/hotspot","description":"The Qt GUI for performance analysis.","fork":false,"url":"https://api.github.com/repos/KDAB/hotspot","forks_url":"https://api.github.com/repos/KDAB/hotspot/forks","keys_url":"https://api.github.com/repos/KDAB/hotspot/keys{/key_id}","collaborators_url":"https://api.github.com/repos/KDAB/hotspot/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/KDAB/hotspot/teams","hooks_url":"https://api.github.com/repos/KDAB/hotspot/hooks","issue_events_url":"https://api.github.com/repos/KDAB/hotspot/issues/events{/number}","events_url":"https://api.github.com/repos/KDAB/hotspot/events","assignees_url":"https://api.github.com/repos/KDAB/hotspot/assignees{/user}","branches_url":"https://api.github.com/repos/KDAB/hotspot/branches{/branch}","tags_url":"https://api.github.com/repos/KDAB/hotspot/tags","blobs_url":"https://api.github.com/repos/KDAB/hotspot/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/KDAB/hotspot/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/KDAB/hotspot/git/refs{/sha}","trees_url":"https://api.github.com/repos/KDAB/hotspot/git/trees{/sha}","statuses_url":"https://api.github.com/repos/KDAB/hotspot/statuses/{sha}","languages_url":"https://api.github.com/repos/KDAB/hotspot/languages","stargazers_url":"https://api.github.com/repos/KDAB/hotspot/stargazers","contributors_url":"https://api.github.com/repos/KDAB/hotspot/contributors","subscribers_url":"https://api.github.com/repos/KDAB/hotspot/subscribers","subscription_url":"https://api.github.com/repos/KDAB/hotspot/subscription","commits_url":"https://api.github.com/repos/KDAB/hotspot/commits{/sha}","git_commits_url":"https://api.github.com/repos/KDAB/hotspot/git/commits{/sha}","comments_url":"https://api.github.com/repos/KDAB/hotspot/comments{/number}","issue_comment_url":"https://api.github.com/repos/KDAB/hotspot/issues/comments{/number}","contents_url":"https://api.github.com/repos/KDAB/hotspot/contents/{+path}","compare_url":"https://api.github.com/repos/KDAB/hotspot/compare/{base}...{head}","merges_url":"https://api.github.com/repos/KDAB/hotspot/merges","archive_url":"https://api.github.com/repos/KDAB/hotspot/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/KDAB/hotspot/downloads","issues_url":"https://api.github.com/repos/KDAB/hotspot/issues{/number}","pulls_url":"https://api.github.com/repos/KDAB/hotspot/pulls{/number}","milestones_url":"https://api.github.com/repos/KDAB/hotspot/milestones{/number}","notifications_url":"https://api.github.com/repos/KDAB/hotspot/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/KDAB/hotspot/labels{/name}","releases_url":"https://api.github.com/repos/KDAB/hotspot/releases{/id}","deployments_url":"https://api.github.com/repos/KDAB/hotspot/deployments","created_at":"2016-12-20T17:38:04Z","updated_at":"2017-01-26T16:02:42Z","pushed_at":"2017-01-30T05:49:19Z","git_url":"git://github.com/KDAB/hotspot.git","ssh_url":"git@github.com:KDAB/hotspot.git","clone_url":"https://github.com/KDAB/hotspot.git","svn_url":"https://github.com/KDAB/hotspot","homepage":null,"size":84,"stargazers_count":6,"watchers_count":6,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":18,"forks":1,"open_issues":18,"watchers":6,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/KDAB/hotspot/pulls/22"},"html":{"href":"https://github.com/KDAB/hotspot/pull/22"},"issue":{"href":"https://api.github.com/repos/KDAB/hotspot/issues/22"},"comments":{"href":"https://api.github.com/repos/KDAB/hotspot/issues/22/comments"},"review_comments":{"href":"https://api.github.com/repos/KDAB/hotspot/pulls/22/comments"},"review_comment":{"href":"https://api.github.com/repos/KDAB/hotspot/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/KDAB/hotspot/pulls/22/commits"},"statuses":{"href":"https://api.github.com/repos/KDAB/hotspot/statuses/2bdc82e19a4cba2c7a77498092da1c7abc181f14"}}}}
{"actor":{"display_login":"milianw"}}