{"action":"created","comment":{"url":"https://api.github.com/repos/owncloud/client/pulls/comments/31620546","id":31620546,"diff_hunk":"@@ -1245,6 +1259,55 @@ void SyncJournalDb::setPollInfo(const SyncJournalDb::PollInfo& info)\n     }\n }\n \n+QStringList SyncJournalDb::getSelectiveSyncList(SyncJournalDb::SelectiveSyncListType type)\n+{\n+    QStringList result;\n+\n+    QMutexLocker locker(&_mutex);\n+    if( !checkConnect() ) {\n+        return result;\n+    }\n+\n+    _getSelectiveSyncListQuery->reset();\n+    _getSelectiveSyncListQuery->bindValue(1, int(type));\n+    if (!_getSelectiveSyncListQuery->exec()) {\n+        qWarning() << \"SQL query failed: \"<< _getSelectiveSyncListQuery->error();\n+        return result;\n+    }\n+    while( _getSelectiveSyncListQuery->next() ) {\n+        auto entry = _getSelectiveSyncListQuery->stringValue(0);\n+        if (!entry.endsWith(QLatin1Char('/'))) {\n+            entry.append(QLatin1Char('/'));\n+        }\n+        result.append(entry);\n+    }\n+    return result;\n+}\n+\n+void SyncJournalDb::setSelectiveSyncList(SyncJournalDb::SelectiveSyncListType type, const QStringList& list)\n+{\n+    QMutexLocker locker(&_mutex);\n+    if( !checkConnect() ) {\n+        return;\n+    }\n+\n+    //first, delete all entries of this type\n+    SqlQuery delQuery(\"DELETE FROM selectivesync WHERE type == ?1\", _db);\n+    delQuery.bindValue(1, int(type));\n+    if( !delQuery.exec() ) {\n+        qWarning() << \"SQL error when deleting selective sync list\" << list << delQuery.error();\n+    }\n+\n+    SqlQuery insQuery(\"INSERT INTO selectivesync VALUES (?1, ?2)\" , _db);","path":"src/libsync/syncjournaldb.cpp","position":71,"original_position":71,"commit_id":"9e17ddffae4fcbbcd9d2ff477ee7562439970107","original_commit_id":"9e17ddffae4fcbbcd9d2ff477ee7562439970107","user":{"login":"ogoffart","id":959326,"avatar_url":"https://avatars.githubusercontent.com/u/959326?v=3","gravatar_id":"","url":"https://api.github.com/users/ogoffart","html_url":"https://github.com/ogoffart","followers_url":"https://api.github.com/users/ogoffart/followers","following_url":"https://api.github.com/users/ogoffart/following{/other_user}","gists_url":"https://api.github.com/users/ogoffart/gists{/gist_id}","starred_url":"https://api.github.com/users/ogoffart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogoffart/subscriptions","organizations_url":"https://api.github.com/users/ogoffart/orgs","repos_url":"https://api.github.com/users/ogoffart/repos","events_url":"https://api.github.com/users/ogoffart/events{/privacy}","received_events_url":"https://api.github.com/users/ogoffart/received_events","type":"User","site_admin":false},"body":"not all statements are prepared. in general only the statements that happens often during the sync are.  But maybe it deserve to be prepared.","created_at":"2015-06-03T13:14:49Z","updated_at":"2015-06-03T13:14:49Z","html_url":"https://github.com/owncloud/client/pull/3281#discussion_r31620546","pull_request_url":"https://api.github.com/repos/owncloud/client/pulls/3281","_links":{"self":{"href":"https://api.github.com/repos/owncloud/client/pulls/comments/31620546"},"html":{"href":"https://github.com/owncloud/client/pull/3281#discussion_r31620546"},"pull_request":{"href":"https://api.github.com/repos/owncloud/client/pulls/3281"}}},"pull_request":{"url":"https://api.github.com/repos/owncloud/client/pulls/3281","id":36198495,"html_url":"https://github.com/owncloud/client/pull/3281","diff_url":"https://github.com/owncloud/client/pull/3281.diff","patch_url":"https://github.com/owncloud/client/pull/3281.patch","issue_url":"https://api.github.com/repos/owncloud/client/issues/3281","number":3281,"state":"open","locked":false,"title":"Confirm feature (sync engine part only)","user":{"login":"ogoffart","id":959326,"avatar_url":"https://avatars.githubusercontent.com/u/959326?v=3","gravatar_id":"","url":"https://api.github.com/users/ogoffart","html_url":"https://github.com/ogoffart","followers_url":"https://api.github.com/users/ogoffart/followers","following_url":"https://api.github.com/users/ogoffart/following{/other_user}","gists_url":"https://api.github.com/users/ogoffart/gists{/gist_id}","starred_url":"https://api.github.com/users/ogoffart/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ogoffart/subscriptions","organizations_url":"https://api.github.com/users/ogoffart/orgs","repos_url":"https://api.github.com/users/ogoffart/repos","events_url":"https://api.github.com/users/ogoffart/events{/privacy}","received_events_url":"https://api.github.com/users/ogoffart/received_events","type":"User","site_admin":false},"body":"The idea is that the UI would set SyncEngine->setNewSharedFolderSizeLimit and listen to the newSharedFolder signal.  It would then add the new folder in the blacklist, and the unconfirmed list.  Then from the UI we can move the unconfirmed item to the white list when the selective sync dialog is closed.","created_at":"2015-05-26T12:46:22Z","updated_at":"2015-06-03T13:14:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"dde0eda5e019a0bc30a02adae575c70e556ee97c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/owncloud/client/pulls/3281/commits","review_comments_url":"https://api.github.com/repos/owncloud/client/pulls/3281/comments","review_comment_url":"https://api.github.com/repos/owncloud/client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/owncloud/client/issues/3281/comments","statuses_url":"https://api.github.com/repos/owncloud/client/statuses/9e17ddffae4fcbbcd9d2ff477ee7562439970107","head":{"label":"owncloud:confirm","ref":"confirm","sha":"9e17ddffae4fcbbcd9d2ff477ee7562439970107","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550623,"name":"client","full_name":"owncloud/client","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/client","description":"Repository for the ownCloud Desktop Syncing Client","fork":false,"url":"https://api.github.com/repos/owncloud/client","forks_url":"https://api.github.com/repos/owncloud/client/forks","keys_url":"https://api.github.com/repos/owncloud/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/client/teams","hooks_url":"https://api.github.com/repos/owncloud/client/hooks","issue_events_url":"https://api.github.com/repos/owncloud/client/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/client/events","assignees_url":"https://api.github.com/repos/owncloud/client/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/client/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/client/tags","blobs_url":"https://api.github.com/repos/owncloud/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/client/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/client/languages","stargazers_url":"https://api.github.com/repos/owncloud/client/stargazers","contributors_url":"https://api.github.com/repos/owncloud/client/contributors","subscribers_url":"https://api.github.com/repos/owncloud/client/subscribers","subscription_url":"https://api.github.com/repos/owncloud/client/subscription","commits_url":"https://api.github.com/repos/owncloud/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/client/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/client/merges","archive_url":"https://api.github.com/repos/owncloud/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/client/downloads","issues_url":"https://api.github.com/repos/owncloud/client/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/client/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/client/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/client/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/client/releases{/id}","created_at":"2012-08-25T10:44:53Z","updated_at":"2015-06-02T19:00:04Z","pushed_at":"2015-06-03T09:43:14Z","git_url":"git://github.com/owncloud/client.git","ssh_url":"git@github.com:owncloud/client.git","clone_url":"https://github.com/owncloud/client.git","svn_url":"https://github.com/owncloud/client","homepage":null,"size":763678,"stargazers_count":505,"watchers_count":505,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":273,"mirror_url":null,"open_issues_count":423,"forks":273,"open_issues":423,"watchers":505,"default_branch":"master"}},"base":{"label":"owncloud:master","ref":"master","sha":"54a42e401bf1f126a6721f8291a227dfc4718131","user":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"repo":{"id":5550623,"name":"client","full_name":"owncloud/client","owner":{"login":"owncloud","id":1645051,"avatar_url":"https://avatars.githubusercontent.com/u/1645051?v=3","gravatar_id":"","url":"https://api.github.com/users/owncloud","html_url":"https://github.com/owncloud","followers_url":"https://api.github.com/users/owncloud/followers","following_url":"https://api.github.com/users/owncloud/following{/other_user}","gists_url":"https://api.github.com/users/owncloud/gists{/gist_id}","starred_url":"https://api.github.com/users/owncloud/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/owncloud/subscriptions","organizations_url":"https://api.github.com/users/owncloud/orgs","repos_url":"https://api.github.com/users/owncloud/repos","events_url":"https://api.github.com/users/owncloud/events{/privacy}","received_events_url":"https://api.github.com/users/owncloud/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/owncloud/client","description":"Repository for the ownCloud Desktop Syncing Client","fork":false,"url":"https://api.github.com/repos/owncloud/client","forks_url":"https://api.github.com/repos/owncloud/client/forks","keys_url":"https://api.github.com/repos/owncloud/client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/owncloud/client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/owncloud/client/teams","hooks_url":"https://api.github.com/repos/owncloud/client/hooks","issue_events_url":"https://api.github.com/repos/owncloud/client/issues/events{/number}","events_url":"https://api.github.com/repos/owncloud/client/events","assignees_url":"https://api.github.com/repos/owncloud/client/assignees{/user}","branches_url":"https://api.github.com/repos/owncloud/client/branches{/branch}","tags_url":"https://api.github.com/repos/owncloud/client/tags","blobs_url":"https://api.github.com/repos/owncloud/client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/owncloud/client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/owncloud/client/git/refs{/sha}","trees_url":"https://api.github.com/repos/owncloud/client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/owncloud/client/statuses/{sha}","languages_url":"https://api.github.com/repos/owncloud/client/languages","stargazers_url":"https://api.github.com/repos/owncloud/client/stargazers","contributors_url":"https://api.github.com/repos/owncloud/client/contributors","subscribers_url":"https://api.github.com/repos/owncloud/client/subscribers","subscription_url":"https://api.github.com/repos/owncloud/client/subscription","commits_url":"https://api.github.com/repos/owncloud/client/commits{/sha}","git_commits_url":"https://api.github.com/repos/owncloud/client/git/commits{/sha}","comments_url":"https://api.github.com/repos/owncloud/client/comments{/number}","issue_comment_url":"https://api.github.com/repos/owncloud/client/issues/comments{/number}","contents_url":"https://api.github.com/repos/owncloud/client/contents/{+path}","compare_url":"https://api.github.com/repos/owncloud/client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/owncloud/client/merges","archive_url":"https://api.github.com/repos/owncloud/client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/owncloud/client/downloads","issues_url":"https://api.github.com/repos/owncloud/client/issues{/number}","pulls_url":"https://api.github.com/repos/owncloud/client/pulls{/number}","milestones_url":"https://api.github.com/repos/owncloud/client/milestones{/number}","notifications_url":"https://api.github.com/repos/owncloud/client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/owncloud/client/labels{/name}","releases_url":"https://api.github.com/repos/owncloud/client/releases{/id}","created_at":"2012-08-25T10:44:53Z","updated_at":"2015-06-02T19:00:04Z","pushed_at":"2015-06-03T09:43:14Z","git_url":"git://github.com/owncloud/client.git","ssh_url":"git@github.com:owncloud/client.git","clone_url":"https://github.com/owncloud/client.git","svn_url":"https://github.com/owncloud/client","homepage":null,"size":763678,"stargazers_count":505,"watchers_count":505,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":273,"mirror_url":null,"open_issues_count":423,"forks":273,"open_issues":423,"watchers":505,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/owncloud/client/pulls/3281"},"html":{"href":"https://github.com/owncloud/client/pull/3281"},"issue":{"href":"https://api.github.com/repos/owncloud/client/issues/3281"},"comments":{"href":"https://api.github.com/repos/owncloud/client/issues/3281/comments"},"review_comments":{"href":"https://api.github.com/repos/owncloud/client/pulls/3281/comments"},"review_comment":{"href":"https://api.github.com/repos/owncloud/client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/owncloud/client/pulls/3281/commits"},"statuses":{"href":"https://api.github.com/repos/owncloud/client/statuses/9e17ddffae4fcbbcd9d2ff477ee7562439970107"}}}}