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.cc54
1 files changed, 27 insertions, 27 deletions
diff --git a/kbabel/datatools/arguments/main.cc b/kbabel/datatools/arguments/main.cc
index fd3daf3c..e80c7c35 100644
--- a/kbabel/datatools/arguments/main.cc
+++ b/kbabel/datatools/arguments/main.cc
@@ -51,13 +51,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_argstool, KGenericFactory<ArgumentTool> ( "kb
using namespace KBabel;
-ArgumentTool::ArgumentTool( QObject* parent, const char* name, const QStringList & )
+ArgumentTool::ArgumentTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 )
{
i18n( "what check found errors","arguments");
}
-bool ArgumentTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool ArgumentTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -96,13 +96,13 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
if(!item->isUntranslated())
{
- QString formatChars="dioxXucsfeEgGp%";
+ TQString formatChars="dioxXucsfeEgGp%";
if( _checkPlurals ) formatChars+="n";
// FIXME: this should care about plural forms in msgid
- QString line=item->msgid().first();
- QStringList argList;
+ TQString line=item->msgid().first();
+ TQStringList argList;
// if( isPluralForm() )
{
@@ -114,17 +114,17 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
}
}
line.replace(_context, "");
- line.replace(QRegExp("\\n"),"");
+ line.replace(TQRegExp("\\n"),"");
line.simplifyWhiteSpace();
// flag, for GNU only we can allow reordering
bool non_gnu = (item->pluralForm() == KDESpecific);
- int index=line.find(QRegExp("%."));
+ int index=line.find(TQRegExp("%."));
while(index>=0)
{
- int endIndex=line.find(QRegExp("[^\\d]"),index+1);
+ int endIndex=line.find(TQRegExp("[^\\d]"),index+1);
if(endIndex<0)
{
endIndex=line.length();
@@ -135,15 +135,15 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
}
if(endIndex - index > 1 ) {
- QString arg = line.mid(index,endIndex-index);
- if( arg.contains( QRegExp("\\d") ) ) {
+ TQString arg = line.mid(index,endIndex-index);
+ if( arg.contains( TQRegExp("\\d") ) ) {
non_gnu = true;
}
argList.append(arg);
}
- index=line.find(QRegExp("%."),endIndex);
+ index=line.find(TQRegExp("%."),endIndex);
}
if( item->pluralForm()==KDESpecific)
@@ -157,22 +157,22 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
// generate for each plural form to be checked separately
line=item->msgstr().first();
- QStringList lines;
+ TQStringList lines;
// FIXME; this is KDE specific
if( item->pluralForm() == KDESpecific )
{
- lines = QStringList::split("\\n",line);
+ lines = TQStringList::split("\\n",line);
}
else
{
lines.append(line);
}
- QStringList argCache = argList;
- QStringList foundArgs;
+ TQStringList argCache = argList;
+ TQStringList foundArgs;
- for(QStringList::Iterator i = lines.begin() ; i!=lines.end() ; i++)
+ for(TQStringList::Iterator i = lines.begin() ; i!=lines.end() ; i++)
{
// initialize for the next plural form
foundArgs.clear();
@@ -180,9 +180,9 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
line=(*i);
- line.replace(QRegExp("\\n"),"");
+ line.replace(TQRegExp("\\n"),"");
- QRegExp argdesc(
+ TQRegExp argdesc(
"%((["+formatChars+"])"
+"|(\\d)+"
+"|(\\d)+\\$(["+formatChars+"])"
@@ -204,7 +204,7 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
argList = argCache;
if( non_gnu ) {
- for ( QStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it ) {
+ for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it ) {
if( argList.find( *it ) == argList.end() ) {
hasError = true;
break;
@@ -220,11 +220,11 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
else
{
// handle GNU with replacements
- QStringList::Iterator oit = argList.begin();
- for ( QStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it , ++oit) {
+ TQStringList::Iterator oit = argList.begin();
+ for ( TQStringList::Iterator it = foundArgs.begin(); it != foundArgs.end(); ++it , ++oit) {
if( *it == *oit ) {
// argument is the same, mark as used
- *oit = QString::null;
+ *oit = TQString::null;
} else {
// try to strip replacement
int index = (*it).find( '$' );
@@ -233,13 +233,13 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
hasError = true;
break;
}
- QString place = (*it).mid( 1, index-1 );
- QString arg = (*it).right( index );
+ TQString place = (*it).mid( 1, index-1 );
+ TQString arg = (*it).right( index );
arg[0] = '%';
- QStringList::Iterator a = argList.at( place.toInt()-1 );
+ TQStringList::Iterator a = argList.at( place.toInt()-1 );
if( a != argList.end() && (*a) == arg )
{
- (*a) = QString::null;
+ (*a) = TQString::null;
}
else
{
@@ -249,7 +249,7 @@ bool ArgumentTool::run( const QString& command, void* data, const QString& datat
}
}
- for ( QStringList::Iterator it = argList.begin(); it != argList.end(); ++it) {
+ for ( TQStringList::Iterator it = argList.begin(); it != argList.end(); ++it) {
if( ! (*it).isNull () ) {
// argument is the same, mark as used
hasError = true;