summaryrefslogtreecommitdiffstats
path: root/quanta/parts/kafka
diff options
context:
space:
mode:
Diffstat (limited to 'quanta/parts/kafka')
-rw-r--r--quanta/parts/kafka/htmldocumentproperties.cpp14
-rw-r--r--quanta/parts/kafka/htmlenhancer.cpp6
-rw-r--r--quanta/parts/kafka/kafkacommon.cpp14
-rw-r--r--quanta/parts/kafka/wkafkapart.cpp34
4 files changed, 34 insertions, 34 deletions
diff --git a/quanta/parts/kafka/htmldocumentproperties.cpp b/quanta/parts/kafka/htmldocumentproperties.cpp
index 23b2655e..d6b38cb7 100644
--- a/quanta/parts/kafka/htmldocumentproperties.cpp
+++ b/quanta/parts/kafka/htmldocumentproperties.cpp
@@ -108,7 +108,7 @@ htmlDocumentProperties::htmlDocumentProperties( TQWidget* tqparent, bool forceIn
while(node)
{
nodeName = node->tag->name.lower();
- if(nodeName == "?xml" || nodeName.tqcontains("xml pi block"))
+ if(nodeName == "?xml" || nodeName.contains("xml pi block"))
xmlNode = node;
if(nodeName == "html")
htmlNode = node;
@@ -116,7 +116,7 @@ htmlDocumentProperties::htmlDocumentProperties( TQWidget* tqparent, bool forceIn
headNode = node;
if(nodeName == "body")
bodyNode = node;
- if(nodeName == "!doctype" || nodeName.tqcontains("dtd block"))
+ if(nodeName == "!doctype" || nodeName.contains("dtd block"))
doctypeNode = node;
if(nodeName == "title")
titleNode = node;
@@ -285,10 +285,10 @@ void htmlDocumentProperties::loadCSS(Node *node)
if(node->tag->type == Tag::ScriptStructureBegin)
{
selector = node->tag->tagStr();
- selector = selector.left((uint)selector.tqfind("{")).stripWhiteSpace();
+ selector = selector.left((uint)selector.find("{")).stripWhiteSpace();
if(node->child)
item = new NodeLinkedViewItem(cssRules, selector,
- node->child->tag->tagStr().tqreplace('\n'," "));
+ node->child->tag->tagStr().replace('\n'," "));
else
item = new NodeLinkedViewItem(cssRules, selector, "");
item->node = node;
@@ -602,7 +602,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
QuantaView *view = ViewManager::ref()->activeView();
- if(!xmlNode && view->document()->defaultDTD()->name.tqcontains("XHTML", false))
+ if(!xmlNode && view->document()->defaultDTD()->name.contains("XHTML", false))
{
//if the xml node is not present and the current DTD is a xhtml like, create it.
allTheNodes = baseNode;
@@ -618,7 +618,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
if(!doctypeNode)
{
//if the !doctype node is not present, create it
- if(!view->document()->defaultDTD()->name.tqcontains("XHTML", false))
+ if(!view->document()->defaultDTD()->name.contains("XHTML", false))
{
allTheNodes = baseNode;
baseNode = 0L;
@@ -645,7 +645,7 @@ void htmlDocumentProperties::addBasicNodes(NodeModifsSet *modifs)
//TODO: hardcoded
//If it is XML, it add the namespace.
- if(view->document()->defaultDTD()->name.tqcontains("XHTML", false))
+ if(view->document()->defaultDTD()->name.contains("XHTML", false))
htmlNode->tag->editAttribute("xmlns", "http://www.w3.org/1999/xhtml");
htmlNode->child = allTheNodes;
diff --git a/quanta/parts/kafka/htmlenhancer.cpp b/quanta/parts/kafka/htmlenhancer.cpp
index b15d3c74..daffd656 100644
--- a/quanta/parts/kafka/htmlenhancer.cpp
+++ b/quanta/parts/kafka/htmlenhancer.cpp
@@ -91,7 +91,7 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
//THEN if it is the style element, add a DOM::Node::TEXT_NODE child gathering all the CSS
//by default, the parser parse it as a script, which can't be translated in DOM::Nodes.
if((node->tag->type == Tag::XmlTag && node->tag->name.lower() == "style") ||
- (node->tag->type == Tag::ScriptTag && node->tag->name.lower().tqcontains("style") != 0))
+ (node->tag->type == Tag::ScriptTag && node->tag->name.lower().contains("style") != 0))
{
//If the style Node doesn't exists, create it
if(!node->rootNode())
@@ -129,10 +129,10 @@ bool HTMLEnhancer::enhanceNode(Node *node, DOM::Node parentDNode, DOM::Node next
TQTag* qTag = QuantaCommon::tagFromDTD(m_wkafkapart->getCurrentDoc()->defaultDTD(),
parentDNode.nodeName().string());
- //THEN tqreplace, if asked, scripts by a little icon.
+ //THEN replace, if asked, scripts by a little icon.
if(node->tag->type == Tag::ScriptTag && m_showIconForScripts && qTag->isChild("IMG", false))
{
- script = node->tag->name.left(node->tag->name.tqfind("block", 0, false) - 1).lower();
+ script = node->tag->name.left(node->tag->name.find("block", 0, false) - 1).lower();
#ifdef LIGHT_DEBUG
kdDebug(25001)<< "HTMLTranslator::translateNode() - BLOCK:" << script << ":" << endl;
#endif
diff --git a/quanta/parts/kafka/kafkacommon.cpp b/quanta/parts/kafka/kafkacommon.cpp
index 26aadd51..8ed413f4 100644
--- a/quanta/parts/kafka/kafkacommon.cpp
+++ b/quanta/parts/kafka/kafkacommon.cpp
@@ -770,7 +770,7 @@ int kafkaCommon::getNodeDisplay(Node *node, bool closingNodeToo)
closingNodeToo))
{
//If we areusing a non (X)HTML DTD, make everything blockDisplay by default
- if(node->tag->dtd() && node->tag->dtd()->name.tqcontains("HTML", false) == 0)
+ if(node->tag->dtd() && node->tag->dtd()->name.contains("HTML", false) == 0)
return kafkaCommon::blockDisplay;
nodeName = node->tag->name.lower();
@@ -3297,7 +3297,7 @@ void kafkaCommon::getEndPosition(const TQString &tagString, int bLine, int bCol,
{
/**int result, oldResult;
- result = tagString.tqfind("\n", 0);
+ result = tagString.find("\n", 0);
if(result == -1)
{
eLine = bLine;
@@ -3310,7 +3310,7 @@ void kafkaCommon::getEndPosition(const TQString &tagString, int bLine, int bCol,
{
eLine++;
oldResult = result;
- result = tagString.tqfind("\n", result + 1);
+ result = tagString.find("\n", result + 1);
}
eCol = tagString.length() - oldResult - 2;
}*/
@@ -3974,11 +3974,11 @@ void kafkaCommon::coutDomTree(DOM::Node, int)
dots.fill('_', indent);
output = dots;
if (node.nodeType() != DOM::Node::TEXT_NODE)
- output += node.nodeName().string().tqreplace('\n'," ");
+ output += node.nodeName().string().replace('\n'," ");
else
{
output += "\"";
- output+= node.nodeValue().string().tqreplace('\n'," ");
+ output+= node.nodeValue().string().replace('\n'," ");
output += "\"";
}
kdDebug(25001) << output <<" (" << node.nodeType() << ") "<<
@@ -4016,11 +4016,11 @@ void kafkaCommon::coutTree(Node *node, int indent)
node->tag->endPos(eLine, eCol);
if (node->tag->type == Tag::XmlTag || node->tag->type == Tag::XmlTagEnd ||
node->tag->type == Tag::ScriptTag)
- output += node->tag->name.tqreplace('\n',"<return>");
+ output += node->tag->name.replace('\n',"<return>");
else
{
output += "\"";
- output+= node->tag->tagStr().tqreplace('\n',"<return>");
+ output+= node->tag->tagStr().replace('\n',"<return>");
output += "\"";
}
kdDebug(25001) << output <<" (" << node->tag->type << ", " << node->tag->cleanStrBuilt() << ", " <<
diff --git a/quanta/parts/kafka/wkafkapart.cpp b/quanta/parts/kafka/wkafkapart.cpp
index 91c32106..735e8c51 100644
--- a/quanta/parts/kafka/wkafkapart.cpp
+++ b/quanta/parts/kafka/wkafkapart.cpp
@@ -107,9 +107,9 @@ TQString ab = i18n("Ident all");
{
tmp = t.readLine();
if(tmp.left(2) == "//") continue;//comments
- int begin = tmp.tqfind("(") + 1;
+ int begin = tmp.find("(") + 1;
if(begin == (-1 + 1)) continue;//"(" not found : invalid line
- int length = tmp.tqfind(")") - begin;
+ int length = tmp.find(")") - begin;
decodedChars.insert(tmp.left(1), tmp.mid(begin, length));
encodedChars.insert(tmp.mid(begin, length), tmp.left(1));
}
@@ -521,7 +521,7 @@ bool KafkaDocument::buildKafkaNodeFromNode(Node *node, bool insertNode)
bool canInsertEmptyNode = false;
if(node->tag->type == Tag::Empty)
{
- if(!m_currentDoc->defaultDTD()->name.tqcontains("HTML", false))
+ if(!m_currentDoc->defaultDTD()->name.contains("HTML", false))
canInsertEmptyNode = true;
else
canInsertEmptyNode = kafkaCommon::hasParent(node, "body");
@@ -807,8 +807,8 @@ void KafkaDocument::buildNodeFromKafkaNode(Node *node, DOM::Node domNode)
if(domNode.nodeType() == DOM::Node::TEXT_NODE)
{
TQString text = domNode.nodeValue().string();
- text.tqreplace("<", "&lt;");
- text.tqreplace(">", "&gt;");
+ text.replace("<", "&lt;");
+ text.replace(">", "&gt;");
node->tag->setStr(text);
}
else
@@ -875,7 +875,7 @@ Node * KafkaDocument::buildNodeFromKafkaNode(DOM::Node domNode, Node *nodeParent
TQString KafkaDocument::getDecodedChar(const TQString &encodedChar)
{
- TQMap<TQString, TQString>::Iterator it = encodedChars.tqfind(encodedChar);
+ TQMap<TQString, TQString>::Iterator it = encodedChars.find(encodedChar);
if(it == encodedChars.end())
{
//try this
@@ -950,7 +950,7 @@ TQString KafkaDocument::getEncodedChar(const TQString &decodedChar, const TQStri
else if(decodedChar[0].isSpace())
//FIXME:for an unknown reason, by default it return &iquest; instead of &nbsp;
return "&nbsp;";
- TQMap<TQString, TQString>::Iterator it = decodedChars.tqfind(decodedChar);
+ TQMap<TQString, TQString>::Iterator it = decodedChars.find(decodedChar);
if(it == decodedChars.end())
return decodedChar;
@@ -1074,10 +1074,10 @@ TQString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, in
openingNode = node->getOpeningNode();
if(openingNode && openingNode->tag->type == Tag::ScriptTag)
{
- if(openingNode->tag->name.tqcontains("XML PI", false) ||
- openingNode->tag->name.tqcontains("PHP", false))
+ if(openingNode->tag->name.contains("XML PI", false) ||
+ openingNode->tag->name.contains("PHP", false))
text = "?>";
- else if(openingNode->tag->name.tqcontains("DTD", false))
+ else if(openingNode->tag->name.contains("DTD", false))
text = ">";
else
text = ">";
@@ -1102,26 +1102,26 @@ TQString KafkaDocument::generateCodeFromNode(Node *node, int bLine, int bCol, in
/** Can't use KGlobal::charsets()->toEntity() :
* It translate all chars into entities! */
else if(!hasPreParent)
- text = node->tag->tagStr().tqreplace(TQRegExp("\\s+"), " ");
+ text = node->tag->tagStr().replace(TQRegExp("\\s+"), " ");
else
text = node->tag->tagStr();
}
else if(node->tag->type == Tag::ScriptTag)
{
//WARNING : HTML SPECIFIC
- if(node->tag->name.tqcontains("style", false))
+ if(node->tag->name.contains("style", false))
{
text = "<" + QuantaCommon::tagCase("style") + ">";
}
- else if(node->tag->name.tqcontains("DTD", false))
+ else if(node->tag->name.contains("DTD", false))
{
text = "<!";
}
- else if(node->tag->name.tqcontains("XML PI", false))
+ else if(node->tag->name.contains("XML PI", false))
{
text = "<?xml";
}
- else if(node->tag->name.tqcontains("PHP", false))
+ else if(node->tag->name.contains("PHP", false))
{
text = "<?php";
}
@@ -1832,9 +1832,9 @@ void KafkaDocument::coutLinkTree(Node *, int)
dots.fill('*', indent);
output = dots;
if (node->tag->type != Tag::Text)
- output += node->tag->name.tqreplace('\n'," ");
+ output += node->tag->name.replace('\n'," ");
else
- output+= node->tag->tagStr().tqreplace('\n'," ");
+ output+= node->tag->tagStr().replace('\n'," ");
output += " (";
output += node->tag->type;
output += ") ";