diff options
| author | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-07-28 12:49:15 +0000 |
|---|---|---|
| committer | trialuser02 <trialuser02@90c681e8-e032-0410-971d-27865f9a5e38> | 2016-07-28 12:49:15 +0000 |
| commit | 0e5678ebc94b223d933d32a17710ae32e688af30 (patch) | |
| tree | 6a4a3e6bd009508ca76720356a0f135e297ec971 /src/plugins | |
| parent | 45b203105b980162549fc97106c6353a23571106 (diff) | |
| download | qmmp-0e5678ebc94b223d933d32a17710ae32e688af30.tar.gz qmmp-0e5678ebc94b223d933d32a17710ae32e688af30.tar.bz2 qmmp-0e5678ebc94b223d933d32a17710ae32e688af30.zip | |
removed useless code
git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6612 90c681e8-e032-0410-971d-27865f9a5e38
Diffstat (limited to 'src/plugins')
| -rw-r--r-- | src/plugins/Input/flac/cueparser.cpp | 49 | ||||
| -rw-r--r-- | src/plugins/Input/flac/cueparser.h | 4 | ||||
| -rw-r--r-- | src/plugins/Input/wavpack/cueparser.cpp | 49 | ||||
| -rw-r--r-- | src/plugins/Input/wavpack/cueparser.h | 4 |
4 files changed, 4 insertions, 102 deletions
diff --git a/src/plugins/Input/flac/cueparser.cpp b/src/plugins/Input/flac/cueparser.cpp index 4736d6326..5f5c7a377 100644 --- a/src/plugins/Input/flac/cueparser.cpp +++ b/src/plugins/Input/flac/cueparser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 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 * @@ -212,50 +212,3 @@ qint64 CUEParser::getLength(const QString &str) return (qint64)list.at(0).toInt()*60000 + list.at(1).toInt()*1000 + list.at(2).toInt()*1000/75; return 0; } - -QString CUEParser::getDirtyPath(const QString &cue, const QString &path) -{ - - if (Decoder::findByFilePath(path) || ! m_dirty) - return path; - - QStringList candidates; - QDirIterator it(QFileInfo(path).dir().path(), QDir::Files); - while (it.hasNext()) - { - it.next(); - QString f = it.filePath(); - if ((f != cue) && Decoder::findByFilePath(f)) - candidates.push_back(f); - } - - if (candidates.empty()) - return path; - else if (candidates.count() == 1) - return candidates.first(); - - int dot = cue.lastIndexOf('.'); - if (dot != -1) - { - QRegExp r(QRegExp::escape(cue.left(dot)) + "\\.[^\\.]+$"); - - int index = candidates.indexOf(r); - int rindex = candidates.lastIndexOf(r); - - if ((index != -1) && (index == rindex)) - return candidates[index]; - } - dot = path.lastIndexOf('.'); - if (dot != -1) - { - QRegExp r(QRegExp::escape(path.left(dot)) + "\\.[^\\.]+$"); - - int index = candidates.indexOf(r); - int rindex = candidates.lastIndexOf(r); - - if ((index != -1) && (index == rindex)) - return candidates[index]; - } - - return path; -} diff --git a/src/plugins/Input/flac/cueparser.h b/src/plugins/Input/flac/cueparser.h index fc72c9084..a7926170f 100644 --- a/src/plugins/Input/flac/cueparser.h +++ b/src/plugins/Input/flac/cueparser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 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 * @@ -56,10 +56,8 @@ private: QMap<Qmmp::ReplayGainKey, double> replayGain; }; QList <CUETrack * > m_tracks; - bool m_dirty; QStringList splitLine(const QString &line); qint64 getLength(const QString &str); - QString getDirtyPath(const QString &cue, const QString &path); QString m_filePath; }; diff --git a/src/plugins/Input/wavpack/cueparser.cpp b/src/plugins/Input/wavpack/cueparser.cpp index 0554370c6..4d8cb8491 100644 --- a/src/plugins/Input/wavpack/cueparser.cpp +++ b/src/plugins/Input/wavpack/cueparser.cpp @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 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 * @@ -212,50 +212,3 @@ qint64 CUEParser::getLength(const QString &str) return (qint64)list.at(0).toInt()*60000 + list.at(1).toInt()*1000 + list.at(2).toInt()*1000/75; return 0; } - -QString CUEParser::getDirtyPath(const QString &cue, const QString &path) -{ - - if (Decoder::findByFilePath(path) || ! m_dirty) - return path; - - QStringList candidates; - QDirIterator it(QFileInfo(path).dir().path(), QDir::Files); - while (it.hasNext()) - { - it.next(); - QString f = it.filePath(); - if ((f != cue) && Decoder::findByFilePath(f)) - candidates.push_back(f); - } - - if (candidates.empty()) - return path; - else if (candidates.count() == 1) - return candidates.first(); - - int dot = cue.lastIndexOf('.'); - if (dot != -1) - { - QRegExp r(QRegExp::escape(cue.left(dot)) + "\\.[^\\.]+$"); - - int index = candidates.indexOf(r); - int rindex = candidates.lastIndexOf(r); - - if ((index != -1) && (index == rindex)) - return candidates[index]; - } - dot = path.lastIndexOf('.'); - if (dot != -1) - { - QRegExp r(QRegExp::escape(path.left(dot)) + "\\.[^\\.]+$"); - - int index = candidates.indexOf(r); - int rindex = candidates.lastIndexOf(r); - - if ((index != -1) && (index == rindex)) - return candidates[index]; - } - - return path; -} diff --git a/src/plugins/Input/wavpack/cueparser.h b/src/plugins/Input/wavpack/cueparser.h index fc72c9084..a7926170f 100644 --- a/src/plugins/Input/wavpack/cueparser.h +++ b/src/plugins/Input/wavpack/cueparser.h @@ -1,5 +1,5 @@ /*************************************************************************** - * Copyright (C) 2008-2012 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 * @@ -56,10 +56,8 @@ private: QMap<Qmmp::ReplayGainKey, double> replayGain; }; QList <CUETrack * > m_tracks; - bool m_dirty; QStringList splitLine(const QString &line); qint64 getLength(const QString &str); - QString getDirtyPath(const QString &cue, const QString &path); QString m_filePath; }; |
