Browse Source

Qt4 - MediaInfoPanel, fix a segfault and don't clear() everytime you update and there is no input. :D

pull/2/head
Jean-Baptiste Kempf 19 years ago
parent
commit
214fca415a
  1. 5
      modules/gui/qt4/components/info_panels.cpp
  2. 1
      modules/gui/qt4/components/info_panels.hpp
  3. 9
      modules/gui/qt4/dialogs/mediainfo.cpp
  4. 1
      modules/gui/qt4/dialogs/mediainfo.hpp

5
modules/gui/qt4/components/info_panels.cpp

@ -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();

1
modules/gui/qt4/components/info_panels.hpp

@ -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;

9
modules/gui/qt4/dialogs/mediainfo.cpp

@ -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()

1
modules/gui/qt4/dialogs/mediainfo.hpp

@ -71,6 +71,7 @@ private:
int i_runs;
bool mainInput;
bool stats;
bool b_cleaned;
QTabWidget *IT;
InputStatsPanel *ISP;

Loading…
Cancel
Save