From 576f244d2dc1b7c00ea9c1b6eebded6ff9e69a64 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Tue, 12 Apr 2022 14:15:52 +0200 Subject: [PATCH] *: Chase new namespace Calamares::String --- src/libcalamares/PythonJobApi.cpp | 10 +++++----- src/modules/luksopenswaphookcfg/LOSHJob.cpp | 2 +- src/modules/partition/core/KPMHelpers.cpp | 2 +- src/modules/users/Config.cpp | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/libcalamares/PythonJobApi.cpp b/src/libcalamares/PythonJobApi.cpp index c95edfb63..753e222d1 100644 --- a/src/libcalamares/PythonJobApi.cpp +++ b/src/libcalamares/PythonJobApi.cpp @@ -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 diff --git a/src/modules/luksopenswaphookcfg/LOSHJob.cpp b/src/modules/luksopenswaphookcfg/LOSHJob.cpp index 42f160460..ad3b0abea 100644 --- a/src/modules/luksopenswaphookcfg/LOSHJob.cpp +++ b/src/modules/luksopenswaphookcfg/LOSHJob.cpp @@ -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; } diff --git a/src/modules/partition/core/KPMHelpers.cpp b/src/modules/partition/core/KPMHelpers.cpp index d5086ef21..4a38ab4ca 100644 --- a/src/modules/partition/core/KPMHelpers.cpp +++ b/src/modules/partition/core/KPMHelpers.cpp @@ -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' ) ); } diff --git a/src/modules/users/Config.cpp b/src/modules/users/Config.cpp index cebe45452..eae57a868 100644 --- a/src/modules/users/Config.cpp +++ b/src/modules/users/Config.cpp @@ -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