aboutsummaryrefslogtreecommitdiff
path: root/src/kconfig_compiler/KConfigSourceGenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kconfig_compiler/KConfigSourceGenerator.cpp')
-rw-r--r--src/kconfig_compiler/KConfigSourceGenerator.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/kconfig_compiler/KConfigSourceGenerator.cpp b/src/kconfig_compiler/KConfigSourceGenerator.cpp
index a8a05f4b..45299a4f 100644
--- a/src/kconfig_compiler/KConfigSourceGenerator.cpp
+++ b/src/kconfig_compiler/KConfigSourceGenerator.cpp
@@ -170,7 +170,9 @@ void KConfigSourceGenerator::createSingletonImplementation()
stream() << " return;\n";
stream() << " }\n";
stream() << " new " << cfg().className << "(";
- if (isString) {
+ if (parseResult.cfgStateConfig) {
+ stream() << "KSharedConfig::openStateConfig(" << arg << ")";
+ } else if (isString) {
stream() << "KSharedConfig::openConfig(" << arg << ")";
} else {
stream() << "std::move(" << arg << ")";
@@ -232,7 +234,9 @@ void KConfigSourceGenerator::createConstructorParameterList()
void KConfigSourceGenerator::createParentConstructorCall()
{
stream() << cfg().inherits << "(";
- if (!parseResult.cfgFileName.isEmpty()) {
+ if (parseResult.cfgStateConfig) {
+ stream() << " KSharedConfig::openStateConfig(QStringLiteral( \"" << parseResult.cfgFileName << "\") ";
+ } else if (!parseResult.cfgFileName.isEmpty()) {
stream() << " QStringLiteral( \"" << parseResult.cfgFileName << "\" ";
}
if (parseResult.cfgFileNameArg) {