From cef2f50510aefa0fd0853c32c957cd4bbda1be6a Mon Sep 17 00:00:00 2001 From: Adriaan de Groot Date: Wed, 17 Apr 2019 11:57:46 +0200 Subject: [PATCH] Reduce warnings about extra ; - Trailing ; after Q_UNUSED - Trailing ; after CALAMARES_RETRANSLATE --- src/calamares/progresstree/ProgressTreeModel.cpp | 6 +++--- src/calamares/progresstree/ViewStepItem.cpp | 2 +- src/libcalamares/PythonJob.cpp | 2 +- src/libcalamaresui/utils/CalamaresUtilsGui.cpp | 2 +- src/libcalamaresui/viewpages/ViewStep.cpp | 2 +- src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp | 2 +- src/modules/finished/FinishedPage.cpp | 2 +- src/modules/finished/FinishedViewStep.cpp | 4 ++-- src/modules/keyboard/KeyboardLayoutModel.cpp | 2 +- src/modules/keyboard/KeyboardPage.cpp | 4 ++-- src/modules/license/LicensePage.cpp | 3 +-- src/modules/locale/LocalePage.cpp | 2 +- src/modules/netinstall/PackageModel.cpp | 2 +- src/modules/partition/gui/ChoicePage.cpp | 4 ++-- src/modules/partition/gui/PartitionLabelsView.cpp | 12 ++++++------ .../partition/gui/PartitionSplitterWidget.cpp | 4 ++-- src/modules/summary/SummaryPage.cpp | 2 +- src/modules/welcome/checker/GeneralRequirements.cpp | 2 +- 18 files changed, 29 insertions(+), 30 deletions(-) diff --git a/src/calamares/progresstree/ProgressTreeModel.cpp b/src/calamares/progresstree/ProgressTreeModel.cpp index cf0a0e44a..e3b4fa030 100644 --- a/src/calamares/progresstree/ProgressTreeModel.cpp +++ b/src/calamares/progresstree/ProgressTreeModel.cpp @@ -98,9 +98,9 @@ ProgressTreeModel::data( const QModelIndex& index, int role ) const QVariant ProgressTreeModel::headerData( int section, Qt::Orientation orientation, int role ) const { - Q_UNUSED( section ); - Q_UNUSED( orientation ); - Q_UNUSED( role ); + Q_UNUSED( section ) + Q_UNUSED( orientation ) + Q_UNUSED( role ) return QVariant(); } diff --git a/src/calamares/progresstree/ViewStepItem.cpp b/src/calamares/progresstree/ViewStepItem.cpp index 50cf0b9f8..7c17ff5ae 100644 --- a/src/calamares/progresstree/ViewStepItem.cpp +++ b/src/calamares/progresstree/ViewStepItem.cpp @@ -46,7 +46,7 @@ void ViewStepItem::appendChild( ProgressTreeItem* item ) { Q_ASSERT( false ); - Q_UNUSED( item ); + Q_UNUSED( item ) } diff --git a/src/libcalamares/PythonJob.cpp b/src/libcalamares/PythonJob.cpp index 65a5c4506..6e8323e49 100644 --- a/src/libcalamares/PythonJob.cpp +++ b/src/libcalamares/PythonJob.cpp @@ -92,7 +92,7 @@ BOOST_PYTHON_MODULE( libcalamares ) bp::object utilsModule( bp::handle<>( bp::borrowed( PyImport_AddModule( "libcalamares.utils" ) ) ) ); bp::scope().attr( "utils" ) = utilsModule; bp::scope utilsScope = utilsModule; - Q_UNUSED( utilsScope ); + Q_UNUSED( utilsScope ) bp::def( "debug", diff --git a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp index 69924f1b8..24b42d4e5 100644 --- a/src/libcalamaresui/utils/CalamaresUtilsGui.cpp +++ b/src/libcalamaresui/utils/CalamaresUtilsGui.cpp @@ -40,7 +40,7 @@ static int s_defaultFontHeight = 0; QPixmap defaultPixmap( ImageType type, ImageMode mode, const QSize& size ) { - Q_UNUSED( mode ); + Q_UNUSED( mode ) QPixmap pixmap; switch ( type ) diff --git a/src/libcalamaresui/viewpages/ViewStep.cpp b/src/libcalamaresui/viewpages/ViewStep.cpp index 8a76a05ce..cdfc7bbc9 100644 --- a/src/libcalamaresui/viewpages/ViewStep.cpp +++ b/src/libcalamaresui/viewpages/ViewStep.cpp @@ -71,7 +71,7 @@ ViewStep::setModuleInstanceKey( const QString& instanceKey ) void ViewStep::setConfigurationMap( const QVariantMap& configurationMap ) { - Q_UNUSED( configurationMap ); + Q_UNUSED( configurationMap ) } diff --git a/src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp b/src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp index 140090b97..d1094bb7c 100644 --- a/src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp +++ b/src/libcalamaresui/widgets/FixedAspectRatioLabel.cpp @@ -43,7 +43,7 @@ FixedAspectRatioLabel::setPixmap( const QPixmap& pixmap ) void FixedAspectRatioLabel::resizeEvent( QResizeEvent* event ) { - Q_UNUSED( event ); + Q_UNUSED( event ) QLabel::setPixmap( m_pixmap.scaled( contentsRect().size(), Qt::KeepAspectRatio, diff --git a/src/modules/finished/FinishedPage.cpp b/src/modules/finished/FinishedPage.cpp index cad05bda4..1bc935d0d 100644 --- a/src/modules/finished/FinishedPage.cpp +++ b/src/modules/finished/FinishedPage.cpp @@ -125,7 +125,7 @@ FinishedPage::focusInEvent( QFocusEvent* e ) void FinishedPage::onInstallationFailed( const QString& message, const QString& details ) { - Q_UNUSED( details ); + Q_UNUSED( details ) if ( Calamares::Settings::instance()->isSetupMode() ) ui->mainText->setText( tr( "

Setup Failed


" "%1 has not been set up on your computer.
" diff --git a/src/modules/finished/FinishedViewStep.cpp b/src/modules/finished/FinishedViewStep.cpp index 721df9765..d01a99ce9 100644 --- a/src/modules/finished/FinishedViewStep.cpp +++ b/src/modules/finished/FinishedViewStep.cpp @@ -148,8 +148,8 @@ FinishedViewStep::jobs() const void FinishedViewStep::onInstallationFailed( const QString& message, const QString& details ) { - Q_UNUSED( message ); - Q_UNUSED( details ); + Q_UNUSED( message ) + Q_UNUSED( details ) installFailed = true; } diff --git a/src/modules/keyboard/KeyboardLayoutModel.cpp b/src/modules/keyboard/KeyboardLayoutModel.cpp index 5b5d37130..0abd89ae2 100644 --- a/src/modules/keyboard/KeyboardLayoutModel.cpp +++ b/src/modules/keyboard/KeyboardLayoutModel.cpp @@ -32,7 +32,7 @@ KeyboardLayoutModel::KeyboardLayoutModel( QObject* parent ) int KeyboardLayoutModel::rowCount( const QModelIndex& parent ) const { - Q_UNUSED( parent ); + Q_UNUSED( parent ) return m_layouts.count(); } diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp index 5a82e2545..241d4553e 100644 --- a/src/modules/keyboard/KeyboardPage.cpp +++ b/src/modules/keyboard/KeyboardPage.cpp @@ -436,7 +436,7 @@ void KeyboardPage::onListLayoutCurrentItemChanged( const QModelIndex& current, const QModelIndex& previous ) { - Q_UNUSED( previous ); + Q_UNUSED( previous ) if ( !current.isValid() ) return; @@ -457,7 +457,7 @@ static inline QStringList xkbmap_args( QStringList&& r, const QString& layout, c void KeyboardPage::onListVariantCurrentItemChanged( QListWidgetItem* current, QListWidgetItem* previous ) { - Q_UNUSED( previous ); + Q_UNUSED( previous ) QPersistentModelIndex layoutIndex = ui->listLayout->currentIndex(); LayoutItem* variantItem = dynamic_cast< LayoutItem* >( current ); diff --git a/src/modules/license/LicensePage.cpp b/src/modules/license/LicensePage.cpp index 351c55d79..1fb3de7a8 100644 --- a/src/modules/license/LicensePage.cpp +++ b/src/modules/license/LicensePage.cpp @@ -87,8 +87,7 @@ LicensePage::LicensePage(QWidget *parent) CALAMARES_RETRANSLATE( ui->acceptCheckBox->setText( tr( "I accept the terms and conditions above." ) ); - ); - + ) } diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp index 1ddb2cc0a..c1309a129 100644 --- a/src/modules/locale/LocalePage.cpp +++ b/src/modules/locale/LocalePage.cpp @@ -101,7 +101,7 @@ LocalePage::LocalePage( QWidget* parent ) static_cast< void ( QComboBox::* )( int ) >( &QComboBox::currentIndexChanged ), [this]( int currentIndex ) { - Q_UNUSED( currentIndex ); + Q_UNUSED( currentIndex ) QHash< QString, QList< LocaleGlobal::Location > > regions = LocaleGlobal::getLocations(); if ( !regions.contains( m_regionCombo->currentData().toString() ) ) return; diff --git a/src/modules/netinstall/PackageModel.cpp b/src/modules/netinstall/PackageModel.cpp index f64bd778f..588646816 100644 --- a/src/modules/netinstall/PackageModel.cpp +++ b/src/modules/netinstall/PackageModel.cpp @@ -127,7 +127,7 @@ bool PackageModel::setHeaderData( int section, Qt::Orientation orientation, const QVariant& value, int role ) { - Q_UNUSED( role ); + Q_UNUSED( role ) if ( orientation == Qt::Horizontal ) { diff --git a/src/modules/partition/gui/ChoicePage.cpp b/src/modules/partition/gui/ChoicePage.cpp index fc57d1fad..801f3491e 100644 --- a/src/modules/partition/gui/ChoicePage.cpp +++ b/src/modules/partition/gui/ChoicePage.cpp @@ -540,7 +540,7 @@ void ChoicePage::doAlongsideSetupSplitter( const QModelIndex& current, const QModelIndex& previous ) { - Q_UNUSED( previous ); + Q_UNUSED( previous ) if ( !current.isValid() ) return; @@ -718,7 +718,7 @@ void ChoicePage::onPartitionToReplaceSelected( const QModelIndex& current, const QModelIndex& previous ) { - Q_UNUSED( previous ); + Q_UNUSED( previous ) if ( !current.isValid() ) return; diff --git a/src/modules/partition/gui/PartitionLabelsView.cpp b/src/modules/partition/gui/PartitionLabelsView.cpp index 36774cd20..0da7beba8 100644 --- a/src/modules/partition/gui/PartitionLabelsView.cpp +++ b/src/modules/partition/gui/PartitionLabelsView.cpp @@ -100,7 +100,7 @@ PartitionLabelsView::sizeHint() const void PartitionLabelsView::paintEvent( QPaintEvent* event ) { - Q_UNUSED( event ); + Q_UNUSED( event ) QPainter painter( viewport() ); painter.fillRect( rect(), palette().window() ); @@ -478,7 +478,7 @@ PartitionLabelsView::visualRect( const QModelIndex& idx ) const QRegion PartitionLabelsView::visualRegionForSelection( const QItemSelection& selection ) const { - Q_UNUSED( selection ); + Q_UNUSED( selection ) return QRegion(); } @@ -543,8 +543,8 @@ PartitionLabelsView::setExtendedPartitionHidden( bool hidden ) QModelIndex PartitionLabelsView::moveCursor( CursorAction cursorAction, Qt::KeyboardModifiers modifiers ) { - Q_UNUSED( cursorAction ); - Q_UNUSED( modifiers ); + Q_UNUSED( cursorAction ) + Q_UNUSED( modifiers ) return QModelIndex(); } @@ -553,7 +553,7 @@ PartitionLabelsView::moveCursor( CursorAction cursorAction, Qt::KeyboardModifier bool PartitionLabelsView::isIndexHidden( const QModelIndex& index ) const { - Q_UNUSED( index ); + Q_UNUSED( index ) return false; } @@ -598,7 +598,7 @@ PartitionLabelsView::mouseMoveEvent( QMouseEvent* event ) void PartitionLabelsView::leaveEvent( QEvent* event ) { - Q_UNUSED( event ); + Q_UNUSED( event ) QGuiApplication::restoreOverrideCursor(); if ( m_hoveredIndex.isValid() ) diff --git a/src/modules/partition/gui/PartitionSplitterWidget.cpp b/src/modules/partition/gui/PartitionSplitterWidget.cpp index ae73ecfcd..0281ab32c 100644 --- a/src/modules/partition/gui/PartitionSplitterWidget.cpp +++ b/src/modules/partition/gui/PartitionSplitterWidget.cpp @@ -286,7 +286,7 @@ PartitionSplitterWidget::minimumSizeHint() const void PartitionSplitterWidget::paintEvent( QPaintEvent* event ) { - Q_UNUSED( event ); + Q_UNUSED( event ) QPainter painter( this ); painter.fillRect( rect(), palette().window() ); @@ -401,7 +401,7 @@ PartitionSplitterWidget::mouseMoveEvent( QMouseEvent* event ) void PartitionSplitterWidget::mouseReleaseEvent( QMouseEvent* event ) { - Q_UNUSED( event ); + Q_UNUSED( event ) m_resizing = false; } diff --git a/src/modules/summary/SummaryPage.cpp b/src/modules/summary/SummaryPage.cpp index bddfe9dcc..6913d3e17 100644 --- a/src/modules/summary/SummaryPage.cpp +++ b/src/modules/summary/SummaryPage.cpp @@ -41,7 +41,7 @@ SummaryPage::SummaryPage( const SummaryViewStep* thisViewStep, QWidget* parent ) , m_contentWidget( nullptr ) , m_scrollArea( new QScrollArea( this ) ) { - Q_UNUSED( parent ); + Q_UNUSED( parent ) Q_ASSERT( m_thisViewStep ); QVBoxLayout* layout = new QVBoxLayout( this ); layout->setContentsMargins( 0, 0, 0, 0 ); diff --git a/src/modules/welcome/checker/GeneralRequirements.cpp b/src/modules/welcome/checker/GeneralRequirements.cpp index 067105b28..675d43ed4 100644 --- a/src/modules/welcome/checker/GeneralRequirements.cpp +++ b/src/modules/welcome/checker/GeneralRequirements.cpp @@ -278,7 +278,7 @@ bool GeneralRequirements::checkEnoughStorage( qint64 requiredSpace ) { #ifdef WITHOUT_LIBPARTED - Q_UNUSED( requiredSpace ); + Q_UNUSED( requiredSpace ) cWarning() << "GeneralRequirements is configured without libparted."; return false; #else