From 3094ac8e55ceae3a1c1809fe8af8b7ef1a89a4f0 Mon Sep 17 00:00:00 2001 From: Axel Spoerl Date: Fri, 21 Jul 2023 10:47:01 +0200 Subject: [PATCH] QColorDialog: React to HSV values during manual edit instead of change The existing signal connection can cause a loop and undefined behavior in the interaction between the line edit for a hex rgb color and the individual rgb values. => Change connection to textEdited, to react only on manual editing. Fixes: QTBUG-115189 Change-Id: Ie3062c575652b905a8ab16edb2f5f77f8d150f36 Reviewed-by: Santhosh Kumar Reviewed-by: Qt CI Bot (cherry picked from commit 4a26ae1b270bfeaac5cf60850407fadfbe5db3ab) Reviewed-by: Qt Cherry-pick Bot --- src/widgets/dialogs/qcolordialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 1bb65e6c24d..4ab9b88c8fd 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1316,7 +1316,7 @@ QColorShower::QColorShower(QColorDialog *parent) connect(gEd, &QSpinBox::valueChanged, this, &QColorShower::rgbEd); connect(bEd, &QSpinBox::valueChanged, this, &QColorShower::rgbEd); connect(alphaEd, &QSpinBox::valueChanged, this, &QColorShower::rgbEd); - connect(htEd, &QLineEdit::textChanged, this, &QColorShower::htmlEd); + connect(htEd, &QLineEdit::textEdited, this, &QColorShower::htmlEd); retranslateStrings(); }