Apply coding style globally again

This commit is contained in:
Adriaan de Groot 2020-10-12 14:27:01 +02:00
parent cff24bdd79
commit a955791766
21 changed files with 125 additions and 126 deletions

View File

@ -57,15 +57,13 @@ enum class InsertMode
* in *localeConf*, e.g. "LANG" or "LC_TIME". No effort is made to
* enforce this.
*/
DLLEXPORT void
insertGS( Calamares::GlobalStorage& gs, const QVariantMap& values, InsertMode mode = InsertMode::Merge );
DLLEXPORT void insertGS( Calamares::GlobalStorage& gs, const QVariantMap& values, InsertMode mode = InsertMode::Merge );
/** @brief Insert the given @p values into the *localeConf* map in @p gs
*
* Alternate way of providing the keys and values.
*/
DLLEXPORT void insertGS( Calamares::GlobalStorage& gs,
const QMap< QString, QString >& values,
InsertMode mode = InsertMode::Merge );
DLLEXPORT void
insertGS( Calamares::GlobalStorage& gs, const QMap< QString, QString >& values, InsertMode mode = InsertMode::Merge );
/** @brief Write a single @p key and @p value to the *localeConf* map
*/
DLLEXPORT void insertGS( Calamares::GlobalStorage& gs, const QString& key, const QString& value );

View File

@ -281,9 +281,7 @@ ModuleManager::loadModules()
if ( !failedModules.isEmpty() )
{
ViewManager::instance()->onInitFailed( failedModules );
QTimer::singleShot( 10, [=]() {
emit modulesFailed( failedModules );
} );
QTimer::singleShot( 10, [=]() { emit modulesFailed( failedModules ); } );
}
else
{

View File

@ -41,9 +41,7 @@ ImageRegistry::cacheKey( const QSize& size )
QPixmap
ImageRegistry::pixmap( const QString& image,
const QSize& size,
CalamaresUtils::ImageMode mode )
ImageRegistry::pixmap( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode )
{
Q_ASSERT( !( size.width() < 0 || size.height() < 0 ) );
if ( size.width() < 0 || size.height() < 0 )

View File

@ -22,16 +22,12 @@ public:
explicit ImageRegistry();
QIcon icon( const QString& image, CalamaresUtils::ImageMode mode = CalamaresUtils::Original );
QPixmap pixmap( const QString& image,
const QSize& size,
CalamaresUtils::ImageMode mode = CalamaresUtils::Original );
QPixmap
pixmap( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode = CalamaresUtils::Original );
private:
qint64 cacheKey( const QSize& size );
void putInCache( const QString& image,
const QSize& size,
CalamaresUtils::ImageMode mode,
const QPixmap& pixmap );
void putInCache( const QString& image, const QSize& size, CalamaresUtils::ImageMode mode, const QPixmap& pixmap );
};
#endif // IMAGE_REGISTRY_H

View File

@ -76,9 +76,7 @@ KeyboardPage::KeyboardPage( QWidget* parent )
connect(
ui->buttonRestore, &QPushButton::clicked, [this] { ui->comboBoxModel->setCurrentIndex( m_defaultIndex ); } );
connect( ui->comboBoxModel,
&QComboBox::currentTextChanged,
[this]( const QString& text ) {
connect( ui->comboBoxModel, &QComboBox::currentTextChanged, [this]( const QString& text ) {
QString model = m_models.value( text, "pc105" );
// Set Xorg keyboard model

View File

@ -240,14 +240,14 @@ Config::setConfigurationMap( const QVariantMap& configurationMap )
gs->insert( "allowManualPartitioning",
CalamaresUtils::getBool( configurationMap, "allowManualPartitioning", true ) );
if ( configurationMap.contains( "requiredPartitionTableType" ) &&
configurationMap.value( "requiredPartitionTableType" ).type() == QVariant::List )
if ( configurationMap.contains( "requiredPartitionTableType" )
&& configurationMap.value( "requiredPartitionTableType" ).type() == QVariant::List )
{
m_requiredPartitionTableType.clear();
m_requiredPartitionTableType.append( configurationMap.value( "requiredPartitionTableType" ).toStringList() );
}
else if ( configurationMap.contains( "requiredPartitionTableType" ) &&
configurationMap.value( "requiredPartitionTableType" ).type() == QVariant::String )
else if ( configurationMap.contains( "requiredPartitionTableType" )
&& configurationMap.value( "requiredPartitionTableType" ).type() == QVariant::String )
{
m_requiredPartitionTableType.clear();
m_requiredPartitionTableType.append( configurationMap.value( "requiredPartitionTableType" ).toString() );

View File

@ -803,8 +803,7 @@ ChoicePage::doReplaceSelectedPartition( const QModelIndex& current )
Calamares::GlobalStorage* gs = Calamares::JobQueue::instance()->globalStorage();
PartitionActions::doReplacePartition(
m_core,
PartitionActions::doReplacePartition( m_core,
selectedDevice(),
selectedPartition,
{ gs->value( "defaultPartitionType" ).toString(),
@ -1268,8 +1267,8 @@ ChoicePage::setupActions()
if ( currentDevice->partitionTable() )
{
tableType = currentDevice->partitionTable()->type();
matchTableType = m_requiredPartitionTableType.size() == 0 ||
m_requiredPartitionTableType.contains( PartitionTable::tableTypeToName( tableType ) );
matchTableType = m_requiredPartitionTableType.size() == 0
|| m_requiredPartitionTableType.contains( PartitionTable::tableTypeToName( tableType ) );
}
for ( auto it = PartitionIterator::begin( currentDevice ); it != PartitionIterator::end( currentDevice ); ++it )
@ -1454,7 +1453,8 @@ ChoicePage::setupActions()
m_messageLabel->show();
cWarning() << "Partition table" << PartitionTable::tableTypeToName( tableType )
<< "does not match the requirement " << m_requiredPartitionTableType.join( " or " ) << ", "
<< "does not match the requirement " << m_requiredPartitionTableType.join( " or " )
<< ", "
"ENABLING erease feature and ";
"DISABLING alongside, replace and manual features.";
m_eraseButton->show();
@ -1465,20 +1465,22 @@ ChoicePage::setupActions()
force_uncheck( m_grp, m_replaceButton );
}
if ( m_somethingElseButton->isHidden()
&& m_alongsideButton->isHidden()
&& m_replaceButton->isHidden()
if ( m_somethingElseButton->isHidden() && m_alongsideButton->isHidden() && m_replaceButton->isHidden()
&& m_somethingElseButton->isHidden() )
{
if ( atLeastOneIsMounted )
{
m_messageLabel->setText( tr( "This storage device has one of its partitions <strong>mounted</strong>." ) );
}
else
m_messageLabel->setText( tr( "This storage device is a part of an <strong>inactive RAID</strong> device." ) );
{
m_messageLabel->setText(
tr( "This storage device is a part of an <strong>inactive RAID</strong> device." ) );
}
m_messageLabel->show();
cWarning() << "No buttons available"
<< "replaced?" << atLeastOneCanBeReplaced
<< "resized?" << atLeastOneCanBeResized
<< "replaced?" << atLeastOneCanBeReplaced << "resized?" << atLeastOneCanBeResized
<< "erased? (not-mounted and not-raid)" << !atLeastOneIsMounted << "and" << !isInactiveRAID;
}
}

View File

@ -84,9 +84,12 @@ ReplaceWidget::applyChanges()
{
Device* dev = model->device();
PartitionActions::doReplacePartition(
m_core, dev, partition, { gs->value( "defaultPartitionTableType" ).toString(),
gs->value( "defaultFileSystemType" ).toString(), QString() } );
PartitionActions::doReplacePartition( m_core,
dev,
partition,
{ gs->value( "defaultPartitionTableType" ).toString(),
gs->value( "defaultFileSystemType" ).toString(),
QString() } );
if ( m_isEfi )
{

View File

@ -11,9 +11,9 @@
#include "core/PartitionLayout.h"
#include "utils/Logger.h"
#include "partition/KPMManager.h"
#include "JobQueue.h"
#include "partition/KPMManager.h"
#include "utils/Logger.h"
#include <core/lvmdevice.h>
#include <core/partition.h>
@ -141,7 +141,13 @@ public:
};
TestDevice::TestDevice( const QString& name, const qint64 logicalSectorSize, const qint64 totalLogicalSectors )
: Device (std::make_shared<DevicePrivate>(), name, QString( "node" ), logicalSectorSize, totalLogicalSectors, QString(), Device::Type::Unknown_Device)
: Device( std::make_shared< DevicePrivate >(),
name,
QString( "node" ),
logicalSectorSize,
totalLogicalSectors,
QString(),
Device::Type::Unknown_Device )
{
}
#else