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 <santhosh.kumar.selvaraj@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
(cherry picked from commit 4a26ae1b270bfeaac5cf60850407fadfbe5db3ab)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Axel Spoerl 2023-07-21 10:47:01 +02:00 committed by Qt Cherry-pick Bot
parent e067969ef7
commit 3094ac8e55

View File

@ -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();
}