TagReaderTagLib: Use QString for converting TagLib::String
Converting directly to std::string does not seem to work correctly.
This commit is contained in:
parent
0de87b3e1e
commit
9232ad0125
|
@ -23,8 +23,6 @@
|
||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
#include <boost/algorithm/string/trim.hpp>
|
|
||||||
|
|
||||||
#include <QByteArray>
|
#include <QByteArray>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
|
@ -77,9 +75,9 @@ class TagReaderTagLib : public TagReaderBase {
|
||||||
|
|
||||||
static inline void AssignTagLibStringToStdString(const TagLib::String &tstr, std::string *output) {
|
static inline void AssignTagLibStringToStdString(const TagLib::String &tstr, std::string *output) {
|
||||||
|
|
||||||
std::string stdstr = TagLibStringToStdString(tstr);
|
const QString qstr = TagLibStringToQString(tstr).trimmed();
|
||||||
boost::trim(stdstr);
|
const QByteArray data = qstr.toUtf8();
|
||||||
output->assign(stdstr);
|
output->assign(data.constData(), data.size());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue