From 36c36b53a129509d56fdaa0a7c9fcbcacd0c5826 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 10 Aug 2011 06:08:18 +0000 Subject: rename the following methods: tqfind find tqreplace replace tqcontains contains git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdewebdev@1246075 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- quanta/dialogs/tagdialogs/corewidgetdlg.cpp | 12 ++++++------ quanta/dialogs/tagdialogs/tagattr.cpp | 4 ++-- quanta/dialogs/tagdialogs/tagattr.h | 2 +- quanta/dialogs/tagdialogs/tagdialog.cpp | 8 ++++---- quanta/dialogs/tagdialogs/tagimgdlg.cpp | 16 +++++++-------- quanta/dialogs/tagdialogs/tagimgdlgdata.cpp | 2 +- quanta/dialogs/tagdialogs/tagmaildlg.cpp | 10 +++++----- quanta/dialogs/tagdialogs/tagwidget.cpp | 8 ++++---- quanta/dialogs/tagdialogs/tagxml.cpp | 30 ++++++++++++++--------------- 9 files changed, 46 insertions(+), 46 deletions(-) (limited to 'quanta/dialogs/tagdialogs') diff --git a/quanta/dialogs/tagdialogs/corewidgetdlg.cpp b/quanta/dialogs/tagdialogs/corewidgetdlg.cpp index f45eea8f..815ecdf2 100644 --- a/quanta/dialogs/tagdialogs/corewidgetdlg.cpp +++ b/quanta/dialogs/tagdialogs/corewidgetdlg.cpp @@ -48,13 +48,13 @@ void CoreWidgetDlg::writeAttributes( TQDict *d ) dict = d; TQString *t; // value of attr. - if (( t=d->tqfind("id") )) setValue(*t, lineId); - if (( t=d->tqfind("class") )) setValue(*t, lineClass); - if (( t=d->tqfind("style") )) setValue(*t, lineStyle); - if (( t=d->tqfind("title") )) setValue(*t, lineTitle); + if (( t=d->find("id") )) setValue(*t, lineId); + if (( t=d->find("class") )) setValue(*t, lineClass); + if (( t=d->find("style") )) setValue(*t, lineStyle); + if (( t=d->find("title") )) setValue(*t, lineTitle); - if (( t=d->tqfind("lang") )) setValue(*t, lineLang); - if (( t=d->tqfind("dir") )) setValue(*t, lineDir); + if (( t=d->find("lang") )) setValue(*t, lineLang); + if (( t=d->find("dir") )) setValue(*t, lineDir); } diff --git a/quanta/dialogs/tagdialogs/tagattr.cpp b/quanta/dialogs/tagdialogs/tagattr.cpp index 1ab0bdde..be05c44f 100644 --- a/quanta/dialogs/tagdialogs/tagattr.cpp +++ b/quanta/dialogs/tagdialogs/tagattr.cpp @@ -50,7 +50,7 @@ Attr_list::Attr_list( TQDomElement const& el, TQWidget *w, TQTag *dtdTag ) TQString method = el.attribute("method"); TQString interface = el.attribute("interface", "QuantaIf"); TQString arguments = el.attribute("arguments"); - arguments.tqreplace("%tagname%", m_dtdTag->name()); + arguments.replace("%tagname%", m_dtdTag->name()); DCOPReply reply = QuantaCommon::callDCOPMethod(interface, method, arguments); if (reply.isValid()) { @@ -87,7 +87,7 @@ void Attr_list::setValue(const TQString &value) } -TQDomNode tqfindChild( TQDomNode &tqparent, const TQString &name ) +TQDomNode findChild( TQDomNode &tqparent, const TQString &name ) { for ( TQDomNode n = tqparent.firstChild(); !n.isNull(); n = n.nextSibling() ) if ( n.nodeName() == name ) diff --git a/quanta/dialogs/tagdialogs/tagattr.h b/quanta/dialogs/tagdialogs/tagattr.h index c9567eda..2206f896 100644 --- a/quanta/dialogs/tagdialogs/tagattr.h +++ b/quanta/dialogs/tagdialogs/tagattr.h @@ -37,7 +37,7 @@ class TQWidget; class TQTag; -TQDomNode tqfindChild( TQDomNode &tqparent, const TQString &name ); +TQDomNode findChild( TQDomNode &tqparent, const TQString &name ); class Attr diff --git a/quanta/dialogs/tagdialogs/tagdialog.cpp b/quanta/dialogs/tagdialogs/tagdialog.cpp index 7a7ea593..ac9c8ffc 100644 --- a/quanta/dialogs/tagdialogs/tagdialog.cpp +++ b/quanta/dialogs/tagdialogs/tagdialog.cpp @@ -226,7 +226,7 @@ void TagDialog::parseTag() { TQDomNode node = nodeList.item(j); TQString nodeTagName = node.toElement().attribute("name"); - if (groupList.tqcontains(nodeTagName) && dtdTag->commonGroups.tqcontains(nodeTagName)) //add the attributes of this common tag to a new tab + if (groupList.contains(nodeTagName) && dtdTag->commonGroups.contains(nodeTagName)) //add the attributes of this common tag to a new tab { TQString s; TQTextStream str(&s, IO_ReadWrite); @@ -325,11 +325,11 @@ TQString TagDialog::getAttributeString() TQString TagDialog::getAttribute(const TQString& attr) { TQString attrStr = getAttributeString()+" "; - int pos = attrStr.upper().tqfind(attr.upper()); + int pos = attrStr.upper().find(attr.upper()); if (pos != -1) { - pos = attrStr.tqfind("=",pos+1) + 1; - return attrStr.mid(pos, attrStr.tqfind(" ",pos) - pos); + pos = attrStr.find("=",pos+1) + 1; + return attrStr.mid(pos, attrStr.find(" ",pos) - pos); } else { diff --git a/quanta/dialogs/tagdialogs/tagimgdlg.cpp b/quanta/dialogs/tagdialogs/tagimgdlg.cpp index b52d3be9..95c41e4e 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlg.cpp +++ b/quanta/dialogs/tagdialogs/tagimgdlg.cpp @@ -145,7 +145,7 @@ void TagImgDlg::writeAttributes( TQDict *d ) dict = d; TQString *t; // value of attr. - if (( t=d->tqfind("src") )) + if (( t=d->find("src") )) { lineImgSource->setText(*t); KURL url = baseURL; @@ -153,18 +153,18 @@ void TagImgDlg::writeAttributes( TQDict *d ) url = QExtFileInfo::toAbsolute(url, baseURL); slotImageSet( url ); } - if ( (t=d->tqfind("alt")) ) + if ( (t=d->find("alt")) ) setValue(*t, lineAltText); - if ( (t=d->tqfind("width")) && lineWidth ) + if ( (t=d->find("width")) && lineWidth ) setValue(*t, lineWidth); - if ( (t=d->tqfind("height")) && lineHeight ) + if ( (t=d->find("height")) && lineHeight ) setValue(*t, lineHeight); - if ( (t=d->tqfind("hspace")) && lineHSpace) + if ( (t=d->find("hspace")) && lineHSpace) setValue(*t, lineHSpace); - if ( (t=d->tqfind("vspace")) && lineVSpace ) + if ( (t=d->find("vspace")) && lineVSpace ) setValue(*t, lineVSpace); - if ( (t=d->tqfind("align")) && comboAlign ) + if ( (t=d->find("align")) && comboAlign ) setValue(*t, comboAlign); - if ( (t=d->tqfind("border")) && spinBorder ) + if ( (t=d->find("border")) && spinBorder ) setValue(*t, spinBorder); } diff --git a/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp b/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp index 07a44394..a761d62c 100644 --- a/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp +++ b/quanta/dialogs/tagdialogs/tagimgdlgdata.cpp @@ -34,7 +34,7 @@ void TagImgDlg::initDialog(){ buttonImgSource->setText(i18n("...")); grid->addMultiCellWidget(buttonImgSource, 0, 0, 4, 4); - TQTag *imgTag = m_dtd->tagsList->tqfind("img"); + TQTag *imgTag = m_dtd->tagsList->find("img"); if (!imgTag) return; diff --git a/quanta/dialogs/tagdialogs/tagmaildlg.cpp b/quanta/dialogs/tagdialogs/tagmaildlg.cpp index 0aa689d2..96cef91e 100644 --- a/quanta/dialogs/tagdialogs/tagmaildlg.cpp +++ b/quanta/dialogs/tagdialogs/tagmaildlg.cpp @@ -68,18 +68,18 @@ void TagMailDlg::slotSelectAddress() n = n.simplifyWhiteSpace(); for( unsigned int i = 0; i < emails.count(); ++i ) { if (!emails[i].isEmpty()) { - if (n.isEmpty() || (emails[i].tqfind( "<" ) != -1)) + if (n.isEmpty() || (emails[i].find( "<" ) != -1)) addr = ""; else { /* do we really need quotes around this name ? */ - if (n.tqfind(TQRegExp("[^ 0-9A-Za-z\\x0080-\\xFFFF]")) != -1) + if (n.find(TQRegExp("[^ 0-9A-Za-z\\x0080-\\xFFFF]")) != -1) addr = qConfig.attrValueQuotation + n + qConfig.attrValueQuotation + " "; else addr = n + " "; } email = emails[i]; - if (!addr.isEmpty() && (email.tqfind( "<" ) == -1) - && (email.tqfind( ">" ) == -1) - && (email.tqfind( "," ) == -1)) + if (!addr.isEmpty() && (email.find( "<" ) == -1) + && (email.find( ">" ) == -1) + && (email.find( "," ) == -1)) addr += "<" + email + ">"; else addr += email; diff --git a/quanta/dialogs/tagdialogs/tagwidget.cpp b/quanta/dialogs/tagdialogs/tagwidget.cpp index 4eb79f24..f461e3a9 100644 --- a/quanta/dialogs/tagdialogs/tagwidget.cpp +++ b/quanta/dialogs/tagdialogs/tagwidget.cpp @@ -47,7 +47,7 @@ void TagWidget::updateDict(const TQString &attr, TQComboBox *combo ) delete s; } else - dict->tqreplace(attr, s); + dict->replace(attr, s); } void TagWidget::setValue(const TQString &val, TQComboBox *combo) @@ -92,7 +92,7 @@ void TagWidget::updateDict(const TQString &attr, TQLineEdit *line ) delete s; } else - dict->tqreplace(attr, s); + dict->replace(attr, s); } void TagWidget::updateDict(const TQString &attr, TQSpinBox *spin ) @@ -104,7 +104,7 @@ void TagWidget::updateDict(const TQString &attr, TQSpinBox *spin ) delete s; } else - dict->tqreplace(attr, s); + dict->replace(attr, s); } void TagWidget::updateDict(const TQString &attr, TQCheckBox *check ) @@ -113,7 +113,7 @@ void TagWidget::updateDict(const TQString &attr, TQCheckBox *check ) dict->remove(attr); else { - if (!dict->tqfind(attr)) + if (!dict->find(attr)) dict->insert(attr, new TQString("")); } } diff --git a/quanta/dialogs/tagdialogs/tagxml.cpp b/quanta/dialogs/tagdialogs/tagxml.cpp index a8428b20..0015c35e 100644 --- a/quanta/dialogs/tagdialogs/tagxml.cpp +++ b/quanta/dialogs/tagdialogs/tagxml.cpp @@ -56,7 +56,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) //parse the tag XML file, in order to build up the dialog for ( TQDomNode n = d.firstChild(); !n.isNull(); n = n.nextSibling() ) { - TQDomNode location = tqfindChild(n,"location"); + TQDomNode location = findChild(n,"location"); if ( location.isNull() ) continue; @@ -69,7 +69,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) int colspan = el.attribute("colspan","1").toInt()-1; int rowspan = el.attribute("rowspan","1").toInt()-1; - location = tqfindChild(n,"textlocation"); + location = findChild(n,"textlocation"); el = location.toElement(); int textrow = el.attribute("row","0").toInt(); int textcol = el.attribute("col","0").toInt(); @@ -79,7 +79,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) // qDebug("%s col:%d row:%d cs:%d, rs:%d", n.nodeName().data(), col,row,colspan,rowspan ); TQString tip; - TQDomNode tooltip = tqfindChild( n ,"tooltip" ); + TQDomNode tooltip = findChild( n ,"tooltip" ); if ( !tooltip.isNull() ) { if ( tooltip.firstChild().isText() ) { TQDomText text = tooltip.firstChild().toText(); @@ -87,7 +87,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) } } TQString whatsThis; - TQDomNode what = tqfindChild( n ,"whatsthis" ); + TQDomNode what = findChild( n ,"whatsthis" ); if ( !what.isNull() ) { if ( what.firstChild().isText() ) { TQDomText text = what.firstChild().toText(); @@ -98,7 +98,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) if ( n.nodeName() == "label" ) //a static label { TQLabel *label = new TQLabel(this); - TQDomElement ltext = tqfindChild(n,"text").toElement(); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() ) label->setText( ltext.text().isEmpty() ? TQString("") : (ltext.text()+":") ); @@ -116,7 +116,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) TQDomElement el(n.toElement()); TQString type = el.attribute("type","input"); - TQDomElement ltext = tqfindChild(n,"text").toElement(); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() && (type != "check") ) //if there is a text label for the attribute { TQLabel *label = new TQLabel(this); @@ -152,7 +152,7 @@ void Tagxml::initialize(TQDomNode &d, TQTag *dtdTag) TQCheckBox *w = new TQCheckBox(this); grid->addMultiCellWidget( w, row, row+rowspan, col, col+colspan ); - TQDomElement ltext = tqfindChild(n,"text").toElement(); + TQDomElement ltext = findChild(n,"text").toElement(); if ( !ltext.isNull() ) w->setText( ltext.text() ); if ( !tip.isNull() ) @@ -270,10 +270,10 @@ void Tagxml::readAttributes( TQDict *d ) { if (m_dtd->booleanAttributes == "simple") { - d->tqreplace(name, new TQString("") ); + d->replace(name, new TQString("") ); } else { - d->tqreplace(name, new TQString(m_dtd->booleanTrue)); //it seems that browsers don't like , so if a checkbox is false, don't put in the tag at all + d->replace(name, new TQString(m_dtd->booleanTrue)); //it seems that browsers don't like , so if a checkbox is false, don't put in the tag at all } } else @@ -283,16 +283,16 @@ void Tagxml::readAttributes( TQDict *d ) /* } else { value = (value == "checked")?m_dtd->booleanTrue:m_dtd->booleanFalse; - d->tqreplace(name, new TQString(value)); + d->replace(name, new TQString(value)); } */ } else if (dynamic_cast(attr)) { // value = KURL::encode_string(value); - d->tqreplace(name, new TQString(value)); + d->replace(name, new TQString(value)); } else { - value.tqreplace(TQRegExp("&(?!amp;)"), "&"); - d->tqreplace(name, new TQString(value) ); + value.replace(TQRegExp("&(?!amp;)"), "&"); + d->replace(name, new TQString(value) ); } } @@ -313,9 +313,9 @@ void Tagxml::writeAttributes( TQDict *d ) name = attr->attrName(); - TQString *v = d->tqfind(name); + TQString *v = d->find(name); if ( v ) { - v->tqreplace("&","&"); + v->replace("&","&"); if ( dynamic_cast(attr) ) // checkbox value = "checked"; else -- cgit v1.2.3