From 1e3e53d30a38bd5aa2aec2220a2b806b465ba9ac Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 27 Aug 2019 15:12:47 +0200 Subject: [PATCH] [libcalamaresui] Set activatedInCalamares special property - when the QML is activated, if the slideshow has this property, set it to true. This enables the keyboard shortcuts. --- src/libcalamaresui/ExecutionViewStep.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/libcalamaresui/ExecutionViewStep.cpp b/src/libcalamaresui/ExecutionViewStep.cpp index c131d9c9a..2b2c47e88 100644 --- a/src/libcalamaresui/ExecutionViewStep.cpp +++ b/src/libcalamaresui/ExecutionViewStep.cpp @@ -191,6 +191,17 @@ activateSlideShow( QQuickItem* slideshow, QQuickWidget* widget) { // API version 1 assumes onCompleted is the trigger widget->setSource( QUrl::fromLocalFile( Calamares::Branding::instance()->slideshowPath() ) ); + slideshow = widget->rootObject(); + } + + if ( slideshow ) + { + static const char propertyName[] = "activatedInCalamares"; + auto active = slideshow->property( propertyName ); + if ( active.isValid() && ( active.type() == QVariant::Bool ) && !active.toBool() ) + { + slideshow->setProperty( propertyName, true ); + } } }