vlc/vlc-2.0 | branch: master | Jean-Baptiste Kempf <[email protected]> | Wed Feb 8 12:39:34 2012 +0100| [3619b74b9a70e9ce6c493980d160d68dc48c8c81] | committer: Jean-Baptiste Kempf
Qt: use the new function to factorize code Signed-off-by: Jean-Baptiste Kempf <[email protected]> (cherry picked from commit 720302118212288eb27eb31f077253b5dd2e83ae) Signed-off-by: Jean-Baptiste Kempf <[email protected]> > http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=3619b74b9a70e9ce6c493980d160d68dc48c8c81 --- modules/gui/qt4/components/preferences_widgets.cpp | 18 ++++-------------- 1 files changed, 4 insertions(+), 14 deletions(-) diff --git a/modules/gui/qt4/components/preferences_widgets.cpp b/modules/gui/qt4/components/preferences_widgets.cpp index 5c0ed71..858431d 100644 --- a/modules/gui/qt4/components/preferences_widgets.cpp +++ b/modules/gui/qt4/components/preferences_widgets.cpp @@ -725,20 +725,10 @@ ModuleListConfigControl::~ModuleListConfigControl() void ModuleListConfigControl::checkbox_lists( module_t *p_parser ) { - QCheckBox *cb = new QCheckBox( qtr( module_GetLongName( p_parser ) ) ); - checkBoxListItem *cbl = new checkBoxListItem; - - CONNECT( cb, stateChanged( int ), this, onUpdate() ); - const char *help = module_get_help( p_parser ); - if( help != NULL ) - cb->setToolTip( formatTooltip( qtr( help ) ) ); - cbl->checkBox = cb; - - cbl->psz_module = strdup( module_get_object( p_parser ) ); - modules.append( cbl ); - - if( p_item->value.psz && strstr( p_item->value.psz, cbl->psz_module ) ) \ - cbl->checkBox->setChecked( true ); + const char *help = module_get_help( p_parser ); + checkbox_lists( qtr( module_GetLongName( p_parser ) ), + help != NULL ? qtr( help ): "", + module_get_object( p_parser ) ); } void ModuleListConfigControl::checkbox_lists( QString label, QString help, const char* psz_module ) _______________________________________________ vlc-commits mailing list [email protected] http://mailman.videolan.org/listinfo/vlc-commits
