Clang: reduce warnings, nullptr, unused parameters
This commit is contained in:
parent
34761c4214
commit
e3e519c06f
@ -38,7 +38,7 @@ public:
|
|||||||
IsPartitionRole
|
IsPartitionRole
|
||||||
};
|
};
|
||||||
|
|
||||||
BootLoaderModel( QObject* parent = 0 );
|
BootLoaderModel( QObject* parent = nullptr );
|
||||||
~BootLoaderModel() override;
|
~BootLoaderModel() override;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -270,8 +270,8 @@ PartitionCoreModule::deletePartition( Device* device, Partition* partition )
|
|||||||
if ( !KPMHelpers::isPartitionFreeSpace( childPartition ) )
|
if ( !KPMHelpers::isPartitionFreeSpace( childPartition ) )
|
||||||
lst << childPartition;
|
lst << childPartition;
|
||||||
|
|
||||||
for ( auto partition : lst )
|
for ( auto childPartition : lst )
|
||||||
deletePartition( device, partition );
|
deletePartition( device, childPartition );
|
||||||
}
|
}
|
||||||
|
|
||||||
QList< Calamares::job_ptr >& jobs = deviceInfo->jobs;
|
QList< Calamares::job_ptr >& jobs = deviceInfo->jobs;
|
||||||
@ -441,7 +441,7 @@ PartitionCoreModule::osproberEntries() const
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
PartitionCoreModule::refreshPartition( Device* device, Partition* partition )
|
PartitionCoreModule::refreshPartition( Device* device, Partition* )
|
||||||
{
|
{
|
||||||
// Keep it simple for now: reset the model. This can be improved to cause
|
// Keep it simple for now: reset the model. This can be improved to cause
|
||||||
// the model to emit dataChanged() for the affected row instead, avoiding
|
// the model to emit dataChanged() for the affected row instead, avoiding
|
||||||
|
@ -35,8 +35,8 @@
|
|||||||
|
|
||||||
|
|
||||||
static const int VIEW_HEIGHT = qMax( CalamaresUtils::defaultFontHeight() + 8, // wins out with big fonts
|
static const int VIEW_HEIGHT = qMax( CalamaresUtils::defaultFontHeight() + 8, // wins out with big fonts
|
||||||
(int)( CalamaresUtils::defaultFontHeight() * 0.6 ) + 22 ); // wins out with small fonts
|
int( CalamaresUtils::defaultFontHeight() * 0.6 ) + 22 ); // wins out with small fonts
|
||||||
static const int CORNER_RADIUS = 3;
|
static constexpr int CORNER_RADIUS = 3;
|
||||||
static const int EXTENDED_PARTITION_MARGIN = qMax( 4, VIEW_HEIGHT / 6 );
|
static const int EXTENDED_PARTITION_MARGIN = qMax( 4, VIEW_HEIGHT / 6 );
|
||||||
|
|
||||||
// The SELECTION_MARGIN is applied within a hardcoded 2px padding anyway, so
|
// The SELECTION_MARGIN is applied within a hardcoded 2px padding anyway, so
|
||||||
@ -54,8 +54,8 @@ static const int SELECTION_MARGIN = qMin( ( EXTENDED_PARTITION_MARGIN - 2 ) / 2,
|
|||||||
PartitionBarsView::PartitionBarsView( QWidget* parent )
|
PartitionBarsView::PartitionBarsView( QWidget* parent )
|
||||||
: QAbstractItemView( parent )
|
: QAbstractItemView( parent )
|
||||||
, m_nestedPartitionsMode( NoNestedPartitions )
|
, m_nestedPartitionsMode( NoNestedPartitions )
|
||||||
, m_hoveredIndex( QModelIndex() )
|
|
||||||
, canBeSelected( []( const QModelIndex& ) { return true; } )
|
, canBeSelected( []( const QModelIndex& ) { return true; } )
|
||||||
|
, m_hoveredIndex( QModelIndex() )
|
||||||
{
|
{
|
||||||
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
||||||
setFrameStyle( QFrame::NoFrame );
|
setFrameStyle( QFrame::NoFrame );
|
||||||
@ -422,14 +422,14 @@ PartitionBarsView::setSelectionFilter( std::function< bool ( const QModelIndex&
|
|||||||
|
|
||||||
|
|
||||||
QModelIndex
|
QModelIndex
|
||||||
PartitionBarsView::moveCursor( CursorAction cursorAction, Qt::KeyboardModifiers modifiers )
|
PartitionBarsView::moveCursor( CursorAction, Qt::KeyboardModifiers )
|
||||||
{
|
{
|
||||||
return QModelIndex();
|
return QModelIndex();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool
|
bool
|
||||||
PartitionBarsView::isIndexHidden( const QModelIndex& index ) const
|
PartitionBarsView::isIndexHidden( const QModelIndex& ) const
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -491,7 +491,7 @@ PartitionBarsView::mouseMoveEvent( QMouseEvent* event )
|
|||||||
|
|
||||||
|
|
||||||
void
|
void
|
||||||
PartitionBarsView::leaveEvent( QEvent* event )
|
PartitionBarsView::leaveEvent( QEvent* )
|
||||||
{
|
{
|
||||||
QGuiApplication::restoreOverrideCursor();
|
QGuiApplication::restoreOverrideCursor();
|
||||||
if ( m_hoveredIndex.isValid() )
|
if ( m_hoveredIndex.isValid() )
|
||||||
|
@ -58,7 +58,7 @@ PartitionSizeController::setPartResizerWidget( PartResizerWidget* widget, bool f
|
|||||||
Q_ASSERT( m_device );
|
Q_ASSERT( m_device );
|
||||||
|
|
||||||
if ( m_partResizerWidget )
|
if ( m_partResizerWidget )
|
||||||
disconnect( m_partResizerWidget, 0, this, 0 );
|
disconnect( m_partResizerWidget, nullptr, this, nullptr );
|
||||||
|
|
||||||
m_dirty = false;
|
m_dirty = false;
|
||||||
m_currentSpinBoxValue = -1;
|
m_currentSpinBoxValue = -1;
|
||||||
@ -108,7 +108,7 @@ void
|
|||||||
PartitionSizeController::setSpinBox( QSpinBox* spinBox )
|
PartitionSizeController::setSpinBox( QSpinBox* spinBox )
|
||||||
{
|
{
|
||||||
if ( m_spinBox )
|
if ( m_spinBox )
|
||||||
disconnect( m_spinBox, 0, this, 0 );
|
disconnect( m_spinBox, nullptr, this, nullptr );
|
||||||
m_spinBox = spinBox;
|
m_spinBox = spinBox;
|
||||||
m_spinBox->setMaximum( std::numeric_limits< int >::max() );
|
m_spinBox->setMaximum( std::numeric_limits< int >::max() );
|
||||||
connectWidgets();
|
connectWidgets();
|
||||||
|
@ -347,7 +347,7 @@ ReplaceWidget::updateFromCurrentDevice( QComboBox* devicesComboBox )
|
|||||||
|
|
||||||
QAbstractItemModel* oldModel = m_ui->partitionTreeView->model();
|
QAbstractItemModel* oldModel = m_ui->partitionTreeView->model();
|
||||||
if ( oldModel )
|
if ( oldModel )
|
||||||
disconnect( oldModel, 0, this, 0 );
|
disconnect( oldModel, nullptr, this, nullptr );
|
||||||
|
|
||||||
PartitionModel* model = m_core->partitionModelForDevice( device );
|
PartitionModel* model = m_core->partitionModelForDevice( device );
|
||||||
m_ui->partitionTreeView->setModel( model );
|
m_ui->partitionTreeView->setModel( model );
|
||||||
|
@ -78,7 +78,7 @@ FormatPartitionJob::prettyStatusMessage() const
|
|||||||
Calamares::JobResult
|
Calamares::JobResult
|
||||||
FormatPartitionJob::exec()
|
FormatPartitionJob::exec()
|
||||||
{
|
{
|
||||||
Report report( 0 );
|
Report report( nullptr ); // Root of the report tree, no parent
|
||||||
QString partitionPath = m_partition->partitionPath();
|
QString partitionPath = m_partition->partitionPath();
|
||||||
QString message = tr( "The installer failed to format partition %1 on disk '%2'." ).arg( partitionPath, m_device->name() );
|
QString message = tr( "The installer failed to format partition %1 on disk '%2'." ).arg( partitionPath, m_device->name() );
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user