From 7be55ffa061c026e35e2d6a0effe1161ddb0d41f Mon Sep 17 00:00:00 2001 From: tpearson Date: Sat, 31 Jul 2010 19:53:50 +0000 Subject: Trinity Qt initial conversion git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kode/kxml_compiler/parser.cpp | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'kode/kxml_compiler/parser.cpp') 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 #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include @@ -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::ConstIterator it; + TQMap::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::ConstIterator it1; + TQMap::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::ConstIterator it; + TQMap::ConstIterator it; for( it = mDefinitionMap.begin(); it != mDefinitionMap.end(); ++it ) { dumpElements( *it, 2 ); } -- cgit v1.2.1