diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2010-07-31 19:53:50 +0000 |
commit | 7be55ffa061c026e35e2d6a0effe1161ddb0d41f (patch) | |
tree | 8474f9b444b2756228600050f07a7ff25de532b2 /kode/kwsdl/wscl/parser.cpp | |
parent | f587f20a6d09f1729dd0a8c1cd8ee0110aec7451 (diff) | |
download | tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.tar.gz tdepim-7be55ffa061c026e35e2d6a0effe1161ddb0d41f.zip |
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdepim@1157655 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kode/kwsdl/wscl/parser.cpp')
-rw-r--r-- | kode/kwsdl/wscl/parser.cpp | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/kode/kwsdl/wscl/parser.cpp b/kode/kwsdl/wscl/parser.cpp index 129c3c3dc..a21d05fe8 100644 --- a/kode/kwsdl/wscl/parser.cpp +++ b/kode/kwsdl/wscl/parser.cpp @@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA. */ -#include <qdom.h> +#include <tqdom.h> #include "parser.h" @@ -33,10 +33,10 @@ Parser::~Parser() { } -void Parser::parse( const QString &xml ) +void Parser::parse( const TQString &xml ) { - QDomDocument doc( "kwscl" ); - QString errorMsg; + TQDomDocument doc( "kwscl" ); + TQString errorMsg; int errorLine, errorColumn; bool ok = doc.setContent( xml, true, &errorMsg, &errorLine, &errorColumn ); if ( !ok ) { @@ -44,13 +44,13 @@ void Parser::parse( const QString &xml ) return; } - QDomNodeList nodes = doc.elementsByTagName( "Conversation" ); + TQDomNodeList nodes = doc.elementsByTagName( "Conversation" ); if ( nodes.count() <= 0 ) { qDebug( "No conversation tag found in wscl data" ); return; } - QDomElement conversationElement = nodes.item( 0 ).toElement(); + TQDomElement conversationElement = nodes.item( 0 ).toElement(); mConversation.setName( conversationElement.attribute( "name" ) ); mConversation.setVersion( conversationElement.attribute( "version" ) ); @@ -60,16 +60,16 @@ void Parser::parse( const QString &xml ) mConversation.setInitialInteraction( conversationElement.attribute( "initialInteraction" ) ); mConversation.setFinalInteraction( conversationElement.attribute( "finalInteraction" ) ); - QDomNode node = conversationElement.firstChild(); + TQDomNode node = conversationElement.firstChild(); while ( !node.isNull() ) { - QDomElement element = node.toElement(); + TQDomElement element = node.toElement(); if ( !element.isNull() ) { if ( element.tagName() == "ConversationInteractions" ) { Interaction::List interactions; - QDomNode interactionNode = element.firstChild(); + TQDomNode interactionNode = element.firstChild(); while ( !interactionNode.isNull() ) { - QDomElement interactionElement = interactionNode.toElement(); + TQDomElement interactionElement = interactionNode.toElement(); if ( !interactionElement.isNull() ) { if ( interactionElement.tagName() != "Interaction" ) { qDebug( "Expected tag name 'Interaction', got '%s'", interactionElement.tagName().latin1() ); @@ -78,7 +78,7 @@ void Parser::parse( const QString &xml ) Interaction interaction; interaction.setId( interactionElement.attribute( "id" ) ); - const QString type = interactionElement.attribute( "interactionType" ); + const TQString type = interactionElement.attribute( "interactionType" ); if ( type == "ReceiveSend" ) interaction.setType( Interaction::ReceiveSend ); else if ( type == "SendReceive" ) @@ -97,11 +97,11 @@ void Parser::parse( const QString &xml ) XMLDocument inputDocument; XMLDocument outputDocument; - QDomNode contentNode = interactionElement.firstChild(); + TQDomNode contentNode = interactionElement.firstChild(); while ( !contentNode.isNull() ) { - QDomElement contentElement = contentNode.toElement(); + TQDomElement contentElement = contentNode.toElement(); if ( !contentElement.isNull() ) { - const QString tagName = contentElement.tagName(); + const TQString tagName = contentElement.tagName(); if ( tagName == "InboundXMLDocument" ) { XMLDocument document; document.setId( contentElement.attribute( "id" ) ); @@ -170,9 +170,9 @@ void Parser::parse( const QString &xml ) } else if ( element.tagName() == "ConversationTransitions" ) { Transition::List transitions; - QDomNode transitionNode = element.firstChild(); + TQDomNode transitionNode = element.firstChild(); while ( !transitionNode.isNull() ) { - QDomElement transitionElement = transitionNode.toElement(); + TQDomElement transitionElement = transitionNode.toElement(); if ( !transitionElement.isNull() ) { if ( transitionElement.tagName() != "Transition" ) { qDebug( "Expected tag name 'Transition', got '%s'", transitionElement.tagName().latin1() ); @@ -181,11 +181,11 @@ void Parser::parse( const QString &xml ) Transition transition; - QDomNode contentNode = transitionElement.firstChild(); + TQDomNode contentNode = transitionElement.firstChild(); while ( !contentNode.isNull() ) { - QDomElement contentElement = contentNode.toElement(); + TQDomElement contentElement = contentNode.toElement(); if ( !contentElement.isNull() ) { - const QString tagName = contentElement.tagName(); + const TQString tagName = contentElement.tagName(); if ( tagName == "SourceInteraction" ) transition.setSourceInteraction( contentElement.attribute( "href" ) ); else if ( tagName == "DestinationInteraction" ) |