From ec653fad3931c3db82a1acf697730ba0764f7f22 Mon Sep 17 00:00:00 2001 From: Giuseppe D'Angelo Date: Sat, 24 Jun 2023 12:36:50 +0200 Subject: [PATCH] QtWidgets: code tidies: use the 4-arg connect overload The 3-arg connect is error-prone and makes the lifetime of the connection unclear. Change-Id: I1b6b10d814412f02ae534d408723762ba7cd815b Reviewed-by: Volker Hilsheimer --- src/widgets/widgets/qcombobox.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 11fccc50ac..4d6ce39007 100644 --- a/src/widgets/widgets/qcombobox.cpp +++ b/src/widgets/widgets/qcombobox.cpp @@ -2516,7 +2516,7 @@ bool QComboBoxPrivate::showNativePopup() currentItem = item; IndexSetter setter = { i, q }; - QObject::connect(item, &QPlatformMenuItem::activated, setter); + QObject::connect(item, &QPlatformMenuItem::activated, q, setter); m_platformMenu->insertMenuItem(item, 0); m_platformMenu->syncMenuItem(item);