{"action":"created","comment":{"url":"https://api.github.com/repos/xtuple/qt-client/pulls/comments/34721744","id":34721744,"diff_hunk":"@@ -1023,21 +1023,31 @@ void GUIClient::sTick()\n       emit(tick());\n       __intervalCount = 0;\n     }\n-\n-    _tick.singleShot(60000, this, SLOT(sTick()));\n   }\n   else\n   {\n     // Check to make sure we are not in the middle of an aborted transaction\n     // before we go doing something rash.\n-    if(tickle.lastError().databaseText().contains(\"current transaction is aborted\"))\n-      return;\n-    systemError(this, tr(\"<p>You have been disconnected from the database server.  \"\n-                          \"This is usually caused by an interruption in your \"\n-                          \"network.  Please exit the application and restart.\"\n-                          \"<br><pre>%1</pre>\" )\n-                      .arg(tickle.lastError().databaseText()));\n+    if (!QSqlDatabase::database().isOpen())\n+    {\n+      if (QSqlDatabase::database().open())\n+      {\n+        qDebug() << \"Reconnected to the database\";","path":"guiclient/guiclient.cpp","position":22,"original_position":22,"commit_id":"76fb370ce5952c1fb6d85c8a749ba2e5d3593522","original_commit_id":"76fb370ce5952c1fb6d85c8a749ba2e5d3593522","user":{"login":"davidbeauchamp","id":1675112,"avatar_url":"https://avatars.githubusercontent.com/u/1675112?v=3","gravatar_id":"","url":"https://api.github.com/users/davidbeauchamp","html_url":"https://github.com/davidbeauchamp","followers_url":"https://api.github.com/users/davidbeauchamp/followers","following_url":"https://api.github.com/users/davidbeauchamp/following{/other_user}","gists_url":"https://api.github.com/users/davidbeauchamp/gists{/gist_id}","starred_url":"https://api.github.com/users/davidbeauchamp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidbeauchamp/subscriptions","organizations_url":"https://api.github.com/users/davidbeauchamp/orgs","repos_url":"https://api.github.com/users/davidbeauchamp/repos","events_url":"https://api.github.com/users/davidbeauchamp/events{/privacy}","received_events_url":"https://api.github.com/users/davidbeauchamp/received_events","type":"User","site_admin":false},"body":"You can see an example of how we currently run the login() database function [here](https://github.com/xtuple/qt-client/blob/4_10_x/common/login2.cpp#L479-L486)","created_at":"2015-07-15T19:57:56Z","updated_at":"2015-07-15T19:57:56Z","html_url":"https://github.com/xtuple/qt-client/pull/781#discussion_r34721744","pull_request_url":"https://api.github.com/repos/xtuple/qt-client/pulls/781","_links":{"self":{"href":"https://api.github.com/repos/xtuple/qt-client/pulls/comments/34721744"},"html":{"href":"https://github.com/xtuple/qt-client/pull/781#discussion_r34721744"},"pull_request":{"href":"https://api.github.com/repos/xtuple/qt-client/pulls/781"}}},"pull_request":{"url":"https://api.github.com/repos/xtuple/qt-client/pulls/781","id":40053548,"html_url":"https://github.com/xtuple/qt-client/pull/781","diff_url":"https://github.com/xtuple/qt-client/pull/781.diff","patch_url":"https://github.com/xtuple/qt-client/pull/781.patch","issue_url":"https://api.github.com/repos/xtuple/qt-client/issues/781","number":781,"state":"open","locked":false,"title":"Issue #25576: Reconnect automatically after lost db connection","user":{"login":"bartmaj","id":11619833,"avatar_url":"https://avatars.githubusercontent.com/u/11619833?v=3","gravatar_id":"","url":"https://api.github.com/users/bartmaj","html_url":"https://github.com/bartmaj","followers_url":"https://api.github.com/users/bartmaj/followers","following_url":"https://api.github.com/users/bartmaj/following{/other_user}","gists_url":"https://api.github.com/users/bartmaj/gists{/gist_id}","starred_url":"https://api.github.com/users/bartmaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartmaj/subscriptions","organizations_url":"https://api.github.com/users/bartmaj/orgs","repos_url":"https://api.github.com/users/bartmaj/repos","events_url":"https://api.github.com/users/bartmaj/events{/privacy}","received_events_url":"https://api.github.com/users/bartmaj/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-07-15T18:26:16Z","updated_at":"2015-07-15T19:57:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"34557361000a969a811a0f5a26a42bbe200f4d2f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/xtuple/qt-client/pulls/781/commits","review_comments_url":"https://api.github.com/repos/xtuple/qt-client/pulls/781/comments","review_comment_url":"https://api.github.com/repos/xtuple/qt-client/pulls/comments{/number}","comments_url":"https://api.github.com/repos/xtuple/qt-client/issues/781/comments","statuses_url":"https://api.github.com/repos/xtuple/qt-client/statuses/76fb370ce5952c1fb6d85c8a749ba2e5d3593522","head":{"label":"bartmaj:reconnectDatabase","ref":"reconnectDatabase","sha":"76fb370ce5952c1fb6d85c8a749ba2e5d3593522","user":{"login":"bartmaj","id":11619833,"avatar_url":"https://avatars.githubusercontent.com/u/11619833?v=3","gravatar_id":"","url":"https://api.github.com/users/bartmaj","html_url":"https://github.com/bartmaj","followers_url":"https://api.github.com/users/bartmaj/followers","following_url":"https://api.github.com/users/bartmaj/following{/other_user}","gists_url":"https://api.github.com/users/bartmaj/gists{/gist_id}","starred_url":"https://api.github.com/users/bartmaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartmaj/subscriptions","organizations_url":"https://api.github.com/users/bartmaj/orgs","repos_url":"https://api.github.com/users/bartmaj/repos","events_url":"https://api.github.com/users/bartmaj/events{/privacy}","received_events_url":"https://api.github.com/users/bartmaj/received_events","type":"User","site_admin":false},"repo":{"id":35447279,"name":"qt-client","full_name":"bartmaj/qt-client","owner":{"login":"bartmaj","id":11619833,"avatar_url":"https://avatars.githubusercontent.com/u/11619833?v=3","gravatar_id":"","url":"https://api.github.com/users/bartmaj","html_url":"https://github.com/bartmaj","followers_url":"https://api.github.com/users/bartmaj/followers","following_url":"https://api.github.com/users/bartmaj/following{/other_user}","gists_url":"https://api.github.com/users/bartmaj/gists{/gist_id}","starred_url":"https://api.github.com/users/bartmaj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bartmaj/subscriptions","organizations_url":"https://api.github.com/users/bartmaj/orgs","repos_url":"https://api.github.com/users/bartmaj/repos","events_url":"https://api.github.com/users/bartmaj/events{/privacy}","received_events_url":"https://api.github.com/users/bartmaj/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bartmaj/qt-client","description":"This repository contains the source code for the Desktop client. The Desktop client is built using the Qt framework for C++. The client can be extended or customized using JavaScript. This client is used by all editions of xTuple ERP.","fork":true,"url":"https://api.github.com/repos/bartmaj/qt-client","forks_url":"https://api.github.com/repos/bartmaj/qt-client/forks","keys_url":"https://api.github.com/repos/bartmaj/qt-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bartmaj/qt-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bartmaj/qt-client/teams","hooks_url":"https://api.github.com/repos/bartmaj/qt-client/hooks","issue_events_url":"https://api.github.com/repos/bartmaj/qt-client/issues/events{/number}","events_url":"https://api.github.com/repos/bartmaj/qt-client/events","assignees_url":"https://api.github.com/repos/bartmaj/qt-client/assignees{/user}","branches_url":"https://api.github.com/repos/bartmaj/qt-client/branches{/branch}","tags_url":"https://api.github.com/repos/bartmaj/qt-client/tags","blobs_url":"https://api.github.com/repos/bartmaj/qt-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bartmaj/qt-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bartmaj/qt-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/bartmaj/qt-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bartmaj/qt-client/statuses/{sha}","languages_url":"https://api.github.com/repos/bartmaj/qt-client/languages","stargazers_url":"https://api.github.com/repos/bartmaj/qt-client/stargazers","contributors_url":"https://api.github.com/repos/bartmaj/qt-client/contributors","subscribers_url":"https://api.github.com/repos/bartmaj/qt-client/subscribers","subscription_url":"https://api.github.com/repos/bartmaj/qt-client/subscription","commits_url":"https://api.github.com/repos/bartmaj/qt-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/bartmaj/qt-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/bartmaj/qt-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/bartmaj/qt-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/bartmaj/qt-client/contents/{+path}","compare_url":"https://api.github.com/repos/bartmaj/qt-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bartmaj/qt-client/merges","archive_url":"https://api.github.com/repos/bartmaj/qt-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bartmaj/qt-client/downloads","issues_url":"https://api.github.com/repos/bartmaj/qt-client/issues{/number}","pulls_url":"https://api.github.com/repos/bartmaj/qt-client/pulls{/number}","milestones_url":"https://api.github.com/repos/bartmaj/qt-client/milestones{/number}","notifications_url":"https://api.github.com/repos/bartmaj/qt-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bartmaj/qt-client/labels{/name}","releases_url":"https://api.github.com/repos/bartmaj/qt-client/releases{/id}","created_at":"2015-05-11T20:10:11Z","updated_at":"2015-05-11T20:10:19Z","pushed_at":"2015-07-15T18:26:04Z","git_url":"git://github.com/bartmaj/qt-client.git","ssh_url":"git@github.com:bartmaj/qt-client.git","clone_url":"https://github.com/bartmaj/qt-client.git","svn_url":"https://github.com/bartmaj/qt-client","homepage":"","size":67970,"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":"4_9_x"}},"base":{"label":"xtuple:4_10_x","ref":"4_10_x","sha":"4795ed9dcf6c990dcbecd786214ea354a29560f5","user":{"login":"xtuple","id":703922,"avatar_url":"https://avatars.githubusercontent.com/u/703922?v=3","gravatar_id":"","url":"https://api.github.com/users/xtuple","html_url":"https://github.com/xtuple","followers_url":"https://api.github.com/users/xtuple/followers","following_url":"https://api.github.com/users/xtuple/following{/other_user}","gists_url":"https://api.github.com/users/xtuple/gists{/gist_id}","starred_url":"https://api.github.com/users/xtuple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtuple/subscriptions","organizations_url":"https://api.github.com/users/xtuple/orgs","repos_url":"https://api.github.com/users/xtuple/repos","events_url":"https://api.github.com/users/xtuple/events{/privacy}","received_events_url":"https://api.github.com/users/xtuple/received_events","type":"Organization","site_admin":false},"repo":{"id":10383821,"name":"qt-client","full_name":"xtuple/qt-client","owner":{"login":"xtuple","id":703922,"avatar_url":"https://avatars.githubusercontent.com/u/703922?v=3","gravatar_id":"","url":"https://api.github.com/users/xtuple","html_url":"https://github.com/xtuple","followers_url":"https://api.github.com/users/xtuple/followers","following_url":"https://api.github.com/users/xtuple/following{/other_user}","gists_url":"https://api.github.com/users/xtuple/gists{/gist_id}","starred_url":"https://api.github.com/users/xtuple/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xtuple/subscriptions","organizations_url":"https://api.github.com/users/xtuple/orgs","repos_url":"https://api.github.com/users/xtuple/repos","events_url":"https://api.github.com/users/xtuple/events{/privacy}","received_events_url":"https://api.github.com/users/xtuple/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/xtuple/qt-client","description":"This repository contains the source code for the Desktop client. The Desktop client is built using the Qt framework for C++. The client can be extended or customized using JavaScript. This client is used by all editions of xTuple ERP.","fork":false,"url":"https://api.github.com/repos/xtuple/qt-client","forks_url":"https://api.github.com/repos/xtuple/qt-client/forks","keys_url":"https://api.github.com/repos/xtuple/qt-client/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xtuple/qt-client/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xtuple/qt-client/teams","hooks_url":"https://api.github.com/repos/xtuple/qt-client/hooks","issue_events_url":"https://api.github.com/repos/xtuple/qt-client/issues/events{/number}","events_url":"https://api.github.com/repos/xtuple/qt-client/events","assignees_url":"https://api.github.com/repos/xtuple/qt-client/assignees{/user}","branches_url":"https://api.github.com/repos/xtuple/qt-client/branches{/branch}","tags_url":"https://api.github.com/repos/xtuple/qt-client/tags","blobs_url":"https://api.github.com/repos/xtuple/qt-client/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xtuple/qt-client/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xtuple/qt-client/git/refs{/sha}","trees_url":"https://api.github.com/repos/xtuple/qt-client/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xtuple/qt-client/statuses/{sha}","languages_url":"https://api.github.com/repos/xtuple/qt-client/languages","stargazers_url":"https://api.github.com/repos/xtuple/qt-client/stargazers","contributors_url":"https://api.github.com/repos/xtuple/qt-client/contributors","subscribers_url":"https://api.github.com/repos/xtuple/qt-client/subscribers","subscription_url":"https://api.github.com/repos/xtuple/qt-client/subscription","commits_url":"https://api.github.com/repos/xtuple/qt-client/commits{/sha}","git_commits_url":"https://api.github.com/repos/xtuple/qt-client/git/commits{/sha}","comments_url":"https://api.github.com/repos/xtuple/qt-client/comments{/number}","issue_comment_url":"https://api.github.com/repos/xtuple/qt-client/issues/comments{/number}","contents_url":"https://api.github.com/repos/xtuple/qt-client/contents/{+path}","compare_url":"https://api.github.com/repos/xtuple/qt-client/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xtuple/qt-client/merges","archive_url":"https://api.github.com/repos/xtuple/qt-client/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xtuple/qt-client/downloads","issues_url":"https://api.github.com/repos/xtuple/qt-client/issues{/number}","pulls_url":"https://api.github.com/repos/xtuple/qt-client/pulls{/number}","milestones_url":"https://api.github.com/repos/xtuple/qt-client/milestones{/number}","notifications_url":"https://api.github.com/repos/xtuple/qt-client/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xtuple/qt-client/labels{/name}","releases_url":"https://api.github.com/repos/xtuple/qt-client/releases{/id}","created_at":"2013-05-30T13:54:04Z","updated_at":"2015-07-02T00:57:39Z","pushed_at":"2015-07-15T18:44:20Z","git_url":"git://github.com/xtuple/qt-client.git","ssh_url":"git@github.com:xtuple/qt-client.git","clone_url":"https://github.com/xtuple/qt-client.git","svn_url":"https://github.com/xtuple/qt-client","homepage":"","size":101688,"stargazers_count":26,"watchers_count":26,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":105,"mirror_url":null,"open_issues_count":15,"forks":105,"open_issues":15,"watchers":26,"default_branch":"4_10_x"}},"_links":{"self":{"href":"https://api.github.com/repos/xtuple/qt-client/pulls/781"},"html":{"href":"https://github.com/xtuple/qt-client/pull/781"},"issue":{"href":"https://api.github.com/repos/xtuple/qt-client/issues/781"},"comments":{"href":"https://api.github.com/repos/xtuple/qt-client/issues/781/comments"},"review_comments":{"href":"https://api.github.com/repos/xtuple/qt-client/pulls/781/comments"},"review_comment":{"href":"https://api.github.com/repos/xtuple/qt-client/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/xtuple/qt-client/pulls/781/commits"},"statuses":{"href":"https://api.github.com/repos/xtuple/qt-client/statuses/76fb370ce5952c1fb6d85c8a749ba2e5d3593522"}}}}