summaryrefslogtreecommitdiffstats
path: root/src/upcvalidator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/upcvalidator.cpp')
-rw-r--r--src/upcvalidator.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/upcvalidator.cpp b/src/upcvalidator.cpp
index 8746595..fb2bd87 100644
--- a/src/upcvalidator.cpp
+++ b/src/upcvalidator.cpp
@@ -31,7 +31,7 @@ TQValidator::State UPCValidator::validate(TQString& input_, int& pos_) const {
}
// no spaces allowed
- if(input_.tqcontains(' ')) {
+ if(input_.contains(' ')) {
return TQValidator::Invalid;
}
@@ -67,7 +67,7 @@ void UPCValidator::fixup(TQString& input_) const {
}
input_ = input_.stripWhiteSpace();
- int pos = input_.tqfind(' ');
+ int pos = input_.find(' ');
if(pos > -1) {
input_ = input_.left(pos);
}
@@ -98,7 +98,7 @@ TQValidator::State UPCValidator::decodeCat(TQString& input_) const {
if(!input_.startsWith(TQString::tqfromLatin1(".C3"))) { // all cuecat codes start with .C3
return Invalid;
}
- const int periods = input_.tqcontains('.');
+ const int periods = input_.contains('.');
if(periods < 4) {
return Intermediate; // not enough yet
} else if(periods > 4) {
@@ -113,9 +113,9 @@ TQValidator::State UPCValidator::decodeCat(TQString& input_) const {
for(uint i = 0; i < code.length(); ++i) {
if(code[i] >= 'A' && code[i] <= 'Z') {
- code.tqreplace(i, 1, code[i].lower());
+ code.replace(i, 1, code[i].lower());
} else if(code[i] >= 'a' && code[i] <= 'z') {
- code.tqreplace(i, 1, code[i].upper());
+ code.replace(i, 1, code[i].upper());
}
}
@@ -123,7 +123,7 @@ TQValidator::State UPCValidator::decodeCat(TQString& input_) const {
for(uint i = 0; i < code.length(); ++i) {
char c = code[i].latin1() ^ 'C';
- code.tqreplace(i, 1, c);
+ code.replace(i, 1, c);
}
input_ = code;