diff --git a/src/libcalamares/ProcessJob.cpp b/src/libcalamares/ProcessJob.cpp index 900f314f6..68287097e 100644 --- a/src/libcalamares/ProcessJob.cpp +++ b/src/libcalamares/ProcessJob.cpp @@ -82,7 +82,7 @@ ProcessJob::exec() QString(), m_timeoutSec ); - return CalamaresUtils::ProcessResult::explainProcess( this, ec, m_command, output, m_timeoutSec ); + return CalamaresUtils::ProcessResult::explainProcess( ec, m_command, output, m_timeoutSec ); } diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.cpp b/src/libcalamares/utils/CalamaresUtilsSystem.cpp index 9866840ed..467938d38 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.cpp +++ b/src/libcalamares/utils/CalamaresUtilsSystem.cpp @@ -252,7 +252,7 @@ System::doChroot() const } Calamares::JobResult -ProcessResult::explainProcess( const QObject* parent, int ec, const QString& command, const QString& output, int timeout ) +ProcessResult::explainProcess( int ec, const QString& command, const QString& output, int timeout ) { using Calamares::JobResult; diff --git a/src/libcalamares/utils/CalamaresUtilsSystem.h b/src/libcalamares/utils/CalamaresUtilsSystem.h index f4500f9a9..2b5967591 100644 --- a/src/libcalamares/utils/CalamaresUtilsSystem.h +++ b/src/libcalamares/utils/CalamaresUtilsSystem.h @@ -41,7 +41,6 @@ public: /** @brief Explain a typical external process failure. * - * @param parent Used as context for translation calls. * @param errorCode Return code from runCommand() or similar * (negative values get special explanation). The member * function uses the exit code stored in the ProcessResult @@ -53,18 +52,18 @@ public: * @param timeout Timeout passed to the process runner, for explaining * error code -4 (timeout). */ - static Calamares::JobResult explainProcess( const QObject* parent, int errorCode, const QString& command, const QString& output, int timeout ); + static Calamares::JobResult explainProcess( int errorCode, const QString& command, const QString& output, int timeout ); /// @brief Convenience wrapper for explainProcess() - inline Calamares::JobResult explainProcess( const QObject* parent, const QString& command, int timeout ) const + inline Calamares::JobResult explainProcess( const QString& command, int timeout ) const { - return explainProcess( parent, getExitCode(), command, getOutput(), timeout ); + return explainProcess( getExitCode(), command, getOutput(), timeout ); } /// @brief Convenience wrapper for explainProcess() - inline Calamares::JobResult explainProcess( const QObject* parent, const QStringList& command, int timeout ) const + inline Calamares::JobResult explainProcess( const QStringList& command, int timeout ) const { - return explainProcess( parent, getExitCode(), command.join( ' ' ), getOutput(), timeout ); + return explainProcess( getExitCode(), command.join( ' ' ), getOutput(), timeout ); } } ; diff --git a/src/libcalamares/utils/CommandList.cpp b/src/libcalamares/utils/CommandList.cpp index da2c59d8d..a6e5151bd 100644 --- a/src/libcalamares/utils/CommandList.cpp +++ b/src/libcalamares/utils/CommandList.cpp @@ -98,7 +98,7 @@ CommandList::~CommandList() { } -Calamares::JobResult CommandList::run( const QObject* parent ) +Calamares::JobResult CommandList::run() { System::RunLocation location = m_doChroot ? System::RunLocation::RunInTarget : System::RunLocation::RunInHost; @@ -139,7 +139,7 @@ Calamares::JobResult CommandList::run( const QObject* parent ) if ( suppress_result ) cDebug() << "Error code" << r.getExitCode() << "ignored by CommandList configuration."; else - return r.explainProcess( parent, processed_cmd, timeout ); + return r.explainProcess( processed_cmd, timeout ); } } diff --git a/src/libcalamares/utils/CommandList.h b/src/libcalamares/utils/CommandList.h index 4ed7616eb..b766259c0 100644 --- a/src/libcalamares/utils/CommandList.h +++ b/src/libcalamares/utils/CommandList.h @@ -88,7 +88,7 @@ public: return m_doChroot; } - Calamares::JobResult run( const QObject* parent ); + Calamares::JobResult run(); using CommandList_t::isEmpty; using CommandList_t::count; diff --git a/src/modules/contextualprocess/ContextualProcessJob.cpp b/src/modules/contextualprocess/ContextualProcessJob.cpp index 6744db054..0a1a2fc1a 100644 --- a/src/modules/contextualprocess/ContextualProcessJob.cpp +++ b/src/modules/contextualprocess/ContextualProcessJob.cpp @@ -85,7 +85,7 @@ ContextualProcessJob::exec() { if ( gs->contains( binding->variable ) && ( gs->value( binding->variable ).toString() == binding->value ) ) { - Calamares::JobResult r = binding->commands->run( this ); + Calamares::JobResult r = binding->commands->run(); if ( !r ) return r; } diff --git a/src/modules/shellprocess/ShellProcessJob.cpp b/src/modules/shellprocess/ShellProcessJob.cpp index 5c14284ec..410f06c09 100644 --- a/src/modules/shellprocess/ShellProcessJob.cpp +++ b/src/modules/shellprocess/ShellProcessJob.cpp @@ -62,7 +62,7 @@ ShellProcessJob::exec() return Calamares::JobResult::ok(); } - return m_commands->run( this ); + return m_commands->run(); } diff --git a/src/modules/users/CheckPWQuality.cpp b/src/modules/users/CheckPWQuality.cpp index 503a6b2b8..e3956670c 100644 --- a/src/modules/users/CheckPWQuality.cpp +++ b/src/modules/users/CheckPWQuality.cpp @@ -144,7 +144,7 @@ public: * It is used under the terms of the GNU GPL v3 or later, as * allowed by the libpwquality license (LICENSES/GPLv2+-libpwquality) */ - QString explanation( QWidget* parent ) + QString explanation() { void* auxerror = m_auxerror; m_auxerror = nullptr; @@ -312,9 +312,9 @@ DEFINE_CHECK_FUNC( libpwquality ) { checks.push_back( PasswordCheck( - [parent,settings]() + [settings]() { - return settings->explanation( parent ); + return settings->explanation(); }, [settings]( const QString& s ) { diff --git a/src/modules/users/CheckPWQuality.h b/src/modules/users/CheckPWQuality.h index b9ea82ce1..07760c75b 100644 --- a/src/modules/users/CheckPWQuality.h +++ b/src/modules/users/CheckPWQuality.h @@ -69,7 +69,7 @@ using PasswordCheckList = QVector; * an error, though). */ #define _xDEFINE_CHECK_FUNC(x) \ - add_check_##x( QWidget* parent, PasswordCheckList& checks, const QVariant& value ) + add_check_##x( PasswordCheckList& checks, const QVariant& value ) #define DEFINE_CHECK_FUNC(x) void _xDEFINE_CHECK_FUNC(x) #define DECLARE_CHECK_FUNC(x) void _xDEFINE_CHECK_FUNC(x); diff --git a/src/modules/users/UsersPage.cpp b/src/modules/users/UsersPage.cpp index a821c6e88..ae8f03b13 100644 --- a/src/modules/users/UsersPage.cpp +++ b/src/modules/users/UsersPage.cpp @@ -462,16 +462,16 @@ UsersPage::addPasswordCheck( const QString& key, const QVariant& value ) { if ( key == "minLength" ) { - add_check_minLength( this, m_passwordChecks, value ); + add_check_minLength( m_passwordChecks, value ); } else if ( key == "maxLength" ) { - add_check_maxLength( this, m_passwordChecks, value ); + add_check_maxLength( m_passwordChecks, value ); } #ifdef CHECK_PWQUALITY else if ( key == "libpwquality" ) { - add_check_libpwquality( this, m_passwordChecks, value ); + add_check_libpwquality( m_passwordChecks, value ); } #endif else