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

View File

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

View File

@ -450,7 +450,7 @@ Config::setFullName( const QString& name )
// Build login and hostname, if needed
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( rx, " " )
.toLower()
@ -948,7 +948,7 @@ Config::finalizeGlobalStorage() const
{
gs->insert( "reuseRootPassword", reuseUserPasswordForRoot() );
}
gs->insert( "password", CalamaresUtils::obscure( userPassword() ) );
gs->insert( "password", Calamares::String::obscure( userPassword() ) );
}
Calamares::JobList