Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthieu Gallien <matthieu.gallien@nextcloud.com>2022-05-17 11:07:37 +0300
committerMatthieu Gallien <matthieu_gallien@yahoo.fr>2022-05-17 14:33:22 +0300
commitd622999971a4bbd9ce703ef45725b893ec5a154a (patch)
tree3c76ee998f991485963e23ea848e386241b215a9 /src/gui/tray
parenta8997f4d44964724a433373f05d8f55e555b0681 (diff)
add explicit capture for lambda
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
Diffstat (limited to 'src/gui/tray')
-rw-r--r--src/gui/tray/notificationhandler.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/tray/notificationhandler.cpp b/src/gui/tray/notificationhandler.cpp
index b429093ad..9a9e1893b 100644
--- a/src/gui/tray/notificationhandler.cpp
+++ b/src/gui/tray/notificationhandler.cpp
@@ -150,9 +150,11 @@ void ServerNotificationHandler::slotNotificationsReceived(const QJsonDocument &j
// Add another action to dismiss notification on server
// https://github.com/owncloud/notifications/blob/master/docs/ocs-endpoint-v1.md#deleting-a-notification-for-a-user
constexpr auto deleteVerb = "DELETE";
- if (std::find_if(std::cbegin(a._links), std::cend(a._links), [](const ActivityLink& link) {
- return link._verb == deleteVerb;
- }) == std::cend(a._links)) {
+ const auto itLink = std::find_if(std::cbegin(a._links), std::cend(a._links), [deleteVerb](const ActivityLink& link) {
+ Q_UNUSED(deleteVerb)
+ return link._verb == deleteVerb;
+ });
+ if (itLink == std::cend(a._links)) {
ActivityLink al;
al._label = tr("Dismiss");
al._link = Utility::concatUrlPath(ai->account()->url(), notificationsPath + "/" + QString::number(a._id)).toString();