Coding style
This commit is contained in:
parent
9ce55bfb83
commit
e6c80ed5bd
@ -61,7 +61,7 @@ EditExistingPartitionDialog::applyChanges( PartitionCoreModule* core )
|
|||||||
m_partition->roles(),
|
m_partition->roles(),
|
||||||
m_partition->fileSystem().type(),
|
m_partition->fileSystem().type(),
|
||||||
range.first,
|
range.first,
|
||||||
range.second);
|
range.second );
|
||||||
PartitionInfo::setMountPoint( newPartition, PartitionInfo::mountPoint( m_partition ) );
|
PartitionInfo::setMountPoint( newPartition, PartitionInfo::mountPoint( m_partition ) );
|
||||||
PartitionInfo::setFormat( newPartition, true );
|
PartitionInfo::setFormat( newPartition, true );
|
||||||
|
|
||||||
|
@ -46,7 +46,7 @@ static bool
|
|||||||
hasRootPartition( Device* device )
|
hasRootPartition( Device* device )
|
||||||
{
|
{
|
||||||
for ( auto it = PartitionIterator::begin( device ); it != PartitionIterator::end( device ); ++it )
|
for ( auto it = PartitionIterator::begin( device ); it != PartitionIterator::end( device ); ++it )
|
||||||
if ( (*it)->mountPoint() == "/" )
|
if ( ( *it )->mountPoint() == "/" )
|
||||||
return true;
|
return true;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -33,7 +33,8 @@
|
|||||||
// Qt
|
// Qt
|
||||||
#include <QColor>
|
#include <QColor>
|
||||||
|
|
||||||
static QColor COLORS[ 4 ] = {
|
static QColor COLORS[ 4 ] =
|
||||||
|
{
|
||||||
"#448eca",
|
"#448eca",
|
||||||
"#a5cc42",
|
"#a5cc42",
|
||||||
"#d87e30",
|
"#d87e30",
|
||||||
@ -54,7 +55,7 @@ static QColor colorForPartition( Partition* partition, int row )
|
|||||||
|
|
||||||
//- ResetHelper --------------------------------------------
|
//- ResetHelper --------------------------------------------
|
||||||
PartitionModel::ResetHelper::ResetHelper( PartitionModel* model )
|
PartitionModel::ResetHelper::ResetHelper( PartitionModel* model )
|
||||||
: m_model( model )
|
: m_model( model )
|
||||||
{
|
{
|
||||||
m_model->beginResetModel();
|
m_model->beginResetModel();
|
||||||
}
|
}
|
||||||
@ -98,7 +99,7 @@ QModelIndex
|
|||||||
PartitionModel::index( int row, int column, const QModelIndex& parent ) const
|
PartitionModel::index( int row, int column, const QModelIndex& parent ) const
|
||||||
{
|
{
|
||||||
PartitionNode* parentPartition = parent.isValid()
|
PartitionNode* parentPartition = parent.isValid()
|
||||||
? static_cast< PartitionNode* >( partitionForIndex( parent ))
|
? static_cast< PartitionNode* >( partitionForIndex( parent ) )
|
||||||
: static_cast< PartitionNode* >( m_device->partitionTable() );
|
: static_cast< PartitionNode* >( m_device->partitionTable() );
|
||||||
if ( !parentPartition )
|
if ( !parentPartition )
|
||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
|
@ -99,7 +99,8 @@ PartitionPreview::drawPartitions( QPainter* painter, const QRect& rect, const QM
|
|||||||
return;
|
return;
|
||||||
const int count = modl->rowCount( parent );
|
const int count = modl->rowCount( parent );
|
||||||
const int totalWidth = rect.width();
|
const int totalWidth = rect.width();
|
||||||
struct Item {
|
struct Item
|
||||||
|
{
|
||||||
qreal size;
|
qreal size;
|
||||||
QModelIndex index;
|
QModelIndex index;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user