diff options
author | Mårten Nordheim <marten.nordheim@qt.io> | 2022-03-15 13:02:41 +0100 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2022-03-17 17:14:38 +0100 |
commit | 4b8c20a29715a83aeabc5bc325e0e05e33c859f7 (patch) | |
tree | 74710b6a835edf618b605ac8207e7c318aff5b13 /src/widgets/dialogs/qcolordialog.cpp | |
parent | fb0c7a9956824fbc3e3a3ab70cf7e2e5a622e85d (diff) |
Fix deprecated use of QColor::setNamedColor
'Use fromString() instead.'
Change-Id: I4efef147a8b0486f2664fd7fe6c35a9c82479b90
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qcolordialog.cpp')
-rw-r--r-- | src/widgets/dialogs/qcolordialog.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index e2db3d3be7..a93c6fe629 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1400,9 +1400,8 @@ void QColorShower::hsvEd() void QColorShower::htmlEd() { - QColor c; QString t = htEd->text(); - c.setNamedColor(t); + QColor c = QColor::fromString(t); if (!c.isValid()) return; curCol = qRgba(c.red(), c.green(), c.blue(), currentAlpha()); |