[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.
This commit is contained in:
Adriaan de Groot 2019-08-27 15:12:47 +02:00
parent 7df6ed31e9
commit 1e3e53d30a

View File

@ -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 );
}
}
}