diff options
author | Marc Mutz <marc.mutz@kdab.com> | 2019-07-06 11:04:34 +0200 |
---|---|---|
committer | Marc Mutz <marc.mutz@kdab.com> | 2019-07-06 11:57:31 +0000 |
commit | f5745609481dd4f660e196b8438e25615d3dfe0a (patch) | |
tree | b224a7b9c969b22fcc1a3c20dac937945dcee273 /src/widgets/itemviews | |
parent | 90a29a73f84ffd6386beb37690c328b039423fab (diff) |
Fix compilation with C++20
Implicit capture of 'this' in [=] is deprecated in C++20.
Fix by using explicit captures.
Change-Id: I1633446f4670202b0d1aca938d8c27dbc0c1411e
Reviewed-by: MÃ¥rten Nordheim <marten.nordheim@qt.io>
Diffstat (limited to 'src/widgets/itemviews')
-rw-r--r-- | src/widgets/itemviews/qlistview.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/widgets/itemviews/qlistview.cpp b/src/widgets/itemviews/qlistview.cpp index e07514f297..1c01bba771 100644 --- a/src/widgets/itemviews/qlistview.cpp +++ b/src/widgets/itemviews/qlistview.cpp @@ -1895,7 +1895,7 @@ bool QListViewPrivate::dropOn(QDropEvent *event, int *dropRow, int *dropCol, QMo void QListViewPrivate::removeCurrentAndDisabled(QVector<QModelIndex> *indexes, const QModelIndex ¤t) const { - auto isCurrentOrDisabled = [=](const QModelIndex &index) { + auto isCurrentOrDisabled = [this, current](const QModelIndex &index) { return !isIndexEnabled(index) || index == current; }; indexes->erase(std::remove_if(indexes->begin(), indexes->end(), |