graesslin created this revision. graesslin added a reviewer: Frameworks. REVISION SUMMARY In case a kcfg with arg="true" was used and singleton the static instance method only accepted a QString config name. This made it impossible to combine a singleton config with an already existing and open KSharedConfig::Ptr. With this change an overloaded instance method is added which takes a KSharedConfig::Ptr as argument. The private ctor, though, only takes a KSharedConfig::Ptr and the instance method taking a QString argument uses KSharedConfig::openConfig on the config file name. This provides full API compatibility and at the same time allows to use KSharedConfig in addition to the arg name based variant.
TEST PLAN kconfigcompiler tests still pass and a config with singleton and arg="true" generates the code as I need it BRANCH kconfigcompiler-instance-ksharedconfig REVISION DETAIL https://phabricator.kde.org/D3386 AFFECTED FILES src/kconfig_compiler/kconfig_compiler.cpp EMAIL PREFERENCES https://phabricator.kde.org/settings/panel/emailpreferences/ To: graesslin, #frameworks