mirror of
https://github.com/taglib/taglib.git
synced 2025-09-20 20:05:05 -04:00
Preserve source code backward compatibility
This commit is contained in:
@ -62,12 +62,16 @@ APE::Item::Item(const String &key, const StringList &values)
|
||||
d->text = values;
|
||||
}
|
||||
|
||||
APE::Item::Item(const String &key, const ByteVector &value)
|
||||
APE::Item::Item(const String &key, const ByteVector &value, bool binary)
|
||||
{
|
||||
d = new ItemPrivate;
|
||||
d->type = Binary;
|
||||
d->key = key;
|
||||
d->value = value;
|
||||
if(binary) {
|
||||
d->type = Binary;
|
||||
d->value = value;
|
||||
}
|
||||
else
|
||||
d->text.append(value);
|
||||
}
|
||||
|
||||
APE::Item::Item(const Item &item)
|
||||
|
@ -70,9 +70,10 @@ namespace TagLib {
|
||||
Item(const String &key, const StringList &values);
|
||||
|
||||
/*!
|
||||
* Constructs a binary item with \a key and \a value.
|
||||
* Constructs an item with \a key and \a value.
|
||||
* If \a binary is true a Binary item will be created, otherwise \a value will be interpreted as text
|
||||
*/
|
||||
Item(const String &key, const ByteVector &value);
|
||||
Item(const String &key, const ByteVector &value, bool binary);
|
||||
|
||||
/*!
|
||||
* Construct an item as a copy of \a item.
|
||||
|
@ -294,7 +294,7 @@ void APE::Tag::setData(const String &key, const ByteVector &value)
|
||||
{
|
||||
removeItem(key);
|
||||
if(!key.isEmpty() && !value.isEmpty())
|
||||
setItem(key, Item(key, value));
|
||||
setItem(key, Item(key, value, true));
|
||||
}
|
||||
|
||||
void APE::Tag::setItem(const String &key, const Item &item)
|
||||
|
Reference in New Issue
Block a user