graesslin created this revision.
graesslin added reviewers: Frameworks, dfaure, mdawson.

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.
  
  The change is source-incompatible in the following situation:
  
  - kcfgfile arg="true"
  - Singleton = true
  - Inherits is specified
  
  In this situation the previous revision created an instance method with
  a QString argument and passed that to the parent constructor. This is
  not in accordance with the documentation. Any user of this behavior was
  relying on a bug. With this change now the call to the parent
  constructor carries a KSharedConfigPtr.

TEST PLAN
  kconfigcompiler tests still pass and a config with singleton
  and arg="true" generates the code as I need it

REPOSITORY
  R237 KConfig

BRANCH
  kconfig-change-try2

REVISION DETAIL
  https://phabricator.kde.org/D3690

AFFECTED FILES
  autotests/kconfig_compiler/CMakeLists.txt
  autotests/kconfig_compiler/kconfigcompiler_test.cpp
  autotests/kconfig_compiler/test8c.cpp.ref
  autotests/kconfig_compiler/test8c.h.ref
  autotests/kconfig_compiler/test8c.kcfg
  autotests/kconfig_compiler/test8c.kcfgc
  autotests/kconfig_compiler/test8main.cpp
  src/kconfig_compiler/kconfig_compiler.cpp

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: graesslin, #frameworks, dfaure, mdawson

Reply via email to