From e0db2422362260a2fea3a8e1de4c64011d2f183d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Wed, 16 Nov 2016 14:59:28 +0100 Subject: Generate an instance with KSharedConfig::Ptr for singleton and arg 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 Reviewers: #frameworks, dfaure, mdawson Differential Revision: https://phabricator.kde.org/D3690 --- autotests/kconfig_compiler/kconfigcompiler_test.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'autotests/kconfig_compiler/kconfigcompiler_test.cpp') diff --git a/autotests/kconfig_compiler/kconfigcompiler_test.cpp b/autotests/kconfig_compiler/kconfigcompiler_test.cpp index 88b462ef..01efd602 100644 --- a/autotests/kconfig_compiler/kconfigcompiler_test.cpp +++ b/autotests/kconfig_compiler/kconfigcompiler_test.cpp @@ -38,6 +38,7 @@ static CompilerTestSet testCases = { "test7.cpp", "test7.h", "test8a.cpp", "test8a.h", "test8b.cpp", "test8b.h", + "test8c.cpp", "test8c.h", "test9.h", "test9.cpp", "test10.h", "test10.cpp", "test11.h", "test11.cpp", -- cgit v1.2.1