[locale] Apply coding style

This commit is contained in:
Adriaan de Groot 2019-09-07 16:58:37 +02:00
parent 0ee8427d5a
commit 5cac3ac6ad
9 changed files with 127 additions and 114 deletions

View File

@ -25,9 +25,7 @@
#include <QListWidget> #include <QListWidget>
#include <QPushButton> #include <QPushButton>
LCLocaleDialog::LCLocaleDialog( const QString& guessedLCLocale, LCLocaleDialog::LCLocaleDialog( const QString& guessedLCLocale, const QStringList& localeGenLines, QWidget* parent )
const QStringList& localeGenLines,
QWidget* parent )
: QDialog( parent ) : QDialog( parent )
{ {
setModal( true ); setModal( true );
@ -60,34 +58,33 @@ LCLocaleDialog::LCLocaleDialog( const QString& guessedLCLocale,
} }
} }
QDialogButtonBox* dbb = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, QDialogButtonBox* dbb
Qt::Horizontal, = new QDialogButtonBox( QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this );
this );
dbb->button( QDialogButtonBox::Cancel )->setText( tr( "&Cancel" ) ); dbb->button( QDialogButtonBox::Cancel )->setText( tr( "&Cancel" ) );
dbb->button( QDialogButtonBox::Ok )->setText( tr( "&OK" ) ); dbb->button( QDialogButtonBox::Ok )->setText( tr( "&OK" ) );
mainLayout->addWidget( dbb ); mainLayout->addWidget( dbb );
connect( dbb->button( QDialogButtonBox::Ok ), &QPushButton::clicked, connect( dbb->button( QDialogButtonBox::Ok ), &QPushButton::clicked, this, &QDialog::accept );
this, &QDialog::accept ); connect( dbb->button( QDialogButtonBox::Cancel ), &QPushButton::clicked, this, &QDialog::reject );
connect( dbb->button( QDialogButtonBox::Cancel ), &QPushButton::clicked,
this, &QDialog::reject );
connect( m_localesWidget, &QListWidget::itemDoubleClicked, connect( m_localesWidget, &QListWidget::itemDoubleClicked, this, &QDialog::accept );
this, &QDialog::accept ); connect( m_localesWidget, &QListWidget::itemSelectionChanged, [this, dbb]() {
connect( m_localesWidget, &QListWidget::itemSelectionChanged,
[this, dbb]()
{
if ( m_localesWidget->selectedItems().isEmpty() ) if ( m_localesWidget->selectedItems().isEmpty() )
{
dbb->button( QDialogButtonBox::Ok )->setEnabled( false ); dbb->button( QDialogButtonBox::Ok )->setEnabled( false );
}
else else
{
dbb->button( QDialogButtonBox::Ok )->setEnabled( true ); dbb->button( QDialogButtonBox::Ok )->setEnabled( true );
}
} ); } );
if ( selected > -1 ) if ( selected > -1 )
{
m_localesWidget->setCurrentRow( selected ); m_localesWidget->setCurrentRow( selected );
} }
}
QString QString

View File

@ -30,8 +30,7 @@ LocaleConfiguration::LocaleConfiguration()
LocaleConfiguration::LocaleConfiguration( const QString& localeName, const QString& formatsName ) LocaleConfiguration::LocaleConfiguration( const QString& localeName, const QString& formatsName )
: LocaleConfiguration() : LocaleConfiguration()
{ {
lc_numeric = lc_time = lc_monetary = lc_paper = lc_name lc_numeric = lc_time = lc_monetary = lc_paper = lc_name = lc_address = lc_telephone = lc_measurement
= lc_address = lc_telephone = lc_measurement
= lc_identification = formatsName; = lc_identification = formatsName;
(void)setLanguage( localeName ); (void)setLanguage( localeName );
@ -58,28 +57,37 @@ LocaleConfiguration::fromLanguageAndLocation( const QString& languageLocale,
for ( const QString& line : availableLocales ) for ( const QString& line : availableLocales )
{ {
if ( line.startsWith( language ) ) if ( line.startsWith( language ) )
{
linesForLanguage.append( line ); linesForLanguage.append( line );
} }
}
QString lang; QString lang;
if ( linesForLanguage.length() == 0 || languageLocale.isEmpty() ) if ( linesForLanguage.length() == 0 || languageLocale.isEmpty() )
{
lang = "en_US.UTF-8"; lang = "en_US.UTF-8";
}
else if ( linesForLanguage.length() == 1 ) else if ( linesForLanguage.length() == 1 )
{
lang = linesForLanguage.first(); lang = linesForLanguage.first();
}
else else
{ {
QStringList linesForLanguageUtf; QStringList linesForLanguageUtf;
// FIXME: this might be useless if we already filter out non-UTF8 locales // FIXME: this might be useless if we already filter out non-UTF8 locales
foreach ( QString line, linesForLanguage ) foreach ( QString line, linesForLanguage )
{ {
if ( line.contains( "UTF-8", Qt::CaseInsensitive ) || if ( line.contains( "UTF-8", Qt::CaseInsensitive ) || line.contains( "utf8", Qt::CaseInsensitive ) )
line.contains( "utf8", Qt::CaseInsensitive ) ) {
linesForLanguageUtf.append( line ); linesForLanguageUtf.append( line );
} }
}
if ( linesForLanguageUtf.length() == 1 ) if ( linesForLanguageUtf.length() == 1 )
{
lang = linesForLanguageUtf.first(); lang = linesForLanguageUtf.first();
} }
}
// lang could still be empty if we found multiple locales that satisfy myLanguage // lang could still be empty if we found multiple locales that satisfy myLanguage
@ -92,8 +100,7 @@ LocaleConfiguration::fromLanguageAndLocation( const QString& languageLocale,
# locale categories reflect the selected location. */ # locale categories reflect the selected location. */
if ( language == "pt" || language == "zh" ) if ( language == "pt" || language == "zh" )
{ {
QString proposedLocale = QString( "%1_%2" ).arg( language ) QString proposedLocale = QString( "%1_%2" ).arg( language ).arg( countryCode );
.arg( countryCode );
foreach ( QString line, linesForLanguage ) foreach ( QString line, linesForLanguage )
{ {
if ( line.contains( proposedLocale ) ) if ( line.contains( proposedLocale ) )
@ -116,13 +123,14 @@ LocaleConfiguration::fromLanguageAndLocation( const QString& languageLocale,
break; break;
} }
} }
} }
// Else we have an unrecognized or unsupported locale, all we can do is go with // Else we have an unrecognized or unsupported locale, all we can do is go with
// en_US.UTF-8 UTF-8. This completes all default language setting guesswork. // en_US.UTF-8 UTF-8. This completes all default language setting guesswork.
if ( lang.isEmpty() ) if ( lang.isEmpty() )
{
lang = "en_US.UTF-8"; lang = "en_US.UTF-8";
}
// The following block was inspired by Ubiquity, scripts/localechooser-apply. // The following block was inspired by Ubiquity, scripts/localechooser-apply.
@ -171,8 +179,7 @@ LocaleConfiguration::fromLanguageAndLocation( const QString& languageLocale,
// We make a proposed locale based on the UI language and the timezone's country. There is no // We make a proposed locale based on the UI language and the timezone's country. There is no
// guarantee that this will be a valid, supported locale (often it won't). // guarantee that this will be a valid, supported locale (often it won't).
QString lc_formats; QString lc_formats;
QString combined = QString( "%1_%2" ).arg( language ) QString combined = QString( "%1_%2" ).arg( language ).arg( countryCode );
.arg( countryCode );
// We look up if it's a supported locale. // We look up if it's a supported locale.
for ( const QString& line : availableLocales ) for ( const QString& line : availableLocales )
{ {
@ -248,9 +255,8 @@ LocaleConfiguration::fromLanguageAndLocation( const QString& languageLocale,
}; };
if ( countryToDefaultLanguage.contains( countryCode ) ) if ( countryToDefaultLanguage.contains( countryCode ) )
{ {
QString combinedLocale = QString combinedLocale
QString( "%1_%2" ).arg( countryToDefaultLanguage.value( countryCode ) ) = QString( "%1_%2" ).arg( countryToDefaultLanguage.value( countryCode ) ).arg( countryCode );
.arg( countryCode );
for ( const QString& line : availableLocales ) for ( const QString& line : availableLocales )
{ {
@ -267,7 +273,9 @@ LocaleConfiguration::fromLanguageAndLocation( const QString& languageLocale,
// If we cannot make a good choice for a given country we go with the LANG // If we cannot make a good choice for a given country we go with the LANG
// setting, which defaults to en_US.UTF-8 UTF-8 if all else fails. // setting, which defaults to en_US.UTF-8 UTF-8 if all else fails.
if ( lc_formats.isEmpty() ) if ( lc_formats.isEmpty() )
{
lc_formats = lang; lc_formats = lang;
}
return LocaleConfiguration( lang, lc_formats ); return LocaleConfiguration( lang, lc_formats );
} }
@ -276,16 +284,9 @@ LocaleConfiguration::fromLanguageAndLocation( const QString& languageLocale,
bool bool
LocaleConfiguration::isEmpty() const LocaleConfiguration::isEmpty() const
{ {
return m_lang.isEmpty() && return m_lang.isEmpty() && lc_numeric.isEmpty() && lc_time.isEmpty() && lc_monetary.isEmpty() && lc_paper.isEmpty()
lc_numeric.isEmpty() && && lc_name.isEmpty() && lc_address.isEmpty() && lc_telephone.isEmpty() && lc_measurement.isEmpty()
lc_time.isEmpty() && && lc_identification.isEmpty();
lc_monetary.isEmpty() &&
lc_paper.isEmpty() &&
lc_name.isEmpty() &&
lc_address.isEmpty() &&
lc_telephone.isEmpty() &&
lc_measurement.isEmpty() &&
lc_identification.isEmpty();
} }
@ -295,35 +296,54 @@ LocaleConfiguration::toMap() const
QMap< QString, QString > map; QMap< QString, QString > map;
if ( !m_lang.isEmpty() ) if ( !m_lang.isEmpty() )
{
map.insert( "LANG", m_lang ); map.insert( "LANG", m_lang );
}
if ( !lc_numeric.isEmpty() ) if ( !lc_numeric.isEmpty() )
{
map.insert( "LC_NUMERIC", lc_numeric ); map.insert( "LC_NUMERIC", lc_numeric );
}
if ( !lc_time.isEmpty() ) if ( !lc_time.isEmpty() )
{
map.insert( "LC_TIME", lc_time ); map.insert( "LC_TIME", lc_time );
}
if ( !lc_monetary.isEmpty() ) if ( !lc_monetary.isEmpty() )
{
map.insert( "LC_MONETARY", lc_monetary ); map.insert( "LC_MONETARY", lc_monetary );
}
if ( !lc_paper.isEmpty() ) if ( !lc_paper.isEmpty() )
{
map.insert( "LC_PAPER", lc_paper ); map.insert( "LC_PAPER", lc_paper );
}
if ( !lc_name.isEmpty() ) if ( !lc_name.isEmpty() )
{
map.insert( "LC_NAME", lc_name ); map.insert( "LC_NAME", lc_name );
}
if ( !lc_address.isEmpty() ) if ( !lc_address.isEmpty() )
{
map.insert( "LC_ADDRESS", lc_address ); map.insert( "LC_ADDRESS", lc_address );
}
if ( !lc_telephone.isEmpty() ) if ( !lc_telephone.isEmpty() )
{
map.insert( "LC_TELEPHONE", lc_telephone ); map.insert( "LC_TELEPHONE", lc_telephone );
}
if ( !lc_measurement.isEmpty() ) if ( !lc_measurement.isEmpty() )
{
map.insert( "LC_MEASUREMENT", lc_measurement ); map.insert( "LC_MEASUREMENT", lc_measurement );
}
if ( !lc_identification.isEmpty() ) if ( !lc_identification.isEmpty() )
{
map.insert( "LC_IDENTIFICATION", lc_identification ); map.insert( "LC_IDENTIFICATION", lc_identification );
}
return map; return map;
} }

View File

@ -21,8 +21,8 @@
#define LOCALECONFIGURATION_H #define LOCALECONFIGURATION_H
#include <QDebug> #include <QDebug>
#include <QString>
#include <QMap> #include <QMap>
#include <QString>
class LocaleConfiguration class LocaleConfiguration
{ {
@ -31,13 +31,14 @@ public:
explicit LocaleConfiguration(); explicit LocaleConfiguration();
/// @brief Create a locale with everything set to the given @p localeName /// @brief Create a locale with everything set to the given @p localeName
explicit LocaleConfiguration( const QString& localeName /* "en_US.UTF-8" */ ) explicit LocaleConfiguration( const QString& localeName /* "en_US.UTF-8" */ )
: LocaleConfiguration( localeName, localeName ) { } : LocaleConfiguration( localeName, localeName )
{
}
/// @brief Create a locale with language and formats separate /// @brief Create a locale with language and formats separate
explicit LocaleConfiguration( const QString& localeName, const QString& formatsName ); explicit LocaleConfiguration( const QString& localeName, const QString& formatsName );
static LocaleConfiguration fromLanguageAndLocation( const QString& language, static LocaleConfiguration
const QStringList& availableLocales, fromLanguageAndLocation( const QString& language, const QStringList& availableLocales, const QString& countryCode );
const QString& countryCode );
bool isEmpty() const; bool isEmpty() const;
@ -55,8 +56,8 @@ public:
// These become all uppercase in locale.conf, but we keep them lowercase here to // These become all uppercase in locale.conf, but we keep them lowercase here to
// avoid confusion with locale.h. // avoid confusion with locale.h.
QString lc_numeric, lc_time, lc_monetary, lc_paper, lc_name, lc_address, QString lc_numeric, lc_time, lc_monetary, lc_paper, lc_name, lc_address, lc_telephone, lc_measurement,
lc_telephone, lc_measurement, lc_identification; lc_identification;
// If the user has explicitly selected language (from the dialog) // If the user has explicitly selected language (from the dialog)
// or numbers format, set these to avoid implicit changes to them. // or numbers format, set these to avoid implicit changes to them.
@ -67,7 +68,8 @@ private:
QString m_languageLocaleBcp47; QString m_languageLocaleBcp47;
}; };
inline QDebug& operator <<( QDebug& s, const LocaleConfiguration& l ) inline QDebug&
operator<<( QDebug& s, const LocaleConfiguration& l )
{ {
return s << l.language() << '(' << l.toBcp47() << ") +" << l.lc_numeric; return s << l.language() << '(' << l.toBcp47() << ") +" << l.lc_numeric;
} }

View File

@ -53,19 +53,17 @@ LocaleViewStep::LocaleViewStep( QObject* parent )
m_waitingWidget = new WaitingWidget( tr( "Loading location data..." ) ); m_waitingWidget = new WaitingWidget( tr( "Loading location data..." ) );
mainLayout->addWidget( m_waitingWidget ); mainLayout->addWidget( m_waitingWidget );
connect( &m_initWatcher, &QFutureWatcher< void >::finished, connect( &m_initWatcher, &QFutureWatcher< void >::finished, this, [=] {
this, [=] bool hasInternet = Calamares::JobQueue::instance()->globalStorage()->value( "hasInternet" ).toBool();
{
bool hasInternet = Calamares::JobQueue::instance()->globalStorage()
->value( "hasInternet" ).toBool();
if ( m_geoipUrl.isEmpty() || !hasInternet ) if ( m_geoipUrl.isEmpty() || !hasInternet )
setUpPage(); setUpPage();
else else
{
fetchGeoIpTimezone(); fetchGeoIpTimezone();
}
} ); } );
QFuture< void > initFuture = QtConcurrent::run( [=] QFuture< void > initFuture = QtConcurrent::run( [=] {
{
LocaleGlobal::init(); LocaleGlobal::init();
if ( m_geoipUrl.isEmpty() ) if ( m_geoipUrl.isEmpty() )
return; return;
@ -90,16 +88,16 @@ LocaleViewStep::LocaleViewStep( QObject* parent )
LocaleViewStep::~LocaleViewStep() LocaleViewStep::~LocaleViewStep()
{ {
if ( m_widget && m_widget->parent() == nullptr ) if ( m_widget && m_widget->parent() == nullptr )
{
m_widget->deleteLater(); m_widget->deleteLater();
} }
}
void void
LocaleViewStep::setUpPage() LocaleViewStep::setUpPage()
{ {
m_actualWidget->init( m_startingTimezone.first, m_actualWidget->init( m_startingTimezone.first, m_startingTimezone.second, m_localeGenPath );
m_startingTimezone.second,
m_localeGenPath );
m_widget->layout()->removeWidget( m_waitingWidget ); m_widget->layout()->removeWidget( m_waitingWidget );
m_waitingWidget->deleteLater(); m_waitingWidget->deleteLater();
m_widget->layout()->addWidget( m_actualWidget ); m_widget->layout()->addWidget( m_actualWidget );
@ -116,10 +114,14 @@ LocaleViewStep::fetchGeoIpTimezone()
{ {
m_startingTimezone = h.get(); m_startingTimezone = h.get();
if ( !m_startingTimezone.isValid() ) if ( !m_startingTimezone.isValid() )
{
cWarning() << "GeoIP lookup at" << m_geoipUrl << "failed."; cWarning() << "GeoIP lookup at" << m_geoipUrl << "failed.";
} }
}
else else
{
cWarning() << "GeoIP Style" << m_geoipStyle << "is not recognized."; cWarning() << "GeoIP Style" << m_geoipStyle << "is not recognized.";
}
setUpPage(); setUpPage();
} }
@ -198,10 +200,11 @@ LocaleViewStep::onLeave()
auto map = m_actualWidget->localesMap(); auto map = m_actualWidget->localesMap();
QVariantMap vm; QVariantMap vm;
for ( auto it = map.constBegin(); it != map.constEnd(); ++it ) for ( auto it = map.constBegin(); it != map.constEnd(); ++it )
{
vm.insert( it.key(), it.value() ); vm.insert( it.key(), it.value() );
}
Calamares::JobQueue::instance()->globalStorage() Calamares::JobQueue::instance()->globalStorage()->insert( "localeConf", vm );
->insert( "localeConf", vm );
} }
@ -216,12 +219,15 @@ LocaleViewStep::setConfigurationMap( const QVariantMap& configurationMap )
} }
else else
{ {
m_startingTimezone = CalamaresUtils::GeoIP::RegionZonePair( QStringLiteral( "America" ), QStringLiteral( "New_York" ) ); m_startingTimezone
= CalamaresUtils::GeoIP::RegionZonePair( QStringLiteral( "America" ), QStringLiteral( "New_York" ) );
} }
m_localeGenPath = CalamaresUtils::getString( configurationMap, "localeGenPath" ); m_localeGenPath = CalamaresUtils::getString( configurationMap, "localeGenPath" );
if ( m_localeGenPath.isEmpty() ) if ( m_localeGenPath.isEmpty() )
{
m_localeGenPath = QStringLiteral( "/etc/locale.gen" ); m_localeGenPath = QStringLiteral( "/etc/locale.gen" );
}
bool ok = false; bool ok = false;
QVariantMap geoip = CalamaresUtils::getSubMap( configurationMap, "geoip", ok ); QVariantMap geoip = CalamaresUtils::getSubMap( configurationMap, "geoip", ok );

View File

@ -19,11 +19,11 @@
#include <SetTimezoneJob.h> #include <SetTimezoneJob.h>
#include "JobQueue.h"
#include "GlobalStorage.h" #include "GlobalStorage.h"
#include "JobQueue.h"
#include "Settings.h" #include "Settings.h"
#include "utils/Logger.h"
#include "utils/CalamaresUtilsSystem.h" #include "utils/CalamaresUtilsSystem.h"
#include "utils/Logger.h"
#include <QDir> #include <QDir>
#include <QFileInfo> #include <QFileInfo>
@ -51,14 +51,14 @@ SetTimezoneJob::exec()
// to a running timedated over D-Bus), and we have code that works // to a running timedated over D-Bus), and we have code that works
if ( !Calamares::Settings::instance()->doChroot() ) if ( !Calamares::Settings::instance()->doChroot() )
{ {
int ec = CalamaresUtils::System::instance()-> int ec = CalamaresUtils::System::instance()->targetEnvCall(
targetEnvCall( { "timedatectl", { "timedatectl", "set-timezone", m_region + '/' + m_zone } );
"set-timezone",
m_region + '/' + m_zone } );
if ( !ec ) if ( !ec )
{
return Calamares::JobResult::ok(); return Calamares::JobResult::ok();
} }
}
QString localtimeSlink( "/etc/localtime" ); QString localtimeSlink( "/etc/localtime" );
QString zoneinfoPath( "/usr/share/zoneinfo" ); QString zoneinfoPath( "/usr/share/zoneinfo" );
@ -72,27 +72,17 @@ SetTimezoneJob::exec()
tr( "Bad path: %1" ).arg( zoneFile.absolutePath() ) ); tr( "Bad path: %1" ).arg( zoneFile.absolutePath() ) );
// Make sure /etc/localtime doesn't exist, otherwise symlinking will fail // Make sure /etc/localtime doesn't exist, otherwise symlinking will fail
CalamaresUtils::System::instance()-> CalamaresUtils::System::instance()->targetEnvCall( { "rm", "-f", localtimeSlink } );
targetEnvCall( { "rm",
"-f",
localtimeSlink } );
int ec = CalamaresUtils::System::instance()-> int ec = CalamaresUtils::System::instance()->targetEnvCall( { "ln", "-s", zoneinfoPath, localtimeSlink } );
targetEnvCall( { "ln",
"-s",
zoneinfoPath,
localtimeSlink } );
if ( ec ) if ( ec )
return Calamares::JobResult::error( tr( "Cannot set timezone." ), return Calamares::JobResult::error(
tr( "Link creation failed, target: %1; link name: %2" ) tr( "Cannot set timezone." ),
.arg( zoneinfoPath ) tr( "Link creation failed, target: %1; link name: %2" ).arg( zoneinfoPath ).arg( "/etc/localtime" ) );
.arg( "/etc/localtime" ) );
QFile timezoneFile( gs->value( "rootMountPoint" ).toString() + "/etc/timezone" ); QFile timezoneFile( gs->value( "rootMountPoint" ).toString() + "/etc/timezone" );
if ( !timezoneFile.open( QIODevice::WriteOnly | if ( !timezoneFile.open( QIODevice::WriteOnly | QIODevice::Text | QIODevice::Truncate ) )
QIODevice::Text |
QIODevice::Truncate ) )
return Calamares::JobResult::error( tr( "Cannot set timezone," ), return Calamares::JobResult::error( tr( "Cannot set timezone," ),
tr( "Cannot open /etc/timezone for writing" ) ); tr( "Cannot open /etc/timezone for writing" ) );

View File

@ -26,8 +26,7 @@ class SetTimezoneJob : public Calamares::Job
{ {
Q_OBJECT Q_OBJECT
public: public:
SetTimezoneJob( const QString& region, SetTimezoneJob( const QString& region, const QString& zone );
const QString& zone );
QString prettyName() const override; QString prettyName() const override;
Calamares::JobResult exec() override; Calamares::JobResult exec() override;

View File

@ -25,19 +25,17 @@
QTEST_GUILESS_MAIN( LocaleTests ) QTEST_GUILESS_MAIN( LocaleTests )
LocaleTests::LocaleTests() LocaleTests::LocaleTests() {}
LocaleTests::~LocaleTests() {}
void
LocaleTests::initTestCase()
{ {
} }
LocaleTests::~LocaleTests() void
{ LocaleTests::testEmptyLocaleConfiguration()
}
void LocaleTests::initTestCase()
{
}
void LocaleTests::testEmptyLocaleConfiguration()
{ {
LocaleConfiguration lc; LocaleConfiguration lc;
@ -45,7 +43,8 @@ void LocaleTests::testEmptyLocaleConfiguration()
QCOMPARE( lc.toBcp47(), QString() ); QCOMPARE( lc.toBcp47(), QString() );
} }
void LocaleTests::testDefaultLocaleConfiguration() void
LocaleTests::testDefaultLocaleConfiguration()
{ {
LocaleConfiguration lc( "en_US.UTF-8" ); LocaleConfiguration lc( "en_US.UTF-8" );
QVERIFY( !lc.isEmpty() ); QVERIFY( !lc.isEmpty() );
@ -58,7 +57,8 @@ void LocaleTests::testDefaultLocaleConfiguration()
QCOMPARE( lc2.toBcp47(), "de" ); QCOMPARE( lc2.toBcp47(), "de" );
} }
void LocaleTests::testSplitLocaleConfiguration() void
LocaleTests::testSplitLocaleConfiguration()
{ {
LocaleConfiguration lc( "en_US.UTF-8", "de_DE.UTF-8" ); LocaleConfiguration lc( "en_US.UTF-8", "de_DE.UTF-8" );
QVERIFY( !lc.isEmpty() ); QVERIFY( !lc.isEmpty() );
@ -76,5 +76,4 @@ void LocaleTests::testSplitLocaleConfiguration()
QVERIFY( !lc3.isEmpty() ); QVERIFY( !lc3.isEmpty() );
QCOMPARE( lc3.toBcp47(), "da" ); QCOMPARE( lc3.toBcp47(), "da" );
QCOMPARE( lc3.lc_numeric, "de_DE.UTF-8" ); QCOMPARE( lc3.lc_numeric, "de_DE.UTF-8" );
} }