Commit cbc5fdbd authored by Hugo Pereira Da Costa's avatar Hugo Pereira Da Costa

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 1bf982f4

BUG: 380452
parent 8a4e31bc
......@@ -71,7 +71,7 @@ namespace Oxygen
virtual bool registerWidget( QObject* );
//* duration
void setDuration( int ) Q_DECL_OVERRIDE;
void setDuration( int ) ;
//* set object as animated
virtual void setAnimated( const QObject*, bool );
......@@ -84,7 +84,7 @@ namespace Oxygen
public Q_SLOTS:
//* remove widget from map
bool unregisterWidget( QObject* ) Q_DECL_OVERRIDE;
bool unregisterWidget( QObject* ) ;
protected:
......
......@@ -69,7 +69,7 @@ namespace Oxygen
{ return orientation == Qt::Vertical ? verticalOpacity():horizontalOpacity(); }
//! duration
void setDuration( int duration ) Q_DECL_OVERRIDE
void setDuration( int duration )
{
horizontalAnimation().data()->setDuration( duration );
verticalAnimation().data()->setDuration( duration );
......
......@@ -81,14 +81,14 @@ namespace Oxygen
}
//! enability
void setEnabled( bool value ) Q_DECL_OVERRIDE
void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
void setDuration( int value ) Q_DECL_OVERRIDE
void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -97,7 +97,7 @@ namespace Oxygen
public Q_SLOTS:
//! remove widget from map
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -50,7 +50,7 @@ namespace Oxygen
{}
//! event filter
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
bool eventFilter( QObject*, QEvent* ) ;
};
......
......@@ -59,7 +59,7 @@ namespace Oxygen
{ return _animation; }
//! duration
void setDuration( int duration ) Q_DECL_OVERRIDE
void setDuration( int duration )
{ _animation.data()->setDuration( duration ); }
//! opacity
......
......@@ -53,7 +53,7 @@ namespace Oxygen
{}
//! duration
void setDuration( int duration ) Q_DECL_OVERRIDE
void setDuration( int duration )
{
currentIndexAnimation().data()->setDuration( duration );
previousIndexAnimation().data()->setDuration( duration );
......@@ -131,7 +131,7 @@ namespace Oxygen
protected:
//! dirty
void setDirty( void ) const Q_DECL_OVERRIDE;
void setDirty( void ) const ;
private:
......
......@@ -70,14 +70,14 @@ namespace Oxygen
{ return isAnimated( object, point ) ? _data.find( object ).data()->opacity( point ) : AnimationData::OpacityInvalid; }
//! enability
void setEnabled( bool value ) Q_DECL_OVERRIDE
void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
void setDuration( int value ) Q_DECL_OVERRIDE
void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -86,7 +86,7 @@ namespace Oxygen
public Q_SLOTS:
//! remove widget from map
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -73,7 +73,7 @@ namespace Oxygen
}
//! duration
void setDuration( int duration ) Q_DECL_OVERRIDE
void setDuration( int duration )
{
currentAnimation().data()->setDuration( duration );
previousAnimation().data()->setDuration( duration );
......
......@@ -83,14 +83,14 @@ namespace Oxygen
}
//! enability
void setEnabled( bool value ) Q_DECL_OVERRIDE
void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
void setDuration( int value ) Q_DECL_OVERRIDE
void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -100,7 +100,7 @@ namespace Oxygen
public Q_SLOTS:
//! remove widget from map
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -85,7 +85,7 @@ namespace Oxygen
{}
//! event filter
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
bool eventFilter( QObject*, QEvent* ) ;
//! animations
virtual const Animation::Pointer& currentAnimation( void ) const
......@@ -132,7 +132,7 @@ namespace Oxygen
{ return index == Current ? currentRect():previousRect(); }
//! duration
void setDuration( int duration ) Q_DECL_OVERRIDE
void setDuration( int duration )
{
currentAnimation().data()->setDuration( duration );
previousAnimation().data()->setDuration( duration );
......@@ -290,7 +290,7 @@ namespace Oxygen
{}
//! event filter
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
bool eventFilter( QObject*, QEvent* ) ;
//! return animation associated to action at given position, if any
virtual const Animation::Pointer& animation( void ) const
......@@ -301,7 +301,7 @@ namespace Oxygen
{ return _progressAnimation; }
//! duration
void setDuration( int duration ) Q_DECL_OVERRIDE
void setDuration( int duration )
{ animation().data()->setDuration( duration ); }
//! duration
......@@ -359,7 +359,7 @@ namespace Oxygen
virtual void updateAnimatedRect( void );
//! timer event
void timerEvent( QTimerEvent* ) Q_DECL_OVERRIDE;
void timerEvent( QTimerEvent* ) ;
//!@name current action handling
//@{
......
......@@ -75,10 +75,10 @@ namespace Oxygen
{ return false; }
//! enability
void setEnabled( bool ) Q_DECL_OVERRIDE = 0;
void setEnabled( bool ) = 0;
//! duration
void setDuration( int ) Q_DECL_OVERRIDE = 0;
void setDuration( int ) = 0;
//! duration
virtual void setFollowMouseDuration( int )
......@@ -107,40 +107,40 @@ namespace Oxygen
{}
//! register menubar
bool registerWidget( QWidget* ) Q_DECL_OVERRIDE;
bool registerWidget( QWidget* ) ;
//! true if widget is animated
bool isAnimated( const QObject* object, const QPoint& point ) Q_DECL_OVERRIDE;
bool isAnimated( const QObject* object, const QPoint& point ) ;
//! animation opacity
qreal opacity( const QObject* object, const QPoint& point ) Q_DECL_OVERRIDE
qreal opacity( const QObject* object, const QPoint& point )
{ return isAnimated( object, point ) ? _data.find( object ).data()->opacity( point ): AnimationData::OpacityInvalid; }
//! return 'hover' rect position when widget is animated
QRect currentRect( const QObject* object, const QPoint& point) Q_DECL_OVERRIDE
QRect currentRect( const QObject* object, const QPoint& point)
{ return isAnimated( object, point ) ? _data.find( object ).data()->currentRect( point ): QRect(); }
//! enability
void setEnabled( bool value ) Q_DECL_OVERRIDE
void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
void setDuration( int duration ) Q_DECL_OVERRIDE
void setDuration( int duration )
{
BaseEngine::setDuration( duration );
_data.setDuration( duration );
}
//! return list of registered widgets
WidgetList registeredWidgets( void ) const Q_DECL_OVERRIDE;
WidgetList registeredWidgets( void ) const ;
public Q_SLOTS:
//! remove widget from map
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
private:
......@@ -171,34 +171,34 @@ namespace Oxygen
{}
//! register menubar
bool registerWidget( QWidget* ) Q_DECL_OVERRIDE;
bool registerWidget( QWidget* ) ;
//! true if widget is animated
bool isAnimated( const QObject* object, const QPoint& point ) Q_DECL_OVERRIDE;
bool isAnimated( const QObject* object, const QPoint& point ) ;
//! animation opacity
qreal opacity( const QObject* object, const QPoint& point ) Q_DECL_OVERRIDE
qreal opacity( const QObject* object, const QPoint& point )
{ return isAnimated( object, point ) ? _data.find( object ).data()->opacity(): AnimationData::OpacityInvalid; }
//! return 'hover' rect position when widget is animated
QRect currentRect( const QObject*, const QPoint& ) Q_DECL_OVERRIDE;
QRect currentRect( const QObject*, const QPoint& ) ;
//! return 'hover' rect position when widget is animated
QRect animatedRect( const QObject* ) Q_DECL_OVERRIDE;
QRect animatedRect( const QObject* ) ;
//! timer associated to the data
bool isTimerActive( const QObject* ) Q_DECL_OVERRIDE;
bool isTimerActive( const QObject* ) ;
//! enability
void setEnabled( bool value ) Q_DECL_OVERRIDE
void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
void setDuration( int value ) Q_DECL_OVERRIDE
void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -209,7 +209,7 @@ namespace Oxygen
{ return _followMouseDuration; }
//! duration
void setFollowMouseDuration( int duration ) Q_DECL_OVERRIDE
void setFollowMouseDuration( int duration )
{
_followMouseDuration = duration;
foreach( const DataMap<MenuBarDataV2>::Value& value, _data )
......@@ -217,12 +217,12 @@ namespace Oxygen
}
//! return list of registered widgets
WidgetList registeredWidgets( void ) const Q_DECL_OVERRIDE;
WidgetList registeredWidgets( void ) const ;
protected Q_SLOTS:
//! remove widget from map
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -57,19 +57,19 @@ namespace Oxygen
protected:
//! menubar enterEvent
void enterEvent( const QObject* object ) Q_DECL_OVERRIDE
void enterEvent( const QObject* object )
{ MenuBarDataV1::enterEvent<QMenu>( object ); }
//! menubar enterEvent
void leaveEvent( const QObject* object ) Q_DECL_OVERRIDE
void leaveEvent( const QObject* object )
{ MenuBarDataV1::leaveEvent<QMenu>( object ); }
//! menubar mouseMoveEvent
void mouseMoveEvent( const QObject* object ) Q_DECL_OVERRIDE
void mouseMoveEvent( const QObject* object )
{ MenuBarDataV1::mouseMoveEvent<QMenu>( object ); }
//! menubar mousePressEvent
void mousePressEvent( const QObject* object ) Q_DECL_OVERRIDE
void mousePressEvent( const QObject* object )
{ MenuBarDataV1::mousePressEvent<QMenu>( object ); }
};
......@@ -97,15 +97,15 @@ namespace Oxygen
protected:
//! menubar enterEvent
void enterEvent( const QObject* object ) Q_DECL_OVERRIDE
void enterEvent( const QObject* object )
{ MenuBarDataV2::enterEvent<QMenu>( object ); }
//! menubar enterEvent
void leaveEvent( const QObject* object ) Q_DECL_OVERRIDE
void leaveEvent( const QObject* object )
{ MenuBarDataV2::leaveEvent<QMenu>( object ); }
//! menubar mouseMoveEvent
void mouseMoveEvent( const QObject* object ) Q_DECL_OVERRIDE
void mouseMoveEvent( const QObject* object )
{ MenuBarDataV2::mouseMoveEvent<QMenu>( object ); }
};
......
......@@ -74,10 +74,10 @@ namespace Oxygen
{ return false; }
//! enability
void setEnabled( bool value ) Q_DECL_OVERRIDE = 0;
void setEnabled( bool value ) = 0;
//! duration
void setDuration( int ) Q_DECL_OVERRIDE = 0;
void setDuration( int ) = 0;
//! duration
virtual void setFollowMouseDuration( int )
......@@ -105,46 +105,46 @@ namespace Oxygen
{}
//! register menubar
bool registerWidget( QWidget* ) Q_DECL_OVERRIDE;
bool registerWidget( QWidget* ) ;
//! true if widget is animated
bool isAnimated( const QObject* object, WidgetIndex index ) Q_DECL_OVERRIDE;
bool isAnimated( const QObject* object, WidgetIndex index ) ;
//! animation opacity
qreal opacity( const QObject* object, WidgetIndex index ) Q_DECL_OVERRIDE
qreal opacity( const QObject* object, WidgetIndex index )
{
if( !isAnimated( object, index ) ) return AnimationData::OpacityInvalid;
else return _data.find(object).data()->opacity( index );
}
//! return 'hover' rect position when widget is animated
QRect currentRect( const QObject* object, WidgetIndex index ) Q_DECL_OVERRIDE
QRect currentRect( const QObject* object, WidgetIndex index )
{
if( !isAnimated( object, index ) ) return QRect();
else return _data.find(object).data()->currentRect( index );
}
//! enability
void setEnabled( bool value ) Q_DECL_OVERRIDE
void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
void setDuration( int duration ) Q_DECL_OVERRIDE
void setDuration( int duration )
{
BaseEngine::setDuration( duration );
_data.setDuration( duration );
}
//! return list of registered widgets
WidgetList registeredWidgets( void ) const Q_DECL_OVERRIDE;
WidgetList registeredWidgets( void ) const ;
public Q_SLOTS:
//! remove widget from map
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
private:
......@@ -175,36 +175,36 @@ namespace Oxygen
MenuEngineV2( QObject* parent, MenuBaseEngine* other );
//! register menu
bool registerWidget( QWidget* ) Q_DECL_OVERRIDE;
bool registerWidget( QWidget* ) ;
//! return timeLine associated to action at given position, if any
bool isAnimated( const QObject*, WidgetIndex ) Q_DECL_OVERRIDE;
bool isAnimated( const QObject*, WidgetIndex ) ;
//! animation opacity
qreal opacity( const QObject* object, WidgetIndex index ) Q_DECL_OVERRIDE
qreal opacity( const QObject* object, WidgetIndex index )
{
if( !isAnimated( object, index ) ) return AnimationData::OpacityInvalid;
else return _data.find(object).data()->opacity();
}
//! return 'hover' rect position when widget is animated
QRect currentRect( const QObject* object, WidgetIndex index ) Q_DECL_OVERRIDE;
QRect currentRect( const QObject* object, WidgetIndex index ) ;
//! return 'hover' rect position when widget is animated
QRect animatedRect( const QObject* ) Q_DECL_OVERRIDE;
QRect animatedRect( const QObject* ) ;
//! timer associated to the data
bool isTimerActive( const QObject* ) Q_DECL_OVERRIDE;
bool isTimerActive( const QObject* ) ;
//! enability
void setEnabled( bool value ) Q_DECL_OVERRIDE
void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
void setDuration( int value ) Q_DECL_OVERRIDE
void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -215,7 +215,7 @@ namespace Oxygen
{ return _followMouseDuration; }
//! duration
void setFollowMouseDuration( int duration ) Q_DECL_OVERRIDE
void setFollowMouseDuration( int duration )
{
_followMouseDuration = duration;
foreach( const DataMap<MenuDataV2>::Value& value, _data )
......@@ -223,12 +223,12 @@ namespace Oxygen
}
//! return list of registered widgets
WidgetList registeredWidgets( void ) const Q_DECL_OVERRIDE;
WidgetList registeredWidgets( void ) const ;
protected Q_SLOTS:
//! remove widget from map
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -51,7 +51,7 @@ namespace Oxygen
{}
//! event filter
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
bool eventFilter( QObject*, QEvent* ) ;
//! progressbar value (during animation)
virtual int value( void ) const
......
......@@ -64,14 +64,14 @@ namespace Oxygen
{ return isAnimated( object ) ? data( object ).data()->value():0 ; }
//! enability
void setEnabled( bool value ) Q_DECL_OVERRIDE
void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
void setDuration( int value ) Q_DECL_OVERRIDE
void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -80,7 +80,7 @@ namespace Oxygen
public Q_SLOTS:
//! remove widget from map
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
protected:
......
......@@ -52,7 +52,7 @@ namespace Oxygen
{}
//! event filter
bool eventFilter( QObject*, QEvent* ) Q_DECL_OVERRIDE;
bool eventFilter( QObject*, QEvent* ) ;
//! needed to avoid warning about virtual function being hidden
using WidgetStateData::animation;
......@@ -107,7 +107,7 @@ namespace Oxygen
}
//! duration
void setDuration( int duration ) Q_DECL_OVERRIDE
void setDuration( int duration )
{
WidgetStateData::setDuration( duration );
addLineAnimation().data()->setDuration( duration );
......
......@@ -97,7 +97,7 @@ namespace Oxygen
}
//! enability
void setEnabled( bool value ) Q_DECL_OVERRIDE
void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
/*
......@@ -111,7 +111,7 @@ namespace Oxygen
}
//! duration
void setDuration( int value ) Q_DECL_OVERRIDE
void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -120,7 +120,7 @@ namespace Oxygen
public Q_SLOTS:
//! remove widget from map
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -78,7 +78,7 @@ namespace Oxygen
}
//! duration
void setDuration( int duration ) Q_DECL_OVERRIDE
void setDuration( int duration )
{
upArrowAnimation().data()->setDuration( duration );
downArrowAnimation().data()->setDuration( duration );
......
......@@ -83,14 +83,14 @@ namespace Oxygen
}
//! enability
void setEnabled( bool value ) Q_DECL_OVERRIDE
void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
void setDuration( int value ) Q_DECL_OVERRIDE
void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -100,7 +100,7 @@ namespace Oxygen
public Q_SLOTS:
//! remove widget from map
bool unregisterWidget( QObject* object ) Q_DECL_OVERRIDE
bool unregisterWidget( QObject* object )
{ return _data.unregisterWidget( object ); }
private:
......
......@@ -52,14 +52,14 @@ namespace Oxygen
{}
//! enability
void setEnabled( bool value ) Q_DECL_OVERRIDE
void setEnabled( bool value )
{
BaseEngine::setEnabled( value );
_data.setEnabled( value );
}
//! duration
void setDuration( int value ) Q_DECL_OVERRIDE
void setDuration( int value )
{
BaseEngine::setDuration( value );
_data.setDuration( value );
......@@ -81,7 +81,7 @@ namespace Oxygen
public Q_SLOTS:
//! remove widget from map
bool unregisterWidget( QObject* data ) Q_DECL_OVERRIDE
bool unregisterWidget( QObject* data )
{
if( !data ) return false;
......
......@@ -47,7 +47,7 @@ namespace Oxygen
{}
//* duration
void setDuration( int duration ) Q_DECL_OVERRIDE
void setDuration( int duration )
{
currentIndexAnimation().data()->setDuration( duration );
previousIndexAnimation().data()->setDuration( duration );
......
......@@ -59,7 +59,7 @@ namespace Oxygen
{ return isAnimated( object, point, mode ) ? data( object, mode ).data()->opacity( point ) : AnimationData::OpacityInvalid; }