summaryrefslogtreecommitdiffstats
path: root/juk/tagguesser.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit7ef01c0f34d9c6732d258154bcd3ba5a88280db9 (patch)
tree48ff13dab43883d19ecf2272b8ba72a013d5bc57 /juk/tagguesser.cpp
parentc05ca496a526b3fc192dbfafe0955e5824b22e08 (diff)
downloadtdemultimedia-7ef01c0f34d9c6732d258154bcd3ba5a88280db9.tar.gz
tdemultimedia-7ef01c0f34d9c6732d258154bcd3ba5a88280db9.zip
rename the following methods:
tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdemultimedia@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'juk/tagguesser.cpp')
-rw-r--r--juk/tagguesser.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/juk/tagguesser.cpp b/juk/tagguesser.cpp
index a93b5996..bc195995 100644
--- a/juk/tagguesser.cpp
+++ b/juk/tagguesser.cpp
@@ -23,7 +23,7 @@ FileNameScheme::FileNameScheme(const TQString &s)
m_commentField(-1)
{
int fieldNumber = 1;
- int i = s.tqfind('%');
+ int i = s.find('%');
while (i > -1) {
switch (s[ i + 1 ]) {
case 't': m_titleField = fieldNumber++;
@@ -39,7 +39,7 @@ FileNameScheme::FileNameScheme(const TQString &s)
default:
break;
}
- i = s.tqfind('%', i + 1);
+ i = s.find('%', i + 1);
}
m_regExp.setPattern(composeRegExp(s));
}
@@ -50,7 +50,7 @@ bool FileNameScheme::matches(const TQString &fileName) const
* does not work as a separator.
*/
TQString stripped = fileName;
- stripped.truncate(stripped.tqfindRev('.'));
+ stripped.truncate(stripped.findRev('.'));
return m_regExp.exactMatch(stripped);
}
@@ -103,7 +103,7 @@ TQString FileNameScheme::composeRegExp(const TQString &s) const
TQString regExp = TQRegExp::escape(s.simplifyWhiteSpace());
regExp = ".*" + regExp;
- regExp.tqreplace(' ', "\\s+");
+ regExp.replace(' ', "\\s+");
regExp = KMacroExpander::expandMacros(regExp, substitutions);
regExp += "[^/]*$";
return regExp;
@@ -187,11 +187,11 @@ void TagGuesser::guess(const TQString &absFileName)
for (; it != end; ++it) {
const FileNameScheme schema(*it);
if(schema.matches(absFileName)) {
- m_title = capitalizeWords(schema.title().tqreplace('_', " ")).stripWhiteSpace();
- m_artist = capitalizeWords(schema.artist().tqreplace('_', " ")).stripWhiteSpace();
- m_album = capitalizeWords(schema.album().tqreplace('_', " ")).stripWhiteSpace();
+ m_title = capitalizeWords(schema.title().replace('_', " ")).stripWhiteSpace();
+ m_artist = capitalizeWords(schema.artist().replace('_', " ")).stripWhiteSpace();
+ m_album = capitalizeWords(schema.album().replace('_', " ")).stripWhiteSpace();
m_track = schema.track().stripWhiteSpace();
- m_comment = schema.comment().tqreplace('_', " ").stripWhiteSpace();
+ m_comment = schema.comment().replace('_', " ").stripWhiteSpace();
break;
}
}
@@ -206,10 +206,10 @@ TQString TagGuesser::capitalizeWords(const TQString &s)
result[ 0 ] = result[ 0 ].upper();
const TQRegExp wordRegExp("\\s\\w");
- int i = result.tqfind( wordRegExp );
+ int i = result.find( wordRegExp );
while ( i > -1 ) {
result[ i + 1 ] = result[ i + 1 ].upper();
- i = result.tqfind( wordRegExp, ++i );
+ i = result.find( wordRegExp, ++i );
}
return result;