summaryrefslogtreecommitdiffstats
path: root/kbabel/datatools/arguments/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/datatools/arguments/main.cc')
-rw-r--r--kbabel/datatools/arguments/main.cc40
1 files changed, 20 insertions, 20 deletions
diff --git a/kbabel/datatools/arguments/main.cc b/kbabel/datatools/arguments/main.cc
index e80c7c35..4b533061 100644
--- a/kbabel/datatools/arguments/main.cc
+++ b/kbabel/datatools/arguments/main.cc
@@ -19,11 +19,11 @@
In addition, as a special exception, the copyright holders give
permission to link the code of this program with any edition of
- the Qt library by Trolltech AS, Norway (or with modified versions
- of Qt that use the same license as Qt), and distribute linked
+ the TQt library by Trolltech AS, Norway (or with modified versions
+ of TQt that use the same license as TQt), and distribute linked
combinations including the two. You must obey the GNU General
Public License in all respects for all of the code used other than
- Qt. If you modify this file, you may extend this exception to
+ TQt. If you modify this file, you may extend this exception to
your version of the file, but you are not obligated to do so. If
you do not wish to do so, delete this exception statement from
your version.
@@ -51,8 +51,8 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_argstool, KGenericFactory<ArgumentTool> ( "kb
using namespace KBabel;
-ArgumentTool::ArgumentTool( TQObject* parent, const char* name, const TQStringList & )
- : KDataTool( parent, name ), _cache_origin( 0 )
+ArgumentTool::ArgumentTool( TQObject* tqparent, const char* name, const TQStringList & )
+ : KDataTool( tqparent, name ), _cache_origin( 0 )
{
i18n( "what check found errors","arguments");
}
@@ -110,46 +110,46 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
if( line.startsWith("_n:" ))
{
// truncate text after first \n to get args only once
- line = line.mid(0,line.find("\\n"));
+ line = line.mid(0,line.tqfind("\\n"));
}
}
- line.replace(_context, "");
- line.replace(TQRegExp("\\n"),"");
+ line.tqreplace(_context, "");
+ line.tqreplace(TQRegExp("\\n"),"");
line.simplifyWhiteSpace();
// flag, for GNU only we can allow reordering
bool non_gnu = (item->pluralForm() == KDESpecific);
- int index=line.find(TQRegExp("%."));
+ int index=line.tqfind(TQRegExp("%."));
while(index>=0)
{
- int endIndex=line.find(TQRegExp("[^\\d]"),index+1);
+ int endIndex=line.tqfind(TQRegExp("[^\\d]"),index+1);
if(endIndex<0)
{
endIndex=line.length();
}
- else if( formatChars.contains(line[endIndex]) )
+ else if( formatChars.tqcontains(line[endIndex]) )
{
endIndex++;
}
if(endIndex - index > 1 ) {
TQString arg = line.mid(index,endIndex-index);
- if( arg.contains( TQRegExp("\\d") ) ) {
+ if( arg.tqcontains( TQRegExp("\\d") ) ) {
non_gnu = true;
}
argList.append(arg);
}
- index=line.find(TQRegExp("%."),endIndex);
+ index=line.tqfind(TQRegExp("%."),endIndex);
}
if( item->pluralForm()==KDESpecific)
{
// FIXME: this is KDE specific
- if( _checkPlurals && line.startsWith("_n:" ) && !argList.contains("%n") )
+ if( _checkPlurals && line.startsWith("_n:" ) && !argList.tqcontains("%n") )
{
argList.append("%n");
}
@@ -180,7 +180,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
line=(*i);
- line.replace(TQRegExp("\\n"),"");
+ line.tqreplace(TQRegExp("\\n"),"");
TQRegExp argdesc(
"%((["+formatChars+"])"
@@ -196,7 +196,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
if( index == -1 ) break;
// do not add a redundant argument, if it is non GNU
- if( !non_gnu || !foundArgs.contains( argdesc.cap(0) ) )
+ if( !non_gnu || !foundArgs.tqcontains( argdesc.cap(0) ) )
foundArgs.append( argdesc.cap( 0 ) );
} while( true );
@@ -205,7 +205,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
if( non_gnu ) {
for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it ) {
- if( argList.find( *it ) == argList.end() ) {
+ if( argList.tqfind( *it ) == argList.end() ) {
hasError = true;
break;
} else {
@@ -224,10 +224,10 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it , ++oit) {
if( *it == *oit ) {
// argument is the same, mark as used
- *oit = TQString::null;
+ *oit = TQString();
} else {
// try to strip replacement
- int index = (*it).find( '$' );
+ int index = (*it).tqfind( '$' );
if( index == -1 ) {
// there is no replacement, this is wrong
hasError = true;
@@ -239,7 +239,7 @@ bool ArgumentTool::run( const TQString& command, void* data, const TQString& dat
TQStringList::Iterator a = argList.at( place.toInt()-1 );
if( a != argList.end() && (*a) == arg )
{
- (*a) = TQString::null;
+ (*a) = TQString();
}
else
{