diff options
Diffstat (limited to 'kbabel/datatools/xml')
-rw-r--r-- | kbabel/datatools/xml/main.cc | 30 | ||||
-rw-r--r-- | kbabel/datatools/xml/main.h | 9 |
2 files changed, 20 insertions, 19 deletions
diff --git a/kbabel/datatools/xml/main.cc b/kbabel/datatools/xml/main.cc index 3bcf66da..57a6f785 100644 --- a/kbabel/datatools/xml/main.cc +++ b/kbabel/datatools/xml/main.cc @@ -19,11 +19,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -54,8 +54,8 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_xmltool, KGenericFactory<XMLTool> ( "kbabelda using namespace KBabel; -XMLTool::XMLTool( TQObject* parent, const char* name, const TQStringList & ) - : KDataTool( parent, name ), _cache_origin( 0 ) +XMLTool::XMLTool( TQObject* tqparent, const char* name, const TQStringList & ) + : KDataTool( tqparent, name ), _cache_origin( 0 ) { i18n( "what check found errors", "XML tags" ); } @@ -94,12 +94,12 @@ bool XMLTool::run( const TQString& command, void* data, const TQString& datatype uint correctnessLevel = 0; TQString msgid = item->msgid().first(); - msgid.replace( "\\\"", "\"" ); // Change '\"' to '"' - msgid.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); - msgid.replace( _context, "" ); - msgid.replace("\n",""); // delete newlines + msgid.tqreplace( "\\\"", "\"" ); // Change '\"' to '"' + msgid.tqreplace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); + msgid.tqreplace( _context, "" ); + msgid.tqreplace("\n",""); // delete newlines - if( _levelCache.contains(msgid) ) + if( _levelCache.tqcontains(msgid) ) { correctnessLevel = _levelCache[msgid]; } @@ -134,8 +134,8 @@ bool XMLTool::run( const TQString& command, void* data, const TQString& datatype for( TQStringList::Iterator form = str.begin() ; form != str.end() ; form++ ) { TQString text=(*form); - text.replace( "\\\"", "\"" ); // Change '\"' to '"' - text.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); + text.tqreplace( "\\\"", "\"" ); // Change '\"' to '"' + text.tqreplace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&" ); // isNonCaseWithoutCommonCompliant can fail // even though higher level checks works @@ -189,16 +189,16 @@ bool XMLTool::isNonCaseWithoutCommonCompliant( const TQString& text) TQDomDocument doc; TQString test = text.lower(); TQRegExp rx( "(<br>)|(<hr>)|(<p>)||(<\\w+@(\\w+.)*\\w+>)" ); - test.replace( rx, "" ); + test.tqreplace( rx, "" ); TQString a; do { a = test; - test.replace( TQRegExp("<[^_:A-Za-z/]"), "" ); + test.tqreplace( TQRegExp("<[^_:A-Za-z/]"), "" ); } while( a!=test); - test.replace( TQRegExp("<$"), "" ); + test.tqreplace( TQRegExp("<$"), "" ); return doc.setContent("<para>" + test + "</para>" ); } diff --git a/kbabel/datatools/xml/main.h b/kbabel/datatools/xml/main.h index 68c06cdb..1b983475 100644 --- a/kbabel/datatools/xml/main.h +++ b/kbabel/datatools/xml/main.h @@ -19,11 +19,11 @@ In addition, as a special exception, the copyright holders give permission to link the code of this program with any edition of - the Qt library by Trolltech AS, Norway (or with modified versions - of Qt that use the same license as Qt), and distribute linked + the TQt library by Trolltech AS, Norway (or with modified versions + of TQt that use the same license as TQt), and distribute linked combinations including the two. You must obey the GNU General Public License in all respects for all of the code used other than - Qt. If you modify this file, you may extend this exception to + TQt. If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your version. @@ -41,9 +41,10 @@ class XMLTool : public KDataTool { Q_OBJECT + TQ_OBJECT public: - XMLTool( TQObject* parent, const char* name, const TQStringList & ); + XMLTool( TQObject* tqparent, const char* name, const TQStringList & ); virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype); private: bool isFullyCompliant( const TQString& text); |