summaryrefslogtreecommitdiffstats
path: root/quanta/utility
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-08-10 06:08:18 +0000
commit36c36b53a129509d56fdaa0a7c9fcbcacd0c5826 (patch)
tree629d3942958745660e36c30b0d6139af9459c0f8 /quanta/utility
parent929d7ae4f69d62b8f1f6d3506adf75f017753935 (diff)
downloadtdewebdev-36c36b53a129509d56fdaa0a7c9fcbcacd0c5826.tar.gz
tdewebdev-36c36b53a129509d56fdaa0a7c9fcbcacd0c5826.zip
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
Diffstat (limited to 'quanta/utility')
-rw-r--r--quanta/utility/qpevents.cpp10
-rw-r--r--quanta/utility/quantabookmarks.cpp8
-rw-r--r--quanta/utility/quantabookmarks.h2
-rw-r--r--quanta/utility/quantacommon.cpp38
-rw-r--r--quanta/utility/quantanetaccess.cpp6
-rw-r--r--quanta/utility/tagaction.cpp70
-rw-r--r--quanta/utility/tagactionmanager.cpp4
-rw-r--r--quanta/utility/toolbartabwidget.cpp8
8 files changed, 73 insertions, 73 deletions
diff --git a/quanta/utility/qpevents.cpp b/quanta/utility/qpevents.cpp
index 52be21ba..f41384c1 100644
--- a/quanta/utility/qpevents.cpp
+++ b/quanta/utility/qpevents.cpp
@@ -76,7 +76,7 @@ void QPEvents::slotEventHappened(const TQString& name, const TQString& argument1
return;
EventActions *events = Project::ref()->events();
if (!events) return;
- if (events->tqcontains(name))
+ if (events->contains(name))
{
m_eventName = name;
TQValueList<EventAction> evList = (*events)[name];
@@ -96,7 +96,7 @@ void QPEvents::slotEventHappened(const TQString& name, const TQString& argument1
KURL url2 = KURL::fromPathOrURL(argument2);
if (url.isValid())
{
- bool inProject = Project::ref()->tqcontains(url);
+ bool inProject = Project::ref()->contains(url);
if (inProject)
{
if (name == "upload_requested")
@@ -220,7 +220,7 @@ void QPEvents::slotEventHappened(const TQString& name, const TQString& argument1
}
}
}
- if (!m_eventNames.tqcontains(name))
+ if (!m_eventNames.contains(name))
KMessageBox::sorry(0L, i18n("<qt>Unsupported event <b>%1</b>.</qt>").tqarg(name), i18n("Event Handling Error"));
}
@@ -346,7 +346,7 @@ bool QPEvents::handleEvent(const EventAction& ev)
TQString QPEvents::fullEventName(const TQString &name)
{
- if (m_eventNames.tqcontains(name))
+ if (m_eventNames.contains(name))
return m_eventNames[name];
else
return name;
@@ -354,7 +354,7 @@ TQString QPEvents::fullEventName(const TQString &name)
TQString QPEvents::fullActionName(const TQString& name)
{
- if (m_actionNames.tqcontains(name))
+ if (m_actionNames.contains(name))
return m_actionNames[name];
else
return name;
diff --git a/quanta/utility/quantabookmarks.cpp b/quanta/utility/quantabookmarks.cpp
index 9b91220d..ad0f3327 100644
--- a/quanta/utility/quantabookmarks.cpp
+++ b/quanta/utility/quantabookmarks.cpp
@@ -182,14 +182,14 @@ int QuantaBookmarks::insertBookmarks(TQPopupMenu& menu, Document *doc, bool inse
TQString bText = KStringHandler::rEmSqueeze
( doc->editIf->textLine( (*it)->line ),
menu.fontMetrics(), 32 );
- bText.tqreplace(re, "&&"); // kill undesired accellerators!
- bText.tqreplace('\t', ' '); // kill tabs, as they are interpreted as shortcuts
+ bText.replace(re, "&&"); // kill undesired accellerators!
+ bText.replace('\t', ' '); // kill tabs, as they are interpreted as shortcuts
if ( m_sorting == Position )
{
sortArray[i] = (*it)->line;
ssort( sortArray, i );
- idx = sortArray.tqfind( (*it)->line );
+ idx = sortArray.find( (*it)->line );
if (insertNavigationItems)
idx += 3;
i++;
@@ -396,4 +396,4 @@ void QuantaBookmarks::marksChanged ()
#include "quantabookmarks.moc"
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
diff --git a/quanta/utility/quantabookmarks.h b/quanta/utility/quantabookmarks.h
index 7dac33d5..a613aa9c 100644
--- a/quanta/utility/quantabookmarks.h
+++ b/quanta/utility/quantabookmarks.h
@@ -96,5 +96,5 @@ class QuantaBookmarks : public TQObject
#endif
-// kate: space-indent on; indent-width 2; tqreplace-tabs on;
+// kate: space-indent on; indent-width 2; replace-tabs on;
// vim: noet ts=2
diff --git a/quanta/utility/quantacommon.cpp b/quanta/utility/quantacommon.cpp
index 7846fa15..bc279dc9 100644
--- a/quanta/utility/quantacommon.cpp
+++ b/quanta/utility/quantacommon.cpp
@@ -144,11 +144,11 @@ bool QuantaCommon::isSingleTag(const TQString& dtdName, const TQString& tag)
if(tag.lower() == "!doctype" || tag.lower() == "?xml")
return true;
- const DTDStruct* dtd = DTDs::ref()->tqfind(dtdName);
+ const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
- TQTag* qtag = dtd->tagsList->tqfind(searchForTag);
+ TQTag* qtag = dtd->tagsList->find(searchForTag);
if (qtag)
single = qtag->isSingle();
}
@@ -161,11 +161,11 @@ bool QuantaCommon::isOptionalTag(const TQString& dtdName, const TQString& tag)
{
bool optional = false;
- const DTDStruct* dtd = DTDs::ref()->tqfind(dtdName);
+ const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
- TQTag* qtag = dtd->tagsList->tqfind(searchForTag);
+ TQTag* qtag = dtd->tagsList->find(searchForTag);
if (qtag)
optional = qtag->isOptional();
}
@@ -177,11 +177,11 @@ bool QuantaCommon::isKnownTag(const TQString& dtdName, const TQString& tag)
{
bool known = false;
- const DTDStruct* dtd = DTDs::ref()->tqfind(dtdName);
+ const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
- if (dtd->tagsList->tqfind(searchForTag))
+ if (dtd->tagsList->find(searchForTag))
known = true;
}
@@ -192,11 +192,11 @@ AttributeList* QuantaCommon::tagAttributes(const TQString& dtdName, const TQStri
{
AttributeList* attrs = 0L;
- const DTDStruct* dtd = DTDs::ref()->tqfind(dtdName);
+ const DTDStruct* dtd = DTDs::ref()->find(dtdName);
if (dtd && !tag.isEmpty())
{
TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
- TQTag* qtag = dtd->tagsList->tqfind(searchForTag);
+ TQTag* qtag = dtd->tagsList->find(searchForTag);
if (qtag)
attrs = qtag->attributes();
}
@@ -207,7 +207,7 @@ AttributeList* QuantaCommon::tagAttributes(const TQString& dtdName, const TQStri
/** Returns the TQTag object for the tag "tag" from the DTD named "dtdname". */
TQTag* QuantaCommon::tagFromDTD(const TQString& dtdName, const TQString& tag)
{
- const DTDStruct* dtd = DTDs::ref()->tqfind(dtdName);
+ const DTDStruct* dtd = DTDs::ref()->find(dtdName);
return tagFromDTD(dtd, tag);
}
@@ -218,7 +218,7 @@ TQTag* QuantaCommon::tagFromDTD(const DTDStruct *dtd, const TQString& tag)
if (dtd && !tag.isEmpty())
{
TQString searchForTag = (dtd->caseSensitive) ? tag : tag.upper();
- qtag = dtd->tagsList->tqfind(searchForTag);
+ qtag = dtd->tagsList->find(searchForTag);
}
return qtag;
@@ -311,7 +311,7 @@ bool QuantaCommon::checkMimeGroup(const KURL& url, const TQString& group)
mimetype = mimetype.section('/',-1);
for ( it = list.begin(); it != list.end(); ++it )
{
- if ( ((*it)->name().tqcontains(group)) && ((*it)->name().tqfind(mimetype) != -1)
+ if ( ((*it)->name().contains(group)) && ((*it)->name().find(mimetype) != -1)
) {
status = true;
break;
@@ -410,7 +410,7 @@ TQString QuantaCommon::makeRxCompatible(const TQString& s)
TQString str = s;
for (uint i = 0; i < max - 1; i++)
{
- str.tqreplace(rxs[i], strs[i]);
+ str.replace(rxs[i], strs[i]);
}
return str;
@@ -488,7 +488,7 @@ void QuantaCommon::removeCommentsAndQuotes(TQString &str, const DTDStruct *dtd)
} else
{
s = dtd->comments[s];
- l = str.tqfind(s, pos);
+ l = str.find(s, pos);
l = (l == -1) ? str.length() : l;
for (int i = pos; i < l ; i++)
{
@@ -554,7 +554,7 @@ bool QuantaCommon::insideCommentsOrQuotes(int position, const TQString &string,
} else
{
s = dtd->comments[s];
- l = str.tqfind(s, pos);
+ l = str.find(s, pos);
l = (l == -1) ? str.length() : l;
for (int i = pos; i < l ; i++)
{
@@ -633,12 +633,12 @@ void QuantaCommon::normalizeStructure(TQString f,TQStringList& l)
f.remove("\n");
f.remove("\r");
- while(f.tqcontains("<"))
+ while(f.contains("<"))
{
TQString z(f);
- z.truncate(z.tqfind(">")+1);
- z.remove(0,z.tqfind("<"));
- f.remove(0,f.tqfind(">")+1);
+ z.truncate(z.find(">")+1);
+ z.remove(0,z.find("<"));
+ f.remove(0,f.find(">")+1);
l.append(z);
}
}
@@ -745,7 +745,7 @@ TQString QuantaCommon::readPathEntry(KConfig *config, const TQString &pKey)
TQString QuantaCommon::encodedChar(uint code)
{
- if (replacementMap.tqcontains(code))
+ if (replacementMap.contains(code))
return TQString("%1;").tqarg(replacementMap[code]);
else
return TQString("&#%1;").tqarg(code);
diff --git a/quanta/utility/quantanetaccess.cpp b/quanta/utility/quantanetaccess.cpp
index ec110499..5486c352 100644
--- a/quanta/utility/quantanetaccess.cpp
+++ b/quanta/utility/quantanetaccess.cpp
@@ -176,7 +176,7 @@ void QuantaNetAccess::checkProjectInsert(const KURL& target, TQWidget* window, b
if ( !Project::ref()->hasProject()) return;
KURL saveUrl = adjustURL(target);
KURL baseURL = Project::ref()->projectBaseURL();
- if ( baseURL.isParentOf(saveUrl) && !Project::ref()->tqcontains(saveUrl) )
+ if ( baseURL.isParentOf(saveUrl) && !Project::ref()->contains(saveUrl) )
{
if (confirm)
{
@@ -201,7 +201,7 @@ bool QuantaNetAccess::checkProjectRemove(const KURL& src, TQWidget* window, bool
if ( !Project::ref()->hasProject() ) return true;
KURL url = adjustURL(src);
KURL baseURL = Project::ref()->projectBaseURL();
- if ( baseURL.isParentOf(url) && Project::ref()->tqcontains(url) )
+ if ( baseURL.isParentOf(url) && Project::ref()->contains(url) )
{
if (confirm)
{
@@ -224,7 +224,7 @@ bool QuantaNetAccess::checkProjectDel(const KURL& src, TQWidget* window, bool co
KURL url = adjustURL(src);
if ( Project::ref()->hasProject() )
{
- if ( Project::ref()->projectBaseURL().isParentOf(url) && Project::ref()->tqcontains(url) )
+ if ( Project::ref()->projectBaseURL().isParentOf(url) && Project::ref()->contains(url) )
{
if (confirm)
{
diff --git a/quanta/utility/tagaction.cpp b/quanta/utility/tagaction.cpp
index 3030d661..a4a58a43 100644
--- a/quanta/utility/tagaction.cpp
+++ b/quanta/utility/tagaction.cpp
@@ -332,16 +332,16 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, TQt::Butto
TQString fname = w->url().url();
if ( w->url().protocol() == "file")
fname = w->url().path();
- command.tqreplace("%f", fname );
+ command.replace("%f", fname );
}
pid_t pid = ::getpid();
if (kapp->inherits("KUniqueApplication"))
{
- command.tqreplace("%pid", TQString("unique %1").tqarg(pid));
+ command.replace("%pid", TQString("unique %1").tqarg(pid));
} else
{
- command.tqreplace("%pid", TQString("%1").tqarg(pid));
+ command.replace("%pid", TQString("%1").tqarg(pid));
}
TQString buffer;
TQString inputType = script.attribute("input","none");
@@ -352,9 +352,9 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, TQt::Butto
if ( inputType == "selected" && w->selectionIf) {
buffer = w->selectionIf->selection();
}
- command.tqreplace("%input", buffer);
+ command.replace("%input", buffer);
command = command.stripWhiteSpace();
- int pos = command.tqfind(' ');
+ int pos = command.find(' ');
TQString args;
if (pos != -1)
{
@@ -374,46 +374,46 @@ bool TagAction::slotActionActivated(KAction::ActivationReason reason, TQt::Butto
pos = 0;
while (pos != -1 )
{
- pos = args.tqfind("%scriptdir");
+ pos = args.find("%scriptdir");
TQString scriptname;
if (pos != -1)
{
- int begin = args.tqfindRev('"', pos);
+ int begin = args.findRev('"', pos);
int end = -1;
if (begin == -1)
{
- begin = args.tqfindRev('\'', pos);
+ begin = args.findRev('\'', pos);
if (begin != -1)
- end = args.tqfind('\'', pos);
+ end = args.find('\'', pos);
} else
{
- end = args.tqfind('"', pos);
+ end = args.find('"', pos);
}
if (begin == -1 || end != -1)
{
- begin = args.tqfindRev(' ', pos);
+ begin = args.findRev(' ', pos);
if (begin == -1)
begin = 0;
- end = args.tqfind(' ', pos);
+ end = args.find(' ', pos);
if (end == -1)
end = args.length();
}
scriptname = args.mid(begin, end - begin).stripWhiteSpace();
- scriptname.tqreplace("%scriptdir","scripts");
+ scriptname.replace("%scriptdir","scripts");
// kdDebug(24000) << "Script name is: |" << scriptname << "|" << endl;
scriptname = " " + locate("appdata", scriptname);
// kdDebug(24000) << "Script found at: " << scriptname << endl;
- args.tqreplace(begin, end - begin, scriptname);
+ args.replace(begin, end - begin, scriptname);
// kdDebug(24000) << "Modified argument list: " << args << endl;
}
}
- int pos = args.tqfind("%projectbase");
+ int pos = args.find("%projectbase");
if (pos != -1)
{
TQString s;
if (Project::ref()->hasProject())
s = Project::ref()->projectBaseURL().url();
- args.tqreplace("%projectbase", s);
+ args.replace("%projectbase", s);
}
TQStringList argsList1 = TQStringList::split(' ', args);
TQStringList argsList;
@@ -586,16 +586,16 @@ bool TagAction::slotActionActivated()
TQString fname = w->url().url();
if ( w->url().protocol() == "file")
fname = w->url().path();
- command.tqreplace("%f", fname );
+ command.replace("%f", fname );
}
pid_t pid = ::getpid();
if (kapp->inherits("KUniqueApplication"))
{
- command.tqreplace("%pid", TQString("unique %1").tqarg(pid));
+ command.replace("%pid", TQString("unique %1").tqarg(pid));
} else
{
- command.tqreplace("%pid", TQString("%1").tqarg(pid));
+ command.replace("%pid", TQString("%1").tqarg(pid));
}
TQString buffer;
TQString inputType = script.attribute("input","none");
@@ -606,9 +606,9 @@ bool TagAction::slotActionActivated()
if ( inputType == "selected" && w->selectionIf) {
buffer = w->selectionIf->selection();
}
- command.tqreplace("%input", buffer);
+ command.replace("%input", buffer);
command = command.stripWhiteSpace();
- int pos = command.tqfind(' ');
+ int pos = command.find(' ');
TQString args;
if (pos != -1)
{
@@ -628,46 +628,46 @@ bool TagAction::slotActionActivated()
pos = 0;
while (pos != -1 )
{
- pos = args.tqfind("%scriptdir");
+ pos = args.find("%scriptdir");
TQString scriptname;
if (pos != -1)
{
- int begin = args.tqfindRev('"', pos);
+ int begin = args.findRev('"', pos);
int end = -1;
if (begin == -1)
{
- begin = args.tqfindRev('\'', pos);
+ begin = args.findRev('\'', pos);
if (begin != -1)
- end = args.tqfind('\'', pos);
+ end = args.find('\'', pos);
} else
{
- end = args.tqfind('"', pos);
+ end = args.find('"', pos);
}
if (begin == -1 || end != -1)
{
- begin = args.tqfindRev(' ', pos);
+ begin = args.findRev(' ', pos);
if (begin == -1)
begin = 0;
- end = args.tqfind(' ', pos);
+ end = args.find(' ', pos);
if (end == -1)
end = args.length();
}
scriptname = args.mid(begin, end - begin).stripWhiteSpace();
- scriptname.tqreplace("%scriptdir","scripts");
+ scriptname.replace("%scriptdir","scripts");
// kdDebug(24000) << "Script name is: |" << scriptname << "|" << endl;
scriptname = " " + locate("appdata", scriptname);
// kdDebug(24000) << "Script found at: " << scriptname << endl;
- args.tqreplace(begin, end - begin, scriptname);
+ args.replace(begin, end - begin, scriptname);
// kdDebug(24000) << "Modified argument list: " << args << endl;
}
}
- int pos = args.tqfind("%projectbase");
+ int pos = args.find("%projectbase");
if (pos != -1)
{
TQString s;
if (Project::ref()->hasProject())
s = Project::ref()->projectBaseURL().url();
- args.tqreplace("%projectbase", s);
+ args.replace("%projectbase", s);
}
TQStringList argsList1 = TQStringList::split(' ', args);
TQStringList argsList;
@@ -767,7 +767,7 @@ void TagAction::slotGetScriptOutput( KProcess *, char *buffer, int buflen )
}
w->insertTag( text );
} else
- if ( scriptOutputDest == "tqreplace" )
+ if ( scriptOutputDest == "replace" )
{
if ( firstOutput )
w->editIf->clear();
@@ -827,7 +827,7 @@ void TagAction::slotGetScriptError( KProcess *, char *buffer, int buflen )
}
w->insertTag( text );
} else
- if ( scriptErrorDest == "tqreplace" )
+ if ( scriptErrorDest == "replace" )
{
if ( firstError )
w->editIf->clear();
@@ -874,7 +874,7 @@ void TagAction::setInputFileName(const TQString& fileName)
TQString TagAction::actionText()
{
TQString t = tag.attribute("text");
- int pos = t.tqfind('&');
+ int pos = t.find('&');
if (pos < (int)t.length()-1 && t[pos+1] != '&')
return t.remove(pos, 1);
else
diff --git a/quanta/utility/tagactionmanager.cpp b/quanta/utility/tagactionmanager.cpp
index b11525ec..88eb0d08 100644
--- a/quanta/utility/tagactionmanager.cpp
+++ b/quanta/utility/tagactionmanager.cpp
@@ -78,6 +78,6 @@ void TagActionManager::fillWithTagActions(TQWidget* widget, DOM::Node const& nod
bool TagActionManager::canIndentDTD(TQString const& dtd)
{
- return (dtd.tqcontains("HTML", false) ||
- dtd.tqcontains("XML", false));
+ return (dtd.contains("HTML", false) ||
+ dtd.contains("XML", false));
}
diff --git a/quanta/utility/toolbartabwidget.cpp b/quanta/utility/toolbartabwidget.cpp
index 90602623..d519faf3 100644
--- a/quanta/utility/toolbartabwidget.cpp
+++ b/quanta/utility/toolbartabwidget.cpp
@@ -118,7 +118,7 @@ TQString ToolbarTabWidget::id(int index) const
TQWidget* ToolbarTabWidget::page(const TQString& id)
{
- TQWidget *w = toolbarList.tqfind(id).data();
+ TQWidget *w = toolbarList.find(id).data();
return w;
}
@@ -169,7 +169,7 @@ void ToolbarTabWidget::mousePressEvent ( TQMouseEvent * e )
TQRect r = tab->rect();
TQPoint p1 = mapToGlobal(r.topLeft());
TQPoint p2 = mapToGlobal(r.bottomRight());
- if (TQRect(p1, p2).tqcontains(p))
+ if (TQRect(p1, p2).contains(p))
break;
else
tab = 0L;
@@ -313,11 +313,11 @@ void QuantaToolBar::mousePressEvent(TQMouseEvent *e)
KToolBarButton *w = static_cast<KToolBarButton*>(TQT_TQWIDGET(tqchildrenList->at(i)));
TQPoint p1 = w->parentWidget()->mapToGlobal(w->pos());
TQPoint p2 = TQPoint(p1.x() + w->width(), p1.y()+w->height());
- if (TQRect(p1, p2).tqcontains(p))
+ if (TQRect(p1, p2).contains(p))
{
currentActionName = w->textLabel();
TQString actionName = currentActionName;
- m_popupMenu->insertItem(i18n("Remove Action - %1").tqarg(actionName.tqreplace('&',"&&")), this, TQT_SLOT(slotRemoveAction()));
+ m_popupMenu->insertItem(i18n("Remove Action - %1").tqarg(actionName.replace('&',"&&")), this, TQT_SLOT(slotRemoveAction()));
m_popupMenu->insertItem(i18n("Edit Action - %1").tqarg(actionName), this, TQT_SLOT(slotEditAction()));
break;
}