summaryrefslogtreecommitdiffstats
path: root/kdeui/knumvalidator.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
commit560378aaca1784ba19806a0414a32b20c744de39 (patch)
treece0dfd7c3febf2a1adc7603d1019a8be2083c415 /kdeui/knumvalidator.cpp
parentd4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff)
downloadtdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz
tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdeui/knumvalidator.cpp')
-rw-r--r--kdeui/knumvalidator.cpp30
1 files changed, 15 insertions, 15 deletions
diff --git a/kdeui/knumvalidator.cpp b/kdeui/knumvalidator.cpp
index 436f95431..e60730eed 100644
--- a/kdeui/knumvalidator.cpp
+++ b/kdeui/knumvalidator.cpp
@@ -67,7 +67,7 @@ TQValidator::State KIntValidator::validate ( TQString &str, int & ) const
if (_base > 10)
newStr = newStr.upper();
- if (newStr == TQString::fromLatin1("-")) // a special case
+ if (newStr == TQString::tqfromLatin1("-")) // a special case
if ((_min || _max) && _min >= 0)
ok = false;
else
@@ -209,12 +209,12 @@ TQValidator::State KFloatValidator::validate ( TQString &str, int & ) const
TQString newStr;
newStr = str.stripWhiteSpace();
- if (newStr == TQString::fromLatin1("-")) // a special case
+ if (newStr == TQString::tqfromLatin1("-")) // a special case
if ((_min || _max) && _min >= 0)
ok = false;
else
return TQValidator::Acceptable;
- else if (newStr == TQString::fromLatin1(".") || (d->acceptLocalizedNumbers && newStr==KGlobal::locale()->decimalSymbol())) // another special case
+ else if (newStr == TQString::tqfromLatin1(".") || (d->acceptLocalizedNumbers && newStr==KGlobal::locale()->decimalSymbol())) // another special case
return TQValidator::Acceptable;
else if (newStr.length())
{
@@ -339,30 +339,30 @@ TQValidator::State KDoubleValidator::validate( TQString & input, int & p ) const
t = l->thousandsSeparator();
// first, delete p's and t's:
if ( !p.isEmpty() )
- for ( int idx = s.find( p ) ; idx >= 0 ; idx = s.find( p, idx ) )
+ for ( int idx = s.tqfind( p ) ; idx >= 0 ; idx = s.tqfind( p, idx ) )
s.remove( idx, p.length() );
if ( !t.isEmpty() )
- for ( int idx = s.find( t ) ; idx >= 0 ; idx = s.find( t, idx ) )
+ for ( int idx = s.tqfind( t ) ; idx >= 0 ; idx = s.tqfind( t, idx ) )
s.remove( idx, t.length() );
- // then, replace the d's and n's
- if ( ( !n.isEmpty() && n.find('.') != -1 ) ||
- ( !d.isEmpty() && d.find('-') != -1 ) ) {
- // make sure we don't replace something twice:
- kdWarning() << "KDoubleValidator: decimal symbol contains '-' or "
- "negative sign contains '.' -> improve algorithm" << endl;
+ // then, tqreplace the d's and n's
+ if ( ( !n.isEmpty() && n.tqfind('.') != -1 ) ||
+ ( !d.isEmpty() && d.tqfind('-') != -1 ) ) {
+ // make sure we don't tqreplace something twice:
+ kdWarning() << "KDoubleValidator: decimal symbol tqcontains '-' or "
+ "negative sign tqcontains '.' -> improve algorithm" << endl;
return Invalid;
}
if ( !d.isEmpty() && d != "." )
- for ( int idx = s.find( d ) ; idx >= 0 ; idx = s.find( d, idx + 1 ) )
- s.replace( idx, d.length(), '.');
+ for ( int idx = s.tqfind( d ) ; idx >= 0 ; idx = s.tqfind( d, idx + 1 ) )
+ s.tqreplace( idx, d.length(), '.');
if ( !n.isEmpty() && n != "-" )
- for ( int idx = s.find( n ) ; idx >= 0 ; idx = s.find( n, idx + 1 ) )
- s.replace( idx, n.length(), '-' );
+ for ( int idx = s.tqfind( n ) ; idx >= 0 ; idx = s.tqfind( n, idx + 1 ) )
+ s.tqreplace( idx, n.length(), '-' );
}
return base::validate( s, p );