Commit cc28873a authored by François Cartegnie's avatar François Cartegnie 🤞 Committed by Jean-Baptiste Kempf

Qt: sprintf is deprecated

Signed-off-by: Jean-Baptiste Kempf's avatarJean-Baptiste Kempf <jb@videolan.org>
parent e7a44b2d
......@@ -630,9 +630,10 @@ void TimeLabel::setDisplayPosition( float pos, int64_t t, int length )
secstotimestr( psz_time, ( b_remainingTime && length ) ? length - time
: time );
QString timestr;
timestr.sprintf( " %s%s/%s ", (b_remainingTime && length) ? "-" : "",
psz_time, ( !length && time ) ? "--:--" : psz_length );
QString timestr = QString( " %1%2/%3 " )
.arg( QString( (b_remainingTime && length) ? "-" : "" ) )
.arg( QString( psz_time ) )
.arg( QString( ( !length && time ) ? "--:--" : psz_length ) );
setText( timestr );
......@@ -651,9 +652,10 @@ void TimeLabel::setDisplayPosition( float pos )
secstotimestr( psz_time,
( b_remainingTime && cachedLength ?
cachedLength - time : time ) );
QString timestr;
timestr.sprintf( " %s%s/%s ", (b_remainingTime && cachedLength) ? "-" : "",
psz_time, ( !cachedLength && time ) ? "--:--" : psz_length );
QString timestr = QString( " %1%2/%3 " )
.arg( QString( (b_remainingTime && cachedLength) ? "-" : "" ) )
.arg( QString( psz_time ) )
.arg( QString( ( !cachedLength && time ) ? "--:--" : psz_length ) );
setText( timestr );
}
......
Markdown is supported
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