summaryrefslogtreecommitdiffstats
path: root/khtml/ecma
diff options
context:
space:
mode:
Diffstat (limited to 'khtml/ecma')
-rw-r--r--khtml/ecma/kjs_binding.cpp2
-rw-r--r--khtml/ecma/kjs_binding.h2
-rw-r--r--khtml/ecma/kjs_css.cpp2
-rw-r--r--khtml/ecma/kjs_debugwin.cpp2
-rw-r--r--khtml/ecma/kjs_navigator.cpp28
-rw-r--r--khtml/ecma/kjs_proxy.cpp10
-rw-r--r--khtml/ecma/kjs_window.cpp12
-rw-r--r--khtml/ecma/xmlhttprequest.cpp24
8 files changed, 41 insertions, 41 deletions
diff --git a/khtml/ecma/kjs_binding.cpp b/khtml/ecma/kjs_binding.cpp
index 2646b8e26..4fa87e2ce 100644
--- a/khtml/ecma/kjs_binding.cpp
+++ b/khtml/ecma/kjs_binding.cpp
@@ -190,7 +190,7 @@ ScriptInterpreter::~ScriptInterpreter()
#ifdef KJS_VERBOSE
kdDebug(6070) << "ScriptInterpreter::~ScriptInterpreter " << this << " for part=" << m_frame << endl;
#endif
- assert( interpreterList && interpreterList->tqcontains( this ) );
+ assert( interpreterList && interpreterList->contains( this ) );
interpreterList->remove( this );
if ( interpreterList->isEmpty() ) {
delete interpreterList;
diff --git a/khtml/ecma/kjs_binding.h b/khtml/ecma/kjs_binding.h
index 0672cd8eb..c55da21ce 100644
--- a/khtml/ecma/kjs_binding.h
+++ b/khtml/ecma/kjs_binding.h
@@ -103,7 +103,7 @@ namespace KJS {
m_domObjects.insert( objectHandle, obj );
}
void customizedDOMObject( DOMObject* obj ) {
- m_customizedDomObjects.tqreplace( obj, this );
+ m_customizedDomObjects.replace( obj, this );
}
bool deleteDOMObject( void* objectHandle ) {
DOMObject* obj = m_domObjects.take( objectHandle );
diff --git a/khtml/ecma/kjs_css.cpp b/khtml/ecma/kjs_css.cpp
index ea651336e..b42f9dd02 100644
--- a/khtml/ecma/kjs_css.cpp
+++ b/khtml/ecma/kjs_css.cpp
@@ -185,7 +185,7 @@ void DOMCSSStyleDeclaration::tryPut(ExecState *exec, const Identifier &propertyN
if (propvalue.isEmpty())
styleDecl.removeProperty(prop);
else {
- int important = propvalue.tqfind("!important", 0, false);
+ int important = propvalue.find("!important", 0, false);
if (important == -1)
styleDecl.setProperty(prop, DOM::DOMString(propvalue), "");
else
diff --git a/khtml/ecma/kjs_debugwin.cpp b/khtml/ecma/kjs_debugwin.cpp
index 8ebd20349..b3c2a41b1 100644
--- a/khtml/ecma/kjs_debugwin.cpp
+++ b/khtml/ecma/kjs_debugwin.cpp
@@ -1123,7 +1123,7 @@ bool KJSDebugWin::haveBreakpoint(SourceFile *sourceFile, int line0, int line1)
for (int i = 0; i < m_breakpointCount; i++) {
int sourceId = m_breakpoints[i].sourceId;
int lineno = m_breakpoints[i].lineno;
- if (m_sourceFragments.tqcontains(sourceId) &&
+ if (m_sourceFragments.contains(sourceId) &&
m_sourceFragments[sourceId]->sourceFile == sourceFile) {
int absLineno = m_sourceFragments[sourceId]->baseLine+lineno-1;
if (absLineno >= line0 && absLineno <= line1)
diff --git a/khtml/ecma/kjs_navigator.cpp b/khtml/ecma/kjs_navigator.cpp
index 657addcf3..637b6a8e1 100644
--- a/khtml/ecma/kjs_navigator.cpp
+++ b/khtml/ecma/kjs_navigator.cpp
@@ -188,14 +188,14 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
return String("Mozilla");
case AppName:
// If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape
- if (userAgent.tqfind(TQString::tqfromLatin1("Mozilla")) >= 0 &&
- userAgent.tqfind(TQString::tqfromLatin1("compatible")) == -1)
+ if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 &&
+ userAgent.find(TQString::tqfromLatin1("compatible")) == -1)
{
//kdDebug() << "appName -> Mozilla" << endl;
return String("Netscape");
}
- if (userAgent.tqfind(TQString::tqfromLatin1("Microsoft")) >= 0 ||
- userAgent.tqfind(TQString::tqfromLatin1("MSIE")) >= 0)
+ if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 ||
+ userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0)
{
//kdDebug() << "appName -> IE" << endl;
return String("Microsoft Internet Explorer");
@@ -204,17 +204,17 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
return String("Konqueror");
case AppVersion:
// We assume the string is something like Mozilla/version (properties)
- return String(userAgent.mid(userAgent.tqfind('/') + 1));
+ return String(userAgent.mid(userAgent.find('/') + 1));
case Product:
// We are pretending to be Mozilla or Safari
- if (userAgent.tqfind(TQString::tqfromLatin1("Mozilla")) >= 0 &&
- userAgent.tqfind(TQString::tqfromLatin1("compatible")) == -1)
+ if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 &&
+ userAgent.find(TQString::tqfromLatin1("compatible")) == -1)
{
return String("Gecko");
}
// When spoofing as IE, we use Undefined().
- if (userAgent.tqfind(TQString::tqfromLatin1("Microsoft")) >= 0 ||
- userAgent.tqfind(TQString::tqfromLatin1("MSIE")) >= 0)
+ if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 ||
+ userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0)
{
return Undefined();
}
@@ -222,9 +222,9 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
return String("Konqueror/khtml");
case ProductSub:
{
- int ix = userAgent.tqfind("Gecko");
+ int ix = userAgent.find("Gecko");
if (ix >= 0 && userAgent.length() >= (uint)ix+14 && userAgent.tqunicode()[ix+5] == TQChar('/') &&
- userAgent.tqfind(TQRegExp("\\d{8}"), ix+6) == ix+6)
+ userAgent.find(TQRegExp("\\d{8}"), ix+6) == ix+6)
{
// We have Gecko/<productSub> in the UA string
return String(userAgent.mid(ix+6, 8));
@@ -245,10 +245,10 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
return String(userAgent);
case Platform:
// yet another evil hack, but necessary to spoof some sites...
- if ( (userAgent.tqfind(TQString::tqfromLatin1("Win"),0,false)>=0) )
+ if ( (userAgent.find(TQString::tqfromLatin1("Win"),0,false)>=0) )
return String(TQString::tqfromLatin1("Win32"));
- else if ( (userAgent.tqfind(TQString::tqfromLatin1("Macintosh"),0,false)>=0) ||
- (userAgent.tqfind(TQString::tqfromLatin1("Mac_PowerPC"),0,false)>=0) )
+ else if ( (userAgent.find(TQString::tqfromLatin1("Macintosh"),0,false)>=0) ||
+ (userAgent.find(TQString::tqfromLatin1("Mac_PowerPC"),0,false)>=0) )
return String(TQString::tqfromLatin1("MacPPC"));
else
{
diff --git a/khtml/ecma/kjs_proxy.cpp b/khtml/ecma/kjs_proxy.cpp
index 55e9aeff6..2469ac681 100644
--- a/khtml/ecma/kjs_proxy.cpp
+++ b/khtml/ecma/kjs_proxy.cpp
@@ -343,8 +343,8 @@ void KJSProxyImpl::applyUserAgent()
assert( m_script );
TQString host = m_frame->m_part->url().isLocalFile() ? "localhost" : m_frame->m_part->url().host();
TQString userAgent = KProtocolManager::userAgentForHost(host);
- if (userAgent.tqfind(TQString::tqfromLatin1("Microsoft")) >= 0 ||
- userAgent.tqfind(TQString::tqfromLatin1("MSIE")) >= 0)
+ if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 ||
+ userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0)
{
m_script->setCompatMode(Interpreter::IECompat);
#ifdef KJS_VERBOSE
@@ -353,9 +353,9 @@ void KJSProxyImpl::applyUserAgent()
}
else
// If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape
- if (userAgent.tqfind(TQString::tqfromLatin1("Mozilla")) >= 0 &&
- userAgent.tqfind(TQString::tqfromLatin1("compatible")) == -1 &&
- userAgent.tqfind(TQString::tqfromLatin1("KHTML")) == -1)
+ if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 &&
+ userAgent.find(TQString::tqfromLatin1("compatible")) == -1 &&
+ userAgent.find(TQString::tqfromLatin1("KHTML")) == -1)
{
m_script->setCompatMode(Interpreter::NetscapeCompat);
#ifdef KJS_VERBOSE
diff --git a/khtml/ecma/kjs_window.cpp b/khtml/ecma/kjs_window.cpp
index 77a098680..067a189ac 100644
--- a/khtml/ecma/kjs_window.cpp
+++ b/khtml/ecma/kjs_window.cpp
@@ -1446,7 +1446,7 @@ void Window::goURL(ExecState* exec, const TQString& url, bool lockHistory)
// check if we're allowed to inject javascript
// SYNC check with khtml_part.cpp::slotRedirect!
if ( isSafeScript(exec) ||
- dstUrl.tqfind(TQString::tqfromLatin1("javascript:"), 0, false) != 0 )
+ dstUrl.find(TQString::tqfromLatin1("javascript:"), 0, false) != 0 )
part->scheduleRedirection(-1,
dstUrl,
lockHistory);
@@ -1618,7 +1618,7 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString
while (it != flist.end()) {
TQString s = *it++;
TQString key, val;
- int pos = s.tqfind('=');
+ int pos = s.find('=');
if (pos >= 0) {
key = s.left(pos).stripWhiteSpace().lower();
val = s.mid(pos + 1).stripWhiteSpace().lower();
@@ -2271,7 +2271,7 @@ void WindowQObject::timerEvent(TQTimerEvent *)
it = TQPtrListIterator<ScheduledAction>(toExecute);
for (; it.current(); ++it) {
ScheduledAction *action = it.current();
- if (!scheduledActions.tqcontainsRef(action)) // removed by clearTimeout()
+ if (!scheduledActions.containsRef(action)) // removed by clearTimeout()
continue;
action->executing = true; // prevent deletion in clearTimeout()
@@ -2288,7 +2288,7 @@ void WindowQObject::timerEvent(TQTimerEvent *)
action->executing = false;
- if (!scheduledActions.tqcontainsRef(action))
+ if (!scheduledActions.containsRef(action))
delete action;
else
action->nextTime = action->nextTime.addMSecs(action->interval);
@@ -2603,8 +2603,8 @@ void Location::put(ExecState *exec, const Identifier &p, const Value &v, int att
url.setRef(str);
break;
case Host: {
- TQString host = str.left(str.tqfind(":"));
- TQString port = str.mid(str.tqfind(":")+1);
+ TQString host = str.left(str.find(":"));
+ TQString port = str.mid(str.find(":")+1);
url.setHost(host);
url.setPort(port.toUInt());
break;
diff --git a/khtml/ecma/xmlhttprequest.cpp b/khtml/ecma/xmlhttprequest.cpp
index f821d7b95..7b88477f0 100644
--- a/khtml/ecma/xmlhttprequest.cpp
+++ b/khtml/ecma/xmlhttprequest.cpp
@@ -395,7 +395,7 @@ void XMLHttpRequest::send(const TQString& _body)
// through setRequestHeader. NOTE: the user can still disable
// this feature at the protocol level (kio_http).
// ### does find() ever succeed? the headers are stored in lower case!
- if (requestHeaders.tqfind("Referer") == requestHeaders.end()) {
+ if (requestHeaders.find("Referer") == requestHeaders.end()) {
KURL documentURL(doc->URL());
documentURL.setPass(TQString::null);
documentURL.setUser(TQString::null);
@@ -489,7 +489,7 @@ void XMLHttpRequest::setRequestHeader(const TQString& _name, const TQString &val
TQStringList bannedHeaders = TQStringList::split(',',
TQString::tqfromLatin1(BANNED_HTTP_HEADERS));
- if (bannedHeaders.tqcontains(name))
+ if (bannedHeaders.contains(name))
return; // Denied
requestHeaders[name] = value.stripWhiteSpace();
@@ -501,7 +501,7 @@ Value XMLHttpRequest::getAllResponseHeaders() const
return Undefined();
}
- int endOfLine = responseHeaders.tqfind("\n");
+ int endOfLine = responseHeaders.find("\n");
if (endOfLine == -1) {
return Undefined();
@@ -535,7 +535,7 @@ Value XMLHttpRequest::getResponseHeader(const TQString& name) const
return Undefined();
}
- int endOfLine = responseHeaders.tqfind("\n", headerLinePos + matchLength);
+ int endOfLine = responseHeaders.find("\n", headerLinePos + matchLength);
return String(responseHeaders.mid(headerLinePos + matchLength, endOfLine - (headerLinePos + matchLength)).stripWhiteSpace());
}
@@ -546,10 +546,10 @@ static Value httpStatus(const TQString& response, bool textStatus = false)
return Undefined();
}
- int endOfLine = response.tqfind("\n");
+ int endOfLine = response.find("\n");
TQString firstLine = (endOfLine == -1) ? response : response.left(endOfLine);
- int codeStart = firstLine.tqfind(" ");
- int codeEnd = firstLine.tqfind(" ", codeStart + 1);
+ int codeStart = firstLine.find(" ");
+ int codeEnd = firstLine.find(" ", codeStart + 1);
if (codeStart == -1 || codeEnd == -1) {
return Undefined();
@@ -643,9 +643,9 @@ void XMLHttpRequest::slotData(KIO::Job*, const TQByteArray &_data)
// NOTE: Replace a 304 response with a 200! Both IE and Mozilla do this.
// Problem first reported through bug# 110272.
- int codeStart = responseHeaders.tqfind("304");
+ int codeStart = responseHeaders.find("304");
if ( codeStart != -1) {
- int codeEnd = responseHeaders.tqfind("\n", codeStart+3);
+ int codeEnd = responseHeaders.find("\n", codeStart+3);
if (codeEnd != -1)
responseHeaders.replace(codeStart, (codeEnd-codeStart), "200 OK");
}
@@ -659,13 +659,13 @@ void XMLHttpRequest::slotData(KIO::Job*, const TQByteArray &_data)
#endif
if ( decoder == NULL ) {
- int pos = responseHeaders.tqfind("content-type:", 0, false);
+ int pos = responseHeaders.find("content-type:", 0, false);
if ( pos > -1 ) {
pos += 13;
- int index = responseHeaders.tqfind('\n', pos);
+ int index = responseHeaders.find('\n', pos);
TQString type = responseHeaders.mid(pos, (index-pos));
- index = type.tqfind (';');
+ index = type.find (';');
if (index > -1)
encoding = TQString(type.mid( index+1 ).remove(TQRegExp("charset[ ]*=[ ]*", false))).stripWhiteSpace();
}