From 93e0bbb4f0c3ae83a2700881f244b9d80fbf952b Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Mon, 25 Apr 2016 18:57:01 +0000 Subject: 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 --- src/plugins/Input/mpc/decodermpcfactory.cpp | 10 +--------- src/plugins/Input/mpc/mpcmetadatamodel.cpp | 4 ++-- 2 files changed, 3 insertions(+), 11 deletions(-) (limited to 'src/plugins/Input/mpc') diff --git a/src/plugins/Input/mpc/decodermpcfactory.cpp b/src/plugins/Input/mpc/decodermpcfactory.cpp index aba4263ba..f6abab6ff 100644 --- a/src/plugins/Input/mpc/decodermpcfactory.cpp +++ b/src/plugins/Input/mpc/decodermpcfactory.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 * @@ -30,18 +30,10 @@ #include "decoder_mpc.h" #include "decodermpcfactory.h" -#ifdef Q_OS_WIN -#define QStringToFileName(s) TagLib::FileName(reinterpret_cast(s.utf16())) -#else -#define QStringToFileName(s) s.toLocal8Bit().constData() -#endif - - // DecoderMPCFactory bool DecoderMPCFactory::supports(const QString &source) const { - return (source.right(4).toLower() == ".mpc"); } diff --git a/src/plugins/Input/mpc/mpcmetadatamodel.cpp b/src/plugins/Input/mpc/mpcmetadatamodel.cpp index 9a07390e6..1f6456bd5 100644 --- a/src/plugins/Input/mpc/mpcmetadatamodel.cpp +++ b/src/plugins/Input/mpc/mpcmetadatamodel.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2009-2015 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 * @@ -26,7 +26,7 @@ MPCMetaDataModel::MPCMetaDataModel(const QString &path, QObject *parent) : MetaDataModel(parent) { - m_file = new TagLib::MPC::File (path.toLocal8Bit().constData()); + m_file = new TagLib::MPC::File (QStringToFileName(path)); m_tags << new MPCFileTagModel(m_file, TagLib::MPC::File::ID3v1); m_tags << new MPCFileTagModel(m_file, TagLib::MPC::File::APE); } -- cgit v1.2.3-13-gbd6f