[vlc-commits] Qt4: fix encoding of recent menu text
Rémi Denis-Courmont
git at videolan.org
Wed Nov 23 21:24:13 CET 2011
vlc | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Nov 23 22:23:54 2011 +0200| [b7e56314b287a5a9ef4f655548be955cd88b1d30] | committer: Rémi Denis-Courmont
Qt4: fix encoding of recent menu text
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=b7e56314b287a5a9ef4f655548be955cd88b1d30
---
modules/gui/qt4/menus.cpp | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/modules/gui/qt4/menus.cpp b/modules/gui/qt4/menus.cpp
index 77e7988..f85e515 100644
--- a/modules/gui/qt4/menus.cpp
+++ b/modules/gui/qt4/menus.cpp
@@ -1518,16 +1518,18 @@ void QVLCMenu::updateRecents( intf_thread_t *p_intf )
{
for( int i = 0; i < l.count(); ++i )
{
- char *psz_temp = decode_URI_duplicate( qtu( l.at( i ) ) );
+ QString mrl = l.at( i );
+ char *psz = decode_URI_duplicate( qtu( mrl ) );
+ QString text = qfu( psz );
+ free( psz );
action = recentsMenu->addAction(
QString( i < 9 ? "&%1: ": "%1: " ).arg( i + 1 ) +
- QApplication::fontMetrics().elidedText( psz_temp, Qt::ElideLeft, 400 ),
+ QApplication::fontMetrics().elidedText( text,
+ Qt::ElideLeft, 400 ),
rmrl->signalMapper, SLOT( map() ),
i < 9 ? QString( "Ctrl+%1" ).arg( i + 1 ) : "" );
rmrl->signalMapper->setMapping( action, l.at( i ) );
-
- free( psz_temp );
}
recentsMenu->addSeparator();
More information about the vlc-commits
mailing list