diff --git a/kcms/colors/colors.h b/kcms/colors/colors.h --- a/kcms/colors/colors.h +++ b/kcms/colors/colors.h @@ -48,6 +48,7 @@ Q_PROPERTY(ColorsModel *model READ model CONSTANT) Q_PROPERTY(FilterProxyModel *filteredModel READ filteredModel CONSTANT) + Q_PROPERTY(ColorsSettings *colorsSettings READ colorsSettings CONSTANT) Q_PROPERTY(bool downloadingFile READ downloadingFile NOTIFY downloadingFileChanged) public: @@ -70,7 +71,7 @@ ColorsModel *model() const; FilterProxyModel *filteredModel() const; - + ColorsSettings *colorsSettings() const; bool downloadingFile() const; Q_INVOKABLE void getNewStuff(QQuickItem *ctx); diff --git a/kcms/colors/colors.cpp b/kcms/colors/colors.cpp --- a/kcms/colors/colors.cpp +++ b/kcms/colors/colors.cpp @@ -67,6 +67,7 @@ qmlRegisterUncreatableType("org.kde.private.kcms.colors", 1, 0, "KCM", QStringLiteral("Cannot create instances of KCM")); qmlRegisterType(); qmlRegisterType(); + qmlRegisterType(); KAboutData *about = new KAboutData(QStringLiteral("kcm_colors"), i18n("Colors"), QStringLiteral("2.0"), QString(), KAboutLicense::GPL); @@ -105,6 +106,11 @@ return m_filteredModel; } +ColorsSettings *KCMColors::colorsSettings() const +{ + return m_settings; +} + bool KCMColors::downloadingFile() const { return m_tempCopyJob; diff --git a/kcms/colors/package/contents/ui/main.qml b/kcms/colors/package/contents/ui/main.qml --- a/kcms/colors/package/contents/ui/main.qml +++ b/kcms/colors/package/contents/ui/main.qml @@ -47,7 +47,7 @@ value: filterCombo.model[filterCombo.currentIndex].filter } - enabled: !kcm.downloadingFile + enabled: !kcm.downloadingFile && !kcm.colorsSettings.isImmutable("colorScheme") Component.onCompleted: { // The thumbnails are a bit more elaborate and need more room, especially when translated