[libcalamaresui] Less mutex shenanigans

This commit is contained in:
Adriaan de Groot 2020-09-03 16:11:35 +02:00
parent 32649f78ea
commit d94b9caba5
2 changed files with 12 additions and 5 deletions

View File

@ -117,11 +117,8 @@ SlideshowQML::loadQmlV2Complete()
{
// We're alreay visible! Must have been slow QML loading, and we
// passed onActivate already. changeSlideShowState() locks
// the same mutex: we could set up a workaround to call
// changeSlideShowState() later after destruction of l.
//
l.unlock();
changeSlideShowState( Slideshow::Start );
// the same mutex: call changeSlideShowState() after l is dead.
QTimer::singleShot( 0, this, &SlideshowQML::startSlideShow );
}
}
}
@ -142,6 +139,13 @@ SlideshowQML::loadQmlV2Complete()
}
}
void
SlideshowQML::startSlideShow()
{
changeSlideShowState( Slideshow::Start );
}
/*
* Applies V1 and V2 QML activation / deactivation:
* - V1 loads the QML in @p widget on activation. Sets root object property

View File

@ -100,6 +100,9 @@ public slots:
void loadQmlV2Complete();
void loadQmlV2(); ///< Loads the slideshow QML (from branding) for API version 2
/// Implementation detail
void startSlideShow();
private:
QQuickWidget* m_qmlShow;
QQmlComponent* m_qmlComponent;