From 0235245631363016ef34977b94a9a8a2eb155749 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 14 May 2020 15:55:41 +0200 Subject: [PATCH 1/5] [libcalamares] #include-styling --- src/libcalamares/DllMacro.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/libcalamares/DllMacro.h b/src/libcalamares/DllMacro.h index 712bf5732..528a70c2d 100644 --- a/src/libcalamares/DllMacro.h +++ b/src/libcalamares/DllMacro.h @@ -20,7 +20,7 @@ #ifndef DLLMACRO_H #define DLLMACRO_H -#include +#include /* * Mark symbols exported from Calamares non-GUI library with DLLEXPORT. From 47979555fec0aa19f33a3dc37ec4a66c9e9c118e Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 14 May 2020 15:54:19 +0200 Subject: [PATCH 2/5] CMake: optionally disable QML This makes it possible to remove QML from Calamares, possibly yielding a smaller, lighter installer; it takes with it the nice slideshow, modern configurable navigation and the QML UIs built for various modules. By default, WITH_QML is on and the "normal" feature set is retained. - look for Qml modules only when WITH_QML is on (the default) - look for Network, since that's pulled in only implicitly - disable the QML Calamares models (modules/*q) if no QML is enabled; longer-term plan is to merge the **pages** back to the "upstream" modules, and have things be run-time switchable, but that's not here yet. Also disable the notesqml module when QML is off. --- CMakeLists.txt | 8 ++++++-- src/libcalamares/CalamaresConfig.h.in | 1 + src/modules/keyboardq/CMakeLists.txt | 5 +++++ src/modules/localeq/CMakeLists.txt | 5 +++++ src/modules/notesqml/CMakeLists.txt | 5 +++++ src/modules/welcomeq/CMakeLists.txt | 5 +++++ 6 files changed, 27 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a9e69a3da..519ee1abc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,7 +56,8 @@ option( WITH_KF5DBus "Use DBus service for unique-application." OFF ) # When adding WITH_* that affects the ABI offered by libcalamares, # also update libcalamares/CalamaresConfig.h.in option( WITH_PYTHON "Enable Python modules API (requires Boost.Python)." ON ) -option( WITH_PYTHONQT "Enable next generation Python modules API (experimental, requires PythonQt)." OFF ) +option( WITH_PYTHONQT "Enable Python view modules API (deprecated, requires PythonQt)." OFF ) +option( WITH_QML "Enable QML UI options." ON ) # Possible debugging flags are: # - DEBUG_TIMEZONES draws latitude and longitude lines on the timezone @@ -253,7 +254,10 @@ include( CMakeColors ) ### DEPENDENCIES # -find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Concurrent Core Gui Widgets LinguistTools Svg Quick QuickWidgets ) +find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Concurrent Core Gui LinguistTools Network Svg Widgets ) +if( WITH_QML ) + find_package( Qt5 ${QT_VERSION} CONFIG REQUIRED Quick QuickWidgets ) +endif() if( Qt5_VERSION VERSION_GREATER 5.12.1 ) # At least Qt 5.12.2 seems to support Esperanto in QLocale if( "eo" IN_LIST _tx_incomplete ) diff --git a/src/libcalamares/CalamaresConfig.h.in b/src/libcalamares/CalamaresConfig.h.in index 55468cf15..b31de95b5 100644 --- a/src/libcalamares/CalamaresConfig.h.in +++ b/src/libcalamares/CalamaresConfig.h.in @@ -11,5 +11,6 @@ //cmakedefines for CMake variables (e.g. for optdepends) go here #cmakedefine WITH_PYTHON #cmakedefine WITH_PYTHONQT +#cmakedefine WITH_QML #endif // CALAMARESCONFIG_H diff --git a/src/modules/keyboardq/CMakeLists.txt b/src/modules/keyboardq/CMakeLists.txt index f5fd2b64b..729748a7f 100644 --- a/src/modules/keyboardq/CMakeLists.txt +++ b/src/modules/keyboardq/CMakeLists.txt @@ -1,3 +1,8 @@ +if( NOT WITH_QML ) + calamares_skip_module( "keyboardq (QML is not supported in this build)" ) + return() +endif() + set( _keyboard ${CMAKE_CURRENT_SOURCE_DIR}/../keyboard ) include_directories( ${_keyboard} ) diff --git a/src/modules/localeq/CMakeLists.txt b/src/modules/localeq/CMakeLists.txt index 280c95c62..c9ed1cd55 100644 --- a/src/modules/localeq/CMakeLists.txt +++ b/src/modules/localeq/CMakeLists.txt @@ -1,3 +1,8 @@ +if( NOT WITH_QML ) + calamares_skip_module( "localeq (QML is not supported in this build)" ) + return() +endif() + # When debugging the timezone widget, add this debugging definition # to have a debugging-friendly timezone widget, debug logging, # and no intrusive timezone-setting while clicking around. diff --git a/src/modules/notesqml/CMakeLists.txt b/src/modules/notesqml/CMakeLists.txt index 6aedab5aa..7ac808fa7 100644 --- a/src/modules/notesqml/CMakeLists.txt +++ b/src/modules/notesqml/CMakeLists.txt @@ -1,3 +1,8 @@ +if( NOT WITH_QML ) + calamares_skip_module( "notesqml (QML is not supported in this build)" ) + return() +endif() + calamares_add_plugin( notesqml TYPE viewmodule EXPORT_MACRO PLUGINDLLEXPORT_PRO diff --git a/src/modules/welcomeq/CMakeLists.txt b/src/modules/welcomeq/CMakeLists.txt index 9cb89c3d9..4a040344e 100644 --- a/src/modules/welcomeq/CMakeLists.txt +++ b/src/modules/welcomeq/CMakeLists.txt @@ -1,6 +1,11 @@ # This is a re-write of the welcome module using QML view steps # instead of widgets. +if( NOT WITH_QML ) + calamares_skip_module( "welcomeq (QML is not supported in this build)" ) + return() +endif() + set( _welcome ${CMAKE_CURRENT_SOURCE_DIR}/../welcome ) include_directories( ${PROJECT_BINARY_DIR}/src/libcalamaresui ${CMAKE_CURRENT_SOURCE_DIR}/../../libcalamares ${_welcome} ) From 736f99768a7ab79a6585a5bba8ad75eef5b24b8c Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 14 May 2020 16:18:52 +0200 Subject: [PATCH 3/5] [libcalamaresui] Don't build QML bits if they're not wanted When WITH_QML is off (by explicit choice) - don't build the QmlViewStep - don't build the QML slideshow --- src/libcalamaresui/CMakeLists.txt | 28 ++++++++++--------- .../viewpages/ExecutionViewStep.cpp | 4 ++- src/libcalamaresui/viewpages/Slideshow.cpp | 4 +++ src/libcalamaresui/viewpages/Slideshow.h | 6 ++++ 4 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/libcalamaresui/CMakeLists.txt b/src/libcalamaresui/CMakeLists.txt index ee7992710..c5c7e9d4b 100644 --- a/src/libcalamaresui/CMakeLists.txt +++ b/src/libcalamaresui/CMakeLists.txt @@ -14,11 +14,9 @@ set( calamaresui_SOURCES utils/CalamaresUtilsGui.cpp utils/ImageRegistry.cpp utils/Paste.cpp - utils/Qml.cpp viewpages/BlankViewStep.cpp viewpages/ExecutionViewStep.cpp - viewpages/QmlViewStep.cpp viewpages/Slideshow.cpp viewpages/ViewStep.cpp @@ -45,10 +43,6 @@ if( WITH_PYTHON ) endif() if( WITH_PYTHONQT ) - include_directories(${PYTHON_INCLUDE_DIRS}) - # *_DIRS because we also use extensions - include_directories(${PYTHONQT_INCLUDE_DIRS}) - list( APPEND calamaresui_SOURCES modulesystem/PythonQtViewModule.cpp utils/PythonQtUtils.cpp @@ -57,25 +51,33 @@ if( WITH_PYTHONQT ) viewpages/PythonQtGlobalStorageWrapper.cpp viewpages/PythonQtUtilsWrapper.cpp ) - set( OPTIONAL_PYTHON_LIBRARIES - ${PYTHON_LIBRARIES} - ${PYTHONQT_LIBRARIES} +endif() + +if( WITH_QML ) + list( APPEND calamaresui_SOURCES + utils/Qml.cpp + viewpages/QmlViewStep.cpp ) endif() calamares_add_library( calamaresui SOURCES ${calamaresui_SOURCES} EXPORT_MACRO UIDLLEXPORT_PRO - LINK_PRIVATE_LIBRARIES - ${OPTIONAL_PYTHON_LIBRARIES} LINK_LIBRARIES Qt5::Svg - Qt5::QuickWidgets RESOURCES libcalamaresui.qrc EXPORT CalamaresLibraryDepends VERSION ${CALAMARES_VERSION_SHORT} ) -if ( KF5CoreAddons_FOUND AND KF5CoreAddons_VERSION VERSION_GREATER_EQUAL 5.58 ) +if( KF5CoreAddons_FOUND AND KF5CoreAddons_VERSION VERSION_GREATER_EQUAL 5.58 ) target_compile_definitions( calamaresui PRIVATE WITH_KOSRelease ) endif() +if( WITH_PYTHONQT ) + # *_DIRS because we also use extensions + target_include_directories( calamaresui PRIVATE ${PYTHON_INCLUDE_DIRS} ${PYTHONQT_INCLUDE_DIRS} ) + target_link_libraries( calamaresui PRIVATE ${PYTHON_LIBRARIES} ${PYTHONQT_LIBRARIES} ) +endif() +if( WITH_QML ) + target_link_libraries( calamaresui PUBLIC Qt5::QuickWidgets ) +endif() diff --git a/src/libcalamaresui/viewpages/ExecutionViewStep.cpp b/src/libcalamaresui/viewpages/ExecutionViewStep.cpp index b4c07bff5..2dd4b79df 100644 --- a/src/libcalamaresui/viewpages/ExecutionViewStep.cpp +++ b/src/libcalamaresui/viewpages/ExecutionViewStep.cpp @@ -23,11 +23,11 @@ #include "Slideshow.h" #include "Branding.h" +#include "CalamaresConfig.h" #include "Job.h" #include "JobQueue.h" #include "Settings.h" #include "ViewManager.h" - #include "modulesystem/Module.h" #include "modulesystem/ModuleManager.h" #include "utils/CalamaresUtilsGui.h" @@ -49,10 +49,12 @@ makeSlideshow( QWidget* parent ) { case -1: return new Calamares::SlideshowPictures( parent ); +#ifdef WITH_QML case 1: FALLTHRU; case 2: return new Calamares::SlideshowQML( parent ); +#endif default: cWarning() << "Unknown Branding slideshow API" << api; return new Calamares::SlideshowPictures( parent ); diff --git a/src/libcalamaresui/viewpages/Slideshow.cpp b/src/libcalamaresui/viewpages/Slideshow.cpp index 653c9b99d..85551f797 100644 --- a/src/libcalamaresui/viewpages/Slideshow.cpp +++ b/src/libcalamaresui/viewpages/Slideshow.cpp @@ -28,10 +28,12 @@ #include #include +#ifdef WITH_QML #include #include #include #include +#endif #include #include @@ -41,6 +43,7 @@ namespace Calamares Slideshow::~Slideshow() {} +#ifdef WITH_QML SlideshowQML::SlideshowQML( QWidget* parent ) : Slideshow( parent ) , m_qmlShow( new QQuickWidget ) @@ -173,6 +176,7 @@ SlideshowQML::changeSlideShowState( Action state ) m_state = state; } +#endif SlideshowPictures::SlideshowPictures( QWidget* parent ) : Slideshow( parent ) diff --git a/src/libcalamaresui/viewpages/Slideshow.h b/src/libcalamaresui/viewpages/Slideshow.h index 2296c6d23..f338d44e2 100644 --- a/src/libcalamaresui/viewpages/Slideshow.h +++ b/src/libcalamaresui/viewpages/Slideshow.h @@ -21,15 +21,19 @@ #ifndef LIBCALAMARESUI_SLIDESHOW_H #define LIBCALAMARESUI_SLIDESHOW_H +#include "CalamaresConfig.h" + #include #include #include class QLabel; class QTimer; +#ifdef WITH_QML class QQmlComponent; class QQuickItem; class QQuickWidget; +#endif namespace Calamares { @@ -81,6 +85,7 @@ protected: Action m_state = Stop; }; +#ifdef WITH_QML /** @brief Slideshow using a QML file * * This is the "classic" slideshow in Calamares, which runs some QML @@ -109,6 +114,7 @@ private: QQmlComponent* m_qmlComponent; QQuickItem* m_qmlObject; ///< The actual show }; +#endif /** @brief Slideshow using images * From c83e5c57a455e2c91c60fbadc5b6f006c8ef4ecf Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 14 May 2020 16:56:50 +0200 Subject: [PATCH 4/5] [libcalamaresui] When QML is off, there is no Qml panel flavor --- src/calamares/CalamaresWindow.cpp | 48 ++++++++++++++++++++++--------- src/libcalamaresui/Branding.cpp | 5 +++- src/libcalamaresui/Branding.h | 7 +++-- 3 files changed, 44 insertions(+), 16 deletions(-) diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index 06a31a0e9..2ab7cd5fa 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -22,6 +22,7 @@ #include "CalamaresWindow.h" #include "Branding.h" +#include "CalamaresConfig.h" #include "DebugWindow.h" #include "Settings.h" #include "ViewManager.h" @@ -38,8 +39,10 @@ #include #include #include +#ifdef WITH_QML #include #include +#endif #include static inline int @@ -132,18 +135,6 @@ CalamaresWindow::getWidgetSidebar( QWidget* parent, int desiredWidth ) return sideBox; } -QWidget* -CalamaresWindow::getQmlSidebar( QWidget* parent, int ) -{ - CalamaresUtils::registerCalamaresModels(); - QQuickWidget* w = new QQuickWidget( parent ); - w->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); - w->setResizeMode( QQuickWidget::SizeRootObjectToView ); - w->setSource( QUrl( - CalamaresUtils::searchQmlFile( CalamaresUtils::QmlSearch::Both, QStringLiteral( "calamares-sidebar" ) ) ) ); - return w; -} - /** @brief Get a button-sized icon. */ static inline QPixmap getButtonIcon( const QString& name ) @@ -213,6 +204,19 @@ CalamaresWindow::getWidgetNavigation( QWidget* parent ) return navigation; } +#ifdef WITH_QML +QWidget* +CalamaresWindow::getQmlSidebar( QWidget* parent, int ) +{ + CalamaresUtils::registerCalamaresModels(); + QQuickWidget* w = new QQuickWidget( parent ); + w->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); + w->setResizeMode( QQuickWidget::SizeRootObjectToView ); + w->setSource( QUrl( + CalamaresUtils::searchQmlFile( CalamaresUtils::QmlSearch::Both, QStringLiteral( "calamares-sidebar" ) ) ) ); + return w; +} + QWidget* CalamaresWindow::getQmlNavigation( QWidget* parent ) { @@ -231,6 +235,19 @@ CalamaresWindow::getQmlNavigation( QWidget* parent ) return w; } +#else +// Bogus to keep the linker happy +QWidget * CalamaresWindow::getQmlSidebar(QWidget* , int ) +{ + return nullptr; +} +QWidget * CalamaresWindow::getQmlNavigation(QWidget* ) +{ + return nullptr; +} + + +#endif /**@brief Picks one of two methods to call * @@ -243,16 +260,21 @@ flavoredWidget( Calamares::Branding::PanelFlavor flavor, CalamaresWindow* w, QWidget* parent, widgetMaker widget, - widgetMaker qml, + widgetMaker qml, // Only if WITH_QML is on args... a ) { +#ifndef WITH_QML + Q_UNUSED( qml ) +#endif // Member-function calling syntax is (object.*member)(args) switch ( flavor ) { case Calamares::Branding::PanelFlavor::Widget: return ( w->*widget )( parent, a... ); +#ifdef WITH_QML case Calamares::Branding::PanelFlavor::Qml: return ( w->*qml )( parent, a... ); +#endif case Calamares::Branding::PanelFlavor::None: return nullptr; } diff --git a/src/libcalamaresui/Branding.cpp b/src/libcalamaresui/Branding.cpp index 0ec691904..2eb64e875 100644 --- a/src/libcalamaresui/Branding.cpp +++ b/src/libcalamaresui/Branding.cpp @@ -436,8 +436,11 @@ flavorAndSide( const YAML::Node& doc, const char* key, Branding::PanelFlavor& fl static const NamedEnumTable< PanelFlavor > sidebarFlavorNames { { QStringLiteral( "widget" ), PanelFlavor::Widget }, { QStringLiteral( "none" ), PanelFlavor::None }, - { QStringLiteral( "hidden" ), PanelFlavor::None }, + { QStringLiteral( "hidden" ), PanelFlavor::None } +#ifdef WITH_QML + , { QStringLiteral( "qml" ), PanelFlavor::Qml } +#endif }; static const NamedEnumTable< PanelSide > panelSideNames { { QStringLiteral( "left" ), PanelSide::Left }, diff --git a/src/libcalamaresui/Branding.h b/src/libcalamaresui/Branding.h index 1244ede7d..0723d9287 100644 --- a/src/libcalamaresui/Branding.h +++ b/src/libcalamaresui/Branding.h @@ -22,8 +22,8 @@ #ifndef BRANDING_H #define BRANDING_H +#include "CalamaresConfig.h" #include "DllMacro.h" - #include "utils/NamedSuffix.h" #include @@ -131,8 +131,11 @@ public: enum class PanelFlavor { None, - Widget, + Widget +#ifdef WITH_QML + , Qml +#endif }; Q_ENUM( PanelFlavor ) ///@brief Where to place a panel (sidebar, navigation) From 022045ae0580296890481678f452f56fababe3c6 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 14 May 2020 17:04:35 +0200 Subject: [PATCH 5/5] [libcalamaresui] Refactor loading slideshow - split into a separate method - when QML is disabled, warn about QML settings --- src/libcalamaresui/Branding.cpp | 109 ++++++++++++++++++-------------- src/libcalamaresui/Branding.h | 2 + 2 files changed, 63 insertions(+), 48 deletions(-) diff --git a/src/libcalamaresui/Branding.cpp b/src/libcalamaresui/Branding.cpp index 2eb64e875..a5909fd61 100644 --- a/src/libcalamaresui/Branding.cpp +++ b/src/libcalamaresui/Branding.cpp @@ -180,6 +180,7 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent ) "component directory." ); initSimpleSettings( doc ); + initSlideshowSettings( doc ); #ifdef WITH_KOSRelease // Copy the os-release information into a QHash for use by KMacroExpander. @@ -202,17 +203,15 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent ) { QStringLiteral( "VARIANT" ), relInfo.variant() }, { QStringLiteral( "VARIANT_ID" ), relInfo.variantId() }, { QStringLiteral( "LOGO" ), relInfo.logo() } } }; - auto expand = [ & ]( const QString& s ) -> QString { + auto expand = [&]( const QString& s ) -> QString { return KMacroExpander::expandMacros( s, relMap, QLatin1Char( '@' ) ); }; #else auto expand = []( const QString& s ) -> QString { return s; }; #endif - - // Massage the strings, images and style sections. loadStrings( m_strings, doc, "strings", expand ); - loadStrings( m_images, doc, "images", [ & ]( const QString& s ) -> QString { + loadStrings( m_images, doc, "images", [&]( const QString& s ) -> QString { // See also image() const QString imageName( expand( s ) ); QFileInfo imageFi( componentDir.absoluteFilePath( imageName ) ); @@ -230,50 +229,6 @@ Branding::Branding( const QString& brandingFilePath, QObject* parent ) return imageFi.absoluteFilePath(); } ); loadStrings( m_style, doc, "style", []( const QString& s ) -> QString { return s; } ); - - if ( doc[ "slideshow" ].IsSequence() ) - { - QStringList slideShowPictures; - doc[ "slideshow" ] >> slideShowPictures; - for ( int i = 0; i < slideShowPictures.count(); ++i ) - { - QString pathString = slideShowPictures[ i ]; - QFileInfo imageFi( componentDir.absoluteFilePath( pathString ) ); - if ( !imageFi.exists() ) - { - bail( m_descriptorPath, - QString( "Slideshow file %1 does not exist." ).arg( imageFi.absoluteFilePath() ) ); - } - - slideShowPictures[ i ] = imageFi.absoluteFilePath(); - } - - m_slideshowFilenames = slideShowPictures; - m_slideshowAPI = -1; - } - else if ( doc[ "slideshow" ].IsScalar() ) - { - QString slideshowPath = QString::fromStdString( doc[ "slideshow" ].as< std::string >() ); - QFileInfo slideshowFi( componentDir.absoluteFilePath( slideshowPath ) ); - if ( !slideshowFi.exists() || !slideshowFi.fileName().toLower().endsWith( ".qml" ) ) - bail( m_descriptorPath, - QString( "Slideshow file %1 does not exist or is not a valid QML file." ) - .arg( slideshowFi.absoluteFilePath() ) ); - m_slideshowPath = slideshowFi.absoluteFilePath(); - - // API choice is relevant for QML slideshow - int api = doc[ "slideshowAPI" ].IsScalar() ? doc[ "slideshowAPI" ].as< int >() : -1; - if ( ( api < 1 ) || ( api > 2 ) ) - { - cWarning() << "Invalid or missing *slideshowAPI* in branding file."; - api = 1; - } - m_slideshowAPI = api; - } - else - { - bail( m_descriptorPath, "Syntax error in slideshow sequence." ); - } } catch ( YAML::Exception& e ) { @@ -556,4 +511,62 @@ Branding::initSimpleSettings( const YAML::Node& doc ) } } +void +Branding::initSlideshowSettings( const YAML::Node& doc ) +{ + QDir componentDir( componentDirectory() ); + + if ( doc[ "slideshow" ].IsSequence() ) + { + QStringList slideShowPictures; + doc[ "slideshow" ] >> slideShowPictures; + for ( int i = 0; i < slideShowPictures.count(); ++i ) + { + QString pathString = slideShowPictures[ i ]; + QFileInfo imageFi( componentDir.absoluteFilePath( pathString ) ); + if ( !imageFi.exists() ) + { + bail( m_descriptorPath, + QString( "Slideshow file %1 does not exist." ).arg( imageFi.absoluteFilePath() ) ); + } + + slideShowPictures[ i ] = imageFi.absoluteFilePath(); + } + + m_slideshowFilenames = slideShowPictures; + m_slideshowAPI = -1; + } +#ifdef WITH_QML + else if ( doc[ "slideshow" ].IsScalar() ) + { + QString slideshowPath = QString::fromStdString( doc[ "slideshow" ].as< std::string >() ); + QFileInfo slideshowFi( componentDir.absoluteFilePath( slideshowPath ) ); + if ( !slideshowFi.exists() || !slideshowFi.fileName().toLower().endsWith( ".qml" ) ) + bail( m_descriptorPath, + QString( "Slideshow file %1 does not exist or is not a valid QML file." ) + .arg( slideshowFi.absoluteFilePath() ) ); + m_slideshowPath = slideshowFi.absoluteFilePath(); + + // API choice is relevant for QML slideshow + int api = doc[ "slideshowAPI" ].IsScalar() ? doc[ "slideshowAPI" ].as< int >() : -1; + if ( ( api < 1 ) || ( api > 2 ) ) + { + cWarning() << "Invalid or missing *slideshowAPI* in branding file."; + api = 1; + } + m_slideshowAPI = api; + } +#else + else if ( doc[ "slideshow" ].IsScalar() ) + { + cWarning() << "Invalid *slideshow* setting, must be list of images."; + } +#endif + else + { + bail( m_descriptorPath, "Syntax error in slideshow sequence." ); + } +} + + } // namespace Calamares diff --git a/src/libcalamaresui/Branding.h b/src/libcalamaresui/Branding.h index 0723d9287..e84e23680 100644 --- a/src/libcalamaresui/Branding.h +++ b/src/libcalamaresui/Branding.h @@ -262,6 +262,8 @@ private: /** @brief Initialize the simple settings below */ void initSimpleSettings( const YAML::Node& doc ); + ///@brief Initialize the slideshow settings, above + void initSlideshowSettings( const YAML::Node& doc ); bool m_welcomeStyleCalamares; bool m_welcomeExpandingLogo;