diff options
author | Kevin Ottens <kevin.ottens@nextcloud.com> | 2020-06-17 13:29:14 +0300 |
---|---|---|
committer | Kevin Ottens <kevin.ottens@nextcloud.com> | 2020-06-30 12:29:08 +0300 |
commit | 03ecaab2590ab82e3d14dccb24ea4056a7930bbe (patch) | |
tree | 220f2ad20713589f3cf8c89361dbfc3d63a5c757 /src/gui/accountsettings.cpp | |
parent | 7794de9b5926c9a78017f2ad411b32e489d87d2f (diff) |
Capture the pointer to info by value
Using a reference capture is a disaster waiting to happen here, if for
some reason we'd move from exec() to popup() for the menu below we'd be
getting garbage in the lambda call.
Signed-off-by: Kevin Ottens <kevin.ottens@nextcloud.com>
Diffstat (limited to 'src/gui/accountsettings.cpp')
-rw-r--r-- | src/gui/accountsettings.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index 8b0a36c6f..20b02a15b 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -559,7 +559,7 @@ void AccountSettings::slotSubfolderContextMenuRequested(const QModelIndex& index if (!isEncrypted) { ac = menu.addAction(tr("Encrypt")); - connect(ac, &QAction::triggered, [this, &info] { slotMarkSubfolderEncrypted(info); }); + connect(ac, &QAction::triggered, [this, info] { slotMarkSubfolderEncrypted(info); }); } else { // Ingore decrypting for now since it only works with an empty folder // connect(ac, &QAction::triggered, [this, &info] { slotMarkSubfolderDecrypted(info); }); |