[vlc-commits] Qt: QString::toAscii has been deprecated in Qt5

Ludovic Fauvet git at videolan.org
Fri Jul 19 12:53:25 CEST 2013


vlc/vlc-2.1 | branch: master | Ludovic Fauvet <etix at videolan.org> | Mon Jul 15 11:43:21 2013 +0200| [9a58a2f0f87afd8c510cb04967c4bf881ba2f3a3] | committer: Jean-Baptiste Kempf

Qt: QString::toAscii has been deprecated in Qt5

(cherry picked from commit 8cecc7beb384fd637ce342c6a1a667842621c2e4)
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/gui/qt4/components/playlist/standardpanel.cpp |    2 +-
 modules/gui/qt4/components/sout/profile_selector.cpp  |   10 +++++-----
 modules/gui/qt4/components/sout/sout_widgets.cpp      |    2 +-
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/modules/gui/qt4/components/playlist/standardpanel.cpp b/modules/gui/qt4/components/playlist/standardpanel.cpp
index df03917..0a2b3f2 100644
--- a/modules/gui/qt4/components/playlist/standardpanel.cpp
+++ b/modules/gui/qt4/components/playlist/standardpanel.cpp
@@ -345,7 +345,7 @@ void StandardPLPanel::popupExplore()
     char *path = NULL;
 
     if( ! uri.isEmpty() )
-        path = make_path( uri.toAscii().constData() );
+        path = make_path( uri.toLatin1().constData() );
 
     if( path == NULL )
         return;
diff --git a/modules/gui/qt4/components/sout/profile_selector.cpp b/modules/gui/qt4/components/sout/profile_selector.cpp
index 5f5756d..0a5ec7d 100644
--- a/modules/gui/qt4/components/sout/profile_selector.cpp
+++ b/modules/gui/qt4/components/sout/profile_selector.cpp
@@ -250,7 +250,7 @@ void VLCProfileSelector::updateOptions( int i )
             HASHPICK( "video", "filters" );
             if ( !value.isEmpty() )
             {
-                QStringList valuesList = QUrl::fromPercentEncoding( value.toAscii() ).split( ";" );
+                QStringList valuesList = QUrl::fromPercentEncoding( value.toLatin1() ).split( ";" );
                 smrl.option( "vfilter", valuesList.join( ":" ) );
             }
 
@@ -265,7 +265,7 @@ void VLCProfileSelector::updateOptions( int i )
 
                 HASHPICK( "vcodec", "custom" );
                 if( !value.isEmpty() )
-                    codecoptions << QUrl::fromPercentEncoding( value.toAscii() );
+                    codecoptions << QUrl::fromPercentEncoding( value.toLatin1() );
 
                 if ( codecoptions.count() )
                     smrl.option( "venc",
@@ -316,7 +316,7 @@ void VLCProfileSelector::updateOptions( int i )
             HASHPICK( "audio", "filters" );
             if ( !value.isEmpty() )
             {
-                QStringList valuesList = QUrl::fromPercentEncoding( value.toAscii() ).split( ";" );
+                QStringList valuesList = QUrl::fromPercentEncoding( value.toLatin1() ).split( ";" );
                 smrl.option( "afilter", valuesList.join( ":" ) );
             }
 
@@ -679,11 +679,11 @@ void VLCProfileEditor::fillProfile( const QString& qs )
             else if( object->inherits( "QLineEdit" ) )
             {
                 QLineEdit *box = qobject_cast<QLineEdit *>( object );
-                box->setText( QUrl::fromPercentEncoding( value.toAscii() ) );
+                box->setText( QUrl::fromPercentEncoding( value.toLatin1() ) );
             }
             else if ( object->inherits( "QListWidget" ) )
             {
-                QStringList valuesList = QUrl::fromPercentEncoding( value.toAscii() ).split( ";" );
+                QStringList valuesList = QUrl::fromPercentEncoding( value.toLatin1() ).split( ";" );
                 const QListWidget *list = qobject_cast<const QListWidget *>( object );
                 for( int i=0; i < list->count(); i++ )
                 {
diff --git a/modules/gui/qt4/components/sout/sout_widgets.cpp b/modules/gui/qt4/components/sout/sout_widgets.cpp
index 6770a02..8b0fc12 100644
--- a/modules/gui/qt4/components/sout/sout_widgets.cpp
+++ b/modules/gui/qt4/components/sout/sout_widgets.cpp
@@ -69,7 +69,7 @@ SoutInputBox::SoutInputBox( QWidget *_parent, const QString& mrl ) : QGroupBox(
 
 void SoutInputBox::setMRL( const QString& mrl )
 {
-    QUrl uri = QUrl::fromEncoded( mrl.toAscii() );
+    QUrl uri = QUrl::fromEncoded( mrl.toLatin1() );
     sourceLine->setText( uri.toString() );
     QString type = uri.scheme();
     if ( type.isEmpty() ) type = qtr( I_FILE_SLASH_DIR );



More information about the vlc-commits mailing list