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

Ludovic Fauvet git at videolan.org
Mon Jul 15 16:56:48 CEST 2013


vlc | branch: master | Ludovic Fauvet <etix at videolan.org> | Mon Jul 15 11:43:21 2013 +0200| [8cecc7beb384fd637ce342c6a1a667842621c2e4] | committer: Ludovic Fauvet

Qt: QString::toAscii has been deprecated in Qt5

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

 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