From 2cf2843b384247431ffe6371c8c9f4b5494fc291 Mon Sep 17 00:00:00 2001 From: Jarek Kobus Date: Mon, 26 Feb 2024 13:22:43 +0100 Subject: [PATCH] CreateSimulatorDialog: Skip explicit call to waitForFinished() This is done by the FutureSynchronizer d'tor, so no need to call it explicitly. Move the FutureSynchronizer as the last field of CreateSimulatorDialog so that its d'tor is executed first. Change-Id: I861e4c6498b63909fe52965ca16343ef82d20b42 Reviewed-by: hjk Reviewed-by: Reviewed-by: Eike Ziller --- src/plugins/ios/createsimulatordialog.cpp | 5 +---- src/plugins/ios/createsimulatordialog.h | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/plugins/ios/createsimulatordialog.cpp b/src/plugins/ios/createsimulatordialog.cpp index e658fef07c6..bacba246f27 100644 --- a/src/plugins/ios/createsimulatordialog.cpp +++ b/src/plugins/ios/createsimulatordialog.cpp @@ -71,10 +71,7 @@ CreateSimulatorDialog::CreateSimulatorDialog(QWidget *parent) populateRuntimes(DeviceTypeInfo()); } -CreateSimulatorDialog::~CreateSimulatorDialog() -{ - m_futureSync.waitForFinished(); -} +CreateSimulatorDialog::~CreateSimulatorDialog() = default; /*! Returns the simulator name entered by user. diff --git a/src/plugins/ios/createsimulatordialog.h b/src/plugins/ios/createsimulatordialog.h index 30c862fa584..9f269cc636e 100644 --- a/src/plugins/ios/createsimulatordialog.h +++ b/src/plugins/ios/createsimulatordialog.h @@ -35,12 +35,12 @@ private: void populateDeviceTypes(const QList &deviceTypes); void populateRuntimes(const DeviceTypeInfo &deviceType); - Utils::FutureSynchronizer m_futureSync; QList m_runtimes; QLineEdit *m_nameEdit; QComboBox *m_deviceTypeCombo; QComboBox *m_runtimeCombo; + Utils::FutureSynchronizer m_futureSync; // Keep me last }; } // Ios::Internal