aboutsummaryrefslogtreecommitdiffstats
path: root/src/quick/items/qquicktableview.cpp
diff options
context:
space:
mode:
authorGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2022-12-16 16:54:59 +0100
committerGiuseppe D'Angelo <giuseppe.dangelo@kdab.com>2022-12-18 16:37:33 +0100
commit38e0a0db18cae5768eab46954460a8ed06843d59 (patch)
treeaedbf2703e451f74319e9efee168b6fa857ee889 /src/quick/items/qquicktableview.cpp
parent1309bac26b71d184c924237ba3c8723aa79b5ba1 (diff)
QQuickTableView: fix C++20 build
Implicit capture of `*this` by reference when using [=] is deprecated. We can capture using [&] instead: all the variables used in the lambda are `const` anyways. Change-Id: Ib165e99945a5f673d97f0abdefcd4b4adee31624 Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/quick/items/qquicktableview.cpp')
-rw-r--r--src/quick/items/qquicktableview.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp
index 199c6f9652..59247a2ca7 100644
--- a/src/quick/items/qquicktableview.cpp
+++ b/src/quick/items/qquicktableview.cpp
@@ -4830,7 +4830,7 @@ bool QQuickTableViewPrivate::setCurrentIndexFromKeyEvent(QKeyEvent *e)
return false;
}
- auto beginMoveCurrentIndex = [=](){
+ auto beginMoveCurrentIndex = [&](){
if (!select) {
clearSelection();
} else if (selectionRectangle().isEmpty()) {
@@ -4842,7 +4842,7 @@ bool QQuickTableViewPrivate::setCurrentIndexFromKeyEvent(QKeyEvent *e)
}
};
- auto endMoveCurrentIndex = [=](const QPoint &cell){
+ auto endMoveCurrentIndex = [&](const QPoint &cell){
if (select) {
if (polishScheduled)
forceLayout(true);