From adcd98aa1f2ac2f3d0da46dcc41eb23944acbafe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=A4=C3=9Flin?= Date: Tue, 8 Nov 2016 17:15:55 +0100 Subject: [PATCH] Revert "[kstyle] Implement application unpolish to delete ShadowHelper" This reverts commit a0433d089aa96ff60b625be10082e914c19b58d3. This causes quite some problems when a style sheet is used. --- kstyle/breezestyle.cpp | 15 --------------- kstyle/breezestyle.h | 7 +------ 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/kstyle/breezestyle.cpp b/kstyle/breezestyle.cpp index ab814ddc..d3f6d46b 100644 --- a/kstyle/breezestyle.cpp +++ b/kstyle/breezestyle.cpp @@ -197,24 +197,9 @@ namespace Breeze //______________________________________________________________ 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; - _shadowHelper = nullptr; delete _helper; - _helper = nullptr; } //______________________________________________________________ diff --git a/kstyle/breezestyle.h b/kstyle/breezestyle.h index aa2478b6..a627252a 100644 --- a/kstyle/breezestyle.h +++ b/kstyle/breezestyle.h @@ -92,6 +92,7 @@ namespace Breeze //* needed to avoid warnings at compilation time using ParentStyleClass::polish; + using ParentStyleClass::unpolish; //* widget polishing virtual void polish( QWidget* ); @@ -99,9 +100,6 @@ namespace Breeze //* widget unpolishing virtual void unpolish( QWidget* ); - //* application unpolishing - void unpolish( QApplication* ) override; - //* polish scrollarea void polishScrollArea( QAbstractScrollArea* ); @@ -473,9 +471,6 @@ namespace Breeze private: - //* shared cleanup for unpolish and dtor - void cleanup(); - //*@name scrollbar button types (for addLine and subLine ) //@{ ScrollBarButtonType _addLineButtons;