Revert "[kstyle] Implement application unpolish to delete ShadowHelper"

This reverts commit a0433d089a.

This causes quite some problems when a style sheet is used.
wilder-pre-rebase
Martin Gräßlin 9 years ago
parent a0433d089a
commit adcd98aa1f
  1. 15
      kstyle/breezestyle.cpp
  2. 7
      kstyle/breezestyle.h

@ -197,24 +197,9 @@ namespace Breeze
//______________________________________________________________ //______________________________________________________________
Style::~Style( void ) Style::~Style( void )
{
cleanup();
}
//______________________________________________________________
void Style::unpolish( QApplication* )
{
// NOTE: unpolish is not called in general on tear-down of Application
// only when a new QStyle is loaded by the QApplication unpolish is invoked
cleanup();
}
void Style::cleanup( void )
{ {
delete _shadowHelper; delete _shadowHelper;
_shadowHelper = nullptr;
delete _helper; delete _helper;
_helper = nullptr;
} }
//______________________________________________________________ //______________________________________________________________

@ -92,6 +92,7 @@ namespace Breeze
//* needed to avoid warnings at compilation time //* needed to avoid warnings at compilation time
using ParentStyleClass::polish; using ParentStyleClass::polish;
using ParentStyleClass::unpolish;
//* widget polishing //* widget polishing
virtual void polish( QWidget* ); virtual void polish( QWidget* );
@ -99,9 +100,6 @@ namespace Breeze
//* widget unpolishing //* widget unpolishing
virtual void unpolish( QWidget* ); virtual void unpolish( QWidget* );
//* application unpolishing
void unpolish( QApplication* ) override;
//* polish scrollarea //* polish scrollarea
void polishScrollArea( QAbstractScrollArea* ); void polishScrollArea( QAbstractScrollArea* );
@ -473,9 +471,6 @@ namespace Breeze
private: private:
//* shared cleanup for unpolish and dtor
void cleanup();
//*@name scrollbar button types (for addLine and subLine ) //*@name scrollbar button types (for addLine and subLine )
//@{ //@{
ScrollBarButtonType _addLineButtons; ScrollBarButtonType _addLineButtons;

Loading…
Cancel
Save