diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-04-25 18:57:01 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-04-25 18:57:01 +0000 |
| commit | 93e0bbb4f0c3ae83a2700881f244b9d80fbf952b (patch) | |
| tree | 9f20cacb64f003282fb8d432291ba2fe286ce8ef /src/plugins/Input/flac | |
| parent | 25e440225c1c5cadfb1f3f7b56f6ebde5b91fe16 (diff) | |
| download | qmmp-93e0bbb4f0c3ae83a2700881f244b9d80fbf952b.tar.gz qmmp-93e0bbb4f0c3ae83a2700881f244b9d80fbf952b.tar.bz2 qmmp-93e0bbb4f0c3ae83a2700881f244b9d80fbf952b.zip | |
fixed QString to TagLib::FileName conversion (#852)
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6266 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins/Input/flac')
| -rw-r--r-- | src/plugins/Input/flac/decoderflacfactory.cpp | 9 | ||||
| -rw-r--r-- | src/plugins/Input/flac/flacmetadatamodel.cpp | 4 | ||||
| -rw-r--r-- | src/plugins/Input/flac/replaygainreader.cpp | 6 |
3 files changed, 6 insertions, 13 deletions
diff --git a/src/plugins/Input/flac/decoderflacfactory.cpp b/src/plugins/Input/flac/decoderflacfactory.cpp index 996c5bce1..dac5da374 100644 --- a/src/plugins/Input/flac/decoderflacfactory.cpp +++ b/src/plugins/Input/flac/decoderflacfactory.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2015 by Ilya Kotov * + * Copyright (C) 2008-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -34,13 +34,6 @@ #include "flacmetadatamodel.h" #include "decoderflacfactory.h" -#ifdef Q_OS_WIN -#define QStringToFileName(s) TagLib::FileName(reinterpret_cast<const wchar_t *>(s.utf16())) -#else -#define QStringToFileName(s) s.toLocal8Bit().constData() -#endif - - // DecoderFLACFactory bool DecoderFLACFactory::supports(const QString &source) const diff --git a/src/plugins/Input/flac/flacmetadatamodel.cpp b/src/plugins/Input/flac/flacmetadatamodel.cpp index adf81c99b..82a033b44 100644 --- a/src/plugins/Input/flac/flacmetadatamodel.cpp +++ b/src/plugins/Input/flac/flacmetadatamodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2012 by Ilya Kotov * + * Copyright (C) 2009-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -127,7 +127,7 @@ VorbisCommentModel::VorbisCommentModel(const QString &path) : TagModel(TagModel: m_tag = 0; if(path.endsWith(".flac")) { - m_file = new TagLib::FLAC::File (path.toLocal8Bit().constData()); + m_file = new TagLib::FLAC::File (QStringToFileName(path)); m_tag = m_file->xiphComment(); } else if (path.endsWith(".oga")) diff --git a/src/plugins/Input/flac/replaygainreader.cpp b/src/plugins/Input/flac/replaygainreader.cpp index 9aa27970c..095e94fa9 100644 --- a/src/plugins/Input/flac/replaygainreader.cpp +++ b/src/plugins/Input/flac/replaygainreader.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2013 by Ilya Kotov * + * Copyright (C) 2009-2016 by Ilya Kotov * * forkotov02@hotmail.ru * * * * This program is free software; you can redistribute it and/or modify * @@ -29,13 +29,13 @@ ReplayGainReader::ReplayGainReader(const QString &path) { if(path.endsWith(".flac", Qt::CaseInsensitive)) { - TagLib::FLAC::File fileRef(path.toLocal8Bit ().constData()); + TagLib::FLAC::File fileRef(QStringToFileName(path)); if(fileRef.xiphComment()) readVorbisComment(fileRef.xiphComment()); } else if(path.endsWith(".oga", Qt::CaseInsensitive)) { - TagLib::Ogg::FLAC::File fileRef(path.toLocal8Bit ().constData()); + TagLib::Ogg::FLAC::File fileRef(QStringToFileName(path)); if(fileRef.tag()) readVorbisComment(fileRef.tag()); } |
