diff options
Diffstat (limited to 'quanta/parts/kafka/kafkacommon.cpp')
-rw-r--r-- | quanta/parts/kafka/kafkacommon.cpp | 216 |
1 files changed, 108 insertions, 108 deletions
diff --git a/quanta/parts/kafka/kafkacommon.cpp b/quanta/parts/kafka/kafkacommon.cpp index fe147bc7..0220646d 100644 --- a/quanta/parts/kafka/kafkacommon.cpp +++ b/quanta/parts/kafka/kafkacommon.cpp @@ -15,7 +15,7 @@ * * ***************************************************************************/ -#include <qptrdict.h> +#include <tqptrdict.h> #include <kdebug.h> #include <dom/dom_exception.h> @@ -136,17 +136,17 @@ Node* kafkaCommon::getPrevNodeNE(Node *node, Node *endNode) } Node* kafkaCommon::DTDGetCommonParent(Node* startNode, Node* endNode, - QValueList<int>& commonParentStartChildLocation, - QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree) + TQValueList<int>& commonParentStartChildLocation, + TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree) { // look for commonParent Node* commonParent = 0; Node* commonParentStartChild = 0, *commonParentEndChild = 0; int locOffset = 1; - QValueList<int> startNodeLocation = getLocation(startNode); - QValueList<int> endNodeLocation = getLocation(endNode); - QValueList<int>::iterator itStart = startNodeLocation.begin(); - QValueList<int>::iterator itEnd = endNodeLocation.begin(); + TQValueList<int> startNodeLocation = getLocation(startNode); + TQValueList<int> endNodeLocation = getLocation(endNode); + TQValueList<int>::iterator itStart = startNodeLocation.begin(); + TQValueList<int>::iterator itEnd = endNodeLocation.begin(); while(itStart != startNodeLocation.end() && itEnd != endNodeLocation.end() && (*itStart) == (*itEnd)) { @@ -186,17 +186,17 @@ Node* kafkaCommon::DTDGetCommonParent(Node* startNode, Node* endNode, } Node* kafkaCommon::DTDGetNonInlineCommonParent(Node* startNode, Node* endNode, - QValueList<int>& commonParentStartChildLocation, - QValueList<int>& commonParentEndChildLocation, Node* nodeSubtree) + TQValueList<int>& commonParentStartChildLocation, + TQValueList<int>& commonParentEndChildLocation, Node* nodeSubtree) { // look for commonParent Node* commonParent = 0; Node* commonParentStartChild = 0, *commonParentEndChild = 0; int locOffset = 1; - QValueList<int> startNodeLocation = getLocation(startNode); - QValueList<int> endNodeLocation = getLocation(endNode); - QValueList<int>::iterator itStart = startNodeLocation.begin(); - QValueList<int>::iterator itEnd = endNodeLocation.begin(); + TQValueList<int> startNodeLocation = getLocation(startNode); + TQValueList<int> endNodeLocation = getLocation(endNode); + TQValueList<int>::iterator itStart = startNodeLocation.begin(); + TQValueList<int>::iterator itEnd = endNodeLocation.begin(); while(itStart != startNodeLocation.end() && itEnd != endNodeLocation.end() && (*itStart) == (*itEnd)) { @@ -368,7 +368,7 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod Node *parent, *nextNE, *prevNE, *realPrevNE, *realNextNE, *realPrev, *realNext, *prev, *next; int nonInlineDepth = 0, nonInlineDepth2 = 0, i; bool b = false; - QString indentation1, indentation2, text; + TQString indentation1, indentation2, text; if(!node) return; @@ -431,13 +431,13 @@ void kafkaCommon::applyIndentation(Node *node, int nbOfSpaces, int nbOfTabs, Nod if(nbOfSpaces == 0) // tabs are used { - indentation1 += QString().fill('\t', nbOfTabs * nonInlineDepth); - indentation2 += QString().fill('\t', nbOfTabs * nonInlineDepth2); + indentation1 += TQString().fill('\t', nbOfTabs * nonInlineDepth); + indentation2 += TQString().fill('\t', nbOfTabs * nonInlineDepth2); } else // spaces are used { - indentation1 += QString().fill(' ', nbOfSpaces * nonInlineDepth); - indentation2 += QString().fill(' ', nbOfSpaces * nonInlineDepth2); + indentation1 += TQString().fill(' ', nbOfSpaces * nonInlineDepth); + indentation2 += TQString().fill(' ', nbOfSpaces * nonInlineDepth2); } //test and add indentations if necessary @@ -759,7 +759,7 @@ void kafkaCommon::fitsNodesPosition(Node* startNode, int colMovement, int lineMo int kafkaCommon::getNodeDisplay(Node *node, bool closingNodeToo) { - QString nodeName; + TQString nodeName; if(!node) return kafkaCommon::errorDisplay; @@ -822,10 +822,10 @@ int kafkaCommon::getNodeDisplay(Node *node, bool closingNodeToo) return kafkaCommon::errorDisplay; } -QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string, +TQString kafkaCommon::removeUnnecessaryWhitespaces(const TQString &string, bool removeAllSpacesAtTheLeft, bool removeAllSpacesAtTheRight) { - /**QString newString; + /**TQString newString; int i; if(string.length() == 0) @@ -845,11 +845,11 @@ QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string, newString = newString.mid(0, newString.length() - 1); return newString;*/ - QString newString; + TQString newString; bool hasLeftWhiteSpaces, hasRightWhiteSpaces; if(string.length() == 0) - return QString(); + return TQString(); hasLeftWhiteSpaces = (string[0].isSpace()); hasRightWhiteSpaces = (string[string.length() - 1].isSpace()); @@ -863,7 +863,7 @@ QString kafkaCommon::removeUnnecessaryWhitespaces(const QString &string, return newString; } -Node* kafkaCommon::createNode(const QString &nodeName, const QString &tagString, int nodeType, Document *doc) +Node* kafkaCommon::createNode(const TQString &nodeName, const TQString &tagString, int nodeType, Document *doc) { Node *node; @@ -922,10 +922,10 @@ Node *kafkaCommon::createDoctypeNode(Document *doc) return node; } -Node *kafkaCommon::createXmlDeclarationNode(Document *doc, const QString &encoding) +Node *kafkaCommon::createXmlDeclarationNode(Document *doc, const TQString &encoding) { Node *node, *child, *closingNode; - QString text; + TQString text; if(!doc) return 0L; @@ -951,7 +951,7 @@ Node* kafkaCommon::createMandatoryNodeSubtree(Node *node, Document *doc) QTag *nodeQTag, *oldNodeQTag; bool searchForMandatoryNode; Node *currentParent; - QMap<QString, bool>::iterator it; + TQMap<TQString, bool>::iterator it; if(!node) return 0L; @@ -1353,8 +1353,8 @@ Node* kafkaCommon::DTDInsertNodeSubtree(Node *newNode, NodeSelectionInd& selecti } // look for commonParent - QValueList<int> commonParentStartChildLocation; - QValueList<int> commonParentEndChildLocation; + TQValueList<int> commonParentStartChildLocation; + TQValueList<int> commonParentEndChildLocation; Node* commonParent = DTDGetNonInlineCommonParent(startNode, startNode, commonParentStartChildLocation, commonParentEndChildLocation, 0); @@ -1501,8 +1501,8 @@ bool kafkaCommon::DTDinsertNode(Node *newNode, Node *startNode, int startOffset, kdDebug(25001)<< "kafkaCommon::DTDinsertNode()" << endl; #endif - QValueList<int> startNodeLocation, endNodeLocation; - QValueList<int>::iterator itStart, itEnd; + TQValueList<int> startNodeLocation, endNodeLocation; + TQValueList<int>::iterator itStart, itEnd; Node *commonParent = 0L, *commonParentStartChild, *commonParentEndChild, *parentNode, *node; Node *lastValidStartParent = 0L, *lastValidEndParent = 0L, *newParentNode, *child, *next; Node *oldCommonParent, *lastNewNode, *oldParentNode; @@ -1797,7 +1797,7 @@ bool kafkaCommon::DTDinsertRemoveNode(Node *newNode, Node *startNode, int startO //what should we do? } -Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString, +Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType, Document *doc, Node* parent, Node* nextSibling, NodeModifsSet *modifs, bool merge) { @@ -1817,7 +1817,7 @@ Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &t return node; } -Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString, +Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType, Document *doc, Node *parent, Node *nextSibling, Node *nextEndSibling, NodeModifsSet *modifs) { @@ -1837,7 +1837,7 @@ Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &t return node; } -Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &tagString, +Node *kafkaCommon::createAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType, Document *doc, Node *parent, Node *startNodeToSurround, Node *endNodeToSurround, int startOffset, int endOffset, NodeModifsSet *modifs) { @@ -1862,7 +1862,7 @@ Node *kafkaCommon::createAndInsertNode(const QString &nodeName, const QString &t } -bool kafkaCommon::DTDcreateAndInsertNode(const QString &nodeName, const QString &tagString, +bool kafkaCommon::DTDcreateAndInsertNode(const TQString &nodeName, const TQString &tagString, int nodeType, Document *doc, Node *startNode, int startOffset, Node *endNode, int endOffset, Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs) { @@ -2160,7 +2160,7 @@ Node* kafkaCommon::getLastChild(Node* node) Node *kafkaCommon::duplicateNodeSubtree(Node *node, bool childAndClosingTagOnly) { - QPtrList<NodeLink> nodeLinkList; + TQPtrList<NodeLink> nodeLinkList; bool goUp = false; Node *currentNode, *currentNewNode, *newRootNode = 0, *newNext, *newParent, *newPrev; NodeLink *link; @@ -2221,9 +2221,9 @@ Node* kafkaCommon::extractNode(Node *node, NodeModifsSet *modifs, bool extractCh //Node *prev; bool isSingle; int type; - QString namespaceName, nodeName, caseSensitive; - QString closingNamespaceName, closingNodeName, closingCaseSensitive; - QValueList<int> location; + TQString namespaceName, nodeName, caseSensitive; + TQString closingNamespaceName, closingNodeName, closingCaseSensitive; + TQValueList<int> location; if(!node) return 0L; @@ -2363,8 +2363,8 @@ Node* kafkaCommon::DTDExtractNodeSubtree(Node *startNode, int startOffset, Node if(!startNode || !endNode) return 0; - QValueList<int> commonParentStartChildLocation; - QValueList<int> commonParentEndChildLocation; + TQValueList<int> commonParentStartChildLocation; + TQValueList<int> commonParentEndChildLocation; Node* commonParent = 0; @@ -2423,8 +2423,8 @@ Node* kafkaCommon::DTDExtractNodeSubtree(Node *startNode, int startOffset, Node if(!startNode || !endNode) return 0; - QValueList<int> commonParentStartChildLocation; - QValueList<int> commonParentEndChildLocation; + TQValueList<int> commonParentStartChildLocation; + TQValueList<int> commonParentEndChildLocation; Node* commonParent = 0; if(extractInlineParentNodes) @@ -2519,8 +2519,8 @@ Node* kafkaCommon::getNodeSubtree(Node *startNode, int startOffset, Node *endNod if(!startNode || !endNode) return 0; - QValueList<int> commonParentStartChildLocation; - QValueList<int> commonParentEndChildLocation; + TQValueList<int> commonParentStartChildLocation; + TQValueList<int> commonParentEndChildLocation; Node* commonParent = 0; if(extractInlineParentNodes) @@ -2536,20 +2536,20 @@ Node* kafkaCommon::getNodeSubtree(Node *startNode, int startOffset, Node *endNod Node* newCommonParent = duplicateNodeSubtree(commonParent, true); - QValueList<int> const startNodeLocation = getLocation(startNode); - QValueList<int> const commonParentLocation = getLocation(commonParent); + TQValueList<int> const startNodeLocation = getLocation(startNode); + TQValueList<int> const commonParentLocation = getLocation(commonParent); uint const commonParentDepth = commonParentLocation.size(); uint const newStartNodeDepth = startNodeLocation.size() - commonParentDepth + 1; uint const newEndNodeDepth = startNodeLocation.size() - commonParentDepth + 1; - QValueList<int> newStartNodeLocation, newEndNodeLocation; + TQValueList<int> newStartNodeLocation, newEndNodeLocation; newStartNodeLocation.push_back(1); newEndNodeLocation.push_back(1); for(uint i = 1; i != newStartNodeDepth; ++i) newStartNodeLocation.push_back(startNodeLocation[i + commonParentDepth - 1]); - QValueList<int> const endNodeLocation = getLocation(endNode); + TQValueList<int> const endNodeLocation = getLocation(endNode); for(uint i = 1; i != newEndNodeDepth; ++i) newEndNodeLocation.push_back(endNodeLocation[i + commonParentDepth - 1]); @@ -2577,7 +2577,7 @@ void kafkaCommon::extractAndDeleteNode(Node *node, NodeModifsSet *modifs, bool d { NodeModif modif; Node *curNode, *nodePrev, *nodeNext, *nodeNext2, *n, *n2; - QString nodeName, closingNodeName, namespaceName, namespaceName2; + TQString nodeName, closingNodeName, namespaceName, namespaceName2; bool isSingle, caseSensitive, caseSensitive2; if(!node) @@ -2639,7 +2639,7 @@ void kafkaCommon::extractAndDeleteNode(Node *node, NodeModifsSet *modifs, bool d } } -int kafkaCommon::DTDExtractNode(const QString &nodeName, Document *doc, Node *startNode, +int kafkaCommon::DTDExtractNode(const TQString &nodeName, Document *doc, Node *startNode, int startOffset, Node *endNode, int endOffset, Node **cursorNode, long &cursorOffset, NodeModifsSet *modifs) { @@ -2904,7 +2904,7 @@ bool kafkaCommon::splitNode(Node *n, int offset, NodeModifsSet *modifs) { NodeModif *modif; Tag *tag; - QString tagStr; + TQString tagStr; Node *node; if(!n || (n->tag->type != Tag::Text && n->tag->type != Tag::Empty) || offset <= 0 || offset >= @@ -2939,7 +2939,7 @@ bool kafkaCommon::splitNode(Node *n, int offset, NodeModifsSet *modifs) } void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent, - QValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs) + TQValueList<int>& commonParentStartChildLocation, NodeModifsSet* modifs) { //Then we "split" the lastValidStartParent - startNode subtree into two : the first part is untouched // and the second will be surrounded by the new Node. Same thing for endNode. @@ -2970,8 +2970,8 @@ void kafkaCommon::splitStartNodeSubtree(Node* startNode, Node* commonParent, } void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent, - QValueList<int>& commonParentStartChildLocation, - QValueList<int>& commonParentEndChildLocation, + TQValueList<int>& commonParentStartChildLocation, + TQValueList<int>& commonParentEndChildLocation, bool subTree, NodeModifsSet* modifs) { Node* node = endNode; @@ -3016,8 +3016,8 @@ void kafkaCommon::splitEndNodeSubtree(Node* endNode, Node* commonParent, } void kafkaCommon::splitStartAndEndNodeSubtree(Node*& startNode, int startOffset, Node*& endNode, int endOffset, Node*& commonParent, - QValueList<int>& commonParentStartChildLocation, - QValueList<int>& commonParentEndChildLocation, + TQValueList<int>& commonParentStartChildLocation, + TQValueList<int>& commonParentEndChildLocation, NodeSelection& cursorHolder, Node* subTree, NodeModifsSet* modifs, bool extractInlineParentNodes) { @@ -3109,8 +3109,8 @@ bool kafkaCommon::mergeNodes(Node *n, Node *n2, NodeModifsSet *modifs, bool merg } // have in consideration two spaces in a row - QString nStr(n->tag->tagStr()); - QString n2Str(n2->tag->tagStr()); + TQString nStr(n->tag->tagStr()); + TQString n2Str(n2->tag->tagStr()); if(nStr[nStr.length() - 1] == ' ' && n2Str[0] == ' ') { nStr = nStr.left(nStr.length() - 1); @@ -3165,8 +3165,8 @@ bool kafkaCommon::mergeNodes(Node *n, Node *n2, NodeSelection& cursorHolder, Nod } // have in consideration two spaces in a row - QString nStr(n->tag->tagStr()); - QString n2Str(n2->tag->tagStr()); + TQString nStr(n->tag->tagStr()); + TQString n2Str(n2->tag->tagStr()); if(nStr[nStr.length() - 1] == ' ' && n2Str[0] == ' ') { nStr = nStr.left(nStr.length() - 1); @@ -3293,7 +3293,7 @@ void kafkaCommon::mergeInlineNode(Node *startNode, Node *endNode, Node **cursorN } } -void kafkaCommon::getEndPosition(const QString &tagString, int bLine, int bCol, int &eLine, int &eCol) +void kafkaCommon::getEndPosition(const TQString &tagString, int bLine, int bCol, int &eLine, int &eCol) { /**int result, oldResult; @@ -3342,7 +3342,7 @@ void kafkaCommon::getEndPosition(Node *node, int bLine, int bCol, int &eLine, in getEndPosition(node->tag->tagStr(), bLine, bCol, eLine, eCol); } -void kafkaCommon::setTagString(Node *node, const QString &newTagString, NodeModifsSet* modifs) +void kafkaCommon::setTagString(Node *node, const TQString &newTagString, NodeModifsSet* modifs) { int eLine, eCol, bLine, bCol; Tag *tag; @@ -3368,7 +3368,7 @@ void kafkaCommon::setTagString(Node *node, const QString &newTagString, NodeModi node->tag->setTagPosition(bLine, bCol, eLine, eCol); } -void kafkaCommon::setTagStringAndFitsNodes(Node *node, const QString &newTagString, NodeModifsSet* modifs) +void kafkaCommon::setTagStringAndFitsNodes(Node *node, const TQString &newTagString, NodeModifsSet* modifs) { int eLine, eCol, oldELine, oldECol; bool b = false; @@ -3383,7 +3383,7 @@ void kafkaCommon::setTagStringAndFitsNodes(Node *node, const QString &newTagStri fitsNodesPosition(getNextNode(node, b), eCol - oldECol, eLine - oldELine); } -void kafkaCommon::editNodeAttribute(Node* node, const QString& name, const QString& value, NodeModifsSet* modifs) +void kafkaCommon::editNodeAttribute(Node* node, const TQString& name, const TQString& value, NodeModifsSet* modifs) { NodeModif *modif = 0; @@ -3406,9 +3406,9 @@ void kafkaCommon::editNodeAttribute(Node* node, const QString& name, const QStri } } -QValueList<int> kafkaCommon::getLocation(Node * node) +TQValueList<int> kafkaCommon::getLocation(Node * node) { - QValueList<int> loc; + TQValueList<int> loc; int i = 0; while(node) @@ -3425,9 +3425,9 @@ QValueList<int> kafkaCommon::getLocation(Node * node) return loc; } -QValueList<int> kafkaCommon::getLocation(DOM::Node domNode) +TQValueList<int> kafkaCommon::getLocation(DOM::Node domNode) { - QValueList<int> loc; + TQValueList<int> loc; int i = 0; while(!domNode.isNull()) @@ -3444,9 +3444,9 @@ QValueList<int> kafkaCommon::getLocation(DOM::Node domNode) return loc; } -Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc) +Node* kafkaCommon::getNodeFromLocation(TQValueList<int> loc) { - QValueList<int>::iterator it; + TQValueList<int>::iterator it; Node *node = baseNode; Node *m = 0L; int i; @@ -3469,9 +3469,9 @@ Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc) return m; } -Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc, Node* nodeTree) +Node* kafkaCommon::getNodeFromLocation(TQValueList<int> loc, Node* nodeTree) { - QValueList<int>::iterator it; + TQValueList<int>::iterator it; Node *node = nodeTree; if(!node) node = baseNode; @@ -3496,9 +3496,9 @@ Node* kafkaCommon::getNodeFromLocation(QValueList<int> loc, Node* nodeTree) return m; } -DOM::Node kafkaCommon::getNodeFromLocation(QValueList<int> loc, DOM::Node rootNode) +DOM::Node kafkaCommon::getNodeFromLocation(TQValueList<int> loc, DOM::Node rootNode) { - QValueList<int>::iterator it; + TQValueList<int>::iterator it; DOM::Node node = rootNode; DOM::Node m = rootNode; int i; @@ -3522,10 +3522,10 @@ DOM::Node kafkaCommon::getNodeFromLocation(QValueList<int> loc, DOM::Node rootNo return m; } -Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset) +Node* kafkaCommon::getNodeFromSubLocation(TQValueList<int> loc, int locOffset) { - QValueList<int>::iterator it = loc.begin(); - QValueList<int> list; + TQValueList<int>::iterator it = loc.begin(); + TQValueList<int> list; int i; for(i = 0; i < locOffset; ++i) @@ -3537,10 +3537,10 @@ Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset) return getNodeFromLocation(list); } -Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset, Node* nodeTree) +Node* kafkaCommon::getNodeFromSubLocation(TQValueList<int> loc, int locOffset, Node* nodeTree) { - QValueList<int>::iterator it = loc.begin(); - QValueList<int> list; + TQValueList<int>::iterator it = loc.begin(); + TQValueList<int> list; int i; for(i = 0; i != locOffset; ++i) @@ -3552,9 +3552,9 @@ Node* kafkaCommon::getNodeFromSubLocation(QValueList<int> loc, int locOffset, No return getNodeFromLocation(list, nodeTree); } -int kafkaCommon::compareNodePosition(QValueList<int> pos1, QValueList<int> pos2) +int kafkaCommon::compareNodePosition(TQValueList<int> pos1, TQValueList<int> pos2) { - QValueList<int>::iterator it1, it2; + TQValueList<int>::iterator it1, it2; it1 = pos1.begin(); it2 = pos2.begin(); @@ -3578,7 +3578,7 @@ int kafkaCommon::compareNodePosition(QValueList<int> pos1, QValueList<int> pos2) int kafkaCommon::compareNodePosition(Node *n1, Node *n2) { - QValueList<int> pos1, pos2; + TQValueList<int> pos1, pos2; if(!n1 || !n2) return kafkaCommon::positionError; @@ -3644,7 +3644,7 @@ int kafkaCommon::nodeDepth(Node *node) return depth; } -Node* kafkaCommon::hasParent(Node *node, const QString &name) +Node* kafkaCommon::hasParent(Node *node, const TQString &name) { node = node->parent; while(node) @@ -3657,15 +3657,15 @@ Node* kafkaCommon::hasParent(Node *node, const QString &name) return 0L; } -Node* kafkaCommon::hasParent(Node* startNode, Node* endNode, const QString &name) +Node* kafkaCommon::hasParent(Node* startNode, Node* endNode, const TQString &name) { Q_ASSERT(startNode && endNode); //Andras: don't crash if (!startNode || !endNode) return 0; - QValueList<int> commonParentStartChildLocation; - QValueList<int> commonParentEndChildLocation; + TQValueList<int> commonParentStartChildLocation; + TQValueList<int> commonParentEndChildLocation; Node* node = DTDGetCommonParent(startNode, endNode, commonParentStartChildLocation, commonParentEndChildLocation, 0); @@ -3726,7 +3726,7 @@ bool kafkaCommon::removeDomNode(DOM::Node node) return true; } -DOM::Node kafkaCommon::createDomNode(const QString &nodeName, const DTDStruct* dtd, +DOM::Node kafkaCommon::createDomNode(const TQString &nodeName, const DTDStruct* dtd, DOM::Document rootNode) { // FIXME @@ -3757,13 +3757,13 @@ DOM::Node kafkaCommon::createDomNode(Node *node, DOM::Document rootNode) return createDomNode(node->tag->name, node->tag->dtd(), rootNode); } -DOM::Node kafkaCommon::createTextDomNode(const QString &textString, DOM::Document rootNode) +DOM::Node kafkaCommon::createTextDomNode(const TQString &textString, DOM::Document rootNode) { return rootNode.createTextNode(textString); } -DOM::Node kafkaCommon::createDomNodeAttribute(const QString &nodeName, const DTDStruct* dtd, - const QString &attrName, const QString &attrValue, DOM::Document rootNode) +DOM::Node kafkaCommon::createDomNodeAttribute(const TQString &nodeName, const DTDStruct* dtd, + const TQString &attrName, const TQString &attrValue, DOM::Document rootNode) { DOM::Node attr; QTag *qTag = 0L; @@ -3786,7 +3786,7 @@ DOM::Node kafkaCommon::createDomNodeAttribute(const QString &nodeName, const DTD return attr; } -DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const QString &attrName, +DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const TQString &attrName, DOM::Document rootNode) { if(!node) @@ -3795,7 +3795,7 @@ DOM::Node kafkaCommon::createDomNodeAttribute(Node* node, const QString &attrNam return createDomNodeAttribute(node->tag->name, node->tag->dtd(), attrName, "", rootNode); } -//DOM::node kafkaCommon::createDomNodeAttribute(DOM::Node node, const QString &attrName, +//DOM::node kafkaCommon::createDomNodeAttribute(DOM::Node node, const TQString &attrName, // DOM::Document rootNode) //{ /**if(node.isNull()) @@ -3815,8 +3815,8 @@ bool kafkaCommon::insertDomNodeAttribute(DOM::Node node, DOM::Node attr) return true; } -bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const QString &nodeName, const DTDStruct* dtd, - const QString &attrName, const QString &attrValue, DOM::Document rootNode) +bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const TQString &nodeName, const DTDStruct* dtd, + const TQString &attrName, const TQString &attrValue, DOM::Document rootNode) { DOM::Node attr; @@ -3837,7 +3837,7 @@ bool kafkaCommon::editDomNodeAttribute(DOM::Node node, const QString &nodeName, } bool kafkaCommon::editDomNodeAttribute(DOM::Node domNode, Node* node, - const QString &attrName, const QString &attrValue, DOM::Document rootNode) + const TQString &attrName, const TQString &attrValue, DOM::Document rootNode) { if(!node) return false; @@ -3846,7 +3846,7 @@ bool kafkaCommon::editDomNodeAttribute(DOM::Node domNode, Node* node, attrName, attrValue, rootNode); } -DOM::Node kafkaCommon::hasParent(DOM::Node domNode, const QString &name) +DOM::Node kafkaCommon::hasParent(DOM::Node domNode, const TQString &name) { while(!domNode.isNull()) { @@ -3935,9 +3935,9 @@ bool kafkaCommon::parentSupports(DOM::Node parent, DOM::Node startNode, DOM::Nod return true; } -bool kafkaCommon::isInline(const QString &nodeNam) +bool kafkaCommon::isInline(const TQString &nodeNam) { - QString nodeName = nodeNam.lower(); + TQString nodeName = nodeNam.lower(); if(nodeName == "q" || nodeName == "u" || nodeName == "i" || nodeName == "b" || nodeName == "cite" || nodeName == "em" || nodeName == "var" || nodeName == "em" || nodeName == "tt" || nodeName == "code" || nodeName == "kbd" || nodeName == "samp" || @@ -3961,7 +3961,7 @@ void kafkaCommon::coutDomTree(DOM::Node, int) #endif { #ifdef HEAVY_DEBUG - QString output, dots; + TQString output, dots; int j; DOM::Node node; if(rootNode.isNull()) @@ -4002,7 +4002,7 @@ void kafkaCommon::coutDomTree(DOM::Node, int) void kafkaCommon::coutTree(Node *node, int indent) { - QString output, dots; + TQString output, dots; int bLine, bCol, eLine, eCol, j; if(!node) kdDebug(25001)<< "kafkaCommon::coutTree() - bad node!" << endl; @@ -4056,7 +4056,7 @@ void kafkaCommon::coutTree(Node *node, int indent) } } -int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& tag_name) +int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name) { Q_ASSERT(start_node && end_node); //Andras: don't crash @@ -4078,8 +4078,8 @@ int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& ta return -1; // neither the nodes have tag_name as parent } -int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, QString const& tag_name, - QString const& attribute_name, QString const& attribute_value) +int kafkaCommon::isInsideTag(Node* start_node, Node* end_node, TQString const& tag_name, + TQString const& attribute_name, TQString const& attribute_value) { Q_ASSERT(start_node && end_node); //Andras: don't crash @@ -4109,7 +4109,7 @@ bool kafkaCommon::isBetweenWords(Node* node, int offset) if (!node) return false; //FIXME: Andras: don't crash - QString tag_str = node->tag->tagStr(); + TQString tag_str = node->tag->tagStr(); return ! (tag_str[offset].isSpace() || tag_str[offset].isPunct() || @@ -4129,7 +4129,7 @@ void kafkaCommon::getStartOfWord(Node*& node, int& offset) kdDebug(23100) << "getStartOfWord node length: " << node->tag->tagStr().length() << endl; kdDebug(23100) << "getStartOfWord offset BEGIN: " << offset << endl; - QString tag_str = node->tag->tagStr(); + TQString tag_str = node->tag->tagStr(); while(offset >= 0 && !tag_str[offset].isSpace() && !tag_str[offset].isPunct()) --offset; @@ -4173,7 +4173,7 @@ void kafkaCommon::getEndOfWord(Node*& node, int& offset) return; - QString tag_str = node->tag->tagStr(); + TQString tag_str = node->tag->tagStr(); while((uint)offset != tag_str.length() && !tag_str[offset].isSpace() && !tag_str[offset].isPunct()) ++offset; |