{"action":"created","comment":{"url":"https://api.github.com/repos/bdoin/GCompris-qt/pulls/comments/50875721","id":50875721,"diff_hunk":"@@ -272,4 +275,73 @@ void ActivityInfoTree::init()\n     qmlRegisterSingletonType<QObject>(\"GCompris\", 1, 0, \"ActivityInfoTree\", menuTreeProvider);\n     qmlRegisterType<ActivityInfo>(\"GCompris\", 1, 0, \"ActivityInfo\");\n }\n+void ActivityInfoTree::beginsearch()\n+{\n+\n+     m_menuTree = m_searched;\n+     emit menuTreeChanged();\n+     m_mainWindow = ApplicationInfo::getWindow()->findChild<QObject*>(\"menu\");\n+     QObject::connect(m_mainWindow,SIGNAL(textchanged(QString)),this,SLOT(display(QString)));\n \n+}\n+void ActivityInfoTree::display(QString text)\n+{\n+    int end,length,start = 0;\n+\n+\n+\n+       searchedtext = text;\n+       end = m_menuTreeFulltemp.length();\n+       length = text.length(); // length of the  string . i.e text in the textfield\n+       m_menuTree.clear();\n+\n+       // templength = length of string that was there in the textfield before the present string\n+       // if user erases a character from a string ,the search needs to be performed on all the activities\n+       if(length < templength)\n+       {\n+\n+           m_menuTreeFulltemp = m_menuTreeFull;\n+           end = m_menuTreeFulltemp.length();\n+       }\n+\n+       if(text.trimmed() == \"\")","path":"src/core/ActivityInfoTree.cpp","position":50,"original_position":50,"commit_id":"b8cad02f1ced9fc7e26b92f0c2d4f609331f0506","original_commit_id":"b8cad02f1ced9fc7e26b92f0c2d4f609331f0506","user":{"login":"rish9511","id":10898272,"avatar_url":"https://avatars.githubusercontent.com/u/10898272?v=3","gravatar_id":"","url":"https://api.github.com/users/rish9511","html_url":"https://github.com/rish9511","followers_url":"https://api.github.com/users/rish9511/followers","following_url":"https://api.github.com/users/rish9511/following{/other_user}","gists_url":"https://api.github.com/users/rish9511/gists{/gist_id}","starred_url":"https://api.github.com/users/rish9511/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rish9511/subscriptions","organizations_url":"https://api.github.com/users/rish9511/orgs","repos_url":"https://api.github.com/users/rish9511/repos","events_url":"https://api.github.com/users/rish9511/events{/privacy}","received_events_url":"https://api.github.com/users/rish9511/received_events","type":"User","site_admin":false},"body":"empty and trimmed will behave same in this case ","created_at":"2016-01-26T18:18:20Z","updated_at":"2016-01-26T18:18:20Z","html_url":"https://github.com/bdoin/GCompris-qt/pull/110#discussion_r50875721","pull_request_url":"https://api.github.com/repos/bdoin/GCompris-qt/pulls/110","_links":{"self":{"href":"https://api.github.com/repos/bdoin/GCompris-qt/pulls/comments/50875721"},"html":{"href":"https://github.com/bdoin/GCompris-qt/pull/110#discussion_r50875721"},"pull_request":{"href":"https://api.github.com/repos/bdoin/GCompris-qt/pulls/110"}}},"pull_request":{"url":"https://api.github.com/repos/bdoin/GCompris-qt/pulls/110","id":56915408,"html_url":"https://github.com/bdoin/GCompris-qt/pull/110","diff_url":"https://github.com/bdoin/GCompris-qt/pull/110.diff","patch_url":"https://github.com/bdoin/GCompris-qt/pull/110.patch","issue_url":"https://api.github.com/repos/bdoin/GCompris-qt/issues/110","number":110,"state":"open","locked":false,"title":"Searchfeature","user":{"login":"rish9511","id":10898272,"avatar_url":"https://avatars.githubusercontent.com/u/10898272?v=3","gravatar_id":"","url":"https://api.github.com/users/rish9511","html_url":"https://github.com/rish9511","followers_url":"https://api.github.com/users/rish9511/followers","following_url":"https://api.github.com/users/rish9511/following{/other_user}","gists_url":"https://api.github.com/users/rish9511/gists{/gist_id}","starred_url":"https://api.github.com/users/rish9511/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rish9511/subscriptions","organizations_url":"https://api.github.com/users/rish9511/orgs","repos_url":"https://api.github.com/users/rish9511/repos","events_url":"https://api.github.com/users/rish9511/events{/privacy}","received_events_url":"https://api.github.com/users/rish9511/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-01-22T17:15:36Z","updated_at":"2016-01-26T18:18:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3923e250242988863f059f65ad284735243de31a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/bdoin/GCompris-qt/pulls/110/commits","review_comments_url":"https://api.github.com/repos/bdoin/GCompris-qt/pulls/110/comments","review_comment_url":"https://api.github.com/repos/bdoin/GCompris-qt/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bdoin/GCompris-qt/issues/110/comments","statuses_url":"https://api.github.com/repos/bdoin/GCompris-qt/statuses/b8cad02f1ced9fc7e26b92f0c2d4f609331f0506","head":{"label":"rish9511:searchfeature","ref":"searchfeature","sha":"b8cad02f1ced9fc7e26b92f0c2d4f609331f0506","user":{"login":"rish9511","id":10898272,"avatar_url":"https://avatars.githubusercontent.com/u/10898272?v=3","gravatar_id":"","url":"https://api.github.com/users/rish9511","html_url":"https://github.com/rish9511","followers_url":"https://api.github.com/users/rish9511/followers","following_url":"https://api.github.com/users/rish9511/following{/other_user}","gists_url":"https://api.github.com/users/rish9511/gists{/gist_id}","starred_url":"https://api.github.com/users/rish9511/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rish9511/subscriptions","organizations_url":"https://api.github.com/users/rish9511/orgs","repos_url":"https://api.github.com/users/rish9511/repos","events_url":"https://api.github.com/users/rish9511/events{/privacy}","received_events_url":"https://api.github.com/users/rish9511/received_events","type":"User","site_admin":false},"repo":{"id":44609002,"name":"GCompris-qt","full_name":"rish9511/GCompris-qt","owner":{"login":"rish9511","id":10898272,"avatar_url":"https://avatars.githubusercontent.com/u/10898272?v=3","gravatar_id":"","url":"https://api.github.com/users/rish9511","html_url":"https://github.com/rish9511","followers_url":"https://api.github.com/users/rish9511/followers","following_url":"https://api.github.com/users/rish9511/following{/other_user}","gists_url":"https://api.github.com/users/rish9511/gists{/gist_id}","starred_url":"https://api.github.com/users/rish9511/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rish9511/subscriptions","organizations_url":"https://api.github.com/users/rish9511/orgs","repos_url":"https://api.github.com/users/rish9511/repos","events_url":"https://api.github.com/users/rish9511/events{/privacy}","received_events_url":"https://api.github.com/users/rish9511/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rish9511/GCompris-qt","description":"GCompris in Qt Quick","fork":true,"url":"https://api.github.com/repos/rish9511/GCompris-qt","forks_url":"https://api.github.com/repos/rish9511/GCompris-qt/forks","keys_url":"https://api.github.com/repos/rish9511/GCompris-qt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rish9511/GCompris-qt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rish9511/GCompris-qt/teams","hooks_url":"https://api.github.com/repos/rish9511/GCompris-qt/hooks","issue_events_url":"https://api.github.com/repos/rish9511/GCompris-qt/issues/events{/number}","events_url":"https://api.github.com/repos/rish9511/GCompris-qt/events","assignees_url":"https://api.github.com/repos/rish9511/GCompris-qt/assignees{/user}","branches_url":"https://api.github.com/repos/rish9511/GCompris-qt/branches{/branch}","tags_url":"https://api.github.com/repos/rish9511/GCompris-qt/tags","blobs_url":"https://api.github.com/repos/rish9511/GCompris-qt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rish9511/GCompris-qt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rish9511/GCompris-qt/git/refs{/sha}","trees_url":"https://api.github.com/repos/rish9511/GCompris-qt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rish9511/GCompris-qt/statuses/{sha}","languages_url":"https://api.github.com/repos/rish9511/GCompris-qt/languages","stargazers_url":"https://api.github.com/repos/rish9511/GCompris-qt/stargazers","contributors_url":"https://api.github.com/repos/rish9511/GCompris-qt/contributors","subscribers_url":"https://api.github.com/repos/rish9511/GCompris-qt/subscribers","subscription_url":"https://api.github.com/repos/rish9511/GCompris-qt/subscription","commits_url":"https://api.github.com/repos/rish9511/GCompris-qt/commits{/sha}","git_commits_url":"https://api.github.com/repos/rish9511/GCompris-qt/git/commits{/sha}","comments_url":"https://api.github.com/repos/rish9511/GCompris-qt/comments{/number}","issue_comment_url":"https://api.github.com/repos/rish9511/GCompris-qt/issues/comments{/number}","contents_url":"https://api.github.com/repos/rish9511/GCompris-qt/contents/{+path}","compare_url":"https://api.github.com/repos/rish9511/GCompris-qt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rish9511/GCompris-qt/merges","archive_url":"https://api.github.com/repos/rish9511/GCompris-qt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rish9511/GCompris-qt/downloads","issues_url":"https://api.github.com/repos/rish9511/GCompris-qt/issues{/number}","pulls_url":"https://api.github.com/repos/rish9511/GCompris-qt/pulls{/number}","milestones_url":"https://api.github.com/repos/rish9511/GCompris-qt/milestones{/number}","notifications_url":"https://api.github.com/repos/rish9511/GCompris-qt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rish9511/GCompris-qt/labels{/name}","releases_url":"https://api.github.com/repos/rish9511/GCompris-qt/releases{/id}","deployments_url":"https://api.github.com/repos/rish9511/GCompris-qt/deployments","created_at":"2015-10-20T13:42:17Z","updated_at":"2015-10-20T13:42:25Z","pushed_at":"2016-01-22T09:03:06Z","git_url":"git://github.com/rish9511/GCompris-qt.git","ssh_url":"git@github.com:rish9511/GCompris-qt.git","clone_url":"https://github.com/rish9511/GCompris-qt.git","svn_url":"https://github.com/rish9511/GCompris-qt","homepage":null,"size":88028,"stargazers_count":0,"watchers_count":0,"language":"QML","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":"bdoin:master","ref":"master","sha":"63ca598696968a7ea03ff7e2e0806d82420fd5fa","user":{"login":"bdoin","id":1623942,"avatar_url":"https://avatars.githubusercontent.com/u/1623942?v=3","gravatar_id":"","url":"https://api.github.com/users/bdoin","html_url":"https://github.com/bdoin","followers_url":"https://api.github.com/users/bdoin/followers","following_url":"https://api.github.com/users/bdoin/following{/other_user}","gists_url":"https://api.github.com/users/bdoin/gists{/gist_id}","starred_url":"https://api.github.com/users/bdoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdoin/subscriptions","organizations_url":"https://api.github.com/users/bdoin/orgs","repos_url":"https://api.github.com/users/bdoin/repos","events_url":"https://api.github.com/users/bdoin/events{/privacy}","received_events_url":"https://api.github.com/users/bdoin/received_events","type":"User","site_admin":false},"repo":{"id":16627197,"name":"GCompris-qt","full_name":"bdoin/GCompris-qt","owner":{"login":"bdoin","id":1623942,"avatar_url":"https://avatars.githubusercontent.com/u/1623942?v=3","gravatar_id":"","url":"https://api.github.com/users/bdoin","html_url":"https://github.com/bdoin","followers_url":"https://api.github.com/users/bdoin/followers","following_url":"https://api.github.com/users/bdoin/following{/other_user}","gists_url":"https://api.github.com/users/bdoin/gists{/gist_id}","starred_url":"https://api.github.com/users/bdoin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdoin/subscriptions","organizations_url":"https://api.github.com/users/bdoin/orgs","repos_url":"https://api.github.com/users/bdoin/repos","events_url":"https://api.github.com/users/bdoin/events{/privacy}","received_events_url":"https://api.github.com/users/bdoin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bdoin/GCompris-qt","description":"GCompris in Qt Quick","fork":false,"url":"https://api.github.com/repos/bdoin/GCompris-qt","forks_url":"https://api.github.com/repos/bdoin/GCompris-qt/forks","keys_url":"https://api.github.com/repos/bdoin/GCompris-qt/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bdoin/GCompris-qt/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bdoin/GCompris-qt/teams","hooks_url":"https://api.github.com/repos/bdoin/GCompris-qt/hooks","issue_events_url":"https://api.github.com/repos/bdoin/GCompris-qt/issues/events{/number}","events_url":"https://api.github.com/repos/bdoin/GCompris-qt/events","assignees_url":"https://api.github.com/repos/bdoin/GCompris-qt/assignees{/user}","branches_url":"https://api.github.com/repos/bdoin/GCompris-qt/branches{/branch}","tags_url":"https://api.github.com/repos/bdoin/GCompris-qt/tags","blobs_url":"https://api.github.com/repos/bdoin/GCompris-qt/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bdoin/GCompris-qt/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bdoin/GCompris-qt/git/refs{/sha}","trees_url":"https://api.github.com/repos/bdoin/GCompris-qt/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bdoin/GCompris-qt/statuses/{sha}","languages_url":"https://api.github.com/repos/bdoin/GCompris-qt/languages","stargazers_url":"https://api.github.com/repos/bdoin/GCompris-qt/stargazers","contributors_url":"https://api.github.com/repos/bdoin/GCompris-qt/contributors","subscribers_url":"https://api.github.com/repos/bdoin/GCompris-qt/subscribers","subscription_url":"https://api.github.com/repos/bdoin/GCompris-qt/subscription","commits_url":"https://api.github.com/repos/bdoin/GCompris-qt/commits{/sha}","git_commits_url":"https://api.github.com/repos/bdoin/GCompris-qt/git/commits{/sha}","comments_url":"https://api.github.com/repos/bdoin/GCompris-qt/comments{/number}","issue_comment_url":"https://api.github.com/repos/bdoin/GCompris-qt/issues/comments{/number}","contents_url":"https://api.github.com/repos/bdoin/GCompris-qt/contents/{+path}","compare_url":"https://api.github.com/repos/bdoin/GCompris-qt/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bdoin/GCompris-qt/merges","archive_url":"https://api.github.com/repos/bdoin/GCompris-qt/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bdoin/GCompris-qt/downloads","issues_url":"https://api.github.com/repos/bdoin/GCompris-qt/issues{/number}","pulls_url":"https://api.github.com/repos/bdoin/GCompris-qt/pulls{/number}","milestones_url":"https://api.github.com/repos/bdoin/GCompris-qt/milestones{/number}","notifications_url":"https://api.github.com/repos/bdoin/GCompris-qt/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bdoin/GCompris-qt/labels{/name}","releases_url":"https://api.github.com/repos/bdoin/GCompris-qt/releases{/id}","deployments_url":"https://api.github.com/repos/bdoin/GCompris-qt/deployments","created_at":"2014-02-07T20:54:57Z","updated_at":"2016-01-12T17:39:08Z","pushed_at":"2016-01-26T08:10:06Z","git_url":"git://github.com/bdoin/GCompris-qt.git","ssh_url":"git@github.com:bdoin/GCompris-qt.git","clone_url":"https://github.com/bdoin/GCompris-qt.git","svn_url":"https://github.com/bdoin/GCompris-qt","homepage":null,"size":165840,"stargazers_count":47,"watchers_count":47,"language":"QML","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":62,"mirror_url":null,"open_issues_count":1,"forks":62,"open_issues":1,"watchers":47,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bdoin/GCompris-qt/pulls/110"},"html":{"href":"https://github.com/bdoin/GCompris-qt/pull/110"},"issue":{"href":"https://api.github.com/repos/bdoin/GCompris-qt/issues/110"},"comments":{"href":"https://api.github.com/repos/bdoin/GCompris-qt/issues/110/comments"},"review_comments":{"href":"https://api.github.com/repos/bdoin/GCompris-qt/pulls/110/comments"},"review_comment":{"href":"https://api.github.com/repos/bdoin/GCompris-qt/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bdoin/GCompris-qt/pulls/110/commits"},"statuses":{"href":"https://api.github.com/repos/bdoin/GCompris-qt/statuses/b8cad02f1ced9fc7e26b92f0c2d4f609331f0506"}}}}