diff options
Diffstat (limited to 'kbabel/datatools/xml/main.cc')
-rw-r--r-- | kbabel/datatools/xml/main.cc | 42 |
1 files changed, 21 insertions, 21 deletions
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 <qdom.h> +#include <tqdom.h> #include <kconfig.h> #include <kdebug.h> @@ -54,13 +54,13 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xmltool, KGenericFactory<XMLTool> ( "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("<para>" + text + "</para>" ); } -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("<para>" + test + "</para>" ); } -bool XMLTool::isNonCaseWithoutCommonCompliant( const QString& text) +bool XMLTool::isNonCaseWithoutCommonCompliant( const TQString& text) { - QDomDocument doc; - QString test = text.lower(); - QRegExp rx( "(<br>)|(<hr>)|(<p>)||(<\\w+@(\\w+.)*\\w+>)" ); + TQDomDocument doc; + TQString test = text.lower(); + TQRegExp rx( "(<br>)|(<hr>)|(<p>)||(<\\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("<para>" + test + "</para>" ); } |