Coding style
This commit is contained in:
parent
9ce55bfb83
commit
e6c80ed5bd
@ -124,10 +124,10 @@ CreatePartitionDialog::createPartition()
|
||||
? FileSystem::Extended
|
||||
: FileSystem::typeForName( m_ui->fsComboBox->currentText() );
|
||||
Partition* partition = PMUtils::createNewPartition(
|
||||
m_parent,
|
||||
*m_device,
|
||||
m_role,
|
||||
fsType, range.first, range.second );
|
||||
m_parent,
|
||||
*m_device,
|
||||
m_role,
|
||||
fsType, range.first, range.second );
|
||||
|
||||
PartitionInfo::setMountPoint( partition, m_ui->mountPointComboBox->currentText() );
|
||||
PartitionInfo::setFormat( partition, true );
|
||||
|
@ -56,12 +56,12 @@ EditExistingPartitionDialog::applyChanges( PartitionCoreModule* core )
|
||||
if ( m_ui->formatRadioButton->isChecked() )
|
||||
{
|
||||
Partition* newPartition = PMUtils::createNewPartition(
|
||||
m_partition->parent(),
|
||||
*m_device,
|
||||
m_partition->roles(),
|
||||
m_partition->fileSystem().type(),
|
||||
range.first,
|
||||
range.second);
|
||||
m_partition->parent(),
|
||||
*m_device,
|
||||
m_partition->roles(),
|
||||
m_partition->fileSystem().type(),
|
||||
range.first,
|
||||
range.second );
|
||||
PartitionInfo::setMountPoint( newPartition, PartitionInfo::mountPoint( m_partition ) );
|
||||
PartitionInfo::setFormat( newPartition, true );
|
||||
|
||||
|
@ -53,17 +53,17 @@ createNewPartition( PartitionNode* parent, const Device& device, const Partition
|
||||
{
|
||||
FileSystem* fs = FileSystemFactory::create( fsType, firstSector, lastSector );
|
||||
return new Partition(
|
||||
parent,
|
||||
device,
|
||||
role,
|
||||
fs, fs->firstSector(), fs->lastSector(),
|
||||
QString() /* path */,
|
||||
PartitionTable::FlagNone /* availableFlags */,
|
||||
QString() /* mountPoint */,
|
||||
false /* mounted */,
|
||||
PartitionTable::FlagNone /* activeFlags */,
|
||||
Partition::StateNew
|
||||
);
|
||||
parent,
|
||||
device,
|
||||
role,
|
||||
fs, fs->firstSector(), fs->lastSector(),
|
||||
QString() /* path */,
|
||||
PartitionTable::FlagNone /* availableFlags */,
|
||||
QString() /* mountPoint */,
|
||||
false /* mounted */,
|
||||
PartitionTable::FlagNone /* activeFlags */,
|
||||
Partition::StateNew
|
||||
);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
@ -46,7 +46,7 @@ static bool
|
||||
hasRootPartition( Device* device )
|
||||
{
|
||||
for ( auto it = PartitionIterator::begin( device ); it != PartitionIterator::end( device ); ++it )
|
||||
if ( (*it)->mountPoint() == "/" )
|
||||
if ( ( *it )->mountPoint() == "/" )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
@ -33,7 +33,8 @@
|
||||
// Qt
|
||||
#include <QColor>
|
||||
|
||||
static QColor COLORS[ 4 ] = {
|
||||
static QColor COLORS[ 4 ] =
|
||||
{
|
||||
"#448eca",
|
||||
"#a5cc42",
|
||||
"#d87e30",
|
||||
@ -54,7 +55,7 @@ static QColor colorForPartition( Partition* partition, int row )
|
||||
|
||||
//- ResetHelper --------------------------------------------
|
||||
PartitionModel::ResetHelper::ResetHelper( PartitionModel* model )
|
||||
: m_model( model )
|
||||
: m_model( model )
|
||||
{
|
||||
m_model->beginResetModel();
|
||||
}
|
||||
@ -98,8 +99,8 @@ QModelIndex
|
||||
PartitionModel::index( int row, int column, const QModelIndex& parent ) const
|
||||
{
|
||||
PartitionNode* parentPartition = parent.isValid()
|
||||
? static_cast< PartitionNode* >( partitionForIndex( parent ))
|
||||
: static_cast< PartitionNode* >( m_device->partitionTable() );
|
||||
? static_cast< PartitionNode* >( partitionForIndex( parent ) )
|
||||
: static_cast< PartitionNode* >( m_device->partitionTable() );
|
||||
if ( !parentPartition )
|
||||
return QModelIndex();
|
||||
auto lst = parentPartition->children();
|
||||
|
@ -99,7 +99,8 @@ PartitionPreview::drawPartitions( QPainter* painter, const QRect& rect, const QM
|
||||
return;
|
||||
const int count = modl->rowCount( parent );
|
||||
const int totalWidth = rect.width();
|
||||
struct Item {
|
||||
struct Item
|
||||
{
|
||||
qreal size;
|
||||
QModelIndex index;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user