Only load core after settings have fully loaded (#7421)

* Only load core after settings have fully loaded

* Update ChangeLog
This commit is contained in:
Nick Bolton 2024-07-30 20:45:12 +01:00 committed by GitHub
parent 7c40a4d198
commit 2a6a688dbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 9 deletions

View File

@ -63,6 +63,7 @@ Enhancements:
- #7414 Expand BSD sockets poll tests and remove legacy-poll code
- #7415 Assert arg value `num > 0` for BSD socket poll unblock pipe
- #7416 Catch exception propagating to `Server` dtor
- #7421 Only load core after settings have fully loaded
# 1.14.6

View File

@ -225,6 +225,12 @@ void MainWindow::onCreated() {
// ensure that the ctor is fully executed before we start loading the
// app config. a signal is the clearest way to communicate this.
m_AppConfig.loadAllScopes();
const auto serverEnabled = appConfig().serverGroupChecked();
const auto clientEnabled = appConfig().clientGroupChecked();
if (serverEnabled || clientEnabled) {
startCore();
}
}
void MainWindow::onShown() {
@ -503,18 +509,11 @@ void MainWindow::createMenuBar() {
}
void MainWindow::applyConfig() {
const auto serverEnabled = appConfig().serverGroupChecked();
const auto clientEnabled = appConfig().clientGroupChecked();
enableServer(serverEnabled);
enableClient(clientEnabled);
enableServer(appConfig().serverGroupChecked());
enableClient(appConfig().clientGroupChecked());
m_pLineEditHostname->setText(appConfig().serverHostname());
m_pLineEditClientIp->setText(serverConfig().getClientAddress());
if (serverEnabled || clientEnabled) {
startCore();
}
}
void MainWindow::saveSettings() {