diff --git a/ChangeLog b/ChangeLog index 3fe3a4e3..14f373ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -21164,3 +21164,5 @@ * Removed the 'Q3PointArray' dependency from 'RDMarkerBar'. 2021-02-15 Fred Gleason * Removed the 'Q3Url' dependency from 'RDUrl'. +2021-02-15 Fred Gleason + * Removed the 'Q3CString' dependency from 'RDWaveFile'. diff --git a/lib/rdwavefile.cpp b/lib/rdwavefile.cpp index 7cee7d9d..18dfd425 100644 --- a/lib/rdwavefile.cpp +++ b/lib/rdwavefile.cpp @@ -2,7 +2,7 @@ // // A class for handling audio files. // -// (C) Copyright 2002-2018 Fred Gleason +// (C) Copyright 2002-2021 Fred Gleason // // This program is free software; you can redistribute it and/or modify // it under the terms of the GNU Library General Public License @@ -48,13 +48,6 @@ #include #endif // HAVE_FLAC -#include -#include -#include -#include -//Added by qt3to4: -#include - #include #include #include @@ -2429,7 +2422,7 @@ bool RDWaveFile::IsFlac(int fd) #ifdef HAVE_FLAC char buffer[5]; - ID3_Tag id3_tag(Q3CString().sprintf("%s",(const char *)wave_file_name.utf8())); + ID3_Tag id3_tag(wave_file_name.toUtf8()); lseek(fd,id3_tag.GetPrependedBytes(),SEEK_SET); if(read(fd,buffer,4)!=4) { return false; @@ -4233,7 +4226,7 @@ bool RDWaveFile::GetFlacStreamInfo() { #if HAVE_FLAC FLAC__StreamMetadata sinfo; - if(!FLAC__metadata_get_streaminfo(Q3CString().sprintf("%s",(const char *)wave_file_name.utf8()),&sinfo)) { + if(!FLAC__metadata_get_streaminfo(wave_file_name.toUtf8(),&sinfo)) { return false; } samples_per_sec=sinfo.data.stream_info.sample_rate; @@ -4255,8 +4248,7 @@ void RDWaveFile::ReadFlacMetadata() QString artist; QString composer; FLAC__StreamMetadata* tags; - if(!FLAC__metadata_get_tags(Q3CString(). - sprintf("%s",(const char *)wave_file_name.utf8()),&tags)) { + if(!FLAC__metadata_get_tags(wave_file_name.toUtf8(),&tags)) { return; } for(unsigned iCommentIndex=0;