[vlc-devel] commit: Qt4 sout: convert option to UTF-8 once, not twice (fixes: #3077) ( Rémi Denis-Courmont )

git version control git at videolan.org
Sat Oct 17 11:08:27 CEST 2009


vlc | branch: 1.0-bugfix | Rémi Denis-Courmont <remi at remlab.net> | Sat Oct 17 12:07:15 2009 +0300| [dde5125e3626d2891b3a7e763e7d1ba23f894121] | committer: Rémi Denis-Courmont 

Qt4 sout: convert option to UTF-8 once, not twice (fixes: #3077)
(cherry picked from commit 67bb9babf9eb1479f32c58dc84089d41ef360f1b)

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=dde5125e3626d2891b3a7e763e7d1ba23f894121
---

 modules/gui/qt4/dialogs_provider.cpp |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/modules/gui/qt4/dialogs_provider.cpp b/modules/gui/qt4/dialogs_provider.cpp
index c39bb2f..89cd76c 100644
--- a/modules/gui/qt4/dialogs_provider.cpp
+++ b/modules/gui/qt4/dialogs_provider.cpp
@@ -569,7 +569,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
                                        bool b_transcode_only,
                                        QStringList options )
 {
-    char *psz_soutoption;
+    QString soutoption;
 
     /* Stream */
     if( !b_transcode_only )
@@ -577,7 +577,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
         SoutDialog *s = new SoutDialog( parent, p_intf, mrl );
         if( s->exec() == QDialog::Accepted )
         {
-            psz_soutoption = strdup( qtu( s->getMrl() ) );
+            soutoption = s->getMrl();
             delete s;
         }
         else
@@ -589,7 +589,7 @@ void DialogsProvider::streamingDialog( QWidget *parent,
         ConvertDialog *s = new ConvertDialog( parent, p_intf, mrl );
         if( s->exec() == QDialog::Accepted )
         {
-            psz_soutoption = strdup( qtu( s->getMrl() ) );
+            soutoption = s->getMrl();
             delete s;
         }
         else
@@ -599,9 +599,9 @@ void DialogsProvider::streamingDialog( QWidget *parent,
     }
 
     /* Get SoutMRL */
-    if( !EMPTY_STR( psz_soutoption ) )
+    if( !soutoption.isEmpty() )
     {
-        options += QString( psz_soutoption ).split( " :");
+        options += soutoption.split( " :");
 
         /* Create Input */
         input_item_t *p_input;
@@ -627,7 +627,6 @@ void DialogsProvider::streamingDialog( QWidget *parent,
 
         RecentsMRL::getInstance( p_intf )->addRecent( mrl );
     }
-    free( psz_soutoption );
 }
 
 void DialogsProvider::openAndStreamingDialogs()




More information about the vlc-devel mailing list