Commit cfd0ba78 authored by David Redondo's avatar David Redondo 🏎
Browse files

Use separate face controller for appearance config

This is a workaround for the page being totally broken on when opened
again after the dialog was closed for the first time. Using a new controller
works around that.
BUG:424458
parent 83982f8e
......@@ -39,10 +39,12 @@ QQC2.Control {
function saveConfig() {
contentItem.saveConfig();
plasmoid.nativeInterface.faceController.reloadConfig()
}
contentItem: plasmoid.nativeInterface.faceController.appearanceConfigUi
// Workaround for Bug 424458, when reusing the controller/item things break
contentItem: plasmoid.nativeInterface.workaroundController(root).appearanceConfigUi
Connections {
target: contentItem
function onConfigurationChanged() {
......
......@@ -77,6 +77,13 @@ KSysGuard::SensorFaceController *SystemMonitor::faceController() const
return m_sensorFaceController;
}
KSysGuard::SensorFaceController *SystemMonitor::workaroundController(QQuickItem *context) const
{
KConfigGroup cg = config();
return new KSysGuard::SensorFaceController(cg, qmlEngine(context));
}
void SystemMonitor::configChanged()
{
if (m_sensorFaceController) {
......
......@@ -52,6 +52,9 @@ public:
KSysGuard::SensorFaceController *faceController() const;
// Workaround for Bug 424458, when reusing the controller/item things break in ConfigAppearance
Q_INVOKABLE KSysGuard::SensorFaceController *workaroundController(QQuickItem *context) const;
public Q_SLOTS:
void configChanged() override;
......
Supports Markdown
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