{"action":"created","issue":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/5245","repository_url":"https://api.github.com/repos/qbittorrent/qBittorrent","labels_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/5245/labels{/name}","comments_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/5245/comments","events_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/5245/events","html_url":"https://github.com/qbittorrent/qBittorrent/pull/5245","id":154251304,"number":5245,"title":"Minor refactor in PeerListWidget","user":{"login":"thalieht","id":6451685,"avatar_url":"https://avatars.githubusercontent.com/u/6451685?v=3","gravatar_id":"","url":"https://api.github.com/users/thalieht","html_url":"https://github.com/thalieht","followers_url":"https://api.github.com/users/thalieht/followers","following_url":"https://api.github.com/users/thalieht/following{/other_user}","gists_url":"https://api.github.com/users/thalieht/gists{/gist_id}","starred_url":"https://api.github.com/users/thalieht/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/thalieht/subscriptions","organizations_url":"https://api.github.com/users/thalieht/orgs","repos_url":"https://api.github.com/users/thalieht/repos","events_url":"https://api.github.com/users/thalieht/events{/privacy}","received_events_url":"https://api.github.com/users/thalieht/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-05-11T14:01:31Z","updated_at":"2016-05-11T20:03:41Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/pulls/5245","html_url":"https://github.com/qbittorrent/qBittorrent/pull/5245","diff_url":"https://github.com/qbittorrent/qBittorrent/pull/5245.diff","patch_url":"https://github.com/qbittorrent/qBittorrent/pull/5245.patch"},"body":"- Removed `m_resolveCountries` as we can use `Preferences::instance()->resolvePeerCountries()` directly, i guess there was a reason for using `m_resolveCountries` so i'm waiting to be corrected.\r\n- Check if a column is visible before resizing it to be able to keep the column's saved width even when we restart qbit with that column disabled. If there are no objections with this one we should do the same in `transferlistwidget` as it suffers the same problem.\r\n- Now it doesn't resize Country column to contents on every restart (fixes part of #5236)\r\n- Now country column is automatically shown when you enable Resolve peer countries\" after a qbit restart with it disabled (had to manually show the country column from the column menu).\r\n"},"comment":{"url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/comments/218573391","html_url":"https://github.com/qbittorrent/qBittorrent/pull/5245#issuecomment-218573391","issue_url":"https://api.github.com/repos/qbittorrent/qBittorrent/issues/5245","id":218573391,"user":{"login":"evsh","id":394621,"avatar_url":"https://avatars.githubusercontent.com/u/394621?v=3","gravatar_id":"","url":"https://api.github.com/users/evsh","html_url":"https://github.com/evsh","followers_url":"https://api.github.com/users/evsh/followers","following_url":"https://api.github.com/users/evsh/following{/other_user}","gists_url":"https://api.github.com/users/evsh/gists{/gist_id}","starred_url":"https://api.github.com/users/evsh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/evsh/subscriptions","organizations_url":"https://api.github.com/users/evsh/orgs","repos_url":"https://api.github.com/users/evsh/repos","events_url":"https://api.github.com/users/evsh/events{/privacy}","received_events_url":"https://api.github.com/users/evsh/received_events","type":"User","site_admin":false},"created_at":"2016-05-11T20:03:41Z","updated_at":"2016-05-11T20:03:41Z","body":"> Removed `m_resolveCountries` as we can use `Preferences::instance()->resolvePeerCountries()` directly, i guess there was a reason for using `m_resolveCountries` so i'm waiting to be corrected.\r\n\r\nMy guess is: `m_resolveCountries` is used for performance reasons, because every access to `Preferences` implies a mutex lock, and thus I would not remove the variable. "}}