Only load QML when the install page is activated.

main
Teo Mrnjavac 10 years ago
parent 4ea0cba497
commit 851f175ae7

@ -33,6 +33,7 @@
#include <QtQuickWidgets/QQuickWidget>
#include <QQmlEngine>
namespace Calamares
{
@ -56,27 +57,21 @@ InstallationViewStep::InstallationViewStep( QObject* parent )
m_slideShow->engine()->addImportPath( CalamaresUtils::qmlModulesDir().absolutePath() );
CALAMARES_RETRANSLATE_WIDGET( m_widget,
if ( !Calamares::Branding::instance()->slideshowPath().isEmpty() )
m_slideShow->setSource( QUrl::fromLocalFile( Calamares::Branding::instance()
->slideshowPath() ) );
)
innerLayout->addSpacing( CalamaresUtils::defaultFontHeight() / 2 );
innerLayout->addWidget( m_progressBar );
innerLayout->addWidget( m_label );
connect( JobQueue::instance(), &JobQueue::progress,
this, &InstallationViewStep::updateFromJobQueue );
cDebug() << "QML import paths:" << m_slideShow->engine()->importPathList();
}
QString
InstallationViewStep::prettyName() const
{
return tr( "Install" );
}
QWidget*
InstallationViewStep::widget()
{
@ -89,11 +84,13 @@ InstallationViewStep::next()
{
}
void
InstallationViewStep::back()
{
}
bool
InstallationViewStep::isNextEnabled() const
{
@ -114,18 +111,35 @@ InstallationViewStep::isAtBeginning() const
return true;
}
bool
InstallationViewStep::isAtEnd() const
{
return true;
}
void
InstallationViewStep::onActivate()
{
CALAMARES_RETRANSLATE_WIDGET( m_widget,
if ( !Calamares::Branding::instance()->slideshowPath().isEmpty() )
m_slideShow->setSource( QUrl::fromLocalFile( Calamares::Branding::instance()
->slideshowPath() ) );
)
connect( JobQueue::instance(), &JobQueue::progress,
this, &InstallationViewStep::updateFromJobQueue );
}
QList< Calamares::job_ptr >
InstallationViewStep::jobs() const
{
return QList< Calamares::job_ptr >();
}
void
InstallationViewStep::updateFromJobQueue( qreal percent, const QString& message )
{

@ -48,6 +48,8 @@ public:
bool isAtBeginning() const override;
bool isAtEnd() const override;
void onActivate() override;
QList< Calamares::job_ptr > jobs() const override;
private:

Loading…
Cancel
Save