Fix std::string to const char * conversion
This commit is contained in:
1 parent
d7e2a990f2
commit
d0e08ecbcc
4 files changed
+8
-8
No files matched your search
@@ -54,7 +54,7 @@ Void QualityHandle::createActions()
|
||||
QAction* currAction;
|
||||
for( UInt i = 0; i < PlaYUVerFrame::supportedQualityMetricsList().size(); i++ )
|
||||
{
|
||||
currAction = new QAction( PlaYUVerFrame::supportedQualityMetricsList()[i].data(), this );
|
||||
currAction = new QAction( PlaYUVerFrame::supportedQualityMetricsList()[i].c_str(), this );
|
||||
currAction->setCheckable( true );
|
||||
m_actionGroupQualityMetric->addAction( currAction );
|
||||
connect( currAction, SIGNAL( triggered() ), m_mapperQualityMetric, SLOT( map() ) );
|
||||
|
||||
@@ -51,7 +51,7 @@ QualityMeasurementSidebar::QualityMeasurementSidebar( QWidget* parent, PlaYUVerS
|
||||
m_comboBoxMetric = new QComboBox;
|
||||
for( UInt i=0; i<PlaYUVerFrame::supportedQualityMetricsList().size();i++ )
|
||||
{
|
||||
m_comboBoxMetric->insertItem( i, PlaYUVerFrame::supportedQualityMetricsList()[i].data() );
|
||||
m_comboBoxMetric->insertItem( i, PlaYUVerFrame::supportedQualityMetricsList()[i].c_str() );
|
||||
}
|
||||
m_comboBoxMetric->setSizeAdjustPolicy( QComboBox::AdjustToContents );
|
||||
m_comboBoxMetric->setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
|
||||
@@ -207,7 +207,7 @@ Void QualityMeasurementSidebar::updateSidebarData()
|
||||
Void QualityMeasurementSidebar::updateQualityMetric( Int idx )
|
||||
{
|
||||
m_comboBoxMetric->setCurrentIndex( idx );
|
||||
QString labelQuality( PlaYUVerFrame::supportedQualityMetricsList()[idx].data() );
|
||||
QString labelQuality( PlaYUVerFrame::supportedQualityMetricsList()[idx].c_str() );
|
||||
m_ppcLabelQualityLabel[LUMA]->setText( labelQuality + " Y" );
|
||||
m_ppcLabelQualityLabel[CHROMA_U]->setText( labelQuality + " U" );
|
||||
m_ppcLabelQualityLabel[CHROMA_V]->setText( labelQuality + " V" );
|
||||
|
||||
@@ -213,7 +213,7 @@ Void VideoSubWindow::updateVideoWindowInfo()
|
||||
{
|
||||
m_cStreamInformation = "Module | ";
|
||||
}
|
||||
QString m_cPelFmtName = QString::fromStdString( PlaYUVerFrame::supportedPixelFormatListNames()[m_pcCurrFrame->getPelFormat()].data() );
|
||||
QString m_cPelFmtName = QString::fromStdString( PlaYUVerFrame::supportedPixelFormatListNames()[m_pcCurrFrame->getPelFormat()].c_str() );
|
||||
m_cStreamInformation += m_cPelFmtName;
|
||||
}
|
||||
else
|
||||
@@ -236,7 +236,7 @@ Bool VideoSubWindow::guessFormat( QString filename, UInt& rWidth, UInt& rHeight,
|
||||
QVector<std::string> formats_list = QVector<std::string>::fromStdVector( PlaYUVerFrame::supportedPixelFormatListNames() );
|
||||
for( Int i = 0; i < formats_list.size(); i++ )
|
||||
{
|
||||
if( FilenameShort.contains( formats_list.at( i ).data(), Qt::CaseInsensitive ) )
|
||||
if( FilenameShort.contains( formats_list.at( i ).c_str(), Qt::CaseInsensitive ) )
|
||||
{
|
||||
rInputFormat = i;
|
||||
break;
|
||||
|
||||
@@ -267,7 +267,7 @@ Bool PlaYUVerStream::open( std::string filename, UInt width, UInt height, Int in
|
||||
#ifdef USE_FFMPEG
|
||||
if( m_uiStreamHandler == FFMPEG )
|
||||
{
|
||||
if( !m_cLibAvContext->initAvFormat( m_cFilename.data(), m_uiWidth, m_uiHeight, m_iPixelFormat, m_uiFrameRate, m_uiTotalFrameNum ) )
|
||||
if( !m_cLibAvContext->initAvFormat( m_cFilename.c_str(), m_uiWidth, m_uiHeight, m_iPixelFormat, m_uiFrameRate, m_uiTotalFrameNum ) )
|
||||
{
|
||||
throw "Cannot open file using FFmpeg libs";
|
||||
}
|
||||
@@ -341,7 +341,7 @@ Bool PlaYUVerStream::open( std::string filename, UInt width, UInt height, Int in
|
||||
return m_bInit;
|
||||
}
|
||||
|
||||
m_cPelFmtName = PlaYUVerFrame::supportedPixelFormatListNames()[m_iPixelFormat].data();
|
||||
m_cPelFmtName = PlaYUVerFrame::supportedPixelFormatListNames()[m_iPixelFormat].c_str();
|
||||
|
||||
m_iCurrFrameNum = -1;
|
||||
|
||||
@@ -356,7 +356,7 @@ Bool PlaYUVerStream::open( std::string filename, UInt width, UInt height, Int in
|
||||
Bool PlaYUVerStream::openFile()
|
||||
{
|
||||
m_pFile = NULL;
|
||||
m_pFile = fopen( m_cFilename.data(), m_bIsInput ? "rb" : "wb" );
|
||||
m_pFile = fopen( m_cFilename.c_str(), m_bIsInput ? "rb" : "wb" );
|
||||
if( m_pFile == NULL )
|
||||
{
|
||||
return false;
|
||||
|
||||
Reference in new issue
Block a user