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>bb10
parent
90a29a73f8
commit
f574560948
|
|
@ -102,7 +102,7 @@ QEvdevMouseManager::QEvdevMouseManager(const QString &key, const QString &specif
|
|||
}
|
||||
|
||||
QInputDeviceManager *manager = QGuiApplicationPrivate::inputDeviceManager();
|
||||
connect(manager, &QInputDeviceManager::cursorPositionChangeRequested, [=](const QPoint &pos) {
|
||||
connect(manager, &QInputDeviceManager::cursorPositionChangeRequested, [this](const QPoint &pos) {
|
||||
m_x = pos.x();
|
||||
m_y = pos.y();
|
||||
clampPosition();
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ QLibInputHandler::QLibInputHandler(const QString &key, const QString &spec)
|
|||
m_touch.reset(new QLibInputTouch);
|
||||
|
||||
QInputDeviceManager *manager = QGuiApplicationPrivate::inputDeviceManager();
|
||||
connect(manager, &QInputDeviceManager::cursorPositionChangeRequested, [=](const QPoint &pos) {
|
||||
connect(manager, &QInputDeviceManager::cursorPositionChangeRequested, [this](const QPoint &pos) {
|
||||
m_pointer->setPos(pos);
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -1739,7 +1739,7 @@ void QColorDialogPrivate::initWidgets()
|
|||
q->connect(custom, SIGNAL(selected(int,int)), SLOT(_q_newCustom(int,int)));
|
||||
q->connect(custom, SIGNAL(currentChanged(int,int)), SLOT(_q_nextCustom(int,int)));
|
||||
|
||||
q->connect(custom, &QWellArray::colorChanged, [=] (int index, QRgb color) {
|
||||
q->connect(custom, &QWellArray::colorChanged, [this] (int index, QRgb color) {
|
||||
QColorDialogOptions::setCustomColor(index, color);
|
||||
if (custom)
|
||||
custom->update();
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -200,7 +200,7 @@ void QMenuPrivate::init()
|
|||
q->setAttribute(Qt::WA_X11NetWmWindowTypePopupMenu);
|
||||
defaultMenuAction = menuAction = new QAction(q);
|
||||
menuAction->d_func()->menu = q;
|
||||
QObject::connect(menuAction, &QAction::changed, [=] {
|
||||
QObject::connect(menuAction, &QAction::changed, [this] {
|
||||
if (!tornPopup.isNull())
|
||||
tornPopup->updateWindowTitle();
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue