{"action":"created","comment":{"url":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/comments/59194707","id":59194707,"diff_hunk":"@@ -276,22 +276,42 @@ void PDFRenderThread::cancelRenderJob(int index)\n     }\n }\n \n+void PDFRenderThread::updateRenderJob(int index, int size, QRect subpart)\n+{\n+    // Look for a render job for this page, updating its size / subpart if necessary.\n+    QMutexLocker locker(&d->thread->mutex);\n+    for (QList<PDFJob *>::iterator it = d->thread->jobQueue->begin(); it != d->thread->jobQueue->end();) {\n+        PDFJob *j = *it;\n+        if (j->type() == PDFJob::RenderPageJob &&\n+            static_cast<RenderPageJob *>(j)->m_index == index) {\n+            RenderPageJob *rj = static_cast<RenderPageJob *>(j);\n+            rj->changeRenderWidth(size);\n+            rj->m_subpart = subpart;\n+            return;\n+        }\n+        ++it;\n+    }\n+    locker.unlock();","path":"pdf/pdfrenderthread.cpp","position":null,"original_position":19,"commit_id":"9c2dbe0f97a513daa5b49cc3c7f6e9cd7dd6f2c9","original_commit_id":"3fdd0c46735e8780d148e4ab5ec3a7524ba697e0","user":{"login":"dcaliste","id":5889532,"avatar_url":"https://avatars.githubusercontent.com/u/5889532?v=3","gravatar_id":"","url":"https://api.github.com/users/dcaliste","html_url":"https://github.com/dcaliste","followers_url":"https://api.github.com/users/dcaliste/followers","following_url":"https://api.github.com/users/dcaliste/following{/other_user}","gists_url":"https://api.github.com/users/dcaliste/gists{/gist_id}","starred_url":"https://api.github.com/users/dcaliste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcaliste/subscriptions","organizations_url":"https://api.github.com/users/dcaliste/orgs","repos_url":"https://api.github.com/users/dcaliste/repos","events_url":"https://api.github.com/users/dcaliste/events{/privacy}","received_events_url":"https://api.github.com/users/dcaliste/received_events","type":"User","site_admin":false},"body":"Sorry, this was WIP, not ready yet.","created_at":"2016-04-11T12:23:14Z","updated_at":"2016-04-11T12:23:14Z","html_url":"https://github.com/sailfishos/sailfish-office/pull/55#discussion_r59194707","pull_request_url":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/55","_links":{"self":{"href":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/comments/59194707"},"html":{"href":"https://github.com/sailfishos/sailfish-office/pull/55#discussion_r59194707"},"pull_request":{"href":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/55"}}},"pull_request":{"url":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/55","id":49543844,"html_url":"https://github.com/sailfishos/sailfish-office/pull/55","diff_url":"https://github.com/sailfishos/sailfish-office/pull/55.diff","patch_url":"https://github.com/sailfishos/sailfish-office/pull/55.patch","issue_url":"https://api.github.com/repos/sailfishos/sailfish-office/issues/55","number":55,"state":"open","locked":false,"title":"[office] Implement partial page rendering to allow unlimited zoom.","user":{"login":"dcaliste","id":5889532,"avatar_url":"https://avatars.githubusercontent.com/u/5889532?v=3","gravatar_id":"","url":"https://api.github.com/users/dcaliste","html_url":"https://github.com/dcaliste","followers_url":"https://api.github.com/users/dcaliste/followers","following_url":"https://api.github.com/users/dcaliste/following{/other_user}","gists_url":"https://api.github.com/users/dcaliste/gists{/gist_id}","starred_url":"https://api.github.com/users/dcaliste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcaliste/subscriptions","organizations_url":"https://api.github.com/users/dcaliste/orgs","repos_url":"https://api.github.com/users/dcaliste/repos","events_url":"https://api.github.com/users/dcaliste/events{/privacy}","received_events_url":"https://api.github.com/users/dcaliste/received_events","type":"User","site_admin":false},"body":"There is a TJC question about being able to increase the zoom level for PDFs : https://together.jolla.com/question/1763/unlimited-zoom-needed-in-document-viewer/\r\n\r\nThe limit is currently hardcoded in PDFView.qml, and set to 2.5. I understand that this limit is used to avoid having too big textures and limit memory consumption. But that would be convenient to be able to change this value anyway, knowing what we're doing. There is even a patch for patch manager to do this : https://openrepos.net/content/ancelad/patch-gallery-image-zoom . The patch, actually, uses a dconf key value instead of the hardcoded 2.5. So like that, one can create a GUI or even change via command line the setting.\r\n\r\nThe PR, I propose, just changes the hardcoded value for a dconf key (like the idea in the patch). The dconf key is loaded in PDFDocumentPage.qml (like the dconf key for the remember page position) so PDFView.qml is kept simple.\r\n\r\nWhat do you think, this PR may conciliate the memory consumption limit for everyone and the need of some to easily raises the limit in some cases (in a more robust way than a patch) ?","created_at":"2015-11-03T11:20:58Z","updated_at":"2016-04-11T12:23:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9d9973ee297f9c5b8c0dfcf921b629e14059442a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/55/commits","review_comments_url":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/55/comments","review_comment_url":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sailfishos/sailfish-office/issues/55/comments","statuses_url":"https://api.github.com/repos/sailfishos/sailfish-office/statuses/9c2dbe0f97a513daa5b49cc3c7f6e9cd7dd6f2c9","head":{"label":"dcaliste:zoom","ref":"zoom","sha":"9c2dbe0f97a513daa5b49cc3c7f6e9cd7dd6f2c9","user":{"login":"dcaliste","id":5889532,"avatar_url":"https://avatars.githubusercontent.com/u/5889532?v=3","gravatar_id":"","url":"https://api.github.com/users/dcaliste","html_url":"https://github.com/dcaliste","followers_url":"https://api.github.com/users/dcaliste/followers","following_url":"https://api.github.com/users/dcaliste/following{/other_user}","gists_url":"https://api.github.com/users/dcaliste/gists{/gist_id}","starred_url":"https://api.github.com/users/dcaliste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcaliste/subscriptions","organizations_url":"https://api.github.com/users/dcaliste/orgs","repos_url":"https://api.github.com/users/dcaliste/repos","events_url":"https://api.github.com/users/dcaliste/events{/privacy}","received_events_url":"https://api.github.com/users/dcaliste/received_events","type":"User","site_admin":false},"repo":{"id":32389480,"name":"sailfish-office","full_name":"dcaliste/sailfish-office","owner":{"login":"dcaliste","id":5889532,"avatar_url":"https://avatars.githubusercontent.com/u/5889532?v=3","gravatar_id":"","url":"https://api.github.com/users/dcaliste","html_url":"https://github.com/dcaliste","followers_url":"https://api.github.com/users/dcaliste/followers","following_url":"https://api.github.com/users/dcaliste/following{/other_user}","gists_url":"https://api.github.com/users/dcaliste/gists{/gist_id}","starred_url":"https://api.github.com/users/dcaliste/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dcaliste/subscriptions","organizations_url":"https://api.github.com/users/dcaliste/orgs","repos_url":"https://api.github.com/users/dcaliste/repos","events_url":"https://api.github.com/users/dcaliste/events{/privacy}","received_events_url":"https://api.github.com/users/dcaliste/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/dcaliste/sailfish-office","description":"Sailfish Office","fork":true,"url":"https://api.github.com/repos/dcaliste/sailfish-office","forks_url":"https://api.github.com/repos/dcaliste/sailfish-office/forks","keys_url":"https://api.github.com/repos/dcaliste/sailfish-office/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dcaliste/sailfish-office/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dcaliste/sailfish-office/teams","hooks_url":"https://api.github.com/repos/dcaliste/sailfish-office/hooks","issue_events_url":"https://api.github.com/repos/dcaliste/sailfish-office/issues/events{/number}","events_url":"https://api.github.com/repos/dcaliste/sailfish-office/events","assignees_url":"https://api.github.com/repos/dcaliste/sailfish-office/assignees{/user}","branches_url":"https://api.github.com/repos/dcaliste/sailfish-office/branches{/branch}","tags_url":"https://api.github.com/repos/dcaliste/sailfish-office/tags","blobs_url":"https://api.github.com/repos/dcaliste/sailfish-office/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dcaliste/sailfish-office/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dcaliste/sailfish-office/git/refs{/sha}","trees_url":"https://api.github.com/repos/dcaliste/sailfish-office/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dcaliste/sailfish-office/statuses/{sha}","languages_url":"https://api.github.com/repos/dcaliste/sailfish-office/languages","stargazers_url":"https://api.github.com/repos/dcaliste/sailfish-office/stargazers","contributors_url":"https://api.github.com/repos/dcaliste/sailfish-office/contributors","subscribers_url":"https://api.github.com/repos/dcaliste/sailfish-office/subscribers","subscription_url":"https://api.github.com/repos/dcaliste/sailfish-office/subscription","commits_url":"https://api.github.com/repos/dcaliste/sailfish-office/commits{/sha}","git_commits_url":"https://api.github.com/repos/dcaliste/sailfish-office/git/commits{/sha}","comments_url":"https://api.github.com/repos/dcaliste/sailfish-office/comments{/number}","issue_comment_url":"https://api.github.com/repos/dcaliste/sailfish-office/issues/comments{/number}","contents_url":"https://api.github.com/repos/dcaliste/sailfish-office/contents/{+path}","compare_url":"https://api.github.com/repos/dcaliste/sailfish-office/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dcaliste/sailfish-office/merges","archive_url":"https://api.github.com/repos/dcaliste/sailfish-office/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dcaliste/sailfish-office/downloads","issues_url":"https://api.github.com/repos/dcaliste/sailfish-office/issues{/number}","pulls_url":"https://api.github.com/repos/dcaliste/sailfish-office/pulls{/number}","milestones_url":"https://api.github.com/repos/dcaliste/sailfish-office/milestones{/number}","notifications_url":"https://api.github.com/repos/dcaliste/sailfish-office/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dcaliste/sailfish-office/labels{/name}","releases_url":"https://api.github.com/repos/dcaliste/sailfish-office/releases{/id}","deployments_url":"https://api.github.com/repos/dcaliste/sailfish-office/deployments","created_at":"2015-03-17T11:28:28Z","updated_at":"2016-01-14T11:31:20Z","pushed_at":"2016-04-11T12:19:09Z","git_url":"git://github.com/dcaliste/sailfish-office.git","ssh_url":"git@github.com:dcaliste/sailfish-office.git","clone_url":"https://github.com/dcaliste/sailfish-office.git","svn_url":"https://github.com/dcaliste/sailfish-office","homepage":null,"size":636,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"sailfishos:master","ref":"master","sha":"56e96002ff020a8782ed3cf5a5cb2a255827cfcc","user":{"login":"sailfishos","id":6198659,"avatar_url":"https://avatars.githubusercontent.com/u/6198659?v=3","gravatar_id":"","url":"https://api.github.com/users/sailfishos","html_url":"https://github.com/sailfishos","followers_url":"https://api.github.com/users/sailfishos/followers","following_url":"https://api.github.com/users/sailfishos/following{/other_user}","gists_url":"https://api.github.com/users/sailfishos/gists{/gist_id}","starred_url":"https://api.github.com/users/sailfishos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailfishos/subscriptions","organizations_url":"https://api.github.com/users/sailfishos/orgs","repos_url":"https://api.github.com/users/sailfishos/repos","events_url":"https://api.github.com/users/sailfishos/events{/privacy}","received_events_url":"https://api.github.com/users/sailfishos/received_events","type":"Organization","site_admin":false},"repo":{"id":20478568,"name":"sailfish-office","full_name":"sailfishos/sailfish-office","owner":{"login":"sailfishos","id":6198659,"avatar_url":"https://avatars.githubusercontent.com/u/6198659?v=3","gravatar_id":"","url":"https://api.github.com/users/sailfishos","html_url":"https://github.com/sailfishos","followers_url":"https://api.github.com/users/sailfishos/followers","following_url":"https://api.github.com/users/sailfishos/following{/other_user}","gists_url":"https://api.github.com/users/sailfishos/gists{/gist_id}","starred_url":"https://api.github.com/users/sailfishos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sailfishos/subscriptions","organizations_url":"https://api.github.com/users/sailfishos/orgs","repos_url":"https://api.github.com/users/sailfishos/repos","events_url":"https://api.github.com/users/sailfishos/events{/privacy}","received_events_url":"https://api.github.com/users/sailfishos/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/sailfishos/sailfish-office","description":"Sailfish Office","fork":false,"url":"https://api.github.com/repos/sailfishos/sailfish-office","forks_url":"https://api.github.com/repos/sailfishos/sailfish-office/forks","keys_url":"https://api.github.com/repos/sailfishos/sailfish-office/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sailfishos/sailfish-office/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sailfishos/sailfish-office/teams","hooks_url":"https://api.github.com/repos/sailfishos/sailfish-office/hooks","issue_events_url":"https://api.github.com/repos/sailfishos/sailfish-office/issues/events{/number}","events_url":"https://api.github.com/repos/sailfishos/sailfish-office/events","assignees_url":"https://api.github.com/repos/sailfishos/sailfish-office/assignees{/user}","branches_url":"https://api.github.com/repos/sailfishos/sailfish-office/branches{/branch}","tags_url":"https://api.github.com/repos/sailfishos/sailfish-office/tags","blobs_url":"https://api.github.com/repos/sailfishos/sailfish-office/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sailfishos/sailfish-office/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sailfishos/sailfish-office/git/refs{/sha}","trees_url":"https://api.github.com/repos/sailfishos/sailfish-office/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sailfishos/sailfish-office/statuses/{sha}","languages_url":"https://api.github.com/repos/sailfishos/sailfish-office/languages","stargazers_url":"https://api.github.com/repos/sailfishos/sailfish-office/stargazers","contributors_url":"https://api.github.com/repos/sailfishos/sailfish-office/contributors","subscribers_url":"https://api.github.com/repos/sailfishos/sailfish-office/subscribers","subscription_url":"https://api.github.com/repos/sailfishos/sailfish-office/subscription","commits_url":"https://api.github.com/repos/sailfishos/sailfish-office/commits{/sha}","git_commits_url":"https://api.github.com/repos/sailfishos/sailfish-office/git/commits{/sha}","comments_url":"https://api.github.com/repos/sailfishos/sailfish-office/comments{/number}","issue_comment_url":"https://api.github.com/repos/sailfishos/sailfish-office/issues/comments{/number}","contents_url":"https://api.github.com/repos/sailfishos/sailfish-office/contents/{+path}","compare_url":"https://api.github.com/repos/sailfishos/sailfish-office/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sailfishos/sailfish-office/merges","archive_url":"https://api.github.com/repos/sailfishos/sailfish-office/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sailfishos/sailfish-office/downloads","issues_url":"https://api.github.com/repos/sailfishos/sailfish-office/issues{/number}","pulls_url":"https://api.github.com/repos/sailfishos/sailfish-office/pulls{/number}","milestones_url":"https://api.github.com/repos/sailfishos/sailfish-office/milestones{/number}","notifications_url":"https://api.github.com/repos/sailfishos/sailfish-office/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sailfishos/sailfish-office/labels{/name}","releases_url":"https://api.github.com/repos/sailfishos/sailfish-office/releases{/id}","deployments_url":"https://api.github.com/repos/sailfishos/sailfish-office/deployments","created_at":"2014-06-04T10:08:14Z","updated_at":"2016-02-12T10:56:01Z","pushed_at":"2016-04-11T12:19:10Z","git_url":"git://github.com/sailfishos/sailfish-office.git","ssh_url":"git@github.com:sailfishos/sailfish-office.git","clone_url":"https://github.com/sailfishos/sailfish-office.git","svn_url":"https://github.com/sailfishos/sailfish-office","homepage":null,"size":614,"stargazers_count":40,"watchers_count":40,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":18,"mirror_url":null,"open_issues_count":11,"forks":18,"open_issues":11,"watchers":40,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/55"},"html":{"href":"https://github.com/sailfishos/sailfish-office/pull/55"},"issue":{"href":"https://api.github.com/repos/sailfishos/sailfish-office/issues/55"},"comments":{"href":"https://api.github.com/repos/sailfishos/sailfish-office/issues/55/comments"},"review_comments":{"href":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/55/comments"},"review_comment":{"href":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sailfishos/sailfish-office/pulls/55/commits"},"statuses":{"href":"https://api.github.com/repos/sailfishos/sailfish-office/statuses/9c2dbe0f97a513daa5b49cc3c7f6e9cd7dd6f2c9"}}}}