Commit 29861197 authored by Cyril Rossi's avatar Cyril Rossi
Browse files

KCM Colors : take into account immutable property

Reviewers: ervin, bport, mart, davidedmundson, #plasma

Subscribers: plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D25522
parent 873adfe4
......@@ -67,6 +67,7 @@ KCMColors::KCMColors(QObject *parent, const QVariantList &args)
qmlRegisterUncreatableType<KCMColors>("org.kde.private.kcms.colors", 1, 0, "KCM", QStringLiteral("Cannot create instances of KCM"));
qmlRegisterType<ColorsModel>();
qmlRegisterType<FilterProxyModel>();
qmlRegisterType<ColorsSettings>();
KAboutData *about = new KAboutData(QStringLiteral("kcm_colors"), i18n("Colors"),
QStringLiteral("2.0"), QString(), KAboutLicense::GPL);
......@@ -105,6 +106,11 @@ FilterProxyModel *KCMColors::filteredModel() const
return m_filteredModel;
}
ColorsSettings *KCMColors::colorsSettings() const
{
return m_settings;
}
bool KCMColors::downloadingFile() const
{
return m_tempCopyJob;
......
......@@ -48,6 +48,7 @@ class KCMColors : public KQuickAddons::ManagedConfigModule
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 @@ public:
ColorsModel *model() const;
FilterProxyModel *filteredModel() const;
ColorsSettings *colorsSettings() const;
bool downloadingFile() const;
Q_INVOKABLE void getNewStuff(QQuickItem *ctx);
......
......@@ -47,7 +47,7 @@ KCM.GridViewKCM {
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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment