diff options
Diffstat (limited to 'noatun-plugins/luckytag/parsedmp3filename.cpp')
-rw-r--r-- | noatun-plugins/luckytag/parsedmp3filename.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/noatun-plugins/luckytag/parsedmp3filename.cpp b/noatun-plugins/luckytag/parsedmp3filename.cpp index 11694bc..1c75958 100644 --- a/noatun-plugins/luckytag/parsedmp3filename.cpp +++ b/noatun-plugins/luckytag/parsedmp3filename.cpp @@ -31,22 +31,22 @@ ParsedMP3FileName::ParsedMP3FileName(const TQString &path) TQString fileName = url.fileName(false); m_directories = TQStringList::split("/", url.directory()); - if (fileName.startsWith("(") && fileName.tqcontains(")")) + if (fileName.startsWith("(") && fileName.contains(")")) { - m_artist = fileName.mid(1, fileName.tqfind(")") - 1); - m_title = fileName.right(fileName.length() - fileName.tqfind(")") - 1); + m_artist = fileName.mid(1, fileName.find(")") - 1); + m_title = fileName.right(fileName.length() - fileName.find(")") - 1); validateArtist(); } - else if (fileName.startsWith("[") && fileName.tqcontains("]")) + else if (fileName.startsWith("[") && fileName.contains("]")) { - m_artist = fileName.mid(1, fileName.tqfind("]") - 1); - m_title = fileName.right(fileName.length() - fileName.tqfind("]") - 1); + m_artist = fileName.mid(1, fileName.find("]") - 1); + m_title = fileName.right(fileName.length() - fileName.find("]") - 1); validateArtist(); } - else if (fileName.tqcontains("-")) + else if (fileName.contains("-")) { - m_artist = fileName.left(fileName.tqfind("-") - 1); - m_title = fileName.right(fileName.length() - fileName.tqfind("-") - 1); + m_artist = fileName.left(fileName.find("-") - 1); + m_title = fileName.right(fileName.length() - fileName.find("-") - 1); validateArtist(); } else @@ -56,10 +56,10 @@ ParsedMP3FileName::ParsedMP3FileName(const TQString &path) m_artist = m_directories[m_directories.count() - 2]; } - if (m_title.tqcontains("(") && m_title.tqfind(")", m_title.tqfind("("))) + if (m_title.contains("(") && m_title.find(")", m_title.find("("))) { - unsigned int start = m_title.tqfind("("); - unsigned int end = m_title.tqfind(")"); + unsigned int start = m_title.find("("); + unsigned int end = m_title.find(")"); m_comment = m_title.mid(start + 1, end - start - 1); m_title.truncate(start); } @@ -86,10 +86,10 @@ TQString ParsedMP3FileName::beautifyString(const TQString &s) temp[0] = temp[0].upper(); - unsigned int numSpaces = temp.tqcontains(" "); + unsigned int numSpaces = temp.contains(" "); unsigned int spacePos = 0; while (numSpaces > 0) { - spacePos = temp.tqfind(" ", spacePos == 0? 0 : spacePos + 1); + spacePos = temp.find(" ", spacePos == 0? 0 : spacePos + 1); temp[spacePos + 1] = temp[spacePos + 1].upper(); numSpaces--; } |