summaryrefslogtreecommitdiffstats
path: root/kbabel/datatools/length
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:51:49 +0000
commit4ae0c208b66e0f7954e194384464fe2d0a2c56dd (patch)
treeb0a7cd1c184f0003c0292eb416ed27f674f9cc43 /kbabel/datatools/length
parent1964ea0fb4ab57493ca2ebb709c8d3b5395fd653 (diff)
downloadtdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.tar.gz
tdesdk-4ae0c208b66e0f7954e194384464fe2d0a2c56dd.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kbabel/datatools/length')
-rw-r--r--kbabel/datatools/length/main.cc22
-rw-r--r--kbabel/datatools/length/main.h8
2 files changed, 15 insertions, 15 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));
diff --git a/kbabel/datatools/length/main.h b/kbabel/datatools/length/main.h
index 7e84cf55..6a4ec06f 100644
--- a/kbabel/datatools/length/main.h
+++ b/kbabel/datatools/length/main.h
@@ -43,12 +43,12 @@ class LengthTool : public KDataTool
Q_OBJECT
public:
- LengthTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ LengthTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
KBabel::Project::Ptr _cache_origin;
- QRegExp _context;
- QRegExp _plurals;
+ TQRegExp _context;
+ TQRegExp _plurals;
};
#endif