From 4ae0c208b66e0f7954e194384464fe2d0a2c56dd Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:51:49 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdesdk@1157652 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kbabel/datatools/xml/main.cc | 42 +++++++++++++++++++++--------------------- 1 file changed, 21 insertions(+), 21 deletions(-) (limited to 'kbabel/datatools/xml/main.cc') diff --git a/kbabel/datatools/xml/main.cc b/kbabel/datatools/xml/main.cc index cae88b4c..3bcf66da 100644 --- a/kbabel/datatools/xml/main.cc +++ b/kbabel/datatools/xml/main.cc @@ -35,7 +35,7 @@ #include "catalogsettings.h" #include "main.h" -#include +#include #include #include @@ -54,13 +54,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xmltool, KGenericFactory ( "kbabelda using namespace KBabel; -XMLTool::XMLTool( QObject* parent, const char* name, const QStringList & ) +XMLTool::XMLTool( TQObject* parent, const char* name, const TQStringList & ) : KDataTool( parent, name ), _cache_origin( 0 ) { i18n( "what check found errors", "XML tags" ); } -bool XMLTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype ) +bool XMLTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype ) { if ( command != "validate" ) { @@ -93,9 +93,9 @@ bool XMLTool::run( const QString& command, void* data, const QString& datatype, } uint correctnessLevel = 0; - QString msgid = item->msgid().first(); + TQString msgid = item->msgid().first(); msgid.replace( "\\\"", "\"" ); // Change '\"' to '"' - msgid.replace( QRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); + msgid.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); msgid.replace( _context, "" ); msgid.replace("\n",""); // delete newlines @@ -130,12 +130,12 @@ bool XMLTool::run( const QString& command, void* data, const QString& datatype, if(!item->isUntranslated()) { - QStringList str = item->msgstr(true); - for( QStringList::Iterator form = str.begin() ; form != str.end() ; form++ ) + TQStringList str = item->msgstr(true); + for( TQStringList::Iterator form = str.begin() ; form != str.end() ; form++ ) { - QString text=(*form); + TQString text=(*form); text.replace( "\\\"", "\"" ); // Change '\"' to '"' - text.replace( QRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); + text.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); // isNonCaseWithoutCommonCompliant can fail // even though higher level checks works @@ -171,34 +171,34 @@ bool XMLTool::run( const QString& command, void* data, const QString& datatype, return FALSE; } -bool XMLTool::isFullyCompliant( const QString& text) +bool XMLTool::isFullyCompliant( const TQString& text) { - QDomDocument doc; + TQDomDocument doc; return doc.setContent("" + text + "" ); } -bool XMLTool::isNonCaseCompliant( const QString& text) +bool XMLTool::isNonCaseCompliant( const TQString& text) { - QDomDocument doc; - QString test = text.lower(); + TQDomDocument doc; + TQString test = text.lower(); return doc.setContent("" + test + "" ); } -bool XMLTool::isNonCaseWithoutCommonCompliant( const QString& text) +bool XMLTool::isNonCaseWithoutCommonCompliant( const TQString& text) { - QDomDocument doc; - QString test = text.lower(); - QRegExp rx( "(
)|(
)|(

)||(<\\w+@(\\w+.)*\\w+>)" ); + TQDomDocument doc; + TQString test = text.lower(); + TQRegExp rx( "(
)|(


)|(

)||(<\\w+@(\\w+.)*\\w+>)" ); test.replace( rx, "" ); - QString a; + TQString a; do { a = test; - test.replace( QRegExp("<[^_:A-Za-z/]"), "" ); + test.replace( TQRegExp("<[^_:A-Za-z/]"), "" ); } while( a!=test); - test.replace( QRegExp("<$"), "" ); + test.replace( TQRegExp("<$"), "" ); return doc.setContent("" + test + "" ); } -- cgit v1.2.1