From d101fdee54adc076c8e54dd4d6a6239aa1014901 Mon Sep 17 00:00:00 2001 From: Ken Moore Date: Tue, 15 Jan 2019 07:44:51 -0500 Subject: Track a Qt change with Qt 5.12: They added a new color to the QPalette class, which was throwing off the settings-load system. Make the settings-load system more robust by supporting files which had fewer colors specified (backwards compatible), while also updating the palette editor to add support for the new color. --- .../core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp') diff --git a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp index 98f9c865..bc8ff355 100644 --- a/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp +++ b/src-qt5/core/lumina-theme-engine/src/lthemeengine/appearancepage.cpp @@ -253,8 +253,8 @@ QPalette AppearancePage::loadColorScheme(const QString &filePath){ QStringList inactiveColors = settings.value("inactive_colors").toStringList(); QStringList disabledColors = settings.value("disabled_colors").toStringList(); settings.endGroup(); - if(activeColors.count() == QPalette::NColorRoles && inactiveColors.count() == QPalette::NColorRoles && disabledColors.count() == QPalette::NColorRoles){ - for (int i = 0; i < QPalette::NColorRoles; i++){ + if(activeColors.count() <= QPalette::NColorRoles && inactiveColors.count() <= QPalette::NColorRoles && disabledColors.count() <= QPalette::NColorRoles){ + for (int i = 0; i < QPalette::NColorRoles && i