From b4b1bf5de213311bb11fc18014e7ad35edb3e44f Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 11 Feb 2020 16:39:39 +0100 Subject: [PATCH] [libcalamares] Call delegated constructor --- src/libcalamares/locale/Label.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/libcalamares/locale/Label.cpp b/src/libcalamares/locale/Label.cpp index 8e817a4ce..987c66811 100644 --- a/src/libcalamares/locale/Label.cpp +++ b/src/libcalamares/locale/Label.cpp @@ -25,18 +25,14 @@ namespace Locale { Label::Label( QObject* parent ) - : QObject( parent ) - , m_locale( QLocale() ) + : Label( QString(), LabelFormat::IfNeededWithCountry, parent ) { - m_localeId = m_locale.name(); - - setLabels( QString(), LabelFormat::IfNeededWithCountry ); } Label::Label( const QString& locale, LabelFormat format, QObject* parent ) : QObject( parent ) , m_locale( Label::getLocale( locale ) ) - , m_localeId( locale ) + , m_localeId( locale.isEmpty() ? m_locale.name() : locale ) { setLabels( locale, format );