Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit 30245aba authored by Pino Toscano's avatar Pino Toscano

Partially revert "Use Q_DECL_OVERRIDE"

The style code can be built with Qt4/kdelibs4 as well, and there is no
Q_DECL_OVERRIDE in that case.

This partially reverts commit 13859b08.
parent 13859b08
......@@ -65,7 +65,7 @@ namespace Breeze
virtual bool registerWidget( QObject* );
//* duration
void setDuration( int ) override;
virtual void setDuration( int );
//* set object as animated
virtual void setAnimated( const QObject*, bool );
......@@ -78,7 +78,7 @@ namespace Breeze
public Q_SLOTS:
//* remove widget from map
bool unregisterWidget( QObject* ) override;
virtual bool unregisterWidget( QObject* );
protected:
......
......@@ -41,7 +41,7 @@ namespace Breeze
{}
//* event filter
bool eventFilter( QObject*, QEvent* ) override;
virtual bool eventFilter( QObject*, QEvent* );
//* subcontrol rect
virtual void setHandleRect( const QRect& rect )
......
......@@ -44,7 +44,7 @@ namespace Breeze
{}
//* register dial
bool registerWidget( QWidget*, AnimationModes ) override;
virtual bool registerWidget( QWidget*, AnimationModes );
//* control rect
virtual void setHandleRect( const QObject* object, const QRect& rect )
......
......@@ -43,7 +43,7 @@ namespace Breeze
{}
//* event filter
bool eventFilter( QObject*, QEvent* ) override;
virtual bool eventFilter( QObject*, QEvent* );
};
......
......@@ -52,7 +52,7 @@ namespace Breeze
{ return _animation; }
//* duration
void setDuration( int duration ) override
virtual void setDuration( int duration )
{ _animation.data()->setDuration( duration ); }
//* opacity
......
......@@ -46,7 +46,7 @@ namespace Breeze
{}
//* duration
void setDuration( int duration ) override
void setDuration( int duration )
{
currentIndexAnimation().data()->setDuration( duration );
previousIndexAnimation().data()->setDuration( duration );
......@@ -124,7 +124,7 @@ namespace Breeze
protected:
//* dirty
void setDirty( void ) const override;
virtual void setDirty( void ) const;
private:
......
......@@ -63,14 +63,14 @@ namespace Breeze
{ return isAnimated( object, point ) ? _data.find( object ).data()->opacity( point ) : AnimationData::OpacityInvalid; }
//* enability
void setEnabled( bool value ) override
virtual void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//* duration
void setDuration( int value ) override
virtual void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -79,7 +79,7 @@ namespace Breeze
public Q_SLOTS:
//* remove widget from map
bool unregisterWidget( QObject* object ) override
virtual bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -46,7 +46,7 @@ namespace Breeze
{}
//* event filter
bool eventFilter( QObject*, QEvent* ) override;
virtual bool eventFilter( QObject*, QEvent* );
//* needed to avoid warning about virtual function being hidden
using WidgetStateData::animation;
......@@ -102,7 +102,7 @@ namespace Breeze
}
//* duration
void setDuration( int duration ) override
virtual void setDuration( int duration )
{
WidgetStateData::setDuration( duration );
addLineAnimation().data()->setDuration( duration );
......
......@@ -44,7 +44,7 @@ namespace Breeze
{}
//* register scrollbar
bool registerWidget( QWidget*, AnimationModes ) override;
virtual bool registerWidget( QWidget*, AnimationModes );
//*@name accessors
//@{
......
......@@ -71,7 +71,7 @@ namespace Breeze
}
//* duration
void setDuration( int duration ) override
virtual void setDuration( int duration )
{
upArrowAnimation().data()->setDuration( duration );
downArrowAnimation().data()->setDuration( duration );
......
......@@ -76,14 +76,14 @@ namespace Breeze
}
//* enability
void setEnabled( bool value ) override
virtual void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//* duration
void setDuration( int value ) override
virtual void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -93,7 +93,7 @@ namespace Breeze
public Q_SLOTS:
//* remove widget from map
bool unregisterWidget( QObject* object ) override
virtual bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -52,10 +52,10 @@ namespace Breeze
protected Q_SLOTS:
//! initialize animation
bool initializeAnimation( void ) override;
virtual bool initializeAnimation( void );
//! animate
bool animate( void ) override;
virtual bool animate( void );
//! finish animation
virtual void finishAnimation( void );
......
......@@ -55,14 +55,14 @@ namespace Breeze
virtual bool registerWidget( QStackedWidget* );
//! duration
void setEnabled( bool value ) override
virtual void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
void setDuration( int value ) override
virtual void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -71,7 +71,7 @@ namespace Breeze
public Q_SLOTS:
//! remove widget from map
bool unregisterWidget( QObject* object ) override
virtual bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -47,7 +47,7 @@ namespace Breeze
{}
//* duration
void setDuration( int duration ) override
void setDuration( int duration )
{
currentIndexAnimation().data()->setDuration( duration );
previousIndexAnimation().data()->setDuration( duration );
......
......@@ -59,7 +59,7 @@ namespace Breeze
{ return isAnimated( object, point, mode ) ? data( object, mode ).data()->opacity( point ) : AnimationData::OpacityInvalid; }
//* enability
void setEnabled( bool value ) override
virtual void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_hoverData.setEnabled( value );
......@@ -67,7 +67,7 @@ namespace Breeze
}
//* duration
void setDuration( int value ) override
virtual void setDuration( int value )
{
BaseEngine::setDuration( value );
_hoverData.setDuration( value );
......@@ -77,7 +77,7 @@ namespace Breeze
public Q_SLOTS:
//* remove widget from map
bool unregisterWidget( QObject* object ) override
virtual bool unregisterWidget( QObject* object )
{
if( !object ) return false;
bool found = false;
......
......@@ -45,14 +45,14 @@ namespace Breeze
{}
//* enability
void setEnabled( bool value ) override
virtual void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//* duration
void setDuration( int value ) override
virtual void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -74,7 +74,7 @@ namespace Breeze
public Q_SLOTS:
//* remove widget from map
bool unregisterWidget( QObject* data ) override
virtual bool unregisterWidget( QObject* data )
{
if( !data ) return false;
......
......@@ -173,10 +173,10 @@ namespace Breeze
protected:
//* generic event filter
bool event( QEvent* ) override;
virtual bool event( QEvent* );
//* paint event
void paintEvent( QPaintEvent* ) override;
virtual void paintEvent( QPaintEvent* );
//* grab widget background
/*!
......
......@@ -104,7 +104,7 @@ namespace Breeze
}
//* duration
void setEnabled( bool value ) override
virtual void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_hoverData.setEnabled( value );
......@@ -114,7 +114,7 @@ namespace Breeze
}
//* duration
void setDuration( int value ) override
virtual void setDuration( int value )
{
BaseEngine::setDuration( value );
_hoverData.setDuration( value );
......@@ -126,7 +126,7 @@ namespace Breeze
public Q_SLOTS:
//* remove widget from map
bool unregisterWidget( QObject* object ) override
virtual bool unregisterWidget( QObject* object )
{
if( !object ) return false;
bool found = false;
......
......@@ -44,7 +44,7 @@ namespace Breeze
//* event filter
/** blocks all AddChild events */
bool eventFilter( QObject*, QEvent* event ) Q_DECL_OVERRIDE
virtual bool eventFilter( QObject*, QEvent* event )
{ return event->type() == QEvent::ChildAdded; }
};
......
......@@ -63,7 +63,7 @@ namespace Breeze
{ return _registeredWidgets.contains( widget ); }
//* event filter
bool eventFilter( QObject*, QEvent*) Q_DECL_OVERRIDE;
virtual bool eventFilter( QObject*, QEvent*);
//* update state
void updateState( const QWidget*, bool focus, bool hover, qreal opacity, AnimationMode ) const;
......@@ -127,7 +127,7 @@ namespace Breeze
protected:
//* painting
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
virtual void paintEvent(QPaintEvent *);
//* return viewport associated to parent widget
virtual QWidget* viewport( void ) const;
......
......@@ -61,7 +61,7 @@ namespace Breeze
protected:
//* painting
void paintEvent(QPaintEvent *) Q_DECL_OVERRIDE;
virtual void paintEvent(QPaintEvent *);
private:
......@@ -106,7 +106,7 @@ namespace Breeze
{ return _registeredWidgets.contains( widget ); }
//* event filter
bool eventFilter( QObject*, QEvent*) Q_DECL_OVERRIDE;
virtual bool eventFilter( QObject*, QEvent*);
protected:
......
......@@ -50,7 +50,7 @@ namespace Breeze
void setMode( int );
//* event filter
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
virtual bool eventFilter( QObject*, QEvent* );
//* true if mnemonics are enabled
const bool& enabled( void ) const
......
......@@ -84,7 +84,7 @@ namespace Breeze
void unregisterWidget( QWidget* );
//* event filter
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
virtual bool eventFilter( QObject*, QEvent* );
//* shadow tiles
/** is public because it is also needed for mdi windows */
......
......@@ -95,7 +95,7 @@ namespace Breeze
virtual ~SplitterProxy( void );
//* event filter
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
virtual bool eventFilter( QObject*, QEvent* );
//* enable state
void setEnabled( bool );
......@@ -107,7 +107,7 @@ namespace Breeze
protected:
//* event handler
bool event( QEvent* ) Q_DECL_OVERRIDE;
virtual bool event( QEvent* );
protected:
......
......@@ -113,7 +113,7 @@ namespace BreezePrivate
{}
//* paint
void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const Q_DECL_OVERRIDE
void paint( QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
{
// call either proxy or parent class
if( _proxy ) _proxy.data()->paint( painter, option, index );
......@@ -121,7 +121,7 @@ namespace BreezePrivate
}
//* size hint for index
QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const Q_DECL_OVERRIDE
virtual QSize sizeHint( const QStyleOptionViewItem& option, const QModelIndex& index ) const
{
// get size from either proxy or parent class
......
......@@ -96,50 +96,50 @@ namespace Breeze
using ParentStyleClass::unpolish;
//* widget polishing
void polish( QWidget* ) Q_DECL_OVERRIDE;
virtual void polish( QWidget* );
//* widget unpolishing
void unpolish( QWidget* ) Q_DECL_OVERRIDE;
virtual void unpolish( QWidget* );
//* polish scrollarea
void polishScrollArea( QAbstractScrollArea* );
//* pixel metrics
int pixelMetric(PixelMetric, const QStyleOption* = nullptr, const QWidget* = nullptr) const Q_DECL_OVERRIDE;
virtual int pixelMetric(PixelMetric, const QStyleOption* = nullptr, const QWidget* = nullptr) const;
//* style hints
int styleHint(StyleHint, const QStyleOption* = nullptr, const QWidget* = nullptr, QStyleHintReturn* = nullptr) const Q_DECL_OVERRIDE;
virtual int styleHint(StyleHint, const QStyleOption* = nullptr, const QWidget* = nullptr, QStyleHintReturn* = nullptr) const;
//* returns rect corresponding to one widget's subelement
QRect subElementRect( SubElement, const QStyleOption*, const QWidget* ) const Q_DECL_OVERRIDE;
virtual QRect subElementRect( SubElement, const QStyleOption*, const QWidget* ) const;
//* returns rect corresponding to one widget's subcontrol
QRect subControlRect( ComplexControl, const QStyleOptionComplex*, SubControl, const QWidget* ) const Q_DECL_OVERRIDE;
virtual QRect subControlRect( ComplexControl, const QStyleOptionComplex*, SubControl, const QWidget* ) const;
//* returns size matching contents
QSize sizeFromContents( ContentsType, const QStyleOption*, const QSize&, const QWidget* ) const Q_DECL_OVERRIDE;
QSize sizeFromContents( ContentsType, const QStyleOption*, const QSize&, const QWidget* ) const;
//* returns which subcontrol given QPoint corresponds to
SubControl hitTestComplexControl( ComplexControl, const QStyleOptionComplex*, const QPoint&, const QWidget* ) const Q_DECL_OVERRIDE;
SubControl hitTestComplexControl( ComplexControl, const QStyleOptionComplex*, const QPoint&, const QWidget* ) const;
//* primitives
void drawPrimitive( PrimitiveElement, const QStyleOption*, QPainter*, const QWidget* ) const Q_DECL_OVERRIDE;
void drawPrimitive( PrimitiveElement, const QStyleOption*, QPainter*, const QWidget* ) const;
//* controls
void drawControl( ControlElement, const QStyleOption*, QPainter*, const QWidget* ) const Q_DECL_OVERRIDE;
void drawControl( ControlElement, const QStyleOption*, QPainter*, const QWidget* ) const;
//* complex controls
void drawComplexControl( ComplexControl, const QStyleOptionComplex*, QPainter*, const QWidget* ) const Q_DECL_OVERRIDE;
void drawComplexControl( ComplexControl, const QStyleOptionComplex*, QPainter*, const QWidget* ) const;
//* generic text rendering
void drawItemText(
virtual void drawItemText(
QPainter*, const QRect&, int alignment, const QPalette&, bool enabled,
const QString&, QPalette::ColorRole = QPalette::NoRole) const Q_DECL_OVERRIDE;
const QString&, QPalette::ColorRole = QPalette::NoRole) const;
//*@name event filters
//@{
bool eventFilter(QObject *, QEvent *) Q_DECL_OVERRIDE;
virtual bool eventFilter(QObject *, QEvent *);
bool eventFilterScrollArea( QWidget*, QEvent* );
bool eventFilterComboBoxContainer( QWidget*, QEvent* );
bool eventFilterDockWidget( QDockWidget*, QEvent* );
......@@ -169,7 +169,7 @@ namespace Breeze
protected:
//* standard icons
QIcon standardIcon( StandardPixmap pixmap, const QStyleOption* option = nullptr, const QWidget* widget = nullptr) const Q_DECL_OVERRIDE
virtual QIcon standardIcon( StandardPixmap pixmap, const QStyleOption* option = nullptr, const QWidget* widget = nullptr) const
{ return standardIconImplementation( pixmap, option, widget ); }
//* load configuration
......
......@@ -48,7 +48,7 @@ namespace Breeze
QStringList keys() const;
//* create style
QStyle* create( const QString& ) Q_DECL_OVERRIDE;
QStyle* create( const QString& );
};
......
......@@ -123,7 +123,7 @@ namespace Breeze
{}
//* event filter
bool eventFilter( QObject* object, QEvent* event ) Q_DECL_OVERRIDE
virtual bool eventFilter( QObject* object, QEvent* event )
{
if( event->type() == QEvent::MouseButtonRelease )
......
......@@ -79,13 +79,13 @@ namespace Breeze
void unregisterWidget( QWidget* );
//* event filter [reimplemented]
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
virtual bool eventFilter( QObject*, QEvent* );
protected:
//* timer event,
/** used to start drag if button is pressed for a long enough time */
void timerEvent( QTimerEvent* ) Q_DECL_OVERRIDE;
void timerEvent( QTimerEvent* );
//* mouse press event
bool mousePressEvent( QObject*, QEvent* );
......
......@@ -51,7 +51,7 @@ namespace Breeze
{ _drawWidgetRects = value; }
//* event filter
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
virtual bool eventFilter( QObject*, QEvent* );
protected:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment