mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 19:05:46 -05:00
[users] Apply code format
This commit is contained in:
parent
ca033583a4
commit
16eca3c1be
1 changed files with 9 additions and 5 deletions
|
@ -97,7 +97,7 @@ Config::Config( QObject* parent )
|
||||||
connect( this, &Config::requireStrongPasswordsChanged, this, &Config::checkReady );
|
connect( this, &Config::requireStrongPasswordsChanged, this, &Config::checkReady );
|
||||||
}
|
}
|
||||||
|
|
||||||
Config::~Config() {}
|
Config::~Config() { }
|
||||||
|
|
||||||
void
|
void
|
||||||
Config::setUserShell( const QString& shell )
|
Config::setUserShell( const QString& shell )
|
||||||
|
@ -297,10 +297,10 @@ transliterate( const QString& input )
|
||||||
{
|
{
|
||||||
static auto ue = UErrorCode::U_ZERO_ERROR;
|
static auto ue = UErrorCode::U_ZERO_ERROR;
|
||||||
static auto transliterator = std::unique_ptr< icu::Transliterator >(
|
static auto transliterator = std::unique_ptr< icu::Transliterator >(
|
||||||
icu::Transliterator::createInstance( TRANSLITERATOR_ID, UTRANS_FORWARD, ue )
|
icu::Transliterator::createInstance( TRANSLITERATOR_ID, UTRANS_FORWARD, ue ) );
|
||||||
);
|
|
||||||
|
|
||||||
if( ue != UErrorCode::U_ZERO_ERROR ){
|
if ( ue != UErrorCode::U_ZERO_ERROR )
|
||||||
|
{
|
||||||
cWarning() << "Can't create transliterator";
|
cWarning() << "Can't create transliterator";
|
||||||
|
|
||||||
//it'll be checked later for non-ASCII characters
|
//it'll be checked later for non-ASCII characters
|
||||||
|
@ -378,7 +378,11 @@ Config::setFullName( const QString& name )
|
||||||
// Build login and hostname, if needed
|
// Build login and hostname, if needed
|
||||||
static QRegExp rx( "[^a-zA-Z0-9 ]", Qt::CaseInsensitive );
|
static QRegExp rx( "[^a-zA-Z0-9 ]", Qt::CaseInsensitive );
|
||||||
|
|
||||||
QString cleanName = CalamaresUtils::removeDiacritics( transliterate( name ) ).replace( QRegExp( "[-']" ), "").replace( rx, " " ).toLower().simplified();
|
QString cleanName = CalamaresUtils::removeDiacritics( transliterate( name ) )
|
||||||
|
.replace( QRegExp( "[-']" ), "" )
|
||||||
|
.replace( rx, " " )
|
||||||
|
.toLower()
|
||||||
|
.simplified();
|
||||||
|
|
||||||
|
|
||||||
QStringList cleanParts = cleanName.split( ' ' );
|
QStringList cleanParts = cleanName.split( ' ' );
|
||||||
|
|
Loading…
Add table
Reference in a new issue