From cd7884a0e507329766174a2ea620e52d0eb16773 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 18 Mar 2020 11:02:35 +0100 Subject: [PATCH] [welcomeq] Fix build with clang - can't convert lambda-with-captures to a function pointer (Clang 9) - instead, use a context property .. QmlViewStep already sets a "config" property with the Config object, but WelcomeQ wants it as another name as well. - this avoids registering the Welcome object across all QML pages, as well. NOTE: needs to have the QML adjusted for this change. --- src/modules/welcomeq/WelcomeQmlViewStep.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modules/welcomeq/WelcomeQmlViewStep.cpp b/src/modules/welcomeq/WelcomeQmlViewStep.cpp index 7570de4ae..ef49dea32 100644 --- a/src/modules/welcomeq/WelcomeQmlViewStep.cpp +++ b/src/modules/welcomeq/WelcomeQmlViewStep.cpp @@ -51,7 +51,6 @@ WelcomeQmlViewStep::WelcomeQmlViewStep( QObject* parent ) // this, // &WelcomeQmlViewStep::nextStatusChanged ); // emit nextStatusChanged(true); - qmlRegisterSingletonType< Config >( "io.calamares.module", 1, 0, "Welcome", [&](QQmlEngine*, QJSEngine*) -> QObject* { return m_config; } ); } @@ -158,6 +157,7 @@ WelcomeQmlViewStep::setConfigurationMap( const QVariantMap& configurationMap ) } Calamares::QmlViewStep::setConfigurationMap( configurationMap ); // call parent implementation last + setContextProperty( "Welcome", m_config ); } Calamares::RequirementsList