summaryrefslogtreecommitdiffstats
path: root/kbabel/datatools/xml/main.cc
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/xml/main.cc
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/xml/main.cc')
-rw-r--r--kbabel/datatools/xml/main.cc42
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]+;)" ), "&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>" );
}