Only load QML when the install page is activated.
This commit is contained in:
parent
4ea0cba497
commit
851f175ae7
@ -33,6 +33,7 @@
|
|||||||
#include <QtQuickWidgets/QQuickWidget>
|
#include <QtQuickWidgets/QQuickWidget>
|
||||||
#include <QQmlEngine>
|
#include <QQmlEngine>
|
||||||
|
|
||||||
|
|
||||||
namespace Calamares
|
namespace Calamares
|
||||||
{
|
{
|
||||||
|
|
||||||
@ -56,27 +57,21 @@ InstallationViewStep::InstallationViewStep( QObject* parent )
|
|||||||
|
|
||||||
m_slideShow->engine()->addImportPath( CalamaresUtils::qmlModulesDir().absolutePath() );
|
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->addSpacing( CalamaresUtils::defaultFontHeight() / 2 );
|
||||||
innerLayout->addWidget( m_progressBar );
|
innerLayout->addWidget( m_progressBar );
|
||||||
innerLayout->addWidget( m_label );
|
innerLayout->addWidget( m_label );
|
||||||
|
|
||||||
connect( JobQueue::instance(), &JobQueue::progress,
|
|
||||||
this, &InstallationViewStep::updateFromJobQueue );
|
|
||||||
|
|
||||||
cDebug() << "QML import paths:" << m_slideShow->engine()->importPathList();
|
cDebug() << "QML import paths:" << m_slideShow->engine()->importPathList();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QString
|
QString
|
||||||
InstallationViewStep::prettyName() const
|
InstallationViewStep::prettyName() const
|
||||||
{
|
{
|
||||||
return tr( "Install" );
|
return tr( "Install" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
QWidget*
|
QWidget*
|
||||||
InstallationViewStep::widget()
|
InstallationViewStep::widget()
|
||||||
{
|
{
|
||||||
@ -89,11 +84,13 @@ InstallationViewStep::next()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
InstallationViewStep::back()
|
InstallationViewStep::back()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
InstallationViewStep::isNextEnabled() const
|
InstallationViewStep::isNextEnabled() const
|
||||||
{
|
{
|
||||||
@ -114,18 +111,35 @@ InstallationViewStep::isAtBeginning() const
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
InstallationViewStep::isAtEnd() const
|
InstallationViewStep::isAtEnd() const
|
||||||
{
|
{
|
||||||
return true;
|
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 >
|
QList< Calamares::job_ptr >
|
||||||
InstallationViewStep::jobs() const
|
InstallationViewStep::jobs() const
|
||||||
{
|
{
|
||||||
return QList< Calamares::job_ptr >();
|
return QList< Calamares::job_ptr >();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
InstallationViewStep::updateFromJobQueue( qreal percent, const QString& message )
|
InstallationViewStep::updateFromJobQueue( qreal percent, const QString& message )
|
||||||
{
|
{
|
||||||
|
@ -48,6 +48,8 @@ public:
|
|||||||
bool isAtBeginning() const override;
|
bool isAtBeginning() const override;
|
||||||
bool isAtEnd() const override;
|
bool isAtEnd() const override;
|
||||||
|
|
||||||
|
void onActivate() override;
|
||||||
|
|
||||||
QList< Calamares::job_ptr > jobs() const override;
|
QList< Calamares::job_ptr > jobs() const override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user