[Differential] [Request, 33 lines] D3386: Generate an instance with KSharedConfig::Ptr for singleton and arg

graesslin (Martin Gräßlin) noreply at phabricator.kde.org
Wed Nov 16 14:07:42 UTC 2016


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161116/7b0aa248/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list