From: Kevin Ottens Date: Wed, 17 Jun 2020 10:29:14 +0000 (+0200) Subject: Capture the pointer to info by value X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~222^2^2~130^2~18 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=03ecaab2590ab82e3d14dccb24ea4056a7930bbe;p=nextcloud-desktop.git 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 --- 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); });