*: Chase new namespace Calamares::String

This commit is contained in:
Adriaan de Groot 2022-04-12 14:15:52 +02:00
parent d03a8acc9d
commit 576f244d2d
4 changed files with 9 additions and 9 deletions

View File

@ -211,9 +211,9 @@ _process_output( Calamares::Utils::RunLocation location,
bp::extract< bp::list > x( callback ); bp::extract< bp::list > x( callback );
if ( x.check() ) if ( x.check() )
{ {
QObject::connect( &r, &decltype( r )::output, [cb = callback.attr( "append" )]( const QString& s ) { QObject::connect( &r,
cb( s.toStdString() ); &decltype( r )::output,
} ); [ cb = callback.attr( "append" ) ]( const QString& s ) { cb( s.toStdString() ); } );
} }
else else
{ {
@ -262,7 +262,7 @@ host_env_process_output( const boost::python::list& args,
std::string std::string
obscure( const std::string& string ) obscure( const std::string& string )
{ {
return CalamaresUtils::obscure( QString::fromStdString( string ) ).toStdString(); return Calamares::String::obscure( QString::fromStdString( string ) ).toStdString();
} }
static QStringList static QStringList

View File

@ -163,7 +163,7 @@ globalStoragePartitionInfo( Calamares::GlobalStorage* gs, LOSHInfo& info )
QString btrfsRootSubvolume = gs->value( "btrfsRootSubvolume" ).toString(); QString btrfsRootSubvolume = gs->value( "btrfsRootSubvolume" ).toString();
if ( !btrfsRootSubvolume.isEmpty() ) if ( !btrfsRootSubvolume.isEmpty() )
{ {
CalamaresUtils::removeLeading( btrfsRootSubvolume, '/' ); Calamares::String::removeLeading( btrfsRootSubvolume, '/' );
info.keyfile_device_mount_options info.keyfile_device_mount_options
= QStringLiteral( "keyfile_device_mount_options=--options=subvol=" ) + btrfsRootSubvolume; = QStringLiteral( "keyfile_device_mount_options=--options=subvol=" ) + btrfsRootSubvolume;
} }

View File

@ -140,7 +140,7 @@ execute( Operation& operation, const QString& failureMessage )
// Remove the === lines from the report by trimming them to empty // Remove the === lines from the report by trimming them to empty
QStringList l = report.toText().split( '\n' ); QStringList l = report.toText().split( '\n' );
std::for_each( l.begin(), l.end(), []( QString& s ) { CalamaresUtils::removeLeading( s, '=' ); } ); std::for_each( l.begin(), l.end(), []( QString& s ) { Calamares::String::removeLeading( s, '=' ); } );
return Calamares::JobResult::error( failureMessage, l.join( '\n' ) ); return Calamares::JobResult::error( failureMessage, l.join( '\n' ) );
} }

View File

@ -450,7 +450,7 @@ 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 );
const QString cleanName = CalamaresUtils::removeDiacritics( transliterate( name ) ) const QString cleanName = Calamares::String::removeDiacritics( transliterate( name ) )
.replace( QRegExp( "[-']" ), "" ) .replace( QRegExp( "[-']" ), "" )
.replace( rx, " " ) .replace( rx, " " )
.toLower() .toLower()
@ -948,7 +948,7 @@ Config::finalizeGlobalStorage() const
{ {
gs->insert( "reuseRootPassword", reuseUserPasswordForRoot() ); gs->insert( "reuseRootPassword", reuseUserPasswordForRoot() );
} }
gs->insert( "password", CalamaresUtils::obscure( userPassword() ) ); gs->insert( "password", Calamares::String::obscure( userPassword() ) );
} }
Calamares::JobList Calamares::JobList