From f632fdc8c43173412d9c6e4a4a9a15afa81748cf Mon Sep 17 00:00:00 2001 From: Vlad Zagorodniy Date: Sat, 24 Mar 2018 11:11:29 +0200 Subject: [PATCH] modernize: delete redundant void args Summary: Redundant void args are deleted with clang-tidy. See https://clang.llvm.org/extra/clang-tidy/checks/modernize-redundant-void-arg.html Reviewers: #breeze, mart Reviewed By: mart Subscribers: plasma-devel Tags: #plasma Differential Revision: https://phabricator.kde.org/D11636 --- kdecoration/breezebutton.cpp | 4 +- kdecoration/breezebutton.h | 6 +- kdecoration/breezedecoration.cpp | 4 +- kdecoration/breezedecoration.h | 60 +++++++++---------- kdecoration/breezesettingsprovider.cpp | 2 +- kdecoration/breezesettingsprovider.h | 4 +- kdecoration/breezesizegrip.cpp | 8 +-- kdecoration/breezesizegrip.h | 8 +-- kdecoration/config/breezeconfigwidget.cpp | 8 +-- kdecoration/config/breezeconfigwidget.h | 6 +- kdecoration/config/breezedetectwidget.h | 2 +- kdecoration/config/breezeexceptiondialog.cpp | 6 +- kdecoration/config/breezeexceptiondialog.h | 8 +-- .../config/breezeexceptionlistwidget.cpp | 16 ++--- .../config/breezeexceptionlistwidget.h | 18 +++--- kdecoration/config/breezeitemmodel.h | 8 +-- kdecoration/config/breezelistmodel.h | 6 +- kstyle/breezeblurhelper.h | 2 +- 18 files changed, 88 insertions(+), 88 deletions(-) diff --git a/kdecoration/breezebutton.cpp b/kdecoration/breezebutton.cpp index 2ae2ea6a..e2e043bc 100644 --- a/kdecoration/breezebutton.cpp +++ b/kdecoration/breezebutton.cpp @@ -353,7 +353,7 @@ namespace Breeze } //__________________________________________________________________ - QColor Button::foregroundColor( void ) const + QColor Button::foregroundColor() const { auto d = qobject_cast( decoration() ); if( !d ) { @@ -389,7 +389,7 @@ namespace Breeze } //__________________________________________________________________ - QColor Button::backgroundColor( void ) const + QColor Button::backgroundColor() const { auto d = qobject_cast( decoration() ); if( !d ) { diff --git a/kdecoration/breezebutton.h b/kdecoration/breezebutton.h index fd28e774..835d119d 100644 --- a/kdecoration/breezebutton.h +++ b/kdecoration/breezebutton.h @@ -93,7 +93,7 @@ namespace Breeze update(); } - qreal opacity( void ) const + qreal opacity() const { return m_opacity; } //@} @@ -116,8 +116,8 @@ namespace Breeze //*@name colors //@{ - QColor foregroundColor( void ) const; - QColor backgroundColor( void ) const; + QColor foregroundColor() const; + QColor backgroundColor() const; //@} Flag m_flag = FlagNone; diff --git a/kdecoration/breezedecoration.cpp b/kdecoration/breezedecoration.cpp index 800a5174..71cdab70 100644 --- a/kdecoration/breezedecoration.cpp +++ b/kdecoration/breezedecoration.cpp @@ -724,7 +724,7 @@ namespace Breeze } //_________________________________________________________________ - void Decoration::createSizeGrip( void ) + void Decoration::createSizeGrip() { // do nothing if size grip already exist @@ -749,7 +749,7 @@ namespace Breeze } //_________________________________________________________________ - void Decoration::deleteSizeGrip( void ) + void Decoration::deleteSizeGrip() { if( m_sizeGrip ) { diff --git a/kdecoration/breezedecoration.h b/kdecoration/breezedecoration.h index 0dd9e2a8..b2ab31a6 100644 --- a/kdecoration/breezedecoration.h +++ b/kdecoration/breezedecoration.h @@ -74,30 +74,30 @@ namespace Breeze //@{ void setOpacity( qreal ); - qreal opacity( void ) const + qreal opacity() const { return m_opacity; } //@} //*@name colors //@{ - QColor titleBarColor( void ) const; - QColor outlineColor( void ) const; - QColor fontColor( void ) const; + QColor titleBarColor() const; + QColor outlineColor() const; + QColor fontColor() const; //@} //*@name maximization modes //@{ - inline bool isMaximized( void ) const; - inline bool isMaximizedHorizontally( void ) const; - inline bool isMaximizedVertically( void ) const; + inline bool isMaximized() const; + inline bool isMaximizedHorizontally() const; + inline bool isMaximizedVertically() const; - inline bool isLeftEdge( void ) const; - inline bool isRightEdge( void ) const; - inline bool isTopEdge( void ) const; - inline bool isBottomEdge( void ) const; + inline bool isLeftEdge() const; + inline bool isRightEdge() const; + inline bool isTopEdge() const; + inline bool isBottomEdge() const; - inline bool hideTitleBar( void ) const; + inline bool hideTitleBar() const; //@} public Q_SLOTS: @@ -115,7 +115,7 @@ namespace Breeze private: //* return the rect in which caption will be drawn - QPair captionRect( void ) const; + QPair captionRect() const; void createButtons(); void paintTitleBar(QPainter *painter, const QRect &repaintRegion); @@ -124,16 +124,16 @@ namespace Breeze //*@name border size //@{ int borderSize(bool bottom = false) const; - inline bool hasBorders( void ) const; - inline bool hasNoBorders( void ) const; - inline bool hasNoSideBorders( void ) const; + inline bool hasBorders() const; + inline bool hasNoBorders() const; + inline bool hasNoSideBorders() const; //@} //*@name size grip //@{ - void createSizeGrip( void ); - void deleteSizeGrip( void ); - SizeGrip* sizeGrip( void ) const + void createSizeGrip(); + void deleteSizeGrip(); + SizeGrip* sizeGrip() const { return m_sizeGrip; } //@} @@ -153,46 +153,46 @@ namespace Breeze }; - bool Decoration::hasBorders( void ) const + bool Decoration::hasBorders() const { if( m_internalSettings && m_internalSettings->mask() & BorderSize ) return m_internalSettings->borderSize() > InternalSettings::BorderNoSides; else return settings()->borderSize() > KDecoration2::BorderSize::NoSides; } - bool Decoration::hasNoBorders( void ) const + bool Decoration::hasNoBorders() const { if( m_internalSettings && m_internalSettings->mask() & BorderSize ) return m_internalSettings->borderSize() == InternalSettings::BorderNone; else return settings()->borderSize() == KDecoration2::BorderSize::None; } - bool Decoration::hasNoSideBorders( void ) const + bool Decoration::hasNoSideBorders() const { if( m_internalSettings && m_internalSettings->mask() & BorderSize ) return m_internalSettings->borderSize() == InternalSettings::BorderNoSides; else return settings()->borderSize() == KDecoration2::BorderSize::NoSides; } - bool Decoration::isMaximized( void ) const + bool Decoration::isMaximized() const { return client().data()->isMaximized() && !m_internalSettings->drawBorderOnMaximizedWindows(); } - bool Decoration::isMaximizedHorizontally( void ) const + bool Decoration::isMaximizedHorizontally() const { return client().data()->isMaximizedHorizontally() && !m_internalSettings->drawBorderOnMaximizedWindows(); } - bool Decoration::isMaximizedVertically( void ) const + bool Decoration::isMaximizedVertically() const { return client().data()->isMaximizedVertically() && !m_internalSettings->drawBorderOnMaximizedWindows(); } - bool Decoration::isLeftEdge( void ) const + bool Decoration::isLeftEdge() const { return (client().data()->isMaximizedHorizontally() || client().data()->adjacentScreenEdges().testFlag( Qt::LeftEdge ) ) && !m_internalSettings->drawBorderOnMaximizedWindows(); } - bool Decoration::isRightEdge( void ) const + bool Decoration::isRightEdge() const { return (client().data()->isMaximizedHorizontally() || client().data()->adjacentScreenEdges().testFlag( Qt::RightEdge ) ) && !m_internalSettings->drawBorderOnMaximizedWindows(); } - bool Decoration::isTopEdge( void ) const + bool Decoration::isTopEdge() const { return (client().data()->isMaximizedVertically() || client().data()->adjacentScreenEdges().testFlag( Qt::TopEdge ) ) && !m_internalSettings->drawBorderOnMaximizedWindows(); } - bool Decoration::isBottomEdge( void ) const + bool Decoration::isBottomEdge() const { return (client().data()->isMaximizedVertically() || client().data()->adjacentScreenEdges().testFlag( Qt::BottomEdge ) ) && !m_internalSettings->drawBorderOnMaximizedWindows(); } - bool Decoration::hideTitleBar( void ) const + bool Decoration::hideTitleBar() const { return m_internalSettings->hideTitleBar() && !client().data()->isShaded(); } } diff --git a/kdecoration/breezesettingsprovider.cpp b/kdecoration/breezesettingsprovider.cpp index f1e07cf4..229ec9e6 100644 --- a/kdecoration/breezesettingsprovider.cpp +++ b/kdecoration/breezesettingsprovider.cpp @@ -51,7 +51,7 @@ namespace Breeze } //__________________________________________________________________ - void SettingsProvider::reconfigure( void ) + void SettingsProvider::reconfigure() { if( !m_defaultSettings ) { diff --git a/kdecoration/breezesettingsprovider.h b/kdecoration/breezesettingsprovider.h index e6362a1c..25e02577 100644 --- a/kdecoration/breezesettingsprovider.h +++ b/kdecoration/breezesettingsprovider.h @@ -50,12 +50,12 @@ namespace Breeze public Q_SLOTS: //* reconfigure - void reconfigure( void ); + void reconfigure(); private: //* contructor - SettingsProvider( void ); + SettingsProvider(); //* default configuration InternalSettingsPtr m_defaultSettings; diff --git a/kdecoration/breezesizegrip.cpp b/kdecoration/breezesizegrip.cpp index 08b2f99f..6599b4b5 100644 --- a/kdecoration/breezesizegrip.cpp +++ b/kdecoration/breezesizegrip.cpp @@ -75,11 +75,11 @@ namespace Breeze } //_____________________________________________ - SizeGrip::~SizeGrip( void ) + SizeGrip::~SizeGrip() {} //_____________________________________________ - void SizeGrip::updateActiveState( void ) + void SizeGrip::updateActiveState() { #if BREEZE_HAVE_X11 if( QX11Info::isPlatformX11() ) @@ -95,7 +95,7 @@ namespace Breeze } //_____________________________________________ - void SizeGrip::embed( void ) + void SizeGrip::embed() { #if BREEZE_HAVE_X11 @@ -190,7 +190,7 @@ namespace Breeze } //_______________________________________________________________________________ - void SizeGrip::updatePosition( void ) + void SizeGrip::updatePosition() { #if BREEZE_HAVE_X11 diff --git a/kdecoration/breezesizegrip.h b/kdecoration/breezesizegrip.h index cb28fcb9..b240d90b 100644 --- a/kdecoration/breezesizegrip.h +++ b/kdecoration/breezesizegrip.h @@ -47,18 +47,18 @@ namespace Breeze explicit SizeGrip( Decoration* ); //* constructor - virtual ~SizeGrip( void ); + virtual ~SizeGrip(); protected Q_SLOTS: //* update background color - void updateActiveState( void ); + void updateActiveState(); //* update position - void updatePosition( void ); + void updatePosition(); //* embed into parent widget - void embed( void ); + void embed(); protected: diff --git a/kdecoration/config/breezeconfigwidget.cpp b/kdecoration/config/breezeconfigwidget.cpp index 1e5476c8..49f5a123 100644 --- a/kdecoration/config/breezeconfigwidget.cpp +++ b/kdecoration/config/breezeconfigwidget.cpp @@ -69,7 +69,7 @@ namespace Breeze } //_________________________________________________________ - void ConfigWidget::load( void ) + void ConfigWidget::load() { // create internal settings and load from rc files @@ -103,7 +103,7 @@ namespace Breeze } //_________________________________________________________ - void ConfigWidget::save( void ) + void ConfigWidget::save() { // create internal settings and load from rc files @@ -151,7 +151,7 @@ namespace Breeze } //_________________________________________________________ - void ConfigWidget::defaults( void ) + void ConfigWidget::defaults() { // create internal settings and load from rc files @@ -175,7 +175,7 @@ namespace Breeze } //_______________________________________________ - void ConfigWidget::updateChanged( void ) + void ConfigWidget::updateChanged() { // check configuration diff --git a/kdecoration/config/breezeconfigwidget.h b/kdecoration/config/breezeconfigwidget.h index fda0de9d..a2fc6d14 100644 --- a/kdecoration/config/breezeconfigwidget.h +++ b/kdecoration/config/breezeconfigwidget.h @@ -51,16 +51,16 @@ namespace Breeze explicit ConfigWidget( QWidget*, const QVariantList& ); //* destructor - virtual ~ConfigWidget( void ) = default; + virtual ~ConfigWidget() = default; //* default void defaults() override; //* load configuration - void load( void ) override; + void load() override; //* save configuration - void save( void ) override; + void save() override; protected Q_SLOTS: diff --git a/kdecoration/config/breezedetectwidget.h b/kdecoration/config/breezedetectwidget.h index 83b92d8c..54e51da7 100644 --- a/kdecoration/config/breezedetectwidget.h +++ b/kdecoration/config/breezedetectwidget.h @@ -92,7 +92,7 @@ namespace Breeze WId findWindow(); //* execute - void executeDialog( void ); + void executeDialog(); //* ui Ui::BreezeDetectWidget m_ui; diff --git a/kdecoration/config/breezeexceptiondialog.cpp b/kdecoration/config/breezeexceptiondialog.cpp index f3ca3f09..d2b348ab 100644 --- a/kdecoration/config/breezeexceptiondialog.cpp +++ b/kdecoration/config/breezeexceptiondialog.cpp @@ -89,7 +89,7 @@ namespace Breeze } //___________________________________________ - void ExceptionDialog::save( void ) + void ExceptionDialog::save() { m_exception->setExceptionType( m_ui.exceptionType->currentIndex() ); m_exception->setExceptionPattern( m_ui.exceptionEditor->text() ); @@ -108,7 +108,7 @@ namespace Breeze } //___________________________________________ - void ExceptionDialog::updateChanged( void ) + void ExceptionDialog::updateChanged() { bool modified( false ); if( m_exception->exceptionType() != m_ui.exceptionType->currentIndex() ) modified = true; @@ -133,7 +133,7 @@ namespace Breeze } //___________________________________________ - void ExceptionDialog::selectWindowProperties( void ) + void ExceptionDialog::selectWindowProperties() { // create widget diff --git a/kdecoration/config/breezeexceptiondialog.h b/kdecoration/config/breezeexceptiondialog.h index 37fc4789..9846ff28 100644 --- a/kdecoration/config/breezeexceptiondialog.h +++ b/kdecoration/config/breezeexceptiondialog.h @@ -48,17 +48,17 @@ namespace Breeze explicit ExceptionDialog( QWidget* parent ); //* destructor - virtual ~ExceptionDialog( void ) + virtual ~ExceptionDialog() {} //* set exception void setException( InternalSettingsPtr ); //* save exception - void save( void ); + void save(); //* true if changed - virtual bool isChanged( void ) const + virtual bool isChanged() const { return m_changed; } Q_SIGNALS: @@ -83,7 +83,7 @@ namespace Breeze private Q_SLOTS: //* select window properties from grabbed pointers - void selectWindowProperties( void ); + void selectWindowProperties(); //* read properties of selected window void readWindowProperties( bool ); diff --git a/kdecoration/config/breezeexceptionlistwidget.cpp b/kdecoration/config/breezeexceptionlistwidget.cpp index 3d3703d9..74aa9068 100644 --- a/kdecoration/config/breezeexceptionlistwidget.cpp +++ b/kdecoration/config/breezeexceptionlistwidget.cpp @@ -83,14 +83,14 @@ namespace Breeze } //__________________________________________________________ - InternalSettingsList ExceptionListWidget::exceptions( void ) + InternalSettingsList ExceptionListWidget::exceptions() { return model().get(); setChanged( false ); } //__________________________________________________________ - void ExceptionListWidget::updateButtons( void ) + void ExceptionListWidget::updateButtons() { bool hasSelection( !m_ui.exceptionListView->selectionModel()->selectedRows().empty() ); @@ -104,7 +104,7 @@ namespace Breeze //_______________________________________________________ - void ExceptionListWidget::add( void ) + void ExceptionListWidget::add() { @@ -147,7 +147,7 @@ namespace Breeze } //_______________________________________________________ - void ExceptionListWidget::edit( void ) + void ExceptionListWidget::edit() { // retrieve selection @@ -186,7 +186,7 @@ namespace Breeze } //_______________________________________________________ - void ExceptionListWidget::remove( void ) + void ExceptionListWidget::remove() { // confirmation dialog @@ -224,7 +224,7 @@ namespace Breeze } //_______________________________________________________ - void ExceptionListWidget::up( void ) + void ExceptionListWidget::up() { InternalSettingsList selection( model().get( m_ui.exceptionListView->selectionModel()->selectedRows() ) ); @@ -270,7 +270,7 @@ namespace Breeze } //_______________________________________________________ - void ExceptionListWidget::down( void ) + void ExceptionListWidget::down() { InternalSettingsList selection( model().get( m_ui.exceptionListView->selectionModel()->selectedRows() ) ); @@ -322,7 +322,7 @@ namespace Breeze } //_______________________________________________________ - void ExceptionListWidget::resizeColumns( void ) const + void ExceptionListWidget::resizeColumns() const { m_ui.exceptionListView->resizeColumnToContents( ExceptionModel::ColumnEnabled ); m_ui.exceptionListView->resizeColumnToContents( ExceptionModel::ColumnType ); diff --git a/kdecoration/config/breezeexceptionlistwidget.h b/kdecoration/config/breezeexceptionlistwidget.h index 45e18eff..cbbf0c10 100644 --- a/kdecoration/config/breezeexceptionlistwidget.h +++ b/kdecoration/config/breezeexceptionlistwidget.h @@ -47,10 +47,10 @@ namespace Breeze void setExceptions( const InternalSettingsList& ); //* get exceptions - InternalSettingsList exceptions( void ); + InternalSettingsList exceptions(); //* true if changed - virtual bool isChanged( void ) const + virtual bool isChanged() const { return m_changed; } Q_SIGNALS: @@ -71,30 +71,30 @@ namespace Breeze protected Q_SLOTS: //* update button states - virtual void updateButtons( void ); + virtual void updateButtons(); //* add - virtual void add( void ); + virtual void add(); //* edit - virtual void edit( void ); + virtual void edit(); //* remove - virtual void remove( void ); + virtual void remove(); //* toggle virtual void toggle( const QModelIndex& ); //* move up - virtual void up( void ); + virtual void up(); //* move down - virtual void down( void ); + virtual void down(); protected: //* resize columns - void resizeColumns( void ) const; + void resizeColumns() const; //* check exception bool checkException( InternalSettingsPtr ); diff --git a/kdecoration/config/breezeitemmodel.h b/kdecoration/config/breezeitemmodel.h index 71bf85e1..3af4ab30 100644 --- a/kdecoration/config/breezeitemmodel.h +++ b/kdecoration/config/breezeitemmodel.h @@ -51,18 +51,18 @@ namespace Breeze //@{ //* sort - virtual void sort( void ) + virtual void sort() { sort( sortColumn(), sortOrder() ); } //* sort void sort( int column, Qt::SortOrder order = Qt::AscendingOrder ) override; //* current sorting column - const int& sortColumn( void ) const + const int& sortColumn() const { return m_sortColumn; } //* current sort order - const Qt::SortOrder& sortOrder( void ) const + const Qt::SortOrder& sortOrder() const { return m_sortOrder; } //@} @@ -70,7 +70,7 @@ namespace Breeze protected: //* this sort columns without calling the layout changed callbacks - void privateSort( void ) + void privateSort() { privateSort( m_sortColumn, m_sortOrder ); } //* private sort, with no signals emmitted diff --git a/kdecoration/config/breezelistmodel.h b/kdecoration/config/breezelistmodel.h index 1cc0e548..9ec59896 100644 --- a/kdecoration/config/breezelistmodel.h +++ b/kdecoration/config/breezelistmodel.h @@ -105,7 +105,7 @@ namespace Breeze //@{ //! clear internal list selected items - virtual void clearSelectedIndexes( void ) + virtual void clearSelectedIndexes() { _selection.clear(); } //! store index internal selection state @@ -116,7 +116,7 @@ namespace Breeze } //! get list of internal selected items - virtual QModelIndexList selectedIndexes( void ) const + virtual QModelIndexList selectedIndexes() const { QModelIndexList out; @@ -228,7 +228,7 @@ namespace Breeze } //! clear - virtual void clear( void ) + virtual void clear() { set( List() ); } //! update values from list diff --git a/kstyle/breezeblurhelper.h b/kstyle/breezeblurhelper.h index 1fb5e93d..ed7cbd1c 100644 --- a/kstyle/breezeblurhelper.h +++ b/kstyle/breezeblurhelper.h @@ -53,7 +53,7 @@ namespace Breeze BlurHelper( QObject* ); //! destructor - virtual ~BlurHelper( void ) + virtual ~BlurHelper() {} //! register widget