[libcalamares] Apply coding style
This commit is contained in:
parent
80300e412c
commit
ffeab32403
@ -122,8 +122,9 @@ public:
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
cDebug() << o << "Starting" << ( failureEncountered ? "EMERGENCY JOB" : "job" ) << jobitem.job->prettyName()
|
cDebug() << o << "Starting" << ( failureEncountered ? "EMERGENCY JOB" : "job" )
|
||||||
<< '(' << ( m_jobIndex + 1 ) << '/' << m_runningJobs->count() << ')';
|
<< jobitem.job->prettyName() << '(' << ( m_jobIndex + 1 ) << '/' << m_runningJobs->count()
|
||||||
|
<< ')';
|
||||||
o.refresh(); // So next time it shows the function header again
|
o.refresh(); // So next time it shows the function header again
|
||||||
emitProgress( 0.0 ); // 0% for *this job*
|
emitProgress( 0.0 ); // 0% for *this job*
|
||||||
connect( jobitem.job.data(), &Job::progress, this, &JobThread::emitProgress );
|
connect( jobitem.job.data(), &Job::progress, this, &JobThread::emitProgress );
|
||||||
|
@ -259,7 +259,8 @@ operator<<( QDebug& s, const RedactedCommand& l )
|
|||||||
* Identical strings with the same context will be hashed the same,
|
* Identical strings with the same context will be hashed the same,
|
||||||
* so that they can be logged and still recognized as 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
|
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 )
|
RedactedName::RedactedName( const QString& context, const QString& s )
|
||||||
: m_id( insertRedactedName(context, s) ),
|
: m_id( insertRedactedName( context, s ) )
|
||||||
m_context(context)
|
, m_context( context )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -247,7 +247,8 @@ private:
|
|||||||
const QString m_context;
|
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;
|
return s << NoQuote << QString( n ) << Quote;
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,8 @@ namespace CalamaresUtils
|
|||||||
* @param locale the new locale (names as defined by Calamares).
|
* @param locale the new locale (names as defined by Calamares).
|
||||||
* @param brandingTranslationsPrefix the branding path prefix, from Calamares::Branding.
|
* @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
|
/** @brief Initializes the translations with the current system settings
|
||||||
*/
|
*/
|
||||||
@ -56,7 +57,8 @@ DLLEXPORT CalamaresUtils::Locale::Translation::Id translatorLocaleName();
|
|||||||
*
|
*
|
||||||
* @returns @c true on success
|
* @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.
|
/** @brief Set @p allow to true to load translations from current dir.
|
||||||
*
|
*
|
||||||
@ -138,7 +140,10 @@ private:
|
|||||||
#define CALAMARES_RETRANSLATE_SLOT( slotfunc ) \
|
#define CALAMARES_RETRANSLATE_SLOT( slotfunc ) \
|
||||||
do \
|
do \
|
||||||
{ \
|
{ \
|
||||||
connect( CalamaresUtils::Retranslator::instance(), &CalamaresUtils::Retranslator::languageChanged, this, slotfunc ); \
|
connect( CalamaresUtils::Retranslator::instance(), \
|
||||||
|
&CalamaresUtils::Retranslator::languageChanged, \
|
||||||
|
this, \
|
||||||
|
slotfunc ); \
|
||||||
( this->*slotfunc )(); \
|
( this->*slotfunc )(); \
|
||||||
} while ( false )
|
} while ( false )
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user