[partition] Use Q_EMIT
This commit is contained in:
parent
4fa61249a8
commit
d8a862ec82
@ -180,7 +180,7 @@ Config::setInstallChoice( InstallChoice c )
|
||||
if ( c != m_installChoice )
|
||||
{
|
||||
m_installChoice = c;
|
||||
emit installChoiceChanged( c );
|
||||
Q_EMIT installChoiceChanged( c );
|
||||
::updateGlobalStorage( c, m_swapChoice );
|
||||
}
|
||||
}
|
||||
@ -202,7 +202,7 @@ Config::setSwapChoice( Config::SwapChoice c )
|
||||
if ( c != m_swapChoice )
|
||||
{
|
||||
m_swapChoice = c;
|
||||
emit swapChoiceChanged( c );
|
||||
Q_EMIT swapChoiceChanged( c );
|
||||
::updateGlobalStorage( m_installChoice, c );
|
||||
}
|
||||
}
|
||||
|
@ -132,7 +132,7 @@ DeviceModel::swapDevice( Device* oldDevice, Device* newDevice )
|
||||
|
||||
m_devices[ indexOfOldDevice ] = newDevice;
|
||||
|
||||
emit dataChanged( index( indexOfOldDevice ), index( indexOfOldDevice ) );
|
||||
Q_EMIT dataChanged( index( indexOfOldDevice ), index( indexOfOldDevice ) );
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -687,7 +687,7 @@ void
|
||||
PartitionCoreModule::refreshPartition( Device* device, Partition* )
|
||||
{
|
||||
// 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 Q_EMIT dataChanged() for the affected row instead, avoiding
|
||||
// the loss of the current selection.
|
||||
auto model = partitionModelForDevice( device );
|
||||
Q_ASSERT( model );
|
||||
@ -966,7 +966,7 @@ PartitionCoreModule::revert()
|
||||
m_deviceInfos.clear();
|
||||
doInit();
|
||||
updateIsDirty();
|
||||
emit reverted();
|
||||
Q_EMIT reverted();
|
||||
}
|
||||
|
||||
|
||||
@ -1040,7 +1040,7 @@ PartitionCoreModule::revertDevice( Device* dev, bool individualRevert )
|
||||
{
|
||||
refreshAfterModelChange();
|
||||
}
|
||||
emit deviceReverted( newDev );
|
||||
Q_EMIT deviceReverted( newDev );
|
||||
}
|
||||
|
||||
|
||||
|
@ -327,5 +327,5 @@ PartitionModel::partitionForIndex( const QModelIndex& index ) const
|
||||
void
|
||||
PartitionModel::update()
|
||||
{
|
||||
emit dataChanged( index( 0, 0 ), index( rowCount() - 1, columnCount() - 1 ) );
|
||||
Q_EMIT dataChanged( index( 0, 0 ), index( rowCount() - 1, columnCount() - 1 ) );
|
||||
}
|
||||
|
@ -41,7 +41,7 @@ public:
|
||||
/**
|
||||
* This helper class must be instantiated on the stack *before* making
|
||||
* changes to the device represented by this model. It will cause the model
|
||||
* to emit modelAboutToBeReset() when instantiated and modelReset() when
|
||||
* to Q_EMIT modelAboutToBeReset() when instantiated and modelReset() when
|
||||
* destructed.
|
||||
*/
|
||||
class ResetHelper
|
||||
|
@ -300,7 +300,7 @@ ChoicePage::setupChoices()
|
||||
m_config->setInstallChoice( id );
|
||||
updateNextEnabled();
|
||||
|
||||
emit actionChosen();
|
||||
Q_EMIT actionChosen();
|
||||
}
|
||||
else // An action was unpicked, either on its own or because of another selection.
|
||||
{
|
||||
@ -310,7 +310,7 @@ ChoicePage::setupChoices()
|
||||
m_config->setInstallChoice( InstallChoice::NoChoice );
|
||||
updateNextEnabled();
|
||||
|
||||
emit actionChosen();
|
||||
Q_EMIT actionChosen();
|
||||
}
|
||||
}
|
||||
} );
|
||||
@ -433,8 +433,8 @@ ChoicePage::continueApplyDeviceChoice()
|
||||
checkInstallChoiceRadioButton( m_config->installChoice() );
|
||||
}
|
||||
|
||||
emit actionChosen();
|
||||
emit deviceChosen();
|
||||
Q_EMIT actionChosen();
|
||||
Q_EMIT deviceChosen();
|
||||
}
|
||||
|
||||
|
||||
@ -489,14 +489,14 @@ ChoicePage::applyActionChoice( InstallChoice choice )
|
||||
} ),
|
||||
[=] {
|
||||
PartitionActions::doAutopartition( m_core, selectedDevice(), options );
|
||||
emit deviceChosen();
|
||||
Q_EMIT deviceChosen();
|
||||
},
|
||||
this );
|
||||
}
|
||||
else
|
||||
{
|
||||
PartitionActions::doAutopartition( m_core, selectedDevice(), options );
|
||||
emit deviceChosen();
|
||||
Q_EMIT deviceChosen();
|
||||
}
|
||||
}
|
||||
break;
|
||||
@ -1599,7 +1599,7 @@ ChoicePage::updateNextEnabled()
|
||||
if ( enabled != m_nextEnabled )
|
||||
{
|
||||
m_nextEnabled = enabled;
|
||||
emit nextStatusChanged( enabled );
|
||||
Q_EMIT nextStatusChanged( enabled );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ EncryptWidget::updateState()
|
||||
if ( newState != m_state )
|
||||
{
|
||||
m_state = newState;
|
||||
emit stateChanged( m_state );
|
||||
Q_EMIT stateChanged( m_state );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@ PartitionSplitterWidget::setSplitPartition( const QString& path, qint64 minSize,
|
||||
}
|
||||
}
|
||||
|
||||
emit partitionResized( m_itemToResize.itemPath, m_itemToResize.size, m_itemToResizeNext.size );
|
||||
Q_EMIT partitionResized( m_itemToResize.itemPath, m_itemToResize.size, m_itemToResizeNext.size );
|
||||
|
||||
cDebug() << "Items updated. Status:";
|
||||
foreach ( const PartitionSplitterItem& item, m_items )
|
||||
@ -374,7 +374,7 @@ PartitionSplitterWidget::mouseMoveEvent( QMouseEvent* event )
|
||||
|
||||
repaint();
|
||||
|
||||
emit partitionResized( itemPath, m_itemToResize.size, m_itemToResizeNext.size );
|
||||
Q_EMIT partitionResized( itemPath, m_itemToResize.size, m_itemToResizeNext.size );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -327,7 +327,7 @@ PartitionViewStep::isNextEnabled() const
|
||||
void
|
||||
PartitionViewStep::nextPossiblyChanged( bool )
|
||||
{
|
||||
emit nextStatusChanged( isNextEnabled() );
|
||||
Q_EMIT nextStatusChanged( isNextEnabled() );
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -311,7 +311,7 @@ ReplaceWidget::setNextEnabled( bool enabled )
|
||||
}
|
||||
|
||||
m_nextEnabled = enabled;
|
||||
emit nextStatusChanged( enabled );
|
||||
Q_EMIT nextStatusChanged( enabled );
|
||||
}
|
||||
|
||||
|
||||
|
@ -68,5 +68,5 @@ void
|
||||
ScanningDialog::setVisible( bool visible )
|
||||
{
|
||||
QDialog::setVisible( visible );
|
||||
emit visibilityChanged();
|
||||
Q_EMIT visibilityChanged();
|
||||
}
|
||||
|
@ -25,5 +25,5 @@ PartitionJob::iprogress( int percent )
|
||||
{
|
||||
percent = 100;
|
||||
}
|
||||
emit progress( qreal( percent / 100.0 ) );
|
||||
Q_EMIT progress( qreal( percent / 100.0 ) );
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user