diff --git a/taglib/flac/flacfile.cpp b/taglib/flac/flacfile.cpp index 63c20315..c5680e71 100644 --- a/taglib/flac/flacfile.cpp +++ b/taglib/flac/flacfile.cpp @@ -104,31 +104,26 @@ public: // public members //////////////////////////////////////////////////////////////////////////////// -FLAC::File::File(FileName file, bool readProperties, - Properties::ReadStyle propertiesStyle) : +FLAC::File::File(FileName file, + bool readProperties, Properties::ReadStyle propertiesStyle, + ID3v2::FrameFactory *frameFactory) : TagLib::File(file) { d = new FilePrivate; + if(frameFactory) + d->ID3v2FrameFactory = frameFactory; if(isOpen()) read(readProperties, propertiesStyle); } -FLAC::File::File(FileName file, ID3v2::FrameFactory *frameFactory, - bool readProperties, Properties::ReadStyle propertiesStyle) : - TagLib::File(file) -{ - d = new FilePrivate; - d->ID3v2FrameFactory = frameFactory; - if(isOpen()) - read(readProperties, propertiesStyle); -} - -FLAC::File::File(IOStream *stream, ID3v2::FrameFactory *frameFactory, - bool readProperties, Properties::ReadStyle propertiesStyle) : +FLAC::File::File(IOStream *stream, + bool readProperties, Properties::ReadStyle propertiesStyle, + ID3v2::FrameFactory *frameFactory) : TagLib::File(stream) { d = new FilePrivate; - d->ID3v2FrameFactory = frameFactory; + if(frameFactory) + d->ID3v2FrameFactory = frameFactory; if(isOpen()) read(readProperties, propertiesStyle); } diff --git a/taglib/flac/flacfile.h b/taglib/flac/flacfile.h index 6bbd85c9..22665e01 100644 --- a/taglib/flac/flacfile.h +++ b/taglib/flac/flacfile.h @@ -66,17 +66,6 @@ namespace TagLib { class TAGLIB_EXPORT File : public TagLib::File { public: - /*! - * Contructs a FLAC file from \a file. If \a readProperties is true the - * file's audio properties will also be read using \a propertiesStyle. If - * false, \a propertiesStyle is ignored. - * - * \deprecated This constructor will be dropped in favor of the one below - * in a future version. - */ - File(FileName file, bool readProperties = true, - Properties::ReadStyle propertiesStyle = Properties::Average); - /*! * Contructs a FLAC file from \a file. If \a readProperties is true the * file's audio properties will also be read using \a propertiesStyle. If @@ -85,10 +74,10 @@ namespace TagLib { * If this file contains and ID3v2 tag the frames will be created using * \a frameFactory. */ - // BIC: merge with the above constructor - File(FileName file, ID3v2::FrameFactory *frameFactory, + File(FileName file, bool readProperties = true, - Properties::ReadStyle propertiesStyle = Properties::Average); + Properties::ReadStyle propertiesStyle = Properties::Average, + ID3v2::FrameFactory *frameFactory = 0); /*! * Contructs a FLAC file from \a file. If \a readProperties is true the @@ -101,10 +90,10 @@ namespace TagLib { * \note TagLib will *not* take ownership of the stream, the caller is * responsible for deleting it after the File object. */ - // BIC: merge with the above constructor - File(IOStream *stream, ID3v2::FrameFactory *frameFactory, + File(IOStream *stream, bool readProperties = true, - Properties::ReadStyle propertiesStyle = Properties::Average); + Properties::ReadStyle propertiesStyle = Properties::Average, + ID3v2::FrameFactory *frameFactory = 0); /*! * Destroys this instance of the File.