[libcalamares] Apply coding style

This commit is contained in:
Adriaan de Groot 2022-01-31 23:41:37 +01:00
parent 80300e412c
commit ffeab32403
4 changed files with 22 additions and 14 deletions

View File

@ -122,8 +122,9 @@ public:
}
else
{
cDebug() << o << "Starting" << ( failureEncountered ? "EMERGENCY JOB" : "job" ) << jobitem.job->prettyName()
<< '(' << ( m_jobIndex + 1 ) << '/' << m_runningJobs->count() << ')';
cDebug() << o << "Starting" << ( failureEncountered ? "EMERGENCY JOB" : "job" )
<< jobitem.job->prettyName() << '(' << ( m_jobIndex + 1 ) << '/' << m_runningJobs->count()
<< ')';
o.refresh(); // So next time it shows the function header again
emitProgress( 0.0 ); // 0% for *this job*
connect( jobitem.job.data(), &Job::progress, this, &JobThread::emitProgress );

View File

@ -259,7 +259,8 @@ operator<<( QDebug& s, const RedactedCommand& l )
* Identical strings with the same context will be hashed the same,
* so that they can be logged and still recognized as the-same.
*/
static uint insertRedactedName( const QString& context, const QString& s )
static uint
insertRedactedName( const QString& context, const QString& s )
{
static uint salt = QRandomGenerator::global()->generate(); // Just once
@ -268,8 +269,8 @@ static uint insertRedactedName( const QString& context, const QString& s )
}
RedactedName::RedactedName( const QString& context, const QString& s )
: m_id( insertRedactedName(context, s) ),
m_context(context)
: m_id( insertRedactedName( context, s ) )
, m_context( context )
{
}

View File

@ -247,7 +247,8 @@ private:
const QString m_context;
};
inline QDebug& operator<<( QDebug& s, const RedactedName& n )
inline QDebug&
operator<<( QDebug& s, const RedactedName& n )
{
return s << NoQuote << QString( n ) << Quote;
}

View File

@ -29,7 +29,8 @@ namespace CalamaresUtils
* @param locale the new locale (names as defined by Calamares).
* @param brandingTranslationsPrefix the branding path prefix, from Calamares::Branding.
*/
DLLEXPORT void installTranslator( const CalamaresUtils::Locale::Translation::Id& locale, const QString& brandingTranslationsPrefix );
DLLEXPORT void installTranslator( const CalamaresUtils::Locale::Translation::Id& locale,
const QString& brandingTranslationsPrefix );
/** @brief Initializes the translations with the current system settings
*/
@ -56,7 +57,8 @@ DLLEXPORT CalamaresUtils::Locale::Translation::Id translatorLocaleName();
*
* @returns @c true on success
*/
DLLEXPORT bool loadTranslator( const CalamaresUtils::Locale::Translation::Id& locale, const QString& prefix, QTranslator* translator );
DLLEXPORT bool
loadTranslator( const CalamaresUtils::Locale::Translation::Id& locale, const QString& prefix, QTranslator* translator );
/** @brief Set @p allow to true to load translations from current dir.
*
@ -138,7 +140,10 @@ private:
#define CALAMARES_RETRANSLATE_SLOT( slotfunc ) \
do \
{ \
connect( CalamaresUtils::Retranslator::instance(), &CalamaresUtils::Retranslator::languageChanged, this, slotfunc ); \
connect( CalamaresUtils::Retranslator::instance(), \
&CalamaresUtils::Retranslator::languageChanged, \
this, \
slotfunc ); \
( this->*slotfunc )(); \
} while ( false )