diff options
author | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2023-06-24 12:36:50 +0200 |
---|---|---|
committer | Giuseppe D'Angelo <giuseppe.dangelo@kdab.com> | 2023-06-28 01:32:10 +0200 |
commit | 9e87c3e958a6cdd73ce22127dbc3b8aec217582f (patch) | |
tree | b99b392ce4795030c36b288b6a2c7fb9b25ef2df /src/widgets/widgets/qkeysequenceedit.cpp | |
parent | df735d794fd2e545c18b9e345e833422bcd64329 (diff) |
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: I4e518dd4a9733cc0a42b02639cce9c6136ad5afc
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/widgets/widgets/qkeysequenceedit.cpp')
-rw-r--r-- | src/widgets/widgets/qkeysequenceedit.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
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(); |