summaryrefslogtreecommitdiffstats
path: root/kode/kxml_compiler/parser.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kode/kxml_compiler/parser.cpp')
-rw-r--r--kode/kxml_compiler/parser.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/kode/kxml_compiler/parser.cpp b/kode/kxml_compiler/parser.cpp
index bc451ce0d..9b3f33b99 100644
--- a/kode/kxml_compiler/parser.cpp
+++ b/kode/kxml_compiler/parser.cpp
@@ -35,11 +35,11 @@
#include <ksimpleconfig.h>
#include <kstandarddirs.h>
-#include <qfile.h>
-#include <qtextstream.h>
-#include <qdom.h>
-#include <qregexp.h>
-#include <qmap.h>
+#include <tqfile.h>
+#include <tqtextstream.h>
+#include <tqdom.h>
+#include <tqregexp.h>
+#include <tqmap.h>
#include <iostream>
@@ -54,10 +54,10 @@ bool Pattern::isEmpty()
return !optional && !zeroOrMore && !oneOrMore && !choice;
}
-QString Pattern::asString()
+TQString Pattern::asString()
{
if ( isEmpty() ) return "";
- QString str = "( ";
+ TQString str = "( ";
if ( optional ) str += "optional ";
if ( zeroOrMore ) str += "zeroOrMore ";
if ( oneOrMore ) str += "oneOrMore ";
@@ -83,20 +83,20 @@ Parser::Parser()
{
}
-Element *Parser::parse( const QDomElement &docElement )
+Element *Parser::parse( const TQDomElement &docElement )
{
Element *start = 0;
- QDomNode n1;
+ TQDomNode n1;
for( n1 = docElement.firstChild(); !n1.isNull(); n1 = n1.nextSibling() ) {
- QDomElement e1 = n1.toElement();
+ TQDomElement e1 = n1.toElement();
kdDebug() << "TOP LEVEL element " << e1.tagName() << endl;
if ( e1.tagName() == "define" ) {
Element *d = new Element;
d->name = e1.attribute( "name" );
parseElement( e1, d, Pattern() );
Element::List definitions;
- QMap<QString,Element::List >::ConstIterator it;
+ TQMap<TQString,Element::List >::ConstIterator it;
it = mDefinitionMap.find( d->name );
if ( it != mDefinitionMap.end() ) definitions = *it;
definitions.append( d );
@@ -112,14 +112,14 @@ Element *Parser::parse( const QDomElement &docElement )
return start;
}
-Reference *Parser::parseReference( const QDomElement &referenceElement )
+Reference *Parser::parseReference( const TQDomElement &referenceElement )
{
Reference *r = new Reference;
r->name = referenceElement.attribute( "name" );
return r;
}
-bool Parser::parseAttribute( const QDomElement &attributeElement,
+bool Parser::parseAttribute( const TQDomElement &attributeElement,
Attribute *a )
{
a->name = attributeElement.attribute( "name" );
@@ -127,14 +127,14 @@ bool Parser::parseAttribute( const QDomElement &attributeElement,
return true;
}
-bool Parser::parseElement( const QDomElement &elementElement, Element *e,
+bool Parser::parseElement( const TQDomElement &elementElement, Element *e,
Pattern pattern )
{
kdDebug() << "parseElement " << e->name << endl;
- QDomNode n1;
+ TQDomNode n1;
for( n1 = elementElement.firstChild(); !n1.isNull(); n1 = n1.nextSibling() ) {
- QDomElement e1 = n1.toElement();
+ TQDomElement e1 = n1.toElement();
if ( e1.tagName() == "element" ) {
Element *element = new Element;
element->name = e1.attribute( "name" );
@@ -191,7 +191,7 @@ void Parser::substituteReferences( Element *s )
} else {
r->substituted = true;
}
- QMap<QString,Element::List >::ConstIterator it1;
+ TQMap<TQString,Element::List >::ConstIterator it1;
it1 = mDefinitionMap.find( r->name );
if ( it1 != mDefinitionMap.end() ) {
Element::List elements = *it1;
@@ -292,7 +292,7 @@ void Parser::dumpTree( Element *s )
void Parser::dumpDefinitionMap()
{
std::cout << "DEFINITION MAP" << std::endl;
- QMap<QString,Element::List >::ConstIterator it;
+ TQMap<TQString,Element::List >::ConstIterator it;
for( it = mDefinitionMap.begin(); it != mDefinitionMap.end(); ++it ) {
dumpElements( *it, 2 );
}