aboutsummaryrefslogtreecommitdiff
path: root/autotests/kconfig_compiler/test8c.h.ref
diff options
context:
space:
mode:
authorMartin Gräßlin <mgraesslin@kde.org>2016-11-16 14:59:28 +0100
committerMartin Gräßlin <mgraesslin@kde.org>2017-01-06 09:52:45 +0100
commite0db2422362260a2fea3a8e1de4c64011d2f183d (patch)
tree59b5ba0e74c5d24d27156e51e54eb1fc0eb02623 /autotests/kconfig_compiler/test8c.h.ref
parent7d53de59b6e65b0cbdf6eaad4f5dbcd341307003 (diff)
downloadkconfig-e0db2422362260a2fea3a8e1de4c64011d2f183d.tar.gz
kconfig-e0db2422362260a2fea3a8e1de4c64011d2f183d.tar.bz2
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
Diffstat (limited to 'autotests/kconfig_compiler/test8c.h.ref')
-rw-r--r--autotests/kconfig_compiler/test8c.h.ref70
1 files changed, 70 insertions, 0 deletions
diff --git a/autotests/kconfig_compiler/test8c.h.ref b/autotests/kconfig_compiler/test8c.h.ref
new file mode 100644
index 00000000..8ed9962c
--- /dev/null
+++ b/autotests/kconfig_compiler/test8c.h.ref
@@ -0,0 +1,70 @@
+// This file is generated by kconfig_compiler_kf5 from test8c.kcfg.
+// All changes you do to this file will be lost.
+#ifndef TEST8C_H
+#define TEST8C_H
+
+#include <kconfigskeleton.h>
+#include <QCoreApplication>
+#include <QDebug>
+
+class Test8c : public KConfigSkeleton
+{
+ public:
+
+ static Test8c *self();
+ static void instance(const QString& cfgfilename);
+ static void instance(KSharedConfig::Ptr config);
+ ~Test8c();
+
+ /**
+ Set Font
+ */
+ static
+ void setFont( const QFont & v )
+ {
+ if (!self()->isImmutable( QStringLiteral( "Font" ) ))
+ self()->mFont = v;
+ }
+
+ /**
+ Get Font
+ */
+ static
+ QFont font()
+ {
+ return self()->mFont;
+ }
+
+ /**
+ Set TitleFont
+ */
+ static
+ void setTitleFont( const QFont & v )
+ {
+ if (!self()->isImmutable( QStringLiteral( "TitleFont" ) ))
+ self()->mTitleFont = v;
+ }
+
+ /**
+ Get TitleFont
+ */
+ static
+ QFont titleFont()
+ {
+ return self()->mTitleFont;
+ }
+
+ protected:
+ Test8c(KSharedConfig::Ptr config);
+ friend class Test8cHelper;
+
+
+ // Group
+ QFont mFont;
+ QFont mTitleFont;
+
+ private:
+};
+
+#endif
+