Commit 1f75ac80 authored by David Edmundson's avatar David Edmundson
Browse files

[kcms/feedback] Implement setRepresentsDefaults

Test Plan:
Moved slider
Defaults button enabled/disabled appropriately

Reviewers: #plasma, ngraham

Reviewed By: ngraham

Subscribers: meven, plasma-devel

Tags: #plasma

Differential Revision: https://phabricator.kde.org/D26680
parent e5ef7ea3
......@@ -71,4 +71,12 @@ void Feedback::defaults()
setPlasmaFeedbackLevel(KUserFeedback::Provider::NoTelemetry);
}
void Feedback::setPlasmaFeedbackLevel(int plasmaFeedbackLevel) {
if (plasmaFeedbackLevel != m_plasmaFeedbackLevel) {
m_plasmaFeedbackLevel = plasmaFeedbackLevel;
Q_EMIT plasmaFeedbackLevelChanged(plasmaFeedbackLevel);
}
setRepresentsDefaults(plasmaFeedbackLevel == KUserFeedback::Provider::NoTelemetry);
}
#include "feedback.moc"
......@@ -38,12 +38,7 @@ class Feedback : public KQuickAddons::ConfigModule
bool feedbackEnabled() const;
int plasmaFeedbackLevel() const { return m_plasmaFeedbackLevel; }
void setPlasmaFeedbackLevel(int plasmaFeedbackLevel) {
if (plasmaFeedbackLevel != m_plasmaFeedbackLevel) {
m_plasmaFeedbackLevel = plasmaFeedbackLevel;
Q_EMIT plasmaFeedbackLevelChanged(plasmaFeedbackLevel);
}
}
void setPlasmaFeedbackLevel(int plasmaFeedbackLevel);
public Q_SLOTS:
void load() override;
......
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