Commit 69a7b4d2 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Revert "FSC memory leaks"

This reverts commit 1463e7cb.

Conflicts:

	modules/gui/qt4/components/controller.cpp
	modules/gui/qt4/components/controller_widget.hpp
parent ad55dcbc
...@@ -190,7 +190,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -190,7 +190,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
switch( button ) switch( button )
{ {
case PLAY_BUTTON: { case PLAY_BUTTON: {
PlayButton *playButton = new PlayButton( this ); PlayButton *playButton = new PlayButton;
setupButton( playButton ); setupButton( playButton );
BUTTON_SET_BAR( playButton ); BUTTON_SET_BAR( playButton );
CONNECT_MAP_SET( playButton, PLAY_ACTION ); CONNECT_MAP_SET( playButton, PLAY_ACTION );
...@@ -200,7 +200,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -200,7 +200,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case STOP_BUTTON:{ case STOP_BUTTON:{
QToolButton *stopButton = new QToolButton( this ); QToolButton *stopButton = new QToolButton;
setupButton( stopButton ); setupButton( stopButton );
CONNECT_MAP_SET( stopButton, STOP_ACTION ); CONNECT_MAP_SET( stopButton, STOP_ACTION );
BUTTON_SET_BAR( stopButton ); BUTTON_SET_BAR( stopButton );
...@@ -208,7 +208,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -208,7 +208,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case OPEN_BUTTON:{ case OPEN_BUTTON:{
QToolButton *openButton = new QToolButton( this ); QToolButton *openButton = new QToolButton;
setupButton( openButton ); setupButton( openButton );
CONNECT_MAP_SET( openButton, OPEN_ACTION ); CONNECT_MAP_SET( openButton, OPEN_ACTION );
BUTTON_SET_BAR( openButton ); BUTTON_SET_BAR( openButton );
...@@ -216,7 +216,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -216,7 +216,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case PREVIOUS_BUTTON:{ case PREVIOUS_BUTTON:{
QToolButton *prevButton = new QToolButton( this ); QToolButton *prevButton = new QToolButton;
setupButton( prevButton ); setupButton( prevButton );
CONNECT_MAP_SET( prevButton, PREVIOUS_ACTION ); CONNECT_MAP_SET( prevButton, PREVIOUS_ACTION );
BUTTON_SET_BAR( prevButton ); BUTTON_SET_BAR( prevButton );
...@@ -225,7 +225,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -225,7 +225,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
break; break;
case NEXT_BUTTON: case NEXT_BUTTON:
{ {
QToolButton *nextButton = new QToolButton( this ); QToolButton *nextButton = new QToolButton;
setupButton( nextButton ); setupButton( nextButton );
CONNECT_MAP_SET( nextButton, NEXT_ACTION ); CONNECT_MAP_SET( nextButton, NEXT_ACTION );
BUTTON_SET_BAR( nextButton ); BUTTON_SET_BAR( nextButton );
...@@ -233,7 +233,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -233,7 +233,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case SLOWER_BUTTON:{ case SLOWER_BUTTON:{
QToolButton *slowerButton = new QToolButton( this ); QToolButton *slowerButton = new QToolButton;
setupButton( slowerButton ); setupButton( slowerButton );
CONNECT_MAP_SET( slowerButton, SLOWER_ACTION ); CONNECT_MAP_SET( slowerButton, SLOWER_ACTION );
BUTTON_SET_BAR( slowerButton ); BUTTON_SET_BAR( slowerButton );
...@@ -242,7 +242,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -242,7 +242,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case FASTER_BUTTON:{ case FASTER_BUTTON:{
QToolButton *fasterButton = new QToolButton( this ); QToolButton *fasterButton = new QToolButton;
setupButton( fasterButton ); setupButton( fasterButton );
CONNECT_MAP_SET( fasterButton, FASTER_ACTION ); CONNECT_MAP_SET( fasterButton, FASTER_ACTION );
BUTTON_SET_BAR( fasterButton ); BUTTON_SET_BAR( fasterButton );
...@@ -251,7 +251,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -251,7 +251,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case FRAME_BUTTON: { case FRAME_BUTTON: {
QToolButton *frameButton = new QToolButton( this ); QToolButton *frameButton = new QToolButton;
setupButton( frameButton ); setupButton( frameButton );
CONNECT_MAP_SET( frameButton, FRAME_ACTION ); CONNECT_MAP_SET( frameButton, FRAME_ACTION );
BUTTON_SET_BAR( frameButton ); BUTTON_SET_BAR( frameButton );
...@@ -260,7 +260,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -260,7 +260,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case FULLSCREEN_BUTTON:{ case FULLSCREEN_BUTTON:{
QToolButton *fullscreenButton = new QToolButton( this ); QToolButton *fullscreenButton = new QToolButton;
setupButton( fullscreenButton ); setupButton( fullscreenButton );
CONNECT_MAP_SET( fullscreenButton, FULLSCREEN_ACTION ); CONNECT_MAP_SET( fullscreenButton, FULLSCREEN_ACTION );
BUTTON_SET_BAR( fullscreenButton ); BUTTON_SET_BAR( fullscreenButton );
...@@ -269,7 +269,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -269,7 +269,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case DEFULLSCREEN_BUTTON:{ case DEFULLSCREEN_BUTTON:{
QToolButton *fullscreenButton = new QToolButton( this ); QToolButton *fullscreenButton = new QToolButton;
setupButton( fullscreenButton ); setupButton( fullscreenButton );
CONNECT_MAP_SET( fullscreenButton, FULLSCREEN_ACTION ); CONNECT_MAP_SET( fullscreenButton, FULLSCREEN_ACTION );
BUTTON_SET_BAR( fullscreenButton ) BUTTON_SET_BAR( fullscreenButton )
...@@ -278,7 +278,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -278,7 +278,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case EXTENDED_BUTTON:{ case EXTENDED_BUTTON:{
QToolButton *extSettingsButton = new QToolButton( this ); QToolButton *extSettingsButton = new QToolButton;
setupButton( extSettingsButton ); setupButton( extSettingsButton );
CONNECT_MAP_SET( extSettingsButton, EXTENDED_ACTION ); CONNECT_MAP_SET( extSettingsButton, EXTENDED_ACTION );
BUTTON_SET_BAR( extSettingsButton ) BUTTON_SET_BAR( extSettingsButton )
...@@ -286,7 +286,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -286,7 +286,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case PLAYLIST_BUTTON:{ case PLAYLIST_BUTTON:{
QToolButton *playlistButton = new QToolButton( this ); QToolButton *playlistButton = new QToolButton;
setupButton( playlistButton ); setupButton( playlistButton );
CONNECT_MAP_SET( playlistButton, PLAYLIST_ACTION ); CONNECT_MAP_SET( playlistButton, PLAYLIST_ACTION );
BUTTON_SET_BAR( playlistButton ); BUTTON_SET_BAR( playlistButton );
...@@ -294,7 +294,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -294,7 +294,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case SNAPSHOT_BUTTON:{ case SNAPSHOT_BUTTON:{
QToolButton *snapshotButton = new QToolButton( this ); QToolButton *snapshotButton = new QToolButton;
setupButton( snapshotButton ); setupButton( snapshotButton );
CONNECT_MAP_SET( snapshotButton, SNAPSHOT_ACTION ); CONNECT_MAP_SET( snapshotButton, SNAPSHOT_ACTION );
BUTTON_SET_BAR( snapshotButton ); BUTTON_SET_BAR( snapshotButton );
...@@ -303,7 +303,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -303,7 +303,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case RECORD_BUTTON:{ case RECORD_BUTTON:{
QToolButton *recordButton = new QToolButton( this ); QToolButton *recordButton = new QToolButton;
setupButton( recordButton ); setupButton( recordButton );
CONNECT_MAP_SET( recordButton, RECORD_ACTION ); CONNECT_MAP_SET( recordButton, RECORD_ACTION );
BUTTON_SET_BAR( recordButton ); BUTTON_SET_BAR( recordButton );
...@@ -315,7 +315,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -315,7 +315,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case ATOB_BUTTON: { case ATOB_BUTTON: {
AtoB_Button *ABButton = new AtoB_Button( this ); AtoB_Button *ABButton = new AtoB_Button;
setupButton( ABButton ); setupButton( ABButton );
BUTTON_SET_BAR( ABButton ); BUTTON_SET_BAR( ABButton );
ENABLE_ON_INPUT( ABButton ); ENABLE_ON_INPUT( ABButton );
...@@ -361,7 +361,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -361,7 +361,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
break; break;
case SPLITTER: case SPLITTER:
{ {
QFrame *line = new QFrame( this ); QFrame *line = new QFrame;
line->setFrameShape( QFrame::VLine ); line->setFrameShape( QFrame::VLine );
line->setFrameShadow( QFrame::Raised ); line->setFrameShadow( QFrame::Raised );
line->setLineWidth( 0 ); line->setLineWidth( 0 );
...@@ -376,7 +376,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -376,7 +376,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case REVERSE_BUTTON:{ case REVERSE_BUTTON:{
QToolButton *reverseButton = new QToolButton( this ); QToolButton *reverseButton = new QToolButton;
setupButton( reverseButton ); setupButton( reverseButton );
CONNECT_MAP_SET( reverseButton, REVERSE_ACTION ); CONNECT_MAP_SET( reverseButton, REVERSE_ACTION );
BUTTON_SET_BAR( reverseButton ); BUTTON_SET_BAR( reverseButton );
...@@ -385,7 +385,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -385,7 +385,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case SKIP_BACK_BUTTON: { case SKIP_BACK_BUTTON: {
QToolButton *skipBakButton = new QToolButton( this ); QToolButton *skipBakButton = new QToolButton;
setupButton( skipBakButton ); setupButton( skipBakButton );
CONNECT_MAP_SET( skipBakButton, SKIP_BACK_ACTION ); CONNECT_MAP_SET( skipBakButton, SKIP_BACK_ACTION );
BUTTON_SET_BAR( skipBakButton ); BUTTON_SET_BAR( skipBakButton );
...@@ -394,7 +394,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -394,7 +394,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case SKIP_FW_BUTTON: { case SKIP_FW_BUTTON: {
QToolButton *skipFwButton = new QToolButton( this ); QToolButton *skipFwButton = new QToolButton;
setupButton( skipFwButton ); setupButton( skipFwButton );
CONNECT_MAP_SET( skipFwButton, SKIP_FW_ACTION ); CONNECT_MAP_SET( skipFwButton, SKIP_FW_ACTION );
BUTTON_SET_BAR( skipFwButton ); BUTTON_SET_BAR( skipFwButton );
...@@ -403,7 +403,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options ) ...@@ -403,7 +403,7 @@ QWidget *AbstractController::createWidget( buttonType_e button, int options )
} }
break; break;
case QUIT_BUTTON: { case QUIT_BUTTON: {
QToolButton *quitButton = new QToolButton( this ); QToolButton *quitButton = new QToolButton;
setupButton( quitButton ); setupButton( quitButton );
CONNECT_MAP_SET( quitButton, QUIT_ACTION ); CONNECT_MAP_SET( quitButton, QUIT_ACTION );
BUTTON_SET_BAR( quitButton ); BUTTON_SET_BAR( quitButton );
...@@ -623,8 +623,8 @@ InputControlsWidget::InputControlsWidget( intf_thread_t *_p_i, QWidget *_parent ...@@ -623,8 +623,8 @@ InputControlsWidget::InputControlsWidget( intf_thread_t *_p_i, QWidget *_parent
/********************************************************************** /**********************************************************************
* Fullscrenn control widget * Fullscrenn control widget
**********************************************************************/ **********************************************************************/
FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i, QWidget *parent ) FullscreenControllerWidget::FullscreenControllerWidget( intf_thread_t *_p_i )
: AbstractController( _p_i, parent ) : AbstractController( _p_i )
{ {
i_mouse_last_x = -1; i_mouse_last_x = -1;
i_mouse_last_y = -1; i_mouse_last_y = -1;
......
...@@ -227,7 +227,7 @@ class FullscreenControllerWidget : public AbstractController ...@@ -227,7 +227,7 @@ class FullscreenControllerWidget : public AbstractController
{ {
Q_OBJECT Q_OBJECT
public: public:
FullscreenControllerWidget( intf_thread_t *, QWidget *parent ); FullscreenControllerWidget( intf_thread_t * );
virtual ~FullscreenControllerWidget(); virtual ~FullscreenControllerWidget();
/* Vout */ /* Vout */
......
...@@ -51,8 +51,6 @@ class QAbstractSlider; ...@@ -51,8 +51,6 @@ class QAbstractSlider;
class PlayButton : public QToolButton class PlayButton : public QToolButton
{ {
Q_OBJECT Q_OBJECT
public:
PlayButton( QWidget *parent ) : QToolButton( parent ) { }
private slots: private slots:
void updateButton( bool ); void updateButton( bool );
}; };
...@@ -60,8 +58,6 @@ private slots: ...@@ -60,8 +58,6 @@ private slots:
class AtoB_Button : public QToolButton class AtoB_Button : public QToolButton
{ {
Q_OBJECT Q_OBJECT
public:
AtoB_Button( QWidget *parent ) : QToolButton( parent ) { }
private slots: private slots:
void setIcons( bool, bool ); void setIcons( bool, bool );
}; };
......
...@@ -436,7 +436,7 @@ void MainInterface::handleMainUi( QSettings *settings ) ...@@ -436,7 +436,7 @@ void MainInterface::handleMainUi( QSettings *settings )
/* Create the FULLSCREEN CONTROLS Widget */ /* Create the FULLSCREEN CONTROLS Widget */
if( config_GetInt( p_intf, "qt-fs-controller" ) ) if( config_GetInt( p_intf, "qt-fs-controller" ) )
{ {
fullscreenControls = new FullscreenControllerWidget( p_intf, this ); fullscreenControls = new FullscreenControllerWidget( p_intf );
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment