[welcome] Don't const& POD
- simplify parameter types in some set-methods - while here, shuffle methods to bring things together
This commit is contained in:
parent
e756cc8720
commit
5956c6678e
@ -159,7 +159,7 @@ Config::setLanguageIcon( const QString& languageIcon )
|
||||
}
|
||||
|
||||
void
|
||||
Config::setLocaleIndex( const int& index )
|
||||
Config::setLocaleIndex( int index )
|
||||
{
|
||||
if ( index == m_localeIndex || index > CalamaresUtils::Locale::availableTranslations()->rowCount( QModelIndex() )
|
||||
|| index < 0 )
|
||||
@ -170,7 +170,7 @@ Config::setLocaleIndex( const int& index )
|
||||
m_localeIndex = index;
|
||||
|
||||
const auto& selectedLocale = m_languages->locale( m_localeIndex ).locale();
|
||||
cDebug() << "Selected locale" << selectedLocale;
|
||||
cDebug() << "Index" << index << "Selected locale" << selectedLocale;
|
||||
|
||||
QLocale::setDefault( selectedLocale );
|
||||
CalamaresUtils::installTranslator( selectedLocale, Calamares::Branding::instance()->translationsDirectory() );
|
||||
@ -185,7 +185,7 @@ Config::requirementsModel() const
|
||||
}
|
||||
|
||||
void
|
||||
Config::setIsNextEnabled( const bool& isNextEnabled )
|
||||
Config::setIsNextEnabled( bool isNextEnabled )
|
||||
{
|
||||
m_isNextEnabled = isNextEnabled;
|
||||
emit isNextEnabledChanged( m_isNextEnabled );
|
||||
|
@ -49,13 +49,17 @@ class Config : public QObject
|
||||
|
||||
public:
|
||||
Config( QObject* parent = nullptr );
|
||||
void setCountryCode( const QString& countryCode );
|
||||
void setLanguageIcon( const QString& languageIcon );
|
||||
|
||||
Calamares::RequirementsModel& requirementsModel() const;
|
||||
|
||||
void setIsNextEnabled( const bool& isNextEnabled );
|
||||
void setCountryCode( const QString& countryCode );
|
||||
|
||||
void setLocaleIndex( const int& index );
|
||||
QString languageIcon() const;
|
||||
void setLanguageIcon( const QString& languageIcon );
|
||||
|
||||
void setIsNextEnabled( bool isNextEnabled );
|
||||
|
||||
void setLocaleIndex( int index );
|
||||
int localeIndex() const { return m_localeIndex; }
|
||||
|
||||
QString supportUrl() const;
|
||||
@ -76,7 +80,6 @@ public:
|
||||
public slots:
|
||||
CalamaresUtils::Locale::LabelModel* languagesModel() const;
|
||||
void retranslate();
|
||||
QString languageIcon() const;
|
||||
|
||||
signals:
|
||||
void countryCodeChanged( QString countryCode );
|
||||
|
Loading…
Reference in New Issue
Block a user