From 0e5678ebc94b223d933d32a17710ae32e688af30 Mon Sep 17 00:00:00 2001 From: trialuser02 Date: Thu, 28 Jul 2016 12:49:15 +0000 Subject: removed useless code git-svn-id: http://svn.code.sf.net/p/qmmp-dev/code/trunk/qmmp@6612 90c681e8-e032-0410-971d-27865f9a5e38 --- src/plugins/Input/wavpack/cueparser.cpp | 49 +-------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) (limited to 'src/plugins/Input/wavpack/cueparser.cpp') 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; -} -- cgit v1.2.3-13-gbd6f