Commit 214fca41 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Qt4 - MediaInfoPanel, fix a segfault and don't clear() everytime you update...

Qt4 - MediaInfoPanel, fix a segfault and don't clear() everytime you update and there is no input. :D
parent 099d9779
......@@ -288,7 +288,8 @@ void MetaPanel::saveMeta()
PL_UNLOCK;
pl_Release( p_playlist );
/* Reset the status of the mode. No need to emit any signal */
/* Reset the status of the mode. No need to emit any signal because parent
is the only caller */
b_inEditMode = false;
}
......@@ -300,6 +301,7 @@ bool MetaPanel::isInEditMode()
void MetaPanel::enterEditMode()
{
msg_Dbg( p_intf, "Entering Edit MetaData Mode" );
setEditMode( true );
}
......@@ -314,7 +316,6 @@ void MetaPanel::setEditMode( bool b_editing )
*/
void MetaPanel::clear()
{
uri_text->clear();
title_text->clear();
artist_text->clear();
genre_text->clear();
......
......@@ -64,7 +64,6 @@ private:
intf_thread_t *p_intf;
bool b_inEditMode;
QLineEdit *uri_text;
QLineEdit *title_text;
QLineEdit *artist_text;
QLineEdit *genre_text;
......
......@@ -45,6 +45,7 @@ MediaInfoDialog::MediaInfoDialog( intf_thread_t *_p_intf,
i_runs = 0;
p_item = _p_item;
b_need_update = true;
b_cleaned = true;
setWindowTitle( qtr( "Media information" ) );
resize( 600 , 480 );
......@@ -142,7 +143,11 @@ void MediaInfoDialog::updateOnTimeOut()
input_thread_t *p_input = THEMIM->getInput();
if( !p_input || p_input->b_dead )
{
clear();
if( !b_cleaned )
{
clear();
b_cleaned = true;
}
return;
}
......@@ -151,6 +156,7 @@ void MediaInfoDialog::updateOnTimeOut()
update( input_GetItem(p_input), b_need_update, b_need_update );
b_need_update = false;
b_cleaned = false;
vlc_object_release( p_input );
}
......@@ -176,6 +182,7 @@ void MediaInfoDialog::clear()
MP->clear();
EMP->clear();
if( stats ) ISP->clear();
b_cleaned = true;
}
void MediaInfoDialog::close()
......
......@@ -71,6 +71,7 @@ private:
int i_runs;
bool mainInput;
bool stats;
bool b_cleaned;
QTabWidget *IT;
InputStatsPanel *ISP;
......
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