summaryrefslogtreecommitdiffstats
path: root/kbabel/datatools/regexp/main.cc
diff options
context:
space:
mode:
Diffstat (limited to 'kbabel/datatools/regexp/main.cc')
-rw-r--r--kbabel/datatools/regexp/main.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/kbabel/datatools/regexp/main.cc b/kbabel/datatools/regexp/main.cc
index a101d5c9..eca0be81 100644
--- a/kbabel/datatools/regexp/main.cc
+++ b/kbabel/datatools/regexp/main.cc
@@ -27,11 +27,11 @@
#include "main.h"
#include <math.h>
-#include <qdir.h>
-#include <qfile.h>
-#include <qdom.h>
-#include <qstringlist.h>
-#include <qregexp.h>
+#include <tqdir.h>
+#include <tqfile.h>
+#include <tqdom.h>
+#include <tqstringlist.h>
+#include <tqregexp.h>
#include <kconfig.h>
#include <kdebug.h>
#include <kgenericfactory.h>
@@ -49,16 +49,16 @@ K_EXPORT_COMPONENT_FACTORY( kbabel_regexptool, KGenericFactory<RegExpTool> ( "kb
using namespace KBabel;
-RegExpTool::RegExpTool( QObject* parent, const char* name, const QStringList & )
+RegExpTool::RegExpTool( TQObject* parent, const char* name, const TQStringList & )
: KDataTool( parent, name )
{
i18n("which check found errors","translation has inconsistent length");
loadExpressions();
if ( ! _error.isNull() )
- KMessageBox::error( (QWidget*)parent, i18n( "Error loading data (%1)" ).arg( _error ) );
+ KMessageBox::error( (TQWidget*)parent, i18n( "Error loading data (%1)" ).arg( _error ) );
}
-bool RegExpTool::run( const QString& command, void* data, const QString& datatype, const QString& mimetype )
+bool RegExpTool::run( const TQString& command, void* data, const TQString& datatype, const TQString& mimetype )
{
if ( command != "validate" )
{
@@ -86,8 +86,8 @@ bool RegExpTool::run( const QString& command, void* data, const QString& datatyp
if(!item->isUntranslated()) {
ExpressionList::Iterator it( _list.begin() );
ExpressionList::Iterator end( _list.end() );
- QStringList msgs = item->msgstr();
- QStringList results;
+ TQStringList msgs = item->msgstr();
+ TQStringList results;
for ( ; it != end; ++it ) {
results.clear();
results = msgs.grep( (*it).regExp() );
@@ -110,8 +110,8 @@ bool RegExpTool::run( const QString& command, void* data, const QString& datatyp
void RegExpTool::loadExpressions()
{
// TODO: Change file path
- QFile file( QDir::homeDirPath() + "/.kde/share/apps/kbabel/regexplist.xml" );
- QDomDocument doc;
+ TQFile file( TQDir::homeDirPath() + "/.kde/share/apps/kbabel/regexplist.xml" );
+ TQDomDocument doc;
if ( ! file.open( IO_ReadOnly ) ) {
kdDebug() << "File not found" << endl;
@@ -125,10 +125,10 @@ void RegExpTool::loadExpressions()
}
file.close();
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
+ TQDomElement docElem = doc.documentElement();
+ TQDomNode n = docElem.firstChild();
while( !n.isNull() ) {
- QDomElement e = n.toElement();
+ TQDomElement e = n.toElement();
if( !e.isNull() )
elementToExpression( e );
if ( ! _error.isNull() )
@@ -137,10 +137,10 @@ void RegExpTool::loadExpressions()
}
}
-void RegExpTool::elementToExpression( const QDomElement& e )
+void RegExpTool::elementToExpression( const TQDomElement& e )
{
- QString name;
- QString exp;
+ TQString name;
+ TQString exp;
bool cs = false; //Expressions are case insensitive by default
if ( e.tagName().compare( "item" ) != 0 ) {
@@ -148,13 +148,13 @@ void RegExpTool::elementToExpression( const QDomElement& e )
return;
}
- QDomNode n = e.firstChild();
+ TQDomNode n = e.firstChild();
if ( n.isNull() ) {
_error = i18n( "First child of 'item' is not a node" );
return;
}
- QDomElement el = n.toElement();
+ TQDomElement el = n.toElement();
if ( el.isNull() || el.tagName().compare( "name" ) != 0 ) {
_error = i18n( "Expected tag 'name'" );
return;
@@ -175,7 +175,7 @@ void RegExpTool::elementToExpression( const QDomElement& e )
cs = true;
kdDebug(KBABEL) << "RegExpTool: Adding expression: " << name << endl;
- _list.append( Expression( name, QRegExp( exp, cs ) ) );
+ _list.append( Expression( name, TQRegExp( exp, cs ) ) );
}
#include "main.moc"