Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/modules/gui/qt4/components/info_panels.cpp b/modules/gui/qt4/components/info_panels.cpp
- index 849c7cd..b670c80 100644
- --- a/modules/gui/qt4/components/info_panels.cpp
- +++ b/modules/gui/qt4/components/info_panels.cpp
- @@ -572,11 +572,13 @@ void InputStatsPanel::update( input_item_t *p_item )
- assert( p_item );
- vlc_mutex_lock( &p_item->p_stats->lock );
- +#undef sprintf
- #define UPDATE_INT( widget, calc... ) \
- { widget->setText( 1, QString::number( (qulonglong)calc ) ); }
- #define UPDATE_FLOAT( widget, format, calc... ) \
- - { QString str; widget->setText( 1 , str.sprintf( format, ## calc ) ); }
- + { char str[40]; snprintf(str, sizeof(str), format, ##calc); widget->setText(1, str); }
- + //{ QString str; widget->setText( 1 , str.sprintf( format, ## calc ) ); }
- UPDATE_INT( read_media_stat, (p_item->p_stats->i_read_bytes / 1024 ) );
- UPDATE_FLOAT( input_bitrate_stat, "%6.0f", (float)(p_item->p_stats->f_input_bitrate * 8000 ));
- diff --git a/modules/gui/qt4/components/simple_preferences.cpp b/modules/gui/qt4/components/simple_preferences.cpp
- index b79dcb5..2c02133 100644
- --- a/modules/gui/qt4/components/simple_preferences.cpp
- +++ b/modules/gui/qt4/components/simple_preferences.cpp
- @@ -887,7 +887,7 @@ void SPrefsPanel::assoDialog()
- if( S_OK == CoCreateInstance( &clsid_IApplication2,
- NULL, CLSCTX_INPROC_SERVER,
- - &IID_IApplicationAssociationRegistrationUI,
- + IID_IApplicationAssociationRegistrationUI,
- (void **)&p_appassoc) )
- {
- if(S_OK == p_appassoc->vt->LaunchAdvancedAssociationUI(p_appassoc, L"VLC" ) )
- diff --git a/modules/gui/qt4/dialogs/bookmarks.cpp b/modules/gui/qt4/dialogs/bookmarks.cpp
- index fa0ccd0..e02c0f4 100644
- --- a/modules/gui/qt4/dialogs/bookmarks.cpp
- +++ b/modules/gui/qt4/dialogs/bookmarks.cpp
- @@ -130,8 +130,10 @@ void BookmarksDialog::update()
- int hour = total / (60*60);
- int min = (total - hour*60*60) / 60;
- int sec = total - hour*60*60 - min*60;
- - QString str;
- - row << str.sprintf("%02d:%02d:%02d", hour, min, sec );
- + char str[40];
- + snprintf(str, sizeof(str), "%02d:%02d:%02d", hour, min, sec );
- + //QString str;
- + row << str; //str.sprintf("%02d:%02d:%02d", hour, min, sec );
- QTreeWidgetItem *item = new QTreeWidgetItem( bookmarksList, row );
- item->setFlags( Qt::ItemIsSelectable | Qt::ItemIsEditable |
- Qt::ItemIsUserCheckable | Qt::ItemIsEnabled);
- diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
- index 3c2b403..1ace3bf 100644
- --- a/modules/gui/qt4/menus.cpp
- +++ b/modules/gui/qt4/menus.cpp
- @@ -1409,7 +1409,12 @@ int QVLCMenu::CreateChoicesMenu( QMenu *submenu, const char *psz_var,
- case VLC_VAR_FLOAT:
- var_Get( p_object, psz_var, &val );
- if( CURTEXT ) menutext = qfu( CURTEXT );
- - else menutext.sprintf( "%.2f", CURVAL.f_float );
- + else {
- + char str[40];
- + snprintf(str, sizeof(str), "%.2f", CURVAL.f_float);
- + menutext = qfu(str);
- + }
- + //else menutext.sprintf( "%.2f", CURVAL.f_float );
- CreateAndConnect( submenu, psz_var, menutext, "", RADIO_OR_COMMAND,
- p_object, CURVAL, i_type,
- CURVAL.f_float == val.f_float );
Add Comment
Please, Sign In to add comment