Commit 430e08a2 authored by Jonathan Marten's avatar Jonathan Marten
Browse files

Port deprecated QString::sprintf() -> asprintf()

parent 224c283f
......@@ -148,7 +148,7 @@ void K3b::MsInfoFetcher::slotMediaDetectionFinished( K3b::Device::DeviceHandler*
else {
unsigned int lastSessionStart, nextWritableAdress;
if( m_device->getNextWritableAdress( lastSessionStart, nextWritableAdress ) ) {
m_msInfo.sprintf( "%u,%u", lastSessionStart+16, nextWritableAdress );
m_msInfo = QString::asprintf( "%u,%u", lastSessionStart+16, nextWritableAdress );
jobFinished( true );
}
else {
......
......@@ -184,7 +184,7 @@ bool K3b::VideoDVD::VideoDVD::open( K3b::Device::Device* dev )
m_titles[i].m_audioStreams[j].m_multiChannelExt = titleIfo->vtsi_mat->vts_audio_attr[j].multichannel_extension;
m_titles[i].m_audioStreams[j].m_channels = titleIfo->vtsi_mat->vts_audio_attr[j].channels+1;
if( titleIfo->vtsi_mat->vts_audio_attr[j].lang_code>>8 )
m_titles[i].m_audioStreams[j].m_langCode.sprintf( "%c%c",
m_titles[i].m_audioStreams[j].m_langCode = QString::asprintf( "%c%c",
titleIfo->vtsi_mat->vts_audio_attr[j].lang_code>>8,
titleIfo->vtsi_mat->vts_audio_attr[j].lang_code & 0xff );
else
......@@ -199,7 +199,7 @@ bool K3b::VideoDVD::VideoDVD::open( K3b::Device::Device* dev )
m_titles[i].m_subPictureStreams[j].m_codeMode = titleIfo->vtsi_mat->vts_subp_attr[j].code_mode;
m_titles[i].m_subPictureStreams[j].m_codeExtension = titleIfo->vtsi_mat->vts_subp_attr[j].code_extension;
if( titleIfo->vtsi_mat->vts_subp_attr[j].lang_code>>8 )
m_titles[i].m_subPictureStreams[j].m_langCode.sprintf( "%c%c",
m_titles[i].m_subPictureStreams[j].m_langCode = QString::asprintf( "%c%c",
titleIfo->vtsi_mat->vts_subp_attr[j].lang_code>>8,
titleIfo->vtsi_mat->vts_subp_attr[j].lang_code & 0xff );
else
......
......@@ -359,9 +359,9 @@ QString K3b::DiskInfoView::createMediaInfoItems( const K3b::Medium& medium )
if( K3b::Device::isCdMedia( info.mediaType() ) )
speedStr.append( QString( "%1x (%2 KB/s)" ).arg( speed/K3b::Device::SPEED_FACTOR_CD ).arg( speed ) );
else if( K3b::Device::isDvdMedia( info.mediaType() ) )
speedStr.append( QString().sprintf( "%.1fx (%d KB/s)", (double)speed / ( double )K3b::Device::SPEED_FACTOR_DVD, speed ) );
speedStr.append( QString::asprintf( "%.1fx (%d KB/s)", (double)speed / ( double )K3b::Device::SPEED_FACTOR_DVD, speed ) );
else if ( K3b::Device::isBdMedia( info.mediaType() ) )
speedStr.append( QString().sprintf( "%.1fx (%d KB/s)", (double)speed / ( double )K3b::Device::SPEED_FACTOR_BD, speed ) );
speedStr.append( QString::asprintf( "%.1fx (%d KB/s)", (double)speed / ( double )K3b::Device::SPEED_FACTOR_BD, speed ) );
}
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment