Skip to content

Commit ce4d59d

Browse files
committed
Explicitly capture this
1 parent 04f3fad commit ce4d59d

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

src/gui/accountstate.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ UpdateUrlDialog *AccountState::updateUrlDialog(const QUrl &newUrl)
6464

6565
_updateUrlDialog = UpdateUrlDialog::fromAccount(_account, newUrl, ocApp()->settingsDialog());
6666

67-
connect(_updateUrlDialog, &UpdateUrlDialog::accepted, this, [=]() {
67+
connect(_updateUrlDialog, &UpdateUrlDialog::accepted, this, [newUrl, this]() {
6868
_account->setUrl(newUrl);
6969
Q_EMIT _account->wantsAccountSaved(_account.data());
7070
Q_EMIT urlUpdated();

src/gui/newwizard/pages/accountconfiguredwizardpage.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ AccountConfiguredWizardPage::AccountConfiguredWizardPage(
6464
_ui->useVfsRadioButton->setToolTip(tr("The virtual filesystem feature is not available for this installation."));
6565
}
6666

67-
connect(_ui->chooseLocalDirectoryButton, &QToolButton::clicked, this, [=]() {
67+
connect(_ui->chooseLocalDirectoryButton, &QToolButton::clicked, this, [this]() {
6868
auto dialog = new QFileDialog(this, tr("Select the local folder"), _ui->localDirectoryLineEdit->text());
6969
dialog->setFileMode(QFileDialog::Directory);
7070
dialog->setOption(QFileDialog::ShowDirsOnly);

src/gui/newwizard/states/oauthcredentialssetupwizardstate.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ OAuthCredentialsSetupWizardState::OAuthCredentialsSetupWizardState(SetupWizardCo
4141
// bring window up top again, as the browser may have been raised in front of it
4242
_context->window()->raise();
4343

44-
auto finish = [=]() {
44+
auto finish = [result, token, refreshToken, this] {
4545
switch (result) {
4646
case OAuth::Result::LoggedIn: {
4747
_context->accountBuilder().setAuthenticationStrategy(new OAuth2AuthenticationStrategy(token, refreshToken));
@@ -64,7 +64,7 @@ OAuthCredentialsSetupWizardState::OAuthCredentialsSetupWizardState(SetupWizardCo
6464
if (!_context->accountBuilder().webFingerAuthenticationServerUrl().isEmpty()) {
6565
auto *job = Jobs::WebFingerInstanceLookupJobFactory(_context->accessManager(), token).startJob(_context->accountBuilder().serverUrl(), this);
6666

67-
connect(job, &CoreJob::finished, this, [=]() {
67+
connect(job, &CoreJob::finished, this, [finish, job, this]() {
6868
if (!job->success()) {
6969
Q_EMIT evaluationFailed(QStringLiteral("Failed to look up instances: %1").arg(job->errorMessage()));
7070
} else {

src/libsync/discovery.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,7 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(
426426
item->_modtime = serverEntry.modtime;
427427
item->_size = serverEntry.size;
428428

429-
auto postProcessServerNew = [=]() mutable {
429+
auto postProcessServerNew = [=, this]() mutable {
430430
// Turn new remote files into virtual files if the option is enabled.
431431
// TODO: move the decision to the backend
432432
const auto &opts = _discoveryData->_syncOptions;
@@ -546,7 +546,7 @@ void ProcessDirectoryJob::processFileAnalyzeRemoteInfo(
546546
// we need to make a request to the server to know that the original file is deleted on the server
547547
_pendingAsyncJobs++;
548548
auto job = new RequestEtagJob(_discoveryData->_account, _discoveryData->_baseUrl, _discoveryData->_remoteFolder + originalPath, this);
549-
connect(job, &RequestEtagJob::finishedSignal, this, [=]() mutable {
549+
connect(job, &RequestEtagJob::finishedSignal, this, [=, this]() mutable {
550550
_pendingAsyncJobs--;
551551
QTimer::singleShot(0, _discoveryData, &DiscoveryPhase::scheduleMoreJobs);
552552
if (job->httpStatusCode() == 207 ||

0 commit comments

Comments
 (0)