Remove reset method from OxygenClient

Connects to the appropriate changed signals instead.
This commit is contained in:
Martin Gräßlin 2013-08-23 15:26:53 +02:00
parent d10a31750e
commit 287ddf8446
2 changed files with 19 additions and 11 deletions

View file

@ -67,7 +67,10 @@ namespace Oxygen
_itemData( this ),
_sourceItem( -1 ),
_shadowAtom( 0 )
{}
{
connect(options(), &KDecorationOptions::compositingChanged, this, &Client::updateCompositing);
connect(options(), &KDecorationOptions::configChanged, this, &Client::updateConfig);
}
//___________________________________________
Client::~Client()
@ -133,20 +136,24 @@ namespace Oxygen
_initialized = true;
// first reset is needed to store Oxygen configuration
reset(0);
updateConfig();
}
//___________________________________________
void Client::reset( unsigned long changed )
void Client::updateCompositing()
{
// update window mask when compositing is changed
if( !_initialized ) return;
if( changed & SettingCompositing )
{
updateWindowShape();
widget()->update();
}
updateWindowShape();
widget()->update();
updateConfig();
}
//___________________________________________
void Client::updateConfig()
{
if( !_initialized ) return;
_configuration = _factory->configuration( *this );

View file

@ -127,9 +127,6 @@ namespace Oxygen
//! initialization
virtual void init();
// reset
virtual void reset( unsigned long changed );
//! return associated configuration
Factory::ConfigurationPtr configuration( void ) const
{ return _configuration; }
@ -435,6 +432,10 @@ namespace Oxygen
//! bound one rect to another
void boundRectTo( QRect&, const QRect& ) const;
private Q_SLOTS:
void updateCompositing();
void updateConfig();
private:
//! factory