diff --git a/kcms/colors/colors.h b/kcms/colors/colors.h --- a/kcms/colors/colors.h +++ b/kcms/colors/colors.h @@ -55,13 +55,6 @@ KCMColors(QObject *parent, const QVariantList &args); ~KCMColors() override; - enum Roles { - SchemeNameRole = Qt::UserRole + 1, - PaletteRole, - RemovableRole, - PendingDeletionRole - }; - enum SchemeFilter { AllSchemes, LightSchemes, diff --git a/kcms/colors/colors.cpp b/kcms/colors/colors.cpp --- a/kcms/colors/colors.cpp +++ b/kcms/colors/colors.cpp @@ -243,7 +243,7 @@ m_model->load(); - const auto results = m_model->match(m_model->index(0, 0), SchemeNameRole, newName); + const auto results = m_model->match(m_model->index(0, 0), ColorsModel::SchemeNameRole, newName); if (!results.isEmpty()) { m_model->setSelectedScheme(newName); } @@ -278,8 +278,8 @@ }); QStringList args; - args << idx.data(KCMColors::SchemeNameRole).toString(); - if (idx.data(KCMColors::RemovableRole).toBool()) { + args << idx.data(ColorsModel::SchemeNameRole).toString(); + if (idx.data(ColorsModel::RemovableRole).toBool()) { args << QStringLiteral("--overwrite"); } diff --git a/kcms/colors/filterproxymodel.cpp b/kcms/colors/filterproxymodel.cpp --- a/kcms/colors/filterproxymodel.cpp +++ b/kcms/colors/filterproxymodel.cpp @@ -109,13 +109,13 @@ if (!m_query.isEmpty()) { if (!idx.data(Qt::DisplayRole).toString().contains(m_query, Qt::CaseInsensitive) - && !idx.data(KCMColors::SchemeNameRole).toString().contains(m_query, Qt::CaseInsensitive)) { + && !idx.data(ColorsModel::SchemeNameRole).toString().contains(m_query, Qt::CaseInsensitive)) { return false; } } if (m_filter != KCMColors::AllSchemes) { - const QPalette palette = idx.data(KCMColors::PaletteRole).value(); + const QPalette palette = idx.data(ColorsModel::PaletteRole).value(); const int windowBackgroundGray = qGray(palette.window().color().rgb());