summaryrefslogtreecommitdiffstats
path: root/quanta/parsers/parsercommon.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-06-16 19:02:47 +0000
commite985f7e545f4739493965aad69bbecb136dc9346 (patch)
tree54afd409d8acd6202dd8ab611d24e78c28e4c0a0 /quanta/parsers/parsercommon.cpp
parentf7670c198945adc3b95ad69a959fe5f8ae55b493 (diff)
downloadtdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.tar.gz
tdewebdev-e985f7e545f4739493965aad69bbecb136dc9346.zip
TQt4 port kdewebdev
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1237029 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'quanta/parsers/parsercommon.cpp')
-rw-r--r--quanta/parsers/parsercommon.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/quanta/parsers/parsercommon.cpp b/quanta/parsers/parsercommon.cpp
index be660255..8a9a4be5 100644
--- a/quanta/parsers/parsercommon.cpp
+++ b/quanta/parsers/parsercommon.cpp
@@ -78,7 +78,7 @@ void appendAreaToTextNode(Document *write, const AreaStruct &area, Node *node)
node->tag->setTagPosition(bLine, bCol, area.eLine, area.eCol);
}
-Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *parentNode)
+Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *tqparentNode)
{
Tag *textTag = 0L;
Node *textNode = 0L;
@@ -89,10 +89,10 @@ Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *par
{
node->tag->endPos(bLine, bCol);
} else
- if (parentNode)
- parentNode->tag->endPos(bLine, bCol);
- if (parentNode)
- dtd = parentNode->tag->dtd();
+ if (tqparentNode)
+ tqparentNode->tag->endPos(bLine, bCol);
+ if (tqparentNode)
+ dtd = tqparentNode->tag->dtd();
eCol--;
if (bLine == 0 && bCol == 0)
bCol = -1;
@@ -110,13 +110,13 @@ Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *par
textTag->type = Tag::Text;
}
- if (parentNode && parentNode->tag->single)
+ if (tqparentNode && tqparentNode->tag->single)
{
- textNode = new Node(parentNode->parent);
+ textNode = new Node(tqparentNode->tqparent);
nodeNum++;
- textNode->prev = parentNode;
- parentNode->next = textNode;
- parentNode = parentNode->parent;
+ textNode->prev = tqparentNode;
+ tqparentNode->next = textNode;
+ tqparentNode = tqparentNode->tqparent;
} else
{
if ( node &&
@@ -129,21 +129,21 @@ Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *par
textTag = 0L;
} else
{
- textNode = new Node(parentNode);
+ textNode = new Node(tqparentNode);
nodeNum++;
- if (node && node != parentNode)
+ if (node && node != tqparentNode)
{
node->next = textNode;
textNode->prev = node;
} else
{
- if (parentNode)
+ if (tqparentNode)
{
- Node *n = parentNode->child;
+ Node *n = tqparentNode->child;
while (n && n->next)
n = n->next;
if (!n)
- parentNode->child = textNode;
+ tqparentNode->child = textNode;
else
{
n->next = textNode;
@@ -163,32 +163,32 @@ Node* createTextNode(Document *write, Node *node, int eLine, int eCol, Node *par
}
Node* createScriptTagNode(Document *write, const AreaStruct &area, const TQString &areaName,
- const DTDStruct *dtd, Node *parentNode, Node *currentNode)
+ const DTDStruct *dtd, Node *tqparentNode, Node *currentNode)
{
Tag *tag = new Tag();
tag->setTagPosition(area);
tag->setStr(areaName);
tag->setWrite(write);
- const DTDStruct *d = DTDs::ref()->find(dtd->specialAreaNames[areaName]);
+ const DTDStruct *d = DTDs::ref()->tqfind(dtd->specialAreaNames[areaName]);
if (d)
tag->setDtd(d);
else
tag->setDtd(dtd);
- tag->name = i18n("%1 block").arg(dtd->specialAreaNames[areaName].upper());
+ tag->name = i18n("%1 block").tqarg(dtd->specialAreaNames[areaName].upper());
tag->type = Tag::ScriptTag;
tag->validXMLTag = false;
- Node *node = new Node(parentNode);
+ Node *node = new Node(tqparentNode);
nodeNum++;
node->tag = tag;
node->insideSpecial = true;
- if (parentNode)
+ if (tqparentNode)
{
- if (!parentNode->child)
- parentNode->child = node;
+ if (!tqparentNode->child)
+ tqparentNode->child = node;
else
{
- Node *n = parentNode->child;
+ Node *n = tqparentNode->child;
while (n->next)
n = n->next;
n->next = node;
@@ -216,11 +216,11 @@ void coutTree(Node *node, int indent)
node->tag->beginPos(bLine, bCol);
node->tag->endPos(eLine, eCol);
if (node->tag->type != Tag::Text)
- output += node->tag->name.replace('\n'," ");
+ output += node->tag->name.tqreplace('\n'," ");
else
- output+= node->tag->tagStr().replace('\n'," ");
+ output+= node->tag->tagStr().tqreplace('\n'," ");
kdDebug(24000) << output <<" (" << node->tag->type << ") at pos " <<
- bLine << ":" << bCol << " - " << eLine << ":" << eCol << " This: "<< node << " Parent: " << node->parent << " Prev: " << node->prev << " Next: " << node->next << " Child: " << node->child << " Tag:" << node->tag << endl;
+ bLine << ":" << bCol << " - " << eLine << ":" << eCol << " This: "<< node << " Parent: " << node->tqparent << " Prev: " << node->prev << " Next: " << node->next << " Child: " << node->child << " Tag:" << node->tag << endl;
/* for(j = 0; j < node->tag->attrCount(); j++)
{
kdDebug(24000)<< " attr" << j << " " <<
@@ -245,7 +245,7 @@ void verifyTree(Node *node)
if (!node->tag)
{
kdDebug(24000) << "Bad node: " << node << endl;
- kdDebug(24000) << "Parent: " << node->parent << " " << node->parent->tag->tagStr() << endl;
+ kdDebug(24000) << "Parent: " << node->tqparent << " " << node->tqparent->tag->tagStr() << endl;
}
if (node->child)
verifyTree(node->child);