[vlmc-devel] commit: Removing references to QString::toStdString ( Hugo Beauzée-Luyssen )

git at videolan.org git at videolan.org
Mon Sep 6 16:15:58 CEST 2010


vlmc | branch: master | Hugo Beauzée-Luyssen <beauze.h at gmail.com> | Mon Sep  6 16:15:42 2010 +0200| [988154888659312dd7a02e78a8c5c699f08927ca] | committer: Hugo Beauzée-Luyssen 

Removing references to QString::toStdString

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=988154888659312dd7a02e78a8c5c699f08927ca
---

 src/Media/Media.cpp                   |    6 +++---
 src/Media/Transcoder.cpp              |    2 +-
 src/Metadata/MetaDataWorker.cpp       |    2 +-
 src/Project/WorkspaceWorker.cpp       |    4 ++--
 src/Renderer/WorkflowFileRenderer.cpp |    2 +-
 5 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/Media/Media.cpp b/src/Media/Media.cpp
index f225fd3..8b37d5b 100644
--- a/src/Media/Media.cpp
+++ b/src/Media/Media.cpp
@@ -107,20 +107,20 @@ void        Media::flushVolatileParameters()
     QString     defaultValue;
     foreach ( defaultValue, m_volatileParameters )
     {
-        m_vlcMedia->addOption( defaultValue.toStdString().c_str() );
+        m_vlcMedia->addOption( defaultValue.toUtf8().constData() );
     }
     m_volatileParameters.clear();
 }
 
 void        Media::addVolatileParam( const QString& param, const QString& defaultValue )
 {
-    m_vlcMedia->addOption( param.toStdString().c_str() );
+    m_vlcMedia->addOption( param.toUtf8().constData() );
     m_volatileParameters.append( defaultValue );
 }
 
 void        Media::addConstantParam( const QString& param )
 {
-    m_vlcMedia->addOption( param.toStdString().c_str() );
+    m_vlcMedia->addOption( param.toUtf8().constData() );
 }
 
 const QFileInfo*    Media::fileInfo() const
diff --git a/src/Media/Transcoder.cpp b/src/Media/Transcoder.cpp
index ca0e4e2..c564554 100644
--- a/src/Media/Transcoder.cpp
+++ b/src/Media/Transcoder.cpp
@@ -50,7 +50,7 @@ Transcoder::transcodeToPs()
         outputDir = m_media->fileInfo()->absolutePath();
     m_destinationFile = outputDir + '/' + m_media->fileInfo()->baseName() + ".ps";
     QString         option = ":sout=file://" + m_destinationFile;
-    media->addOption( option.toStdString().c_str() );
+    media->addOption( option.toUtf8().constData() );
     LibVLCpp::MediaPlayer   *mp = new LibVLCpp::MediaPlayer( media );
     connect( mp, SIGNAL( positionChanged( float ) ), this, SIGNAL( progress( float ) ) );
     connect( mp, SIGNAL( endReached() ), this, SLOT( transcodeFinished() ) );
diff --git a/src/Metadata/MetaDataWorker.cpp b/src/Metadata/MetaDataWorker.cpp
index cfc0db9..94eafc1 100644
--- a/src/Metadata/MetaDataWorker.cpp
+++ b/src/Metadata/MetaDataWorker.cpp
@@ -171,7 +171,7 @@ MetaDataWorker::renderSnapshot()
              this, SLOT( setSnapshot( const char* ) ), Qt::QueuedConnection );
 
     //The slot should be triggered in this methode
-    m_mediaPlayer->takeSnapshot( tmp.fileName().toStdString().c_str(), 0, 0 );
+    m_mediaPlayer->takeSnapshot( tmp.fileName().toUtf8().constData(), 0, 0 );
     //Snapshot slot should has been called (but maybe not in next version...)
 }
 
diff --git a/src/Project/WorkspaceWorker.cpp b/src/Project/WorkspaceWorker.cpp
index 1ae5a0b..377b87c 100644
--- a/src/Project/WorkspaceWorker.cpp
+++ b/src/Project/WorkspaceWorker.cpp
@@ -44,8 +44,8 @@ WorkspaceWorker::run()
     bool            hardLinkOk = false;
 
 #ifdef Q_OS_UNIX
-    if ( link( m_media->fileInfo()->absoluteFilePath().toStdString().c_str(),
-          m_dest.toStdString().c_str() ) < 0 )
+    if ( link( m_media->fileInfo()->absoluteFilePath().toUtf8().constData(),
+          m_dest.toUtf8().constData() ) < 0 )
     {
         qDebug() << "Can't create hard link:" << strerror(errno) << "falling back to"
                 " hard copy mode.";
diff --git a/src/Renderer/WorkflowFileRenderer.cpp b/src/Renderer/WorkflowFileRenderer.cpp
index e27a4c4..0b65334 100644
--- a/src/Renderer/WorkflowFileRenderer.cpp
+++ b/src/Renderer/WorkflowFileRenderer.cpp
@@ -56,7 +56,7 @@ void        WorkflowFileRenderer::run( const QString& outputFileName, quint32 wi
                                ",no-hurry-up}"
                                ":standard{access=file,mux=ps,dst=\""
                           + outputFileName + "\"}";
-    m_media->addOption( transcodeStr.toStdString().c_str() );
+    m_media->addOption( transcodeStr.toUtf8().constData() );
 
     m_mediaPlayer->setMedia( m_media );
 



More information about the Vlmc-devel mailing list