Ios: Pass context object to lambda connections

Change-Id: I69a7a2ff3e91256961b2b501e75fe1a21d9c8b6f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
This commit is contained in:
Jarek Kobus
2022-12-07 23:26:08 +01:00
parent 1be357f4be
commit 33e8251edf
2 changed files with 4 additions and 4 deletions

View File

@@ -113,7 +113,7 @@ QWidget *IosBuildStep::createConfigWidget()
resetDefaultsButton->setEnabled(!m_useDefaultArguments);
});
connect(extraArgumentsLineEdit, &QLineEdit::editingFinished, [=] {
connect(extraArgumentsLineEdit, &QLineEdit::editingFinished, this, [=] {
setExtraArguments(ProcessArgs::splitArgs(extraArgumentsLineEdit->text()));
});

View File

@@ -72,14 +72,14 @@ public:
// The future is canceled when app on simulator is stoped.
QEventLoop loop;
QFutureWatcher<void> watcher;
connect(&watcher, &QFutureWatcher<void>::canceled, [&](){
connect(&watcher, &QFutureWatcher<void>::canceled, this, [&] {
loop.quit();
});
watcher.setFuture(fi.future());
// Process to print the console output while app is running.
auto logProcess = [this, fi](QProcess *tailProcess, std::shared_ptr<QTemporaryFile> file) {
QObject::connect(tailProcess, &QProcess::readyReadStandardOutput, [=]() {
QObject::connect(tailProcess, &QProcess::readyReadStandardOutput, this, [=] {
if (!fi.isCanceled())
emit logMessage(QString::fromLocal8Bit(tailProcess->readAll()));
});
@@ -839,7 +839,7 @@ void IosSimulatorToolHandlerPrivate::requestRunApp(const QString &appBundlePath,
return;
}
auto onSimulatorStart = [this, extraArgs] (const SimulatorControl::ResponseData &response) {
auto onSimulatorStart = [this, extraArgs](const SimulatorControl::ResponseData &response) {
if (!isResponseValid(response))
return;
if (response.success) {