Commit 0947da3d authored by Adriaan de Groot's avatar Adriaan de Groot

[libcalamaresui] Report on QML errors

- If the slideshow fails to load entirely, say so
parent ae861f7e
......@@ -23,7 +23,9 @@
#include "Branding.h"
#include "utils/Dirs.h"
#include "utils/Logger.h"
#ifdef WITH_QML
#include "utils/Qml.h"
#endif
#include "utils/Retranslator.h"
#include <QLabel>
......@@ -50,6 +52,8 @@ SlideshowQML::SlideshowQML( QWidget* parent )
, m_qmlComponent( nullptr )
, m_qmlObject( nullptr )
{
CalamaresUtils::registerCalamaresModels();
m_qmlShow->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding );
m_qmlShow->setResizeMode( QQuickWidget::SizeRootObjectToView );
m_qmlShow->engine()->addImportPath( CalamaresUtils::qmlModulesDir().absolutePath() );
......@@ -126,6 +130,21 @@ SlideshowQML::loadQmlV2Complete()
}
}
}
else
{
if ( m_qmlObject )
{
cWarning() << "QML object already created";
}
else if ( !m_qmlComponent )
{
cWarning() << "QML component does not exist";
}
else if ( m_qmlComponent && !m_qmlComponent->isReady() )
{
cWarning() << "QML component not ready:" << m_qmlComponent->errors();
}
}
}
/*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment