From 3f87cc214a8e4fee2e425f8453fa1356a5362bb3 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 18 Mar 2020 10:37:36 +0100 Subject: [PATCH] [calamares] Warnings-- - Set the width of the QML sidebar explicitly - Handle all sidebar-flavor enum values explicitly --- src/calamares/CalamaresWindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp index 71e82cb90..f2ff42aa8 100644 --- a/src/calamares/CalamaresWindow.cpp +++ b/src/calamares/CalamaresWindow.cpp @@ -136,6 +136,8 @@ CalamaresWindow::getQmlSidebar( int desiredWidth ) { CalamaresUtils::registerCalamaresModels(); QQuickWidget* w = new QQuickWidget( this ); + w->setFixedWidth( desiredWidth ); + w->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Expanding ); w->setSource( QUrl( CalamaresUtils::searchQmlFile( CalamaresUtils::QmlSearch::Both, QStringLiteral( "calamares-sidebar" ) ) ) ); return w; @@ -197,7 +199,7 @@ CalamaresWindow::CalamaresWindow( QWidget* parent ) sideBox = getQmlSidebar( qBound( 100, CalamaresUtils::defaultFontHeight() * 12, w < windowPreferredWidth ? 100 : 190 ) ); break; - default: + case Calamares::Branding::SidebarFlavor::None: sideBox = nullptr; } if ( sideBox )