static OpenDialog * getInstance( QWidget *parent, intf_thread_t *p_intf,
int _action_flag = 0, bool modal = false );
+ static void killInstance()
+ {
+ if( instance ) delete instance;
+ instance = NULL;
+ }
virtual ~OpenDialog();
void showTab( int );
static void killInstance()
{
if( instance ) delete instance;
- instance=NULL;
+ instance = NULL;
}
virtual ~DialogsProvider();
QTimer *fixed_timer;
delInput();
return;
}
-
IMEvent *ime = static_cast<IMEvent *>(event);
i_rate = i_new_rate;
/* Update rate */
emit rateChanged( i_rate );
- }
+ }
}
void InputManager::UpdateMeta( void )
MainInputManager::~MainInputManager()
{
- if( p_input )
- {
+ if( p_input )
+ {
vlc_object_release( p_input );
emit inputChanged( NULL );
}
emit volumeChanged();
return;
}
-
+
if( VLC_OBJECT_INTF == p_intf->i_object_type )
{
vlc_mutex_lock( &p_intf->change_lock );
void MainInterface::closeEvent( QCloseEvent *e )
{
hide();
- vlc_object_kill( p_intf );
- QApplication::closeAllWindows();
- QApplication::quit();
+ THEDP->quit();
}
/*****************************************************************************
p_mi->show();
}
else
- /*if( p_intf->pf_show_dialog )*/
vlc_thread_ready( p_intf );
#ifdef ENABLE_NLS
app->exec();
/* And quit */
- MainInputManager::killInstance();
+
+ /* Destroy first the main interface because it is connected to some slots
+ in the MainInputManager */
+ if( p_intf->p_sys->p_mi ) delete p_intf->p_sys->p_mi;
+
+ /* Destroy then other windows, because some are connected to some slots
+ in the MainInputManager */
DialogsProvider::killInstance();
+
+ /* Destroy the MainInputManager */
+ MainInputManager::killInstance();
+
delete app;
}