{"action":"created","issue":{"url":"https://api.github.com/repos/Mudlet/Mudlet/issues/332","repository_url":"https://api.github.com/repos/Mudlet/Mudlet","labels_url":"https://api.github.com/repos/Mudlet/Mudlet/issues/332/labels{/name}","comments_url":"https://api.github.com/repos/Mudlet/Mudlet/issues/332/comments","events_url":"https://api.github.com/repos/Mudlet/Mudlet/issues/332/events","html_url":"https://github.com/Mudlet/Mudlet/pull/332","id":183185583,"number":332,"title":"(release_30)update: remove Midkemia (and add WoTMUD) to list of predefined MUDs","user":{"login":"SlySven","id":6163092,"avatar_url":"https://avatars.githubusercontent.com/u/6163092?v=3","gravatar_id":"","url":"https://api.github.com/users/SlySven","html_url":"https://github.com/SlySven","followers_url":"https://api.github.com/users/SlySven/followers","following_url":"https://api.github.com/users/SlySven/following{/other_user}","gists_url":"https://api.github.com/users/SlySven/gists{/gist_id}","starred_url":"https://api.github.com/users/SlySven/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SlySven/subscriptions","organizations_url":"https://api.github.com/users/SlySven/orgs","repos_url":"https://api.github.com/users/SlySven/repos","events_url":"https://api.github.com/users/SlySven/events{/privacy}","received_events_url":"https://api.github.com/users/SlySven/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Mudlet/Mudlet/labels/3%20-%20Done","name":"3 - Done","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2016-10-15T03:17:53Z","updated_at":"2016-10-15T08:57:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Mudlet/Mudlet/pulls/332","html_url":"https://github.com/Mudlet/Mudlet/pull/332","diff_url":"https://github.com/Mudlet/Mudlet/pull/332.diff","patch_url":"https://github.com/Mudlet/Mudlet/pull/332.patch"},"body":"The I.R.E. MUD Midkemia-online was shutdown on 2016/09/07 and it is not helpful to continue to offer it as a predefined MUD in the connection dialog.\r\n\r\nThis commit removes it from that list and adds a favourite of mine \"WoTMUD\" to replace it.  The logo is one from the Wheel of Time MUD sysop with approval from the creator Flash.\r\n\r\nThe dlgConnectionProfiles.cpp file has quite a few ASCII strings, as appropriate for a file that will in the future be subject to I18n work I took the opportunity to put QStringLiteral(...) wrappers around the QStrings that are used for non-GUI tasks and tr(...) ones that are.  I\r\nexpect it isn't complete but it goes someway towards dealing with THIS particular file - and it should improve very slightly the generation of QStrings that need to be constructed because it means as much of possible of them is done at compile rather than run-time...!\r\n\r\nIn relation to the above there are points in the code where QStrings are compared to \"\" to see if they do not have any contents - the isEmpty()  method is a better way to do the same (it does not involve a string expression)\r\n\r\nIn (void)dlgConnectionProfiles::slot_update_name( const QString ) there are a couple of variables that use a double underscore prefix - that is NOT A Good Idea: such a prefix is RESERVED in both C and C++. For example see:\r\n[what-are-the-rules-about-using-an-underscore-in-a-c-identifier](http://stackoverflow.com/questions/228783/what-are-the-rules-about-using-an-underscore-in-a-c-identifier) also a single prefix might be a bit of a problem with libraries... \r\n\r\nI have renames the offending things there - but I may have used the single underscore prefix myself in the past. *blush*\r\n\r\nThere are some help messages in this class that use an apostrophe in a word contraction - as a matter of readability this is not considered best practice IMHO so I have converted them to the full words.\r\n\r\nFollowing experiences in my previous Pull Request I also took a look at the initialisation and use of some member variables; it became clear that:\r\n* (QString) dlgConnectionProfiles::mOrigin\r\n* (bool) dlgConnectionProfiles::mEditOK\r\nwere not used and could be simply deleted and that:\r\n* (QString) dlgConnectionProfiles::mUnsavedProfileName\r\n* (QString) dlgConnectionProfiles::mCurrentProfileEditName\r\ndid not need to be member variables and could be local to the method that used them, so in (void)dlgConnectionProfiles::slot_save_name():\r\n* (QString) dlgConnectionProfiles::mCurrentProfileEditName becomes\r\n  local: (QString) currentProfileEditName\r\nand in (void) dlgConnectionProfiles::slot_addProfile():\r\n* (QString) dlgConnectionProfiles::mUnsavedProfileName becomes\r\n  local: (QString) newName\r\nalso added initialisers for:\r\n* (QStringList) dlgConnectionProfiles::mProfileList\r\n* (QPushButton *) dlgConnectionProfiles::connect_button\r\n* (QLineEditQPushButton *) dlgConnectionProfiles::delete_profile_lineedit\r\n* (QPushButton *) dlgConnectionProfiles::delete_button\r\n\r\nWhilst looking at the dlgProfilePreferences c'tor I saw that immediately adjacent to where I was editing was some dead code relating to setting a QPalette for the buttons used to edit various aspects of the profile's colours for the consoles and the map - by re-factoring the code I was able to clean it up to use quite a few less lines.\r\n\r\nThe above also led me to check some other methods in the same class and I spotted that there was code in most of the set{color}() ones that was trying to set a palette AND a stylesheet for the SAME things (those previously mentioned buttons).  The Qt Docs say of QtWidget::setPalette :\r\n\"Warning: Do not use this function in conjunction with Qt Style Sheets. When using style sheets, the palette of a widget can be customized using the \"color\", \"background-color\", \"selection-color\", \"selection-background-color\" and \"alternate-background-color\".\"\r\n\r\nObserving that this warning was not being heeded I cleaned up those methods with the effect that they became significantly simpler - and on testing worked the same, at least on my Linux platform...\r\n\r\nSigned-off-by: Stephen Lyons <slysven@virginmedia.com>"},"comment":{"url":"https://api.github.com/repos/Mudlet/Mudlet/issues/comments/253971912","html_url":"https://github.com/Mudlet/Mudlet/pull/332#issuecomment-253971912","issue_url":"https://api.github.com/repos/Mudlet/Mudlet/issues/332","id":253971912,"user":{"login":"vadi2","id":110988,"avatar_url":"https://avatars.githubusercontent.com/u/110988?v=3","gravatar_id":"","url":"https://api.github.com/users/vadi2","html_url":"https://github.com/vadi2","followers_url":"https://api.github.com/users/vadi2/followers","following_url":"https://api.github.com/users/vadi2/following{/other_user}","gists_url":"https://api.github.com/users/vadi2/gists{/gist_id}","starred_url":"https://api.github.com/users/vadi2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vadi2/subscriptions","organizations_url":"https://api.github.com/users/vadi2/orgs","repos_url":"https://api.github.com/users/vadi2/repos","events_url":"https://api.github.com/users/vadi2/events{/privacy}","received_events_url":"https://api.github.com/users/vadi2/received_events","type":"User","site_admin":false},"created_at":"2016-10-15T08:57:22Z","updated_at":"2016-10-15T08:57:22Z","body":"Not happy with this PR... the pictures alignment is stuffed up and it repeats the profile name under the icon everywhere. This is why we need one PR per change, not many related changes in one PR. Only approving because you'd really like to see WoTMUD added in epsilon, whose icon isn't even appropriate (half of the icon is unreadable!). Let's get all changes done in this PR improved on before 3.0 final.\r\n\r\n![select a profile to connect with_325](https://cloud.githubusercontent.com/assets/110988/19408805/2b5f0d48-9309-11e6-8331-89b529b4beb4.png)\r\n"}}
{"actor":{"display_login":"vadi2"}}