diff --git a/autotests/kconfig_compiler/test13.h.ref b/autotests/kconfig_compiler/test13.h.ref --- a/autotests/kconfig_compiler/test13.h.ref +++ b/autotests/kconfig_compiler/test13.h.ref @@ -34,6 +34,7 @@ if (v != mBrightness && !isImmutable( QStringLiteral( "brightness" ) )) { mBrightness = v; Q_EMIT brightnessChanged(); + Q_EMIT configurationChanged(); } } @@ -64,6 +65,9 @@ Q_SIGNALS: void brightnessChanged(); + /** Triggered whenever a setting changes */ + void configurationChanged(); + private: void itemChanged(quint64 flags); diff --git a/autotests/kconfig_compiler/test_signal.h.ref b/autotests/kconfig_compiler/test_signal.h.ref --- a/autotests/kconfig_compiler/test_signal.h.ref +++ b/autotests/kconfig_compiler/test_signal.h.ref @@ -127,11 +127,15 @@ Q_SIGNALS: void emoticonSettingsChanged(); + /** Tell when a complete style change. */ void styleChanged(const QString & stylePath, const QString & StyleCSSVariant); + /** Triggered whenever a setting changes */ + void configurationChanged(); + private: void itemChanged(quint64 flags); 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 @@ -1467,6 +1467,7 @@ } else { out << " " << This << varPath(QStringLiteral("settingsChanged"), cfg) << " |= " << signalEnumName(signal.name) << ";" << endl; } + out << " Q_EMIT " << This << "configurationChanged();" << endl; } if (hasBody) { out << "}" << endl; @@ -1799,8 +1800,9 @@ } h << "#include " << endl; - h << "#include " << endl << endl; + h << "#include " << endl; + h << endl; // Includes for (it = includes.constBegin(); it != includes.constEnd(); ++it) { if ((*it).startsWith('"')) { @@ -2116,8 +2118,12 @@ h << ", "; } } - h << ");" << endl; + h << ");" << endl << endl; + } + h << " /** Triggered whenever a setting changes */" << endl; + h << " void configurationChanged();" << endl; + h << endl; h << " private:" << endl; @@ -2198,7 +2204,6 @@ if (hasNonModifySignals) { h << " uint " << varName(QStringLiteral("settingsChanged"), cfg) << ";" << endl; } - } else { // use a private class for both member variables and items h << " private:" << endl;