When using KConfig Compiler with NameSpace and QmlRegistration options enabled, the forward declaration of QQmlEngine and QJSEngine are placed inside the namespace. If the Singleton option is enabled, the final code fails to compile. Specifically, these line in the generated source code: ``` using namespace NameSpace; // ... Config *Config::create(QQmlEngine *, QJSEngine *) { // Error: Incomplete type 'Namespace::QQmlEngine' named in nested name specifier QQmlEngine::setObjectOwnership(self(), QQmlEngine::CppOwnership); return self(); } ```
(In reply to Trần Nam Tuấn (Bill) from comment #0) > When using KConfig Compiler with NameSpace and QmlRegistration options > enabled, the forward declaration of QQmlEngine and QJSEngine are placed > inside the namespace. If the Singleton option is enabled, the final code > fails to compile. > Rephrasing: When using KConfig Compiler with NameSpace, Singleton and QmlRegistration options enabled, the forward declaration of QQmlEngine and QJSEngine are placed inside the namespace, which causes the final code to fail to compile.