diff --git a/src/kconfig_compiler/kconfig_compiler.cpp b/src/kconfig_compiler/kconfig_compiler.cpp --- a/src/kconfig_compiler/kconfig_compiler.cpp +++ b/src/kconfig_compiler/kconfig_compiler.cpp @@ -113,6 +113,7 @@ qCategoryLoggingName = codegenConfig.value(QStringLiteral("CategoryLoggingName"), QString()).toString(); headerExtension = codegenConfig.value(QStringLiteral("HeaderExtension"), QStringLiteral("h")).toString(); sourceExtension = codegenConfig.value(QStringLiteral("SourceExtension"), QStringLiteral("cpp")).toString(); + autoSave = codegenConfig.value(QStringLiteral("AutoSave"), false).toBool(); } public: @@ -148,6 +149,7 @@ bool useEnumTypes; bool itemAccessors; bool allNotifiers; + bool autoSave; TranslationSystem translationSystem; QString translationDomain; bool generateProperties; @@ -1467,6 +1469,9 @@ } else { out << " " << This << varPath(QStringLiteral("settingsChanged"), cfg) << " |= " << signalEnumName(signal.name) << ";" << endl; } + if (cfg.autoSave) { + out << " " << This << "save();"; + } } if (hasBody) { out << "}" << endl;