taglib: Remove unused functions + add virtual and explicit

This commit is contained in:
Jonas Kvinge
2020-06-22 02:32:37 +02:00
parent 3a3dc02a66
commit 248e487dd5
117 changed files with 452 additions and 653 deletions

View File

@@ -56,7 +56,7 @@ class TAGLIB_EXPORT Attribute {
/*!
* Constructs an empty attribute.
*/
Attribute();
explicit Attribute();
/*!
* Constructs an attribute with \a key and a UnicodeType \a value.
@@ -66,7 +66,7 @@ class TAGLIB_EXPORT Attribute {
/*!
* Constructs an attribute with \a key and a BytesType \a value.
*/
Attribute(const ByteVector &value);
explicit Attribute(const ByteVector &value);
/*!
* Constructs an attribute with \a key and a Picture \a value.
@@ -79,27 +79,27 @@ class TAGLIB_EXPORT Attribute {
* WM/Picture attributes added with TagLib::ASF are not automatically validated to conform to ID3 specifications.
* You must add code in your application to perform validations if you want to maintain complete compatibility with ID3.
*/
Attribute(const Picture &value);
explicit Attribute(const Picture &value);
/*!
* Constructs an attribute with \a key and a DWordType \a value.
*/
Attribute(unsigned int value);
explicit Attribute(unsigned int value);
/*!
* Constructs an attribute with \a key and a QWordType \a value.
*/
Attribute(unsigned long long value);
explicit Attribute(unsigned long long value);
/*!
* Constructs an attribute with \a key and a WordType \a value.
*/
Attribute(unsigned short value);
explicit Attribute(unsigned short value);
/*!
* Constructs an attribute with \a key and a BoolType \a value.
*/
Attribute(bool value);
explicit Attribute(bool value);
/*!
* Construct an attribute as a copy of \a other.

View File

@@ -53,8 +53,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
* \a propertiesStyle are ignored. The audio properties are always
* read.
*/
File(FileName file, bool readProperties = true,
AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
explicit File(FileName file, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
/*!
* Constructs an ASF file from \a stream.
@@ -66,7 +65,7 @@ class TAGLIB_EXPORT File : public Strawberry_TagLib::TagLib::File {
* \note TagLib will *not* take ownership of the stream, the caller is
* responsible for deleting it after the File object.
*/
File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
explicit File(IOStream *stream, bool readProperties = true, AudioProperties::ReadStyle propertiesStyle = AudioProperties::Average);
/*!
* Destroys this instance of the File.

View File

@@ -97,7 +97,7 @@ class TAGLIB_EXPORT Picture {
/*!
* Constructs an empty picture.
*/
Picture();
explicit Picture();
/*!
* Construct an picture as a copy of \a other.

View File

@@ -106,10 +106,6 @@ bool ASF::AudioProperties::isEncrypted() const {
// private members
////////////////////////////////////////////////////////////////////////////////
void ASF::AudioProperties::setLength(int /*length*/) {
debug("ASF::AudioProperties::setLength() -- This method is deprecated. Do not use.");
}
void ASF::AudioProperties::setLengthInMilliseconds(int value) {
d->length = value;
}

View File

@@ -70,7 +70,7 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro
/*!
* Creates an instance of ASF::Properties.
*/
AudioProperties();
explicit AudioProperties();
/*!
* Destroys this ASF::AudioProperties instance.
@@ -83,16 +83,14 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro
*
* \see lengthInMilliseconds()
*/
// BIC: make virtual
int lengthInSeconds() const;
virtual int lengthInSeconds() const;
/*!
* Returns the length of the file in milliseconds.
*
* \see lengthInSeconds()
*/
// BIC: make virtual
int lengthInMilliseconds() const;
virtual int lengthInMilliseconds() const;
/*!
* Returns the average bit rate of the file in kb/s.
@@ -145,9 +143,6 @@ class TAGLIB_EXPORT AudioProperties : public Strawberry_TagLib::TagLib::AudioPro
bool isEncrypted() const;
#ifndef DO_NOT_DOCUMENT
// deprecated
void setLength(int value);
void setLengthInMilliseconds(int value);
void setBitrate(int value);
void setSampleRate(int value);

View File

@@ -45,7 +45,7 @@ class TAGLIB_EXPORT Tag : public Strawberry_TagLib::TagLib::Tag {
friend class File;
public:
Tag();
explicit Tag();
virtual ~Tag();