diff --git a/src/libcalamares/locale/Label.cpp b/src/libcalamares/locale/Label.cpp index ca528dc75..8d3cd443f 100644 --- a/src/libcalamares/locale/Label.cpp +++ b/src/libcalamares/locale/Label.cpp @@ -19,7 +19,9 @@ #include "Label.h" -namespace CalamaresUtils::Locale +namespace CalamaresUtils +{ +namespace Locale { Label::Label() @@ -70,4 +72,5 @@ QLocale Label::getLocale( const QString& localeName ) return QLocale( localeName ); } +} } // namespace diff --git a/src/libcalamares/locale/Label.h b/src/libcalamares/locale/Label.h index 65befc6b4..7935b0880 100644 --- a/src/libcalamares/locale/Label.h +++ b/src/libcalamares/locale/Label.h @@ -23,8 +23,9 @@ #include #include -namespace CalamaresUtils {} -namespace CalamaresUtils::Locale +namespace CalamaresUtils +{ +namespace Locale { /** @@ -120,7 +121,7 @@ protected: QString m_englishLabel; } ; - +} } // namespace #endif diff --git a/src/libcalamares/locale/LabelModel.cpp b/src/libcalamares/locale/LabelModel.cpp index 543417212..ef8ff8ea1 100644 --- a/src/libcalamares/locale/LabelModel.cpp +++ b/src/libcalamares/locale/LabelModel.cpp @@ -22,7 +22,9 @@ #include "CalamaresVersion.h" // For the list of translations -namespace CalamaresUtils::Locale +namespace CalamaresUtils +{ +namespace Locale { LabelModel::LabelModel( const QStringList& locales, QObject* parent ) @@ -121,10 +123,11 @@ LabelModel::find( const QString& countryCode ) const return find( [&]( const Label& l ){ return l.language() == c_l.second; } ); } -LabelModel* const availableTranslations() +LabelModel* availableTranslations() { static LabelModel model( QString( CALAMARES_TRANSLATION_LANGUAGES ).split( ';') ); return &model; } +} } // namespace diff --git a/src/libcalamares/locale/LabelModel.h b/src/libcalamares/locale/LabelModel.h index 178f76343..2f3bee629 100644 --- a/src/libcalamares/locale/LabelModel.h +++ b/src/libcalamares/locale/LabelModel.h @@ -26,8 +26,9 @@ #include -namespace CalamaresUtils {} -namespace CalamaresUtils::Locale +namespace CalamaresUtils +{ +namespace Locale { class DLLEXPORT LabelModel : public QAbstractListModel @@ -78,7 +79,7 @@ private: * * NOTE: While the model is not typed const, it should be. Do not modify. */ -DLLEXPORT LabelModel* const availableTranslations(); - +DLLEXPORT LabelModel* availableTranslations(); +} } // namespace #endif diff --git a/src/libcalamares/locale/Lookup.cpp b/src/libcalamares/locale/Lookup.cpp index a096bc679..73d706de6 100644 --- a/src/libcalamares/locale/Lookup.cpp +++ b/src/libcalamares/locale/Lookup.cpp @@ -20,7 +20,9 @@ #include "CountryData_p.cpp" -namespace CalamaresUtils::Locale +namespace CalamaresUtils +{ +namespace Locale { struct TwoChar @@ -87,4 +89,5 @@ QLocale::Language languageForCountry(QLocale::Country country) return p->l; } +} } // namespace diff --git a/src/libcalamares/locale/Lookup.h b/src/libcalamares/locale/Lookup.h index 5712a1120..9d1c23cd8 100644 --- a/src/libcalamares/locale/Lookup.h +++ b/src/libcalamares/locale/Lookup.h @@ -24,8 +24,9 @@ #include #include -namespace CalamaresUtils {} -namespace CalamaresUtils::Locale +namespace CalamaresUtils +{ +namespace Locale { /* All the functions in this file do lookups of locale data * based on CLDR tables; these are lookups that you can't (easily) @@ -48,6 +49,7 @@ namespace CalamaresUtils::Locale DLLEXPORT QPair< QLocale::Country, QLocale::Language > countryData( const QString& code ); /// @brief Get a likely locale for a 2-letter country code DLLEXPORT QLocale countryLocale( const QString& code ); +} } // namespace #endif