summaryrefslogtreecommitdiffstats
path: root/src/gui
diff options
context:
space:
mode:
authorSerge Lysenko <sergii.lysenko@avid.com>2017-04-06 12:00:04 +0300
committerSerge Lysenko <lserge@auster.in.ua>2017-12-08 16:33:49 +0000
commit5a40143ed622cbd84d5c06afe6cb12017499f69b (patch)
treeb4986be0dbae1d87b847b73425144eb4c719c426 /src/gui
parent4d88d79aa507777bce40740b21747f656efc074d (diff)
Fix persistence of custom colors palette in QColorDialog
QColorDialog does not save custom colors after application relaunching, if those colors were changed with drag'n'drop Task-number: QTBUG-64500 Change-Id: I8ba6e1ef4e078f7b93463e7b20c9e21659d4777e Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@qt.io>
Diffstat (limited to 'src/gui')
-rw-r--r--src/gui/kernel/qplatformdialoghelper.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gui/kernel/qplatformdialoghelper.cpp b/src/gui/kernel/qplatformdialoghelper.cpp
index ad134ebe7f..fbadb48f70 100644
--- a/src/gui/kernel/qplatformdialoghelper.cpp
+++ b/src/gui/kernel/qplatformdialoghelper.cpp
@@ -297,6 +297,7 @@ void QColorDialogStaticData::writeSettings() const
{
#ifndef QT_NO_SETTINGS
if (customSet) {
+ const_cast<QColorDialogStaticData*>(this)->customSet = false;
QSettings settings(QSettings::UserScope, QStringLiteral("QtProject"));
for (int i = 0; i < int(CustomColorCount); ++i)
settings.setValue(QLatin1String("Qt/customColors/") + QString::number(i), customRgb[i]);