diff --git a/toolkit/tstringlist.cpp b/toolkit/tstringlist.cpp index f03684f8..f37b30bf 100644 --- a/toolkit/tstringlist.cpp +++ b/toolkit/tstringlist.cpp @@ -66,6 +66,14 @@ StringList::StringList(const String &s) : List() append(s); } +StringList::StringList(const ByteVectorList &bl, String::Type t) : List() +{ + ByteVectorList::ConstIterator i = bl.begin(); + for(;i != bl.end(); i++) { + append(String(*i, t)); + } +} + StringList::~StringList() { diff --git a/toolkit/tstringlist.h b/toolkit/tstringlist.h index 33dec4b7..5a2219e2 100644 --- a/toolkit/tstringlist.h +++ b/toolkit/tstringlist.h @@ -24,6 +24,7 @@ #include "tstring.h" #include "tlist.h" +#include "tbytevectorlist.h" #include @@ -57,6 +58,14 @@ namespace TagLib { */ StringList(const String &s); + /*! + * Makes a deep copy of the data in \a vl. + * + * \note This should only be used with the 8-bit codecs Latin1 and UTF8, when + * used with other codecs it will simply print a warning and exit. + */ + StringList(const ByteVectorList &vl, String::Type t = String::Latin1); + /*! * Destroys this StringList instance. */