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 <hjk@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Jarek Kobus
2024-02-26 13:22:43 +01:00
committed by Eike Ziller
parent 2428db2a30
commit 2cf2843b38
2 changed files with 2 additions and 5 deletions

View File

@@ -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.

View File

@@ -35,12 +35,12 @@ private:
void populateDeviceTypes(const QList<DeviceTypeInfo> &deviceTypes);
void populateRuntimes(const DeviceTypeInfo &deviceType);
Utils::FutureSynchronizer m_futureSync;
QList<RuntimeInfo> m_runtimes;
QLineEdit *m_nameEdit;
QComboBox *m_deviceTypeCombo;
QComboBox *m_runtimeCombo;
Utils::FutureSynchronizer m_futureSync; // Keep me last
};
} // Ios::Internal