put equal to operator inline, and fixed logic in order to disable check on outerColor, if the latter is not used

svn path=/trunk/KDE/kdebase/workspace/; revision=1024656
remotes/origin/Plasma/5.0
Hugo Pereira Da Costa 17 years ago
parent 1495f281c2
commit 2f5512e00e
  1. 13
      clients/oxygen/oxygenshadowconfiguration.cpp
  2. 16
      clients/oxygen/oxygenshadowconfiguration.h

@ -74,19 +74,6 @@ namespace Oxygen
}
//_________________________________________________________
bool OxygenShadowConfiguration::operator == ( const OxygenShadowConfiguration& other ) const
{
assert( colorGroup() == other.colorGroup() );
return
shadowSize() == other.shadowSize() &&
horizontalOffset() == other.horizontalOffset() &&
verticalOffset() == other.verticalOffset() &&
innerColor() == other.innerColor() &&
outerColor() == other.outerColor() &&
useOuterColor() == other.useOuterColor();
}
//_________________________________________________________
void OxygenShadowConfiguration::write( KConfigGroup& group ) const
{

@ -59,9 +59,6 @@ namespace Oxygen
virtual ~OxygenShadowConfiguration( void )
{}
//! equal to operator
bool operator == ( const OxygenShadowConfiguration& ) const;
//! write to kconfig group
virtual void write( KConfigGroup& ) const;
@ -119,6 +116,19 @@ namespace Oxygen
void setUseOuterColor( bool value )
{ useOuterColor_ = value; }
//! equal to operator
bool operator == (const OxygenShadowConfiguration& other ) const
{
return
colorGroup_ == other.colorGroup_ &&
shadowSize_ == other.shadowSize_ &&
horizontalOffset_ == other.horizontalOffset_ &&
verticalOffset_ == other.verticalOffset_ &&
innerColor_ == other.innerColor_ &&
( useOuterColor_ == false || outerColor_ == other.outerColor_ ) &&
useOuterColor_ == other.useOuterColor_;
}
protected:
//! mid color

Loading…
Cancel
Save