KCModuleQml: Ensure defaulted is emitted with the current configModule…

Authored by meven on Jan 16 2020, 1:52 PM.

Description

KCModuleQml: Ensure defaulted is emitted with the current configModule->representsDefaults on load

Summary:
ConfigModule are instantiated before KCModuleQml in KCModuleLoader.
ConfigModule can sometimes change their representsDefault before KCModuleQml is instantiated.
Furthermore KCModuleProxyPrivate::loadModule that wires the connection between defaulted signal and the restore button state update is set up after KCModuleQml constructor.
This causes KCModuleQml whose ConfigModule setup their representsDefaults before they are loaded, to have their restore default alwaas enabled regardless of their ConfigModule representsDefaults value.

Test Plan:
NightColor KCM with D26049

After:
On load with default settings saved, the "restore default" button is disabled.

Before:
On load "restore default" button is always enabled.

Reviewers: crossi, mart, Frameworks, ervin

Reviewed By: ervin

Subscribers: kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D26085