diff --git a/src/plugins/ios/simulatoroperationdialog.cpp b/src/plugins/ios/simulatoroperationdialog.cpp index 523cda92eed..f69f8a67f9a 100644 --- a/src/plugins/ios/simulatoroperationdialog.cpp +++ b/src/plugins/ios/simulatoroperationdialog.cpp @@ -76,8 +76,11 @@ void SimulatorOperationDialog::addFutures(const QList > &futureLis for (auto future : futureList) { if (!future.isFinished() || !future.isCanceled()) { auto watcher = new QFutureWatcher; - connect(watcher, &QFutureWatcher::finished, - this, &SimulatorOperationDialog::futureFinished); + connect(watcher, &QFutureWatcherBase::finished, this, [this, watcher] { + m_futureWatchList.removeAll(watcher); + watcher->deleteLater(); + updateInputs(); + }); watcher->setFuture(future); m_futureWatchList << watcher; } @@ -108,14 +111,6 @@ void SimulatorOperationDialog::addMessage(const SimulatorInfo &siminfo, } } -void SimulatorOperationDialog::futureFinished() -{ - auto watcher = static_cast *>(sender()); - m_futureWatchList.removeAll(watcher); - watcher->deleteLater(); - updateInputs(); -} - void SimulatorOperationDialog::updateInputs() { bool enableOk = m_futureWatchList.isEmpty(); diff --git a/src/plugins/ios/simulatoroperationdialog.h b/src/plugins/ios/simulatoroperationdialog.h index 1fdac54381e..de689d04542 100644 --- a/src/plugins/ios/simulatoroperationdialog.h +++ b/src/plugins/ios/simulatoroperationdialog.h @@ -54,7 +54,6 @@ public: const QString &context); private: - void futureFinished(); void updateInputs(); private: