From 4a26ae1b270bfeaac5cf60850407fadfbe5db3ab 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 Pick-to: 6.6 6.5 Change-Id: Ie3062c575652b905a8ab16edb2f5f77f8d150f36 Reviewed-by: Santhosh Kumar Reviewed-by: Qt CI 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 93da30aef1..69358b7484 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(); }