client: Fix Remote Cores marked unsaved on load
authorShane Synan <digitalcircuit36939@gmail.com>
Mon, 18 Jun 2018 01:02:49 +0000 (20:02 -0500)
committerManuel Nickschas <sputnick@quassel-irc.org>
Mon, 18 Jun 2018 19:27:30 +0000 (21:27 +0200)
commitf7b02c31c6fd2ef2cae343c2df8b1fed1c4fb177
treefe9b5e6be1239c98356d5758ea4a8831e592b4fb
parentdb6e6642a43143bc45ddb0732d144815b68e37f8
client: Fix Remote Cores marked unsaved on load

Fix Remote Cores (CoreAccountSettingsPage) wrongly being marked as
unsaved when loading if a default core account was chosen and the
index in the QComboBox was not 0.

This likely happened due to the change of setCurrentIndex on
autoConnectAccount triggering the state as changed, due to a missing
call to setChangedState().  Possibly.

Also clean up if statement scopes while we're here.

Test case:
> Add two accounts, "A" and "B"
> Pick "B" as default account
> Save, close Settings dialog, re-open
> Select Remote Cores, note that it's treated as if changes were there
src/qtui/settingspages/coreaccountsettingspage.cpp