diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index a3b6fe935d..93da30aef1 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1755,7 +1755,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, [this] (int index, QRgb color) { + q->connect(custom, &QWellArray::colorChanged, q, [this] (int index, QRgb color) { QColorDialogOptions::setCustomColor(index, color); if (custom) custom->update(); diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index a4b797e5a9..a07cc33711 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -2325,7 +2325,7 @@ void QFileDialog::getOpenFileContent(const QString &nameFilter, const std::funct fileOpenCompleted(fileName, fileContent); }; - connect(dialog, &QFileDialog::fileSelected, fileSelected); + connect(dialog, &QFileDialog::fileSelected, dialog, fileSelected); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->show(); #endif @@ -2365,7 +2365,7 @@ void QFileDialog::saveFileContent(const QByteArray &fileContent, const QString & } }; - connect(dialog, &QFileDialog::fileSelected, fileSelected); + connect(dialog, &QFileDialog::fileSelected, dialog, fileSelected); dialog->setAttribute(Qt::WA_DeleteOnClose); dialog->show(); #endif diff --git a/src/widgets/widgets/qkeysequenceedit.cpp b/src/widgets/widgets/qkeysequenceedit.cpp index d2474e5675..7ae7a048d5 100644 --- a/src/widgets/widgets/qkeysequenceedit.cpp +++ b/src/widgets/widgets/qkeysequenceedit.cpp @@ -20,7 +20,7 @@ void QKeySequenceEditPrivate::init() lineEdit = new QLineEdit(q); lineEdit->setObjectName(QStringLiteral("qt_keysequenceedit_lineedit")); lineEdit->setClearButtonEnabled(false); - q->connect(lineEdit, &QLineEdit::textChanged, [q](const QString& text) { + q->connect(lineEdit, &QLineEdit::textChanged, q, [q](const QString& text) { // Clear the shortcut if the user clicked on the clear icon if (text.isEmpty()) q->clear(); diff --git a/src/widgets/widgets/qmenu.cpp b/src/widgets/widgets/qmenu.cpp index 391aee9cda..b0c653046d 100644 --- a/src/widgets/widgets/qmenu.cpp +++ b/src/widgets/widgets/qmenu.cpp @@ -165,7 +165,7 @@ void QMenuPrivate::init() defaultMenuAction = menuAction = new QAction(q); menuAction->setMenu(q); // this calls setOverrideMenuAction setOverrideMenuAction(nullptr); - QObject::connect(menuAction, &QAction::changed, [this] { + QObject::connect(menuAction, &QAction::changed, q, [this] { if (!tornPopup.isNull()) tornPopup->updateWindowTitle(); });