summaryrefslogtreecommitdiffstats
path: root/kbabel/datatools/length/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/datatools/length/main.cc')
-rw-r--r--kbabel/datatools/length/main.cc22
1 files changed, 11 insertions, 11 deletions
diff --git a/kbabel/datatools/length/main.cc b/kbabel/datatools/length/main.cc
index 6e62c626..5b2bc411 100644
--- a/kbabel/datatools/length/main.cc
+++ b/kbabel/datatools/length/main.cc
@@ -55,13 +55,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_lengthtool, KGenericFactory<LengthTool> ( "kb
using namespace KBabel;
-LengthTool::LengthTool( QObject* parent, const char* name, const QStringList & )
+LengthTool::LengthTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name ), _cache_origin( 0 )
{
i18n("which check found errors","translation has inconsistent length");
}
-bool LengthTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool LengthTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
@@ -89,7 +89,7 @@ bool LengthTool::run( const QString& command, void* data, const QString& datatyp
CatalogItem* item = (CatalogItem*)(data);
bool hasError = false;
- QStringList str, id;
+ TQStringList str, id;
if(!item->isUntranslated()) {
@@ -102,9 +102,9 @@ bool LengthTool::run( const QString& command, void* data, const QString& datatyp
//Ensure KDE plural forms are in a StringList
if( item->pluralForm() == KDESpecific ) {
- str = QStringList::split( "\\n", item->msgstr().first(), true );
- id = QStringList::split( "\\n",
- item->msgid().first().replace( QRegExp(_plurals), ""), true );
+ str = TQStringList::split( "\\n", item->msgstr().first(), true );
+ id = TQStringList::split( "\\n",
+ item->msgid().first().replace( TQRegExp(_plurals), ""), true );
} else {
str = item->msgstr();
id = item->msgid();
@@ -116,11 +116,11 @@ bool LengthTool::run( const QString& command, void* data, const QString& datatyp
//FIXME: replace 10% check with configurable setting or a statistical
//based expected length relationship
int idlen, strlen;
- for( QStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
- QString iditem = (*i);
- idlen = iditem.replace( QRegExp(_context),"").length();
- for( QStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
- QString stritem = (*j);
+ for( TQStringList::Iterator i = id.begin() ; i != id.end() ; i++ ) {
+ TQString iditem = (*i);
+ idlen = iditem.replace( TQRegExp(_context),"").length();
+ for( TQStringList::Iterator j = str.begin() ; j != str.end() ; j++ ) {
+ TQString stritem = (*j);
strlen = stritem.length();
hasError = hasError || (strlen < (0.1 * idlen))
|| (strlen > (10 * idlen));