summaryrefslogtreecommitdiffstats
path: root/kbabel/datatools/xml
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/datatools/xml')
-rw-r--r--kbabel/datatools/xml/main.cc42
-rw-r--r--kbabel/datatools/xml/main.h16
2 files changed, 29 insertions, 29 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]+;)" ), "&amp;" );
+ msgid.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
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]+;)" ), "&amp;" );
+ text.replace( TQRegExp( "&(?![a-zA-Z0-9]+;)" ), "&amp;" );
// 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>" );
}
diff --git a/kbabel/datatools/xml/main.h b/kbabel/datatools/xml/main.h
index 357a4f0d..68c06cdb 100644
--- a/kbabel/datatools/xml/main.h
+++ b/kbabel/datatools/xml/main.h
@@ -35,7 +35,7 @@
#include "kbproject.h"
-#include <qmap.h>
+#include <tqmap.h>
#include <kdatatool.h>
class XMLTool : public KDataTool
@@ -43,17 +43,17 @@ class XMLTool : public KDataTool
Q_OBJECT
public:
- XMLTool( QObject* parent, const char* name, const QStringList & );
- virtual bool run( const QString& command, void* data, const QString& datatype, const QString& mimetype);
+ XMLTool( TQObject* parent, const char* name, const TQStringList & );
+ virtual bool run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype);
private:
- bool isFullyCompliant( const QString& text);
- bool isNonCaseCompliant( const QString& text);
- bool isNonCaseWithoutCommonCompliant( const QString& text);
+ bool isFullyCompliant( const TQString& text);
+ bool isNonCaseCompliant( const TQString& text);
+ bool isNonCaseWithoutCommonCompliant( const TQString& text);
- QMap<QString,int> _levelCache;
+ TQMap<TQString,int> _levelCache;
KBabel::Project::Ptr _cache_origin;
- QRegExp _context;
+ TQRegExp _context;
};
#endif