diff --git a/src/modules/partition/core/Config.cpp b/src/modules/partition/core/Config.cpp index cfe9458cc..78296018a 100644 --- a/src/modules/partition/core/Config.cpp +++ b/src/modules/partition/core/Config.cpp @@ -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 ); } } diff --git a/src/modules/partition/core/DeviceModel.cpp b/src/modules/partition/core/DeviceModel.cpp index 46a181b33..33aae20c0 100644 --- a/src/modules/partition/core/DeviceModel.cpp +++ b/src/modules/partition/core/DeviceModel.cpp @@ -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 diff --git a/src/modules/partition/core/PartitionCoreModule.cpp b/src/modules/partition/core/PartitionCoreModule.cpp index 363d9daef..e2c91fbee 100644 --- a/src/modules/partition/core/PartitionCoreModule.cpp +++ b/src/modules/partition/core/PartitionCoreModule.cpp @@ -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 ); } diff --git a/src/modules/partition/core/PartitionModel.cpp b/src/modules/partition/core/PartitionModel.cpp index b4ea57adb..e310eee5e 100644 --- a/src/modules/partition/core/PartitionModel.cpp +++ b/src/modules/partition/core/PartitionModel.cpp @@ -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 ) ); } diff --git a/src/modules/partition/core/PartitionModel.h b/src/modules/partition/core/PartitionModel.h index 433fa0620..ba5e258a3 100644 --- a/src/modules/partition/core/PartitionModel.h +++ b/src/modules/partition/core/PartitionModel.h @@ -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 diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index 5ae62a87e..e6c7ea91f 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -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 ); } } diff --git a/src/modules/partition/gui/EncryptWidget.cpp b/src/modules/partition/gui/EncryptWidget.cpp index 7f648491a..ee50e7d66 100644 --- a/src/modules/partition/gui/EncryptWidget.cpp +++ b/src/modules/partition/gui/EncryptWidget.cpp @@ -136,7 +136,7 @@ EncryptWidget::updateState() if ( newState != m_state ) { m_state = newState; - emit stateChanged( m_state ); + Q_EMIT stateChanged( m_state ); } } diff --git a/src/modules/partition/gui/PartitionSplitterWidget.cpp b/src/modules/partition/gui/PartitionSplitterWidget.cpp index 93c77bb69..0cafe7814 100644 --- a/src/modules/partition/gui/PartitionSplitterWidget.cpp +++ b/src/modules/partition/gui/PartitionSplitterWidget.cpp @@ -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 { diff --git a/src/modules/partition/gui/PartitionViewStep.cpp b/src/modules/partition/gui/PartitionViewStep.cpp index 52bf1fc3b..cc06ba967 100644 --- a/src/modules/partition/gui/PartitionViewStep.cpp +++ b/src/modules/partition/gui/PartitionViewStep.cpp @@ -327,7 +327,7 @@ PartitionViewStep::isNextEnabled() const void PartitionViewStep::nextPossiblyChanged( bool ) { - emit nextStatusChanged( isNextEnabled() ); + Q_EMIT nextStatusChanged( isNextEnabled() ); } bool diff --git a/src/modules/partition/gui/ReplaceWidget.cpp b/src/modules/partition/gui/ReplaceWidget.cpp index 078eb4de7..94f527646 100644 --- a/src/modules/partition/gui/ReplaceWidget.cpp +++ b/src/modules/partition/gui/ReplaceWidget.cpp @@ -311,7 +311,7 @@ ReplaceWidget::setNextEnabled( bool enabled ) } m_nextEnabled = enabled; - emit nextStatusChanged( enabled ); + Q_EMIT nextStatusChanged( enabled ); } diff --git a/src/modules/partition/gui/ScanningDialog.cpp b/src/modules/partition/gui/ScanningDialog.cpp index cd22bb861..4dffa922b 100644 --- a/src/modules/partition/gui/ScanningDialog.cpp +++ b/src/modules/partition/gui/ScanningDialog.cpp @@ -68,5 +68,5 @@ void ScanningDialog::setVisible( bool visible ) { QDialog::setVisible( visible ); - emit visibilityChanged(); + Q_EMIT visibilityChanged(); } diff --git a/src/modules/partition/jobs/PartitionJob.cpp b/src/modules/partition/jobs/PartitionJob.cpp index 3bdb05ebd..ca9b00944 100644 --- a/src/modules/partition/jobs/PartitionJob.cpp +++ b/src/modules/partition/jobs/PartitionJob.cpp @@ -25,5 +25,5 @@ PartitionJob::iprogress( int percent ) { percent = 100; } - emit progress( qreal( percent / 100.0 ) ); + Q_EMIT progress( qreal( percent / 100.0 ) ); }