Make custom colors in QColorDialog permanent
[ChangeLog][QtWidgets][QColorDialog] Fixed long standing bug that prevented custom colors in QColorDialog to be stored in the settings. Task-number: QTBUG-58424 Change-Id: If3ee5eef75358d811f08e7ce52fb60622972ddd4 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
1327526d8e
commit
52d9fd74b1
@ -278,7 +278,7 @@ void QColorDialogStaticData::readSettings()
|
||||
void QColorDialogStaticData::writeSettings() const
|
||||
{
|
||||
#ifndef QT_NO_SETTINGS
|
||||
if (!customSet) {
|
||||
if (customSet) {
|
||||
QSettings settings(QSettings::UserScope, QStringLiteral("QtProject"));
|
||||
for (int i = 0; i < int(CustomColorCount); ++i)
|
||||
settings.setValue(QLatin1String("Qt/customColors/") + QString::number(i), customRgb[i]);
|
||||
|
Loading…
Reference in New Issue
Block a user