{"action":"created","comment":{"url":"https://api.github.com/repos/equalsraf/neovim-qt/pulls/comments/243687225","pull_request_review_id":187532193,"id":243687225,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDI0MzY4NzIyNQ==","diff_hunk":"@@ -0,0 +1,79 @@\n+#include \"treeview.h\"\n+\n+#include <QDir>\n+#include <QHeaderView>\n+#include <QKeyEvent>\n+#include <QProcess>\n+#include <QStandardPaths>\n+\n+namespace NeovimQt {\n+TreeView::TreeView(NeovimConnector *nvim, QWidget *parent)\n+    : QTreeView(parent), m_nvim(nvim) {\n+  model = new QFileSystemModel(this);\n+\n+  setModel(model);\n+\n+  header()->hide();\n+  // FIXME: MAGIC NUMBER!!\n+  for (int i = 1; i < 5; i++) {\n+    hideColumn(i);\n+  }\n+\n+  if (m_nvim->isReady()) {\n+    connector_ready_cb();\n+  }\n+  connect(m_nvim, &NeovimConnector::ready, this, &TreeView::connector_ready_cb);\n+}\n+\n+void TreeView::connector_ready_cb() {\n+  setDirectory(QStandardPaths::writableLocation(QStandardPaths::HomeLocation));\n+\n+  connect(this, &TreeView::doubleClicked, this, &TreeView::open);\n+\n+  connect(m_nvim->neovimObject(), &NeovimApi1::neovimNotification, this,\n+          &TreeView::handleNeovimNotification);\n+\n+  m_nvim->neovimObject()->vim_subscribe(\"Dir\");\n+  m_nvim->neovimObject()->vim_subscribe(\"TreeView\");\n+}\n+\n+void TreeView::open(const QModelIndex &index) {\n+  QFileInfo info = model->fileInfo(index);\n+  if (info.isFile() and info.isReadable()) {","path":"src/gui/treeview.cpp","position":42,"original_position":42,"commit_id":"ef96732e90051c54af5952762f165c43a59d17e0","original_commit_id":"ef96732e90051c54af5952762f165c43a59d17e0","user":{"login":"equalsraf","id":715238,"node_id":"MDQ6VXNlcjcxNTIzOA==","avatar_url":"https://avatars3.githubusercontent.com/u/715238?v=4","gravatar_id":"","url":"https://api.github.com/users/equalsraf","html_url":"https://github.com/equalsraf","followers_url":"https://api.github.com/users/equalsraf/followers","following_url":"https://api.github.com/users/equalsraf/following{/other_user}","gists_url":"https://api.github.com/users/equalsraf/gists{/gist_id}","starred_url":"https://api.github.com/users/equalsraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equalsraf/subscriptions","organizations_url":"https://api.github.com/users/equalsraf/orgs","repos_url":"https://api.github.com/users/equalsraf/repos","events_url":"https://api.github.com/users/equalsraf/events{/privacy}","received_events_url":"https://api.github.com/users/equalsraf/received_events","type":"User","site_admin":false},"body":"&&","created_at":"2018-12-21T20:39:32Z","updated_at":"2018-12-21T20:39:32Z","html_url":"https://github.com/equalsraf/neovim-qt/pull/484#discussion_r243687225","pull_request_url":"https://api.github.com/repos/equalsraf/neovim-qt/pulls/484","author_association":"OWNER","_links":{"self":{"href":"https://api.github.com/repos/equalsraf/neovim-qt/pulls/comments/243687225"},"html":{"href":"https://github.com/equalsraf/neovim-qt/pull/484#discussion_r243687225"},"pull_request":{"href":"https://api.github.com/repos/equalsraf/neovim-qt/pulls/484"}}},"pull_request":{"url":"https://api.github.com/repos/equalsraf/neovim-qt/pulls/484","id":240416677,"node_id":"MDExOlB1bGxSZXF1ZXN0MjQwNDE2Njc3","html_url":"https://github.com/equalsraf/neovim-qt/pull/484","diff_url":"https://github.com/equalsraf/neovim-qt/pull/484.diff","patch_url":"https://github.com/equalsraf/neovim-qt/pull/484.patch","issue_url":"https://api.github.com/repos/equalsraf/neovim-qt/issues/484","number":484,"state":"open","locked":false,"title":"[WIP] Merge ferranpm project tree","user":{"login":"gagbo","id":10496163,"node_id":"MDQ6VXNlcjEwNDk2MTYz","avatar_url":"https://avatars0.githubusercontent.com/u/10496163?v=4","gravatar_id":"","url":"https://api.github.com/users/gagbo","html_url":"https://github.com/gagbo","followers_url":"https://api.github.com/users/gagbo/followers","following_url":"https://api.github.com/users/gagbo/following{/other_user}","gists_url":"https://api.github.com/users/gagbo/gists{/gist_id}","starred_url":"https://api.github.com/users/gagbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagbo/subscriptions","organizations_url":"https://api.github.com/users/gagbo/orgs","repos_url":"https://api.github.com/users/gagbo/repos","events_url":"https://api.github.com/users/gagbo/events{/privacy}","received_events_url":"https://api.github.com/users/gagbo/received_events","type":"User","site_admin":false},"body":"I took over #254 as a starting point for adding a widget to a Qt application. At this point (feac4e6), the only difference with #254 is that I merged v0.2.11 into the branch.\r\n\r\nResolving conflicts meant : \r\n- changing the `NeovimQt::Neovim` namespace to `NeovimQt::NeovimApi1`\r\n- changing the constructor of TreeView to connect the initialization to the `NeovimConnector::ready` signal\r\n\r\nThere is still polishing to do :\r\n- Linting. I did not find a style file for the code so I messed up the style while saving the file (ignore whitespace changes for the time being). I'm currently running a format finder to produce a `.clang-format` file from v0.2.11 and I'll just apply that back on my PR (and make another PR to actually add this file to the repo)\r\n- The constructor should not connect to the signal, but instead check if the connector is ready so it can directly initialize if the Treeview is constructed later ?\r\n- Should we provide a better way to modularize the TreeView code (by that I mean provide the option of not compiling this part of the code) ?","created_at":"2018-12-21T09:27:25Z","updated_at":"2018-12-21T20:39:32Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34c3b5a882c48fa19004b03d2a1f89971f72f5c0","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/equalsraf/neovim-qt/pulls/484/commits","review_comments_url":"https://api.github.com/repos/equalsraf/neovim-qt/pulls/484/comments","review_comment_url":"https://api.github.com/repos/equalsraf/neovim-qt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/equalsraf/neovim-qt/issues/484/comments","statuses_url":"https://api.github.com/repos/equalsraf/neovim-qt/statuses/ef96732e90051c54af5952762f165c43a59d17e0","head":{"label":"gagbo:merge_ferranpm_project-tree","ref":"merge_ferranpm_project-tree","sha":"ef96732e90051c54af5952762f165c43a59d17e0","user":{"login":"gagbo","id":10496163,"node_id":"MDQ6VXNlcjEwNDk2MTYz","avatar_url":"https://avatars0.githubusercontent.com/u/10496163?v=4","gravatar_id":"","url":"https://api.github.com/users/gagbo","html_url":"https://github.com/gagbo","followers_url":"https://api.github.com/users/gagbo/followers","following_url":"https://api.github.com/users/gagbo/following{/other_user}","gists_url":"https://api.github.com/users/gagbo/gists{/gist_id}","starred_url":"https://api.github.com/users/gagbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagbo/subscriptions","organizations_url":"https://api.github.com/users/gagbo/orgs","repos_url":"https://api.github.com/users/gagbo/repos","events_url":"https://api.github.com/users/gagbo/events{/privacy}","received_events_url":"https://api.github.com/users/gagbo/received_events","type":"User","site_admin":false},"repo":{"id":162621324,"node_id":"MDEwOlJlcG9zaXRvcnkxNjI2MjEzMjQ=","name":"neovim-qt","full_name":"gagbo/neovim-qt","private":false,"owner":{"login":"gagbo","id":10496163,"node_id":"MDQ6VXNlcjEwNDk2MTYz","avatar_url":"https://avatars0.githubusercontent.com/u/10496163?v=4","gravatar_id":"","url":"https://api.github.com/users/gagbo","html_url":"https://github.com/gagbo","followers_url":"https://api.github.com/users/gagbo/followers","following_url":"https://api.github.com/users/gagbo/following{/other_user}","gists_url":"https://api.github.com/users/gagbo/gists{/gist_id}","starred_url":"https://api.github.com/users/gagbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gagbo/subscriptions","organizations_url":"https://api.github.com/users/gagbo/orgs","repos_url":"https://api.github.com/users/gagbo/repos","events_url":"https://api.github.com/users/gagbo/events{/privacy}","received_events_url":"https://api.github.com/users/gagbo/received_events","type":"User","site_admin":false},"html_url":"https://github.com/gagbo/neovim-qt","description":"Neovim client library and GUI, in Qt5.","fork":true,"url":"https://api.github.com/repos/gagbo/neovim-qt","forks_url":"https://api.github.com/repos/gagbo/neovim-qt/forks","keys_url":"https://api.github.com/repos/gagbo/neovim-qt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gagbo/neovim-qt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gagbo/neovim-qt/teams","hooks_url":"https://api.github.com/repos/gagbo/neovim-qt/hooks","issue_events_url":"https://api.github.com/repos/gagbo/neovim-qt/issues/events{/number}","events_url":"https://api.github.com/repos/gagbo/neovim-qt/events","assignees_url":"https://api.github.com/repos/gagbo/neovim-qt/assignees{/user}","branches_url":"https://api.github.com/repos/gagbo/neovim-qt/branches{/branch}","tags_url":"https://api.github.com/repos/gagbo/neovim-qt/tags","blobs_url":"https://api.github.com/repos/gagbo/neovim-qt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gagbo/neovim-qt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gagbo/neovim-qt/git/refs{/sha}","trees_url":"https://api.github.com/repos/gagbo/neovim-qt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gagbo/neovim-qt/statuses/{sha}","languages_url":"https://api.github.com/repos/gagbo/neovim-qt/languages","stargazers_url":"https://api.github.com/repos/gagbo/neovim-qt/stargazers","contributors_url":"https://api.github.com/repos/gagbo/neovim-qt/contributors","subscribers_url":"https://api.github.com/repos/gagbo/neovim-qt/subscribers","subscription_url":"https://api.github.com/repos/gagbo/neovim-qt/subscription","commits_url":"https://api.github.com/repos/gagbo/neovim-qt/commits{/sha}","git_commits_url":"https://api.github.com/repos/gagbo/neovim-qt/git/commits{/sha}","comments_url":"https://api.github.com/repos/gagbo/neovim-qt/comments{/number}","issue_comment_url":"https://api.github.com/repos/gagbo/neovim-qt/issues/comments{/number}","contents_url":"https://api.github.com/repos/gagbo/neovim-qt/contents/{+path}","compare_url":"https://api.github.com/repos/gagbo/neovim-qt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gagbo/neovim-qt/merges","archive_url":"https://api.github.com/repos/gagbo/neovim-qt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gagbo/neovim-qt/downloads","issues_url":"https://api.github.com/repos/gagbo/neovim-qt/issues{/number}","pulls_url":"https://api.github.com/repos/gagbo/neovim-qt/pulls{/number}","milestones_url":"https://api.github.com/repos/gagbo/neovim-qt/milestones{/number}","notifications_url":"https://api.github.com/repos/gagbo/neovim-qt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gagbo/neovim-qt/labels{/name}","releases_url":"https://api.github.com/repos/gagbo/neovim-qt/releases{/id}","deployments_url":"https://api.github.com/repos/gagbo/neovim-qt/deployments","created_at":"2018-12-20T19:10:24Z","updated_at":"2018-12-20T19:10:26Z","pushed_at":"2018-12-21T17:51:08Z","git_url":"git://github.com/gagbo/neovim-qt.git","ssh_url":"git@github.com:gagbo/neovim-qt.git","clone_url":"https://github.com/gagbo/neovim-qt.git","svn_url":"https://github.com/gagbo/neovim-qt","homepage":"https://github.com/equalsraf/neovim-qt/wiki","size":22779,"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":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"equalsraf:master","ref":"master","sha":"b61b7c72f427c564b5d345a186d401fbc5b0cf92","user":{"login":"equalsraf","id":715238,"node_id":"MDQ6VXNlcjcxNTIzOA==","avatar_url":"https://avatars3.githubusercontent.com/u/715238?v=4","gravatar_id":"","url":"https://api.github.com/users/equalsraf","html_url":"https://github.com/equalsraf","followers_url":"https://api.github.com/users/equalsraf/followers","following_url":"https://api.github.com/users/equalsraf/following{/other_user}","gists_url":"https://api.github.com/users/equalsraf/gists{/gist_id}","starred_url":"https://api.github.com/users/equalsraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equalsraf/subscriptions","organizations_url":"https://api.github.com/users/equalsraf/orgs","repos_url":"https://api.github.com/users/equalsraf/repos","events_url":"https://api.github.com/users/equalsraf/events{/privacy}","received_events_url":"https://api.github.com/users/equalsraf/received_events","type":"User","site_admin":false},"repo":{"id":20190634,"node_id":"MDEwOlJlcG9zaXRvcnkyMDE5MDYzNA==","name":"neovim-qt","full_name":"equalsraf/neovim-qt","private":false,"owner":{"login":"equalsraf","id":715238,"node_id":"MDQ6VXNlcjcxNTIzOA==","avatar_url":"https://avatars3.githubusercontent.com/u/715238?v=4","gravatar_id":"","url":"https://api.github.com/users/equalsraf","html_url":"https://github.com/equalsraf","followers_url":"https://api.github.com/users/equalsraf/followers","following_url":"https://api.github.com/users/equalsraf/following{/other_user}","gists_url":"https://api.github.com/users/equalsraf/gists{/gist_id}","starred_url":"https://api.github.com/users/equalsraf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/equalsraf/subscriptions","organizations_url":"https://api.github.com/users/equalsraf/orgs","repos_url":"https://api.github.com/users/equalsraf/repos","events_url":"https://api.github.com/users/equalsraf/events{/privacy}","received_events_url":"https://api.github.com/users/equalsraf/received_events","type":"User","site_admin":false},"html_url":"https://github.com/equalsraf/neovim-qt","description":"Neovim client library and GUI, in Qt5.","fork":false,"url":"https://api.github.com/repos/equalsraf/neovim-qt","forks_url":"https://api.github.com/repos/equalsraf/neovim-qt/forks","keys_url":"https://api.github.com/repos/equalsraf/neovim-qt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/equalsraf/neovim-qt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/equalsraf/neovim-qt/teams","hooks_url":"https://api.github.com/repos/equalsraf/neovim-qt/hooks","issue_events_url":"https://api.github.com/repos/equalsraf/neovim-qt/issues/events{/number}","events_url":"https://api.github.com/repos/equalsraf/neovim-qt/events","assignees_url":"https://api.github.com/repos/equalsraf/neovim-qt/assignees{/user}","branches_url":"https://api.github.com/repos/equalsraf/neovim-qt/branches{/branch}","tags_url":"https://api.github.com/repos/equalsraf/neovim-qt/tags","blobs_url":"https://api.github.com/repos/equalsraf/neovim-qt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/equalsraf/neovim-qt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/equalsraf/neovim-qt/git/refs{/sha}","trees_url":"https://api.github.com/repos/equalsraf/neovim-qt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/equalsraf/neovim-qt/statuses/{sha}","languages_url":"https://api.github.com/repos/equalsraf/neovim-qt/languages","stargazers_url":"https://api.github.com/repos/equalsraf/neovim-qt/stargazers","contributors_url":"https://api.github.com/repos/equalsraf/neovim-qt/contributors","subscribers_url":"https://api.github.com/repos/equalsraf/neovim-qt/subscribers","subscription_url":"https://api.github.com/repos/equalsraf/neovim-qt/subscription","commits_url":"https://api.github.com/repos/equalsraf/neovim-qt/commits{/sha}","git_commits_url":"https://api.github.com/repos/equalsraf/neovim-qt/git/commits{/sha}","comments_url":"https://api.github.com/repos/equalsraf/neovim-qt/comments{/number}","issue_comment_url":"https://api.github.com/repos/equalsraf/neovim-qt/issues/comments{/number}","contents_url":"https://api.github.com/repos/equalsraf/neovim-qt/contents/{+path}","compare_url":"https://api.github.com/repos/equalsraf/neovim-qt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/equalsraf/neovim-qt/merges","archive_url":"https://api.github.com/repos/equalsraf/neovim-qt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/equalsraf/neovim-qt/downloads","issues_url":"https://api.github.com/repos/equalsraf/neovim-qt/issues{/number}","pulls_url":"https://api.github.com/repos/equalsraf/neovim-qt/pulls{/number}","milestones_url":"https://api.github.com/repos/equalsraf/neovim-qt/milestones{/number}","notifications_url":"https://api.github.com/repos/equalsraf/neovim-qt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/equalsraf/neovim-qt/labels{/name}","releases_url":"https://api.github.com/repos/equalsraf/neovim-qt/releases{/id}","deployments_url":"https://api.github.com/repos/equalsraf/neovim-qt/deployments","created_at":"2014-05-26T15:31:34Z","updated_at":"2018-12-20T21:34:46Z","pushed_at":"2018-12-21T17:51:09Z","git_url":"git://github.com/equalsraf/neovim-qt.git","ssh_url":"git@github.com:equalsraf/neovim-qt.git","clone_url":"https://github.com/equalsraf/neovim-qt.git","svn_url":"https://github.com/equalsraf/neovim-qt","homepage":"https://github.com/equalsraf/neovim-qt/wiki","size":22709,"stargazers_count":685,"watchers_count":685,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":92,"mirror_url":null,"archived":false,"open_issues_count":111,"license":{"key":"isc","name":"ISC License","spdx_id":"ISC","url":"https://api.github.com/licenses/isc","node_id":"MDc6TGljZW5zZTEw"},"forks":92,"open_issues":111,"watchers":685,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/equalsraf/neovim-qt/pulls/484"},"html":{"href":"https://github.com/equalsraf/neovim-qt/pull/484"},"issue":{"href":"https://api.github.com/repos/equalsraf/neovim-qt/issues/484"},"comments":{"href":"https://api.github.com/repos/equalsraf/neovim-qt/issues/484/comments"},"review_comments":{"href":"https://api.github.com/repos/equalsraf/neovim-qt/pulls/484/comments"},"review_comment":{"href":"https://api.github.com/repos/equalsraf/neovim-qt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/equalsraf/neovim-qt/pulls/484/commits"},"statuses":{"href":"https://api.github.com/repos/equalsraf/neovim-qt/statuses/ef96732e90051c54af5952762f165c43a59d17e0"}},"author_association":"NONE"}}
{"actor":{"display_login":"equalsraf"}}