From ca41934b6821808810e225f4f5c7885ea4f6c19a Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Mon, 3 Jun 2019 00:35:20 +0100 Subject: [PATCH] Repair an object instance initialization order issue that causes crashes The background thread running the ADIF log load needs a valid configuration object as it now depends on the "Include WAE entities" option. --- widgets/mainwindow.cpp | 2 +- widgets/mainwindow.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/widgets/mainwindow.cpp b/widgets/mainwindow.cpp index 277dbfdd7..f5c5cff41 100644 --- a/widgets/mainwindow.cpp +++ b/widgets/mainwindow.cpp @@ -234,8 +234,8 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple, m_configurations_button {0}, m_settings {multi_settings->settings ()}, ui(new Ui::MainWindow), - m_logBook {&m_config}, m_config {&m_network_manager, temp_directory, m_settings, &m_logBook, this}, + m_logBook {&m_config}, m_WSPR_band_hopping {m_settings, &m_config, this}, m_WSPR_tx_next {false}, m_rigErrorMessageBox {MessageBox::Critical, tr ("Rig Control Error") diff --git a/widgets/mainwindow.h b/widgets/mainwindow.h index 03d009a76..ca545ec35 100644 --- a/widgets/mainwindow.h +++ b/widgets/mainwindow.h @@ -357,8 +357,8 @@ private: QSettings * m_settings; QScopedPointer ui; - LogBook m_logBook; // must be before Configuration construction Configuration m_config; + LogBook m_logBook; // must be after Configuration construction WSPRBandHopping m_WSPR_band_hopping; bool m_WSPR_tx_next; MessageBox m_rigErrorMessageBox;