From 8637235e855ef9ad88aa56404a1d16387610e227 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sat, 20 Oct 2018 20:25:06 +0200 Subject: QColorDialog: use customColorCount() instead hardcoded value A hardcoded value of 16 was used in QColorDialogPrivate::_q_addCustom() instead QColorDialogOptions::customColorCount() Fixes: QTBUG-58425 Change-Id: I7ae9881abd5926e0c6b118d5c84c3f259c545d35 Reviewed-by: Samuel Gaist Reviewed-by: Richard Moe Gustavsen --- src/widgets/dialogs/qcolordialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/widgets/dialogs/qcolordialog.cpp') diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index 4aa680af61..be60ea60b0 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1851,7 +1851,7 @@ void QColorDialogPrivate::_q_addCustom() QColorDialogOptions::setCustomColor(nextCust, cs->currentColor()); if (custom) custom->update(); - nextCust = (nextCust+1) % 16; + nextCust = (nextCust+1) % QColorDialogOptions::customColorCount(); } void QColorDialogPrivate::retranslateStrings() -- cgit v1.2.3