diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-06-18 17:00:31 +0000 |
commit | 395a904bff7b4d6ead445c342f7ac0c5fbf29121 (patch) | |
tree | 9829cadb79d2cc7c29a940627fadb28b11e54150 /noatun-plugins/luckytag/parsedmp3filename.cpp | |
parent | 399f47c376fdf4d19192732a701ea9578d11619d (diff) | |
download | tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.tar.gz tdeaddons-395a904bff7b4d6ead445c342f7ac0c5fbf29121.zip |
TQt4 port kdeaddons
This enables compilation under both Qt3 and Qt4
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeaddons@1237404 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
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 1c75958..11694bc 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.contains(")")) + if (fileName.startsWith("(") && fileName.tqcontains(")")) { - m_artist = fileName.mid(1, fileName.find(")") - 1); - m_title = fileName.right(fileName.length() - fileName.find(")") - 1); + m_artist = fileName.mid(1, fileName.tqfind(")") - 1); + m_title = fileName.right(fileName.length() - fileName.tqfind(")") - 1); validateArtist(); } - else if (fileName.startsWith("[") && fileName.contains("]")) + else if (fileName.startsWith("[") && fileName.tqcontains("]")) { - m_artist = fileName.mid(1, fileName.find("]") - 1); - m_title = fileName.right(fileName.length() - fileName.find("]") - 1); + m_artist = fileName.mid(1, fileName.tqfind("]") - 1); + m_title = fileName.right(fileName.length() - fileName.tqfind("]") - 1); validateArtist(); } - else if (fileName.contains("-")) + else if (fileName.tqcontains("-")) { - m_artist = fileName.left(fileName.find("-") - 1); - m_title = fileName.right(fileName.length() - fileName.find("-") - 1); + m_artist = fileName.left(fileName.tqfind("-") - 1); + m_title = fileName.right(fileName.length() - fileName.tqfind("-") - 1); validateArtist(); } else @@ -56,10 +56,10 @@ ParsedMP3FileName::ParsedMP3FileName(const TQString &path) m_artist = m_directories[m_directories.count() - 2]; } - if (m_title.contains("(") && m_title.find(")", m_title.find("("))) + if (m_title.tqcontains("(") && m_title.tqfind(")", m_title.tqfind("("))) { - unsigned int start = m_title.find("("); - unsigned int end = m_title.find(")"); + unsigned int start = m_title.tqfind("("); + unsigned int end = m_title.tqfind(")"); 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.contains(" "); + unsigned int numSpaces = temp.tqcontains(" "); unsigned int spacePos = 0; while (numSpaces > 0) { - spacePos = temp.find(" ", spacePos == 0? 0 : spacePos + 1); + spacePos = temp.tqfind(" ", spacePos == 0? 0 : spacePos + 1); temp[spacePos + 1] = temp[spacePos + 1].upper(); numSpaces--; } |