From 59255c7a577c55a952c4a97517d4c3c1ab334b59 Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Thu, 5 Nov 2020 00:00:29 +0100 Subject: [PATCH] Changes: apply coding style --- src/libcalamares/geoip/test_geoip.cpp | 2 +- src/libcalamares/modulesystem/Module.cpp | 3 ++- src/libcalamares/utils/Retranslator.cpp | 4 ++-- src/modules/partition/core/PartitionActions.cpp | 2 +- src/modules/partition/tests/CreateLayoutsTests.cpp | 13 +++++++------ src/modules/users/TestGroupInformation.cpp | 6 +++--- 6 files changed, 16 insertions(+), 14 deletions(-) diff --git a/src/libcalamares/geoip/test_geoip.cpp b/src/libcalamares/geoip/test_geoip.cpp index fd50cecff..0e14dcf91 100644 --- a/src/libcalamares/geoip/test_geoip.cpp +++ b/src/libcalamares/geoip/test_geoip.cpp @@ -37,7 +37,7 @@ main( int argc, char** argv ) QString format( argv[ 1 ] ); QString selector = argc == 3 ? QString( argv[ 2 ] ) : QString(); - Logger::setupLogLevel(Logger::LOGVERBOSE); + Logger::setupLogLevel( Logger::LOGVERBOSE ); cDebug() << "Doing GeoIP interpretation with format=" << format << "selector=" << selector; Interface* handler = nullptr; diff --git a/src/libcalamares/modulesystem/Module.cpp b/src/libcalamares/modulesystem/Module.cpp index 94888f240..ff0b20f78 100644 --- a/src/libcalamares/modulesystem/Module.cpp +++ b/src/libcalamares/modulesystem/Module.cpp @@ -86,7 +86,8 @@ moduleConfigurationCandidates( bool assumeBuildDir, const QString& moduleName, c return paths; } -void Module::loadConfigurationFile( const QString& configFileName ) //throws YAML::Exception +void +Module::loadConfigurationFile( const QString& configFileName ) //throws YAML::Exception { QStringList configCandidates = moduleConfigurationCandidates( Settings::instance()->debugMode(), name(), configFileName ); diff --git a/src/libcalamares/utils/Retranslator.cpp b/src/libcalamares/utils/Retranslator.cpp index 7781ecf51..41d5966ab 100644 --- a/src/libcalamares/utils/Retranslator.cpp +++ b/src/libcalamares/utils/Retranslator.cpp @@ -195,7 +195,7 @@ installTranslator( const QLocale& locale, const QString& brandingTranslationsPre loadSingletonTranslator( TZLoader( locale ), s_tztranslator ); loadSingletonTranslator( CalamaresLoader( locale ), s_translator ); - s_translatorLocaleName = CalamaresLoader::mungeLocaleName(locale); + s_translatorLocaleName = CalamaresLoader::mungeLocaleName( locale ); } @@ -206,7 +206,7 @@ translatorLocaleName() } bool -loadTranslator( const QLocale& locale, const QString& prefix, QTranslator *translator ) +loadTranslator( const QLocale& locale, const QString& prefix, QTranslator* translator ) { return ::tryLoad( translator, prefix, locale.name() ); } diff --git a/src/modules/partition/core/PartitionActions.cpp b/src/modules/partition/core/PartitionActions.cpp index 5d92d9b92..dc3b0b572 100644 --- a/src/modules/partition/core/PartitionActions.cpp +++ b/src/modules/partition/core/PartitionActions.cpp @@ -196,7 +196,7 @@ doAutopartition( PartitionCoreModule* core, Device* dev, Choices::AutoPartitionO KPM_PARTITION_FLAG( None ) ); } PartitionInfo::setFormat( swapPartition, true ); - if ( gs->contains( "swapPartitionName" )) + if ( gs->contains( "swapPartitionName" ) ) { swapPartition->setLabel( gs->value( "swapPartitionName" ).toString() ); } diff --git a/src/modules/partition/tests/CreateLayoutsTests.cpp b/src/modules/partition/tests/CreateLayoutsTests.cpp index 04a06b2b3..216bfc209 100644 --- a/src/modules/partition/tests/CreateLayoutsTests.cpp +++ b/src/modules/partition/tests/CreateLayoutsTests.cpp @@ -64,7 +64,8 @@ CreateLayoutsTests::testFixedSizePartition() QFAIL( qPrintable( "Unable to create / partition" ) ); } - partitions = layout.createPartitions( static_cast< Device* >( &dev ), 0, dev.totalLogical(), nullptr, nullptr, role ); + partitions + = layout.createPartitions( static_cast< Device* >( &dev ), 0, dev.totalLogical(), nullptr, nullptr, role ); QCOMPARE( partitions.count(), 1 ); @@ -84,7 +85,8 @@ CreateLayoutsTests::testPercentSizePartition() QFAIL( qPrintable( "Unable to create / partition" ) ); } - partitions = layout.createPartitions( static_cast< Device* >( &dev ), 0, dev.totalLogical(), nullptr, nullptr, role ); + partitions + = layout.createPartitions( static_cast< Device* >( &dev ), 0, dev.totalLogical(), nullptr, nullptr, role ); QCOMPARE( partitions.count(), 1 ); @@ -114,7 +116,8 @@ CreateLayoutsTests::testMixedSizePartition() QFAIL( qPrintable( "Unable to create /bkup partition" ) ); } - partitions = layout.createPartitions( static_cast< Device* >( &dev ), 0, dev.totalLogical(), nullptr, nullptr, role ); + partitions + = layout.createPartitions( static_cast< Device* >( &dev ), 0, dev.totalLogical(), nullptr, nullptr, role ); QCOMPARE( partitions.count(), 3 ); @@ -155,6 +158,4 @@ TestDevice::TestDevice( const QString& name, const qint64 logicalSectorSize, con } #endif -TestDevice::~TestDevice() -{ -} +TestDevice::~TestDevice() {} diff --git a/src/modules/users/TestGroupInformation.cpp b/src/modules/users/TestGroupInformation.cpp index dd4bfe78f..9fc1e1c35 100644 --- a/src/modules/users/TestGroupInformation.cpp +++ b/src/modules/users/TestGroupInformation.cpp @@ -73,7 +73,8 @@ GroupTests::testReadGroup() } } -void GroupTests::testCreateGroup() +void +GroupTests::testCreateGroup() { // BUILD_AS_TEST is the source-directory path QFile fi( QString( "%1/tests/5-issue-1523.conf" ).arg( BUILD_AS_TEST ) ); @@ -93,12 +94,11 @@ void GroupTests::testCreateGroup() Calamares::JobQueue::instance()->globalStorage()->insert( "rootMountPoint", "/" ); - SetupGroupsJob j(&c); + SetupGroupsJob j( &c ); QVERIFY( !j.exec() ); // running as regular user this should fail } - QTEST_GUILESS_MAIN( GroupTests ) #include "utils/moc-warnings.h"