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
wilder-pre-rebase
Vlad Zagorodniy 8 years ago
parent a7b40ce13d
commit f632fdc8c4
  1. 4
      kdecoration/breezebutton.cpp
  2. 6
      kdecoration/breezebutton.h
  3. 4
      kdecoration/breezedecoration.cpp
  4. 60
      kdecoration/breezedecoration.h
  5. 2
      kdecoration/breezesettingsprovider.cpp
  6. 4
      kdecoration/breezesettingsprovider.h
  7. 8
      kdecoration/breezesizegrip.cpp
  8. 8
      kdecoration/breezesizegrip.h
  9. 8
      kdecoration/config/breezeconfigwidget.cpp
  10. 6
      kdecoration/config/breezeconfigwidget.h
  11. 2
      kdecoration/config/breezedetectwidget.h
  12. 6
      kdecoration/config/breezeexceptiondialog.cpp
  13. 8
      kdecoration/config/breezeexceptiondialog.h
  14. 16
      kdecoration/config/breezeexceptionlistwidget.cpp
  15. 18
      kdecoration/config/breezeexceptionlistwidget.h
  16. 8
      kdecoration/config/breezeitemmodel.h
  17. 6
      kdecoration/config/breezelistmodel.h
  18. 2
      kstyle/breezeblurhelper.h

@ -353,7 +353,7 @@ namespace Breeze
} }
//__________________________________________________________________ //__________________________________________________________________
QColor Button::foregroundColor( void ) const QColor Button::foregroundColor() const
{ {
auto d = qobject_cast<Decoration*>( decoration() ); auto d = qobject_cast<Decoration*>( decoration() );
if( !d ) { if( !d ) {
@ -389,7 +389,7 @@ namespace Breeze
} }
//__________________________________________________________________ //__________________________________________________________________
QColor Button::backgroundColor( void ) const QColor Button::backgroundColor() const
{ {
auto d = qobject_cast<Decoration*>( decoration() ); auto d = qobject_cast<Decoration*>( decoration() );
if( !d ) { if( !d ) {

@ -93,7 +93,7 @@ namespace Breeze
update(); update();
} }
qreal opacity( void ) const qreal opacity() const
{ return m_opacity; } { return m_opacity; }
//@} //@}
@ -116,8 +116,8 @@ namespace Breeze
//*@name colors //*@name colors
//@{ //@{
QColor foregroundColor( void ) const; QColor foregroundColor() const;
QColor backgroundColor( void ) const; QColor backgroundColor() const;
//@} //@}
Flag m_flag = FlagNone; Flag m_flag = FlagNone;

@ -724,7 +724,7 @@ namespace Breeze
} }
//_________________________________________________________________ //_________________________________________________________________
void Decoration::createSizeGrip( void ) void Decoration::createSizeGrip()
{ {
// do nothing if size grip already exist // do nothing if size grip already exist
@ -749,7 +749,7 @@ namespace Breeze
} }
//_________________________________________________________________ //_________________________________________________________________
void Decoration::deleteSizeGrip( void ) void Decoration::deleteSizeGrip()
{ {
if( m_sizeGrip ) if( m_sizeGrip )
{ {

@ -74,30 +74,30 @@ namespace Breeze
//@{ //@{
void setOpacity( qreal ); void setOpacity( qreal );
qreal opacity( void ) const qreal opacity() const
{ return m_opacity; } { return m_opacity; }
//@} //@}
//*@name colors //*@name colors
//@{ //@{
QColor titleBarColor( void ) const; QColor titleBarColor() const;
QColor outlineColor( void ) const; QColor outlineColor() const;
QColor fontColor( void ) const; QColor fontColor() const;
//@} //@}
//*@name maximization modes //*@name maximization modes
//@{ //@{
inline bool isMaximized( void ) const; inline bool isMaximized() const;
inline bool isMaximizedHorizontally( void ) const; inline bool isMaximizedHorizontally() const;
inline bool isMaximizedVertically( void ) const; inline bool isMaximizedVertically() const;
inline bool isLeftEdge( void ) const; inline bool isLeftEdge() const;
inline bool isRightEdge( void ) const; inline bool isRightEdge() const;
inline bool isTopEdge( void ) const; inline bool isTopEdge() const;
inline bool isBottomEdge( void ) const; inline bool isBottomEdge() const;
inline bool hideTitleBar( void ) const; inline bool hideTitleBar() const;
//@} //@}
public Q_SLOTS: public Q_SLOTS:
@ -115,7 +115,7 @@ namespace Breeze
private: private:
//* return the rect in which caption will be drawn //* return the rect in which caption will be drawn
QPair<QRect,Qt::Alignment> captionRect( void ) const; QPair<QRect,Qt::Alignment> captionRect() const;
void createButtons(); void createButtons();
void paintTitleBar(QPainter *painter, const QRect &repaintRegion); void paintTitleBar(QPainter *painter, const QRect &repaintRegion);
@ -124,16 +124,16 @@ namespace Breeze
//*@name border size //*@name border size
//@{ //@{
int borderSize(bool bottom = false) const; int borderSize(bool bottom = false) const;
inline bool hasBorders( void ) const; inline bool hasBorders() const;
inline bool hasNoBorders( void ) const; inline bool hasNoBorders() const;
inline bool hasNoSideBorders( void ) const; inline bool hasNoSideBorders() const;
//@} //@}
//*@name size grip //*@name size grip
//@{ //@{
void createSizeGrip( void ); void createSizeGrip();
void deleteSizeGrip( void ); void deleteSizeGrip();
SizeGrip* sizeGrip( void ) const SizeGrip* sizeGrip() const
{ return m_sizeGrip; } { 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; if( m_internalSettings && m_internalSettings->mask() & BorderSize ) return m_internalSettings->borderSize() > InternalSettings::BorderNoSides;
else return settings()->borderSize() > KDecoration2::BorderSize::NoSides; 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; if( m_internalSettings && m_internalSettings->mask() & BorderSize ) return m_internalSettings->borderSize() == InternalSettings::BorderNone;
else return settings()->borderSize() == KDecoration2::BorderSize::None; 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; if( m_internalSettings && m_internalSettings->mask() & BorderSize ) return m_internalSettings->borderSize() == InternalSettings::BorderNoSides;
else return settings()->borderSize() == KDecoration2::BorderSize::NoSides; else return settings()->borderSize() == KDecoration2::BorderSize::NoSides;
} }
bool Decoration::isMaximized( void ) const bool Decoration::isMaximized() const
{ return client().data()->isMaximized() && !m_internalSettings->drawBorderOnMaximizedWindows(); } { return client().data()->isMaximized() && !m_internalSettings->drawBorderOnMaximizedWindows(); }
bool Decoration::isMaximizedHorizontally( void ) const bool Decoration::isMaximizedHorizontally() const
{ return client().data()->isMaximizedHorizontally() && !m_internalSettings->drawBorderOnMaximizedWindows(); } { return client().data()->isMaximizedHorizontally() && !m_internalSettings->drawBorderOnMaximizedWindows(); }
bool Decoration::isMaximizedVertically( void ) const bool Decoration::isMaximizedVertically() const
{ return client().data()->isMaximizedVertically() && !m_internalSettings->drawBorderOnMaximizedWindows(); } { 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(); } { 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(); } { 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(); } { 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(); } { 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(); } { return m_internalSettings->hideTitleBar() && !client().data()->isShaded(); }
} }

@ -51,7 +51,7 @@ namespace Breeze
} }
//__________________________________________________________________ //__________________________________________________________________
void SettingsProvider::reconfigure( void ) void SettingsProvider::reconfigure()
{ {
if( !m_defaultSettings ) if( !m_defaultSettings )
{ {

@ -50,12 +50,12 @@ namespace Breeze
public Q_SLOTS: public Q_SLOTS:
//* reconfigure //* reconfigure
void reconfigure( void ); void reconfigure();
private: private:
//* contructor //* contructor
SettingsProvider( void ); SettingsProvider();
//* default configuration //* default configuration
InternalSettingsPtr m_defaultSettings; InternalSettingsPtr m_defaultSettings;

@ -75,11 +75,11 @@ namespace Breeze
} }
//_____________________________________________ //_____________________________________________
SizeGrip::~SizeGrip( void ) SizeGrip::~SizeGrip()
{} {}
//_____________________________________________ //_____________________________________________
void SizeGrip::updateActiveState( void ) void SizeGrip::updateActiveState()
{ {
#if BREEZE_HAVE_X11 #if BREEZE_HAVE_X11
if( QX11Info::isPlatformX11() ) if( QX11Info::isPlatformX11() )
@ -95,7 +95,7 @@ namespace Breeze
} }
//_____________________________________________ //_____________________________________________
void SizeGrip::embed( void ) void SizeGrip::embed()
{ {
#if BREEZE_HAVE_X11 #if BREEZE_HAVE_X11
@ -190,7 +190,7 @@ namespace Breeze
} }
//_______________________________________________________________________________ //_______________________________________________________________________________
void SizeGrip::updatePosition( void ) void SizeGrip::updatePosition()
{ {
#if BREEZE_HAVE_X11 #if BREEZE_HAVE_X11

@ -47,18 +47,18 @@ namespace Breeze
explicit SizeGrip( Decoration* ); explicit SizeGrip( Decoration* );
//* constructor //* constructor
virtual ~SizeGrip( void ); virtual ~SizeGrip();
protected Q_SLOTS: protected Q_SLOTS:
//* update background color //* update background color
void updateActiveState( void ); void updateActiveState();
//* update position //* update position
void updatePosition( void ); void updatePosition();
//* embed into parent widget //* embed into parent widget
void embed( void ); void embed();
protected: protected:

@ -69,7 +69,7 @@ namespace Breeze
} }
//_________________________________________________________ //_________________________________________________________
void ConfigWidget::load( void ) void ConfigWidget::load()
{ {
// create internal settings and load from rc files // 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 // 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 // create internal settings and load from rc files
@ -175,7 +175,7 @@ namespace Breeze
} }
//_______________________________________________ //_______________________________________________
void ConfigWidget::updateChanged( void ) void ConfigWidget::updateChanged()
{ {
// check configuration // check configuration

@ -51,16 +51,16 @@ namespace Breeze
explicit ConfigWidget( QWidget*, const QVariantList& ); explicit ConfigWidget( QWidget*, const QVariantList& );
//* destructor //* destructor
virtual ~ConfigWidget( void ) = default; virtual ~ConfigWidget() = default;
//* default //* default
void defaults() override; void defaults() override;
//* load configuration //* load configuration
void load( void ) override; void load() override;
//* save configuration //* save configuration
void save( void ) override; void save() override;
protected Q_SLOTS: protected Q_SLOTS:

@ -92,7 +92,7 @@ namespace Breeze
WId findWindow(); WId findWindow();
//* execute //* execute
void executeDialog( void ); void executeDialog();
//* ui //* ui
Ui::BreezeDetectWidget m_ui; Ui::BreezeDetectWidget m_ui;

@ -89,7 +89,7 @@ namespace Breeze
} }
//___________________________________________ //___________________________________________
void ExceptionDialog::save( void ) void ExceptionDialog::save()
{ {
m_exception->setExceptionType( m_ui.exceptionType->currentIndex() ); m_exception->setExceptionType( m_ui.exceptionType->currentIndex() );
m_exception->setExceptionPattern( m_ui.exceptionEditor->text() ); m_exception->setExceptionPattern( m_ui.exceptionEditor->text() );
@ -108,7 +108,7 @@ namespace Breeze
} }
//___________________________________________ //___________________________________________
void ExceptionDialog::updateChanged( void ) void ExceptionDialog::updateChanged()
{ {
bool modified( false ); bool modified( false );
if( m_exception->exceptionType() != m_ui.exceptionType->currentIndex() ) modified = true; 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 // create widget

@ -48,17 +48,17 @@ namespace Breeze
explicit ExceptionDialog( QWidget* parent ); explicit ExceptionDialog( QWidget* parent );
//* destructor //* destructor
virtual ~ExceptionDialog( void ) virtual ~ExceptionDialog()
{} {}
//* set exception //* set exception
void setException( InternalSettingsPtr ); void setException( InternalSettingsPtr );
//* save exception //* save exception
void save( void ); void save();
//* true if changed //* true if changed
virtual bool isChanged( void ) const virtual bool isChanged() const
{ return m_changed; } { return m_changed; }
Q_SIGNALS: Q_SIGNALS:
@ -83,7 +83,7 @@ namespace Breeze
private Q_SLOTS: private Q_SLOTS:
//* select window properties from grabbed pointers //* select window properties from grabbed pointers
void selectWindowProperties( void ); void selectWindowProperties();
//* read properties of selected window //* read properties of selected window
void readWindowProperties( bool ); void readWindowProperties( bool );

@ -83,14 +83,14 @@ namespace Breeze
} }
//__________________________________________________________ //__________________________________________________________
InternalSettingsList ExceptionListWidget::exceptions( void ) InternalSettingsList ExceptionListWidget::exceptions()
{ {
return model().get(); return model().get();
setChanged( false ); setChanged( false );
} }
//__________________________________________________________ //__________________________________________________________
void ExceptionListWidget::updateButtons( void ) void ExceptionListWidget::updateButtons()
{ {
bool hasSelection( !m_ui.exceptionListView->selectionModel()->selectedRows().empty() ); 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 // retrieve selection
@ -186,7 +186,7 @@ namespace Breeze
} }
//_______________________________________________________ //_______________________________________________________
void ExceptionListWidget::remove( void ) void ExceptionListWidget::remove()
{ {
// confirmation dialog // confirmation dialog
@ -224,7 +224,7 @@ namespace Breeze
} }
//_______________________________________________________ //_______________________________________________________
void ExceptionListWidget::up( void ) void ExceptionListWidget::up()
{ {
InternalSettingsList selection( model().get( m_ui.exceptionListView->selectionModel()->selectedRows() ) ); 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() ) ); 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::ColumnEnabled );
m_ui.exceptionListView->resizeColumnToContents( ExceptionModel::ColumnType ); m_ui.exceptionListView->resizeColumnToContents( ExceptionModel::ColumnType );

@ -47,10 +47,10 @@ namespace Breeze
void setExceptions( const InternalSettingsList& ); void setExceptions( const InternalSettingsList& );
//* get exceptions //* get exceptions
InternalSettingsList exceptions( void ); InternalSettingsList exceptions();
//* true if changed //* true if changed
virtual bool isChanged( void ) const virtual bool isChanged() const
{ return m_changed; } { return m_changed; }
Q_SIGNALS: Q_SIGNALS:
@ -71,30 +71,30 @@ namespace Breeze
protected Q_SLOTS: protected Q_SLOTS:
//* update button states //* update button states
virtual void updateButtons( void ); virtual void updateButtons();
//* add //* add
virtual void add( void ); virtual void add();
//* edit //* edit
virtual void edit( void ); virtual void edit();
//* remove //* remove
virtual void remove( void ); virtual void remove();
//* toggle //* toggle
virtual void toggle( const QModelIndex& ); virtual void toggle( const QModelIndex& );
//* move up //* move up
virtual void up( void ); virtual void up();
//* move down //* move down
virtual void down( void ); virtual void down();
protected: protected:
//* resize columns //* resize columns
void resizeColumns( void ) const; void resizeColumns() const;
//* check exception //* check exception
bool checkException( InternalSettingsPtr ); bool checkException( InternalSettingsPtr );

@ -51,18 +51,18 @@ namespace Breeze
//@{ //@{
//* sort //* sort
virtual void sort( void ) virtual void sort()
{ sort( sortColumn(), sortOrder() ); } { sort( sortColumn(), sortOrder() ); }
//* sort //* sort
void sort( int column, Qt::SortOrder order = Qt::AscendingOrder ) override; void sort( int column, Qt::SortOrder order = Qt::AscendingOrder ) override;
//* current sorting column //* current sorting column
const int& sortColumn( void ) const const int& sortColumn() const
{ return m_sortColumn; } { return m_sortColumn; }
//* current sort order //* current sort order
const Qt::SortOrder& sortOrder( void ) const const Qt::SortOrder& sortOrder() const
{ return m_sortOrder; } { return m_sortOrder; }
//@} //@}
@ -70,7 +70,7 @@ namespace Breeze
protected: protected:
//* this sort columns without calling the layout changed callbacks //* this sort columns without calling the layout changed callbacks
void privateSort( void ) void privateSort()
{ privateSort( m_sortColumn, m_sortOrder ); } { privateSort( m_sortColumn, m_sortOrder ); }
//* private sort, with no signals emmitted //* private sort, with no signals emmitted

@ -105,7 +105,7 @@ namespace Breeze
//@{ //@{
//! clear internal list selected items //! clear internal list selected items
virtual void clearSelectedIndexes( void ) virtual void clearSelectedIndexes()
{ _selection.clear(); } { _selection.clear(); }
//! store index internal selection state //! store index internal selection state
@ -116,7 +116,7 @@ namespace Breeze
} }
//! get list of internal selected items //! get list of internal selected items
virtual QModelIndexList selectedIndexes( void ) const virtual QModelIndexList selectedIndexes() const
{ {
QModelIndexList out; QModelIndexList out;
@ -228,7 +228,7 @@ namespace Breeze
} }
//! clear //! clear
virtual void clear( void ) virtual void clear()
{ set( List() ); } { set( List() ); }
//! update values from list //! update values from list

@ -53,7 +53,7 @@ namespace Breeze
BlurHelper( QObject* ); BlurHelper( QObject* );
//! destructor //! destructor
virtual ~BlurHelper( void ) virtual ~BlurHelper()
{} {}
//! register widget //! register widget

Loading…
Cancel
Save