summaryrefslogtreecommitdiffstats
path: root/khtml/ecma
diff options
context:
space:
mode:
Diffstat (limited to 'khtml/ecma')
-rw-r--r--khtml/ecma/README2
-rw-r--r--khtml/ecma/kjs_binding.cpp6
-rw-r--r--khtml/ecma/kjs_binding.h2
-rw-r--r--khtml/ecma/kjs_css.cpp2
-rw-r--r--khtml/ecma/kjs_debugwin.cpp10
-rw-r--r--khtml/ecma/kjs_debugwin.h2
-rw-r--r--khtml/ecma/kjs_dom.cpp16
-rw-r--r--khtml/ecma/kjs_html.cpp18
-rw-r--r--khtml/ecma/kjs_navigator.cpp40
-rw-r--r--khtml/ecma/kjs_proxy.cpp12
-rw-r--r--khtml/ecma/kjs_window.cpp76
-rw-r--r--khtml/ecma/kjs_window.h2
-rw-r--r--khtml/ecma/xmlhttprequest.cpp56
-rw-r--r--khtml/ecma/xmlhttprequest.h6
14 files changed, 125 insertions, 125 deletions
diff --git a/khtml/ecma/README b/khtml/ecma/README
index 1efc877d8..4c341699a 100644
--- a/khtml/ecma/README
+++ b/khtml/ecma/README
@@ -1,4 +1,4 @@
-This module tqcontains the ECMAScript a.k.a. JavaScript language bindings for
+This module contains the ECMAScript a.k.a. JavaScript language bindings for
the KHTML Part.
The module is loaded into KHTML's address space on demand.
diff --git a/khtml/ecma/kjs_binding.cpp b/khtml/ecma/kjs_binding.cpp
index b2ad17725..f9dd291d7 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;
@@ -261,7 +261,7 @@ UString::UString(const TQString &d)
{
unsigned int len = d.length();
UChar *dat = new UChar[len];
- memcpy(dat, d.tqunicode(), len * sizeof(UChar));
+ memcpy(dat, d.unicode(), len * sizeof(UChar));
rep = UString::Rep::create(dat, len);
}
@@ -277,7 +277,7 @@ UString::UString(const DOM::DOMString &d)
unsigned int len = d.length();
UChar *dat = new UChar[len];
- memcpy(dat, d.tqunicode(), len * sizeof(UChar));
+ memcpy(dat, d.unicode(), len * sizeof(UChar));
rep = UString::Rep::create(dat, len);
}
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 d7f1c66e2..eeb126ebb 100644
--- a/khtml/ecma/kjs_debugwin.cpp
+++ b/khtml/ecma/kjs_debugwin.cpp
@@ -107,7 +107,7 @@ void SourceDisplay::setSource(SourceFile *sourceFile)
}
TQString code = sourceFile->getCode();
- const TQChar *chars = code.tqunicode();
+ const TQChar *chars = code.unicode();
uint len = code.length();
TQChar newLine('\n');
TQChar cr('\r');
@@ -861,7 +861,7 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
if (dontShowAgain) {
KConfig *config = kapp->config();
- KConfigGroupSaver saver(config,TQString::tqfromLatin1("Java/JavaScript Settings"));
+ KConfigGroupSaver saver(config,TQString::fromLatin1("Java/JavaScript Settings"));
config->writeEntry("ReportJavaScriptErrors",TQVariant(false,0));
config->sync();
TQByteArray data;
@@ -1020,7 +1020,7 @@ void KJSDebugWin::enterSession(ExecState *exec)
updateContextList();
- tqApp->enter_loop(); // won't return until leaveSession() is called
+ qApp->enter_loop(); // won't return until leaveSession() is called
}
void KJSDebugWin::leaveSession()
@@ -1043,7 +1043,7 @@ void KJSDebugWin::leaveSession()
enableOtherWindows();
}
- tqApp->exit_loop();
+ qApp->exit_loop();
}
void KJSDebugWin::updateContextList()
@@ -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_debugwin.h b/khtml/ecma/kjs_debugwin.h
index e925965eb..8faf71d52 100644
--- a/khtml/ecma/kjs_debugwin.h
+++ b/khtml/ecma/kjs_debugwin.h
@@ -151,7 +151,7 @@ namespace KJS {
/**
* @internal
*
- * KJSDebugWin represents the debugger window that is visible to the user. It tqcontains
+ * KJSDebugWin represents the debugger window that is visible to the user. It contains
* a stack frame list, a code viewer and a source fragment selector, plus buttons
* to control execution including next, step and continue.
*
diff --git a/khtml/ecma/kjs_dom.cpp b/khtml/ecma/kjs_dom.cpp
index b69976e0d..08afc6aab 100644
--- a/khtml/ecma/kjs_dom.cpp
+++ b/khtml/ecma/kjs_dom.cpp
@@ -67,7 +67,7 @@ IMPLEMENT_CONSTANT_TABLE(DOMNodeConstants,"DOMNodeConstants")
/* Source for DOMNodeProtoTable.
@begin DOMNodeProtoTable 13
insertBefore DOMNode::InsertBefore DontDelete|Function 2
- tqreplaceChild DOMNode::ReplaceChild DontDelete|Function 2
+ replaceChild DOMNode::ReplaceChild DontDelete|Function 2
removeChild DOMNode::RemoveChild DontDelete|Function 1
appendChild DOMNode::AppendChild DontDelete|Function 1
hasAttributes DOMNode::HasAttributes DontDelete|Function 0
@@ -81,7 +81,7 @@ IMPLEMENT_CONSTANT_TABLE(DOMNodeConstants,"DOMNodeConstants")
removeEventListener DOMNode::RemoveEventListener DontDelete|Function 3
dispatchEvent DOMNode::DispatchEvent DontDelete|Function 1
# IE extensions
- tqcontains DOMNode::Contains DontDelete|Function 1
+ contains DOMNode::Contains DontDelete|Function 1
insertAdjacentHTML DOMNode::InsertAdjacentHTML DontDelete|Function 2
# "DOM level 0" (from Gecko DOM reference; also in WinIE)
item DOMNode::Item DontDelete|Function 1
@@ -216,7 +216,7 @@ static khtml::RenderObject* handleBodyRootQuirk(const DOM::Node& node, khtml::Re
}
if (needViewport) {
- //Scan up to tqfind the new target
+ //Scan up to find the new target
while (rend->parent())
rend = rend->parent();
}
@@ -322,7 +322,7 @@ Value DOMNode::getValueProperty(ExecState *exec, int token) const
default:
// no DOM standard, found in IE only
- // Make sure our tqlayout is up to date before we allow a query on these attributes.
+ // Make sure our layout is up to date before we allow a query on these attributes.
DOM::DocumentImpl* docimpl = node.handle()->getDocument();
if (docimpl) {
docimpl->updateLayout();
@@ -469,7 +469,7 @@ void DOMNode::putValueProperty(ExecState *exec, int token, const Value& value, i
setListener(exec,DOM::EventImpl::UNLOAD_EVENT,value);
break;
default:
- // Make sure our tqlayout is up to date
+ // Make sure our layout is up to date
DOM::DocumentImpl* docimpl = node.handle()->getDocument();
if (docimpl)
docimpl->updateLayout();
@@ -585,7 +585,7 @@ Value DOMNodeProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List &ar
case DOMNode::InsertBefore:
return getDOMNode(exec,node.insertBefore(toNode(args[0]), toNode(args[1])));
case DOMNode::ReplaceChild:
- return getDOMNode(exec,node.tqreplaceChild(toNode(args[0]), toNode(args[1])));
+ return getDOMNode(exec,node.replaceChild(toNode(args[0]), toNode(args[1])));
case DOMNode::Contains:
{
DOM::Node other = toNode(args[0]);
@@ -1738,7 +1738,7 @@ const ClassInfo DOMCharacterData::info = { "CharacterImp",
appendData DOMCharacterData::AppendData DontDelete|Function 1
insertData DOMCharacterData::InsertData DontDelete|Function 2
deleteData DOMCharacterData::DeleteData DontDelete|Function 2
- tqreplaceData DOMCharacterData::ReplaceData DontDelete|Function 2
+ replaceData DOMCharacterData::ReplaceData DontDelete|Function 2
@end
*/
KJS_DEFINE_PROTOTYPE_WITH_PROTOTYPE(DOMCharacterDataProto, DOMNodeProto)
@@ -1801,7 +1801,7 @@ Value DOMCharacterDataProtoFunc::tryCall(ExecState *exec, Object &thisObj, const
return Undefined();
break;
case DOMCharacterData::ReplaceData:
- data.tqreplaceData(args[0].toInteger(exec),args[1].toInteger(exec),args[2].toString(exec).string());
+ data.replaceData(args[0].toInteger(exec),args[1].toInteger(exec),args[2].toString(exec).string());
return Undefined();
default:
break;
diff --git a/khtml/ecma/kjs_html.cpp b/khtml/ecma/kjs_html.cpp
index 321746f20..57762ffd3 100644
--- a/khtml/ecma/kjs_html.cpp
+++ b/khtml/ecma/kjs_html.cpp
@@ -205,12 +205,12 @@ bool KJS::HTMLDocument::hasProperty(ExecState *exec, const Identifier &p) const
return false;
- if ( docImpl->underDocNamedCache().tqcontains( p.qstring() ) )
+ if ( docImpl->underDocNamedCache().contains( p.qstring() ) )
return true;
if ( view && view->part() )
{
- KHTMLPart *kp = view->part()->tqfindFrame( p.qstring() );
+ KHTMLPart *kp = view->part()->findFrame( p.qstring() );
if (kp)
return true;
}
@@ -260,8 +260,8 @@ Value KJS::HTMLDocument::tryGet(ExecState *exec, const Identifier &propertyName)
if ( view && view->part() )
{
// ###### TODO return a collection in case several frames have the same name
- // (IE does that). Hard to do with tqfindFrame :}
- KHTMLPart *kp = view->part()->tqfindFrame( propertyName.qstring() );
+ // (IE does that). Hard to do with findFrame :}
+ KHTMLPart *kp = view->part()->findFrame( propertyName.qstring() );
if (kp)
return Window::retrieve(kp);
}
@@ -896,7 +896,7 @@ const ClassInfo* KJS::HTMLElement::classInfo() const
rel KJS::HTMLElement::AnchorRel DontDelete
rev KJS::HTMLElement::AnchorRev DontDelete
search KJS::HTMLElement::AnchorSearch DontDelete
- tqshape KJS::HTMLElement::AnchorShape DontDelete
+ shape KJS::HTMLElement::AnchorShape DontDelete
tabIndex KJS::HTMLElement::AnchorTabIndex DontDelete
target KJS::HTMLElement::AnchorTarget DontDelete
text KJS::HTMLElement::AnchorText DontDelete|ReadOnly
@@ -981,7 +981,7 @@ const ClassInfo* KJS::HTMLElement::classInfo() const
protocol KJS::HTMLElement::AreaProtocol DontDelete|ReadOnly
search KJS::HTMLElement::AreaSearch DontDelete|ReadOnly
noHref KJS::HTMLElement::AreaNoHref DontDelete
- tqshape KJS::HTMLElement::AreaShape DontDelete
+ shape KJS::HTMLElement::AreaShape DontDelete
tabIndex KJS::HTMLElement::AreaTabIndex DontDelete
target KJS::HTMLElement::AreaTarget DontDelete
@end
@@ -1599,7 +1599,7 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
case AnchorName: return String(anchor.name());
case AnchorRel: return String(anchor.rel());
case AnchorRev: return String(anchor.rev());
- case AnchorShape: return String(anchor.tqshape());
+ case AnchorShape: return String(anchor.shape());
case AnchorTabIndex: return Number(anchor.tabIndex());
case AnchorTarget: return String(anchor.target());
// Not specified in http://msdn.microsoft.com/workshop/author/dhtml/reference/objects/a.asp
@@ -1735,7 +1735,7 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
}
}
case AreaNoHref: return Boolean(area.noHref());
- case AreaShape: return String(area.tqshape());
+ case AreaShape: return String(area.shape());
case AreaTabIndex: return Number(area.tabIndex());
case AreaTarget: return String(area.target());
}
@@ -3773,7 +3773,7 @@ void KJS::HTMLSelectCollection::tryPut(ExecState *exec, const Identifier &proper
while (diff--) {
element.add(element.ownerDocument().createElement("OPTION"), before);
}
- // tqreplace an existing entry ?
+ // replace an existing entry ?
} else if (diff < 0) {
before = element.options().item(u+1);
element.remove(u);
diff --git a/khtml/ecma/kjs_navigator.cpp b/khtml/ecma/kjs_navigator.cpp
index 4c51561e4..a5c793357 100644
--- a/khtml/ecma/kjs_navigator.cpp
+++ b/khtml/ecma/kjs_navigator.cpp
@@ -187,15 +187,15 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
case AppCodeName:
return String("Mozilla");
case AppName:
- // If we tqfind "Mozilla" but not "(compatible, ...)" we are a real Netscape
- if (userAgent.tqfind(TQString::tqfromLatin1("Mozilla")) >= 0 &&
- userAgent.tqfind(TQString::tqfromLatin1("compatible")) == -1)
+ // If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape
+ if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 &&
+ userAgent.find(TQString::fromLatin1("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::fromLatin1("Microsoft")) >= 0 ||
+ userAgent.find(TQString::fromLatin1("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::fromLatin1("Mozilla")) >= 0 &&
+ userAgent.find(TQString::fromLatin1("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::fromLatin1("Microsoft")) >= 0 ||
+ userAgent.find(TQString::fromLatin1("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");
- if (ix >= 0 && userAgent.length() >= (uint)ix+14 && userAgent.tqunicode()[ix+5] == TQChar('/') &&
- userAgent.tqfind(TQRegExp("\\d{8}"), ix+6) == ix+6)
+ int ix = userAgent.find("Gecko");
+ if (ix >= 0 && userAgent.length() >= (uint)ix+14 && userAgent.unicode()[ix+5] == TQChar('/') &&
+ 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,19 +245,19 @@ 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) )
- return String(TQString::tqfromLatin1("Win32"));
- else if ( (userAgent.tqfind(TQString::tqfromLatin1("Macintosh"),0,false)>=0) ||
- (userAgent.tqfind(TQString::tqfromLatin1("Mac_PowerPC"),0,false)>=0) )
- return String(TQString::tqfromLatin1("MacPPC"));
+ if ( (userAgent.find(TQString::fromLatin1("Win"),0,false)>=0) )
+ return String(TQString::fromLatin1("Win32"));
+ else if ( (userAgent.find(TQString::fromLatin1("Macintosh"),0,false)>=0) ||
+ (userAgent.find(TQString::fromLatin1("Mac_PowerPC"),0,false)>=0) )
+ return String(TQString::fromLatin1("MacPPC"));
else
{
struct utsname name;
int ret = uname(&name);
if ( ret >= 0 )
- return String(TQString::tqfromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine));
+ return String(TQString::fromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine));
else // can't happen
- return String(TQString::tqfromLatin1("Unix X11"));
+ return String(TQString::fromLatin1("Unix X11"));
}
case CpuClass:
{
diff --git a/khtml/ecma/kjs_proxy.cpp b/khtml/ecma/kjs_proxy.cpp
index 0301ef141..ca26c5a0b 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::fromLatin1("Microsoft")) >= 0 ||
+ userAgent.find(TQString::fromLatin1("MSIE")) >= 0)
{
m_script->setCompatMode(Interpreter::IECompat);
#ifdef KJS_VERBOSE
@@ -352,10 +352,10 @@ void KJSProxyImpl::applyUserAgent()
#endif
}
else
- // If we tqfind "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 we find "Mozilla" but not "(compatible, ...)" we are a real Netscape
+ if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 &&
+ userAgent.find(TQString::fromLatin1("compatible")) == -1 &&
+ userAgent.find(TQString::fromLatin1("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 827756ac4..90123aec6 100644
--- a/khtml/ecma/kjs_window.cpp
+++ b/khtml/ecma/kjs_window.cpp
@@ -225,9 +225,9 @@ const ClassInfo Window::info = { "Window", &DOMAbstractView::info, &WindowTable,
btoa Window::BToA DontDelete|Function 1
closed Window::Closed DontDelete|ReadOnly
crypto Window::Crypto DontDelete|ReadOnly
- defaulttqStatus Window::DefaulttqStatus DontDelete
- defaultstatus Window::DefaulttqStatus DontDelete
- status Window::tqStatus DontDelete
+ defaultStatus Window::DefaultStatus DontDelete
+ defaultstatus Window::DefaultStatus DontDelete
+ status Window::Status DontDelete
document Window::Document DontDelete|ReadOnly
frameElement Window::FrameElement DontDelete|ReadOnly
frames Window::Frames DontDelete|ReadOnly
@@ -521,7 +521,7 @@ bool Window::hasProperty(ExecState *exec, const Identifier &p) const
return false;
TQString q = p.qstring();
- if (part->tqfindFramePart(p.qstring()))
+ if (part->findFramePart(p.qstring()))
return true;
// allow window[1] or parent[1] etc. (#56983)
bool ok;
@@ -655,9 +655,9 @@ Value Window::get(ExecState *exec, const Identifier &p) const
switch( entry->value ) {
case Crypto:
return Undefined(); // ###
- case DefaulttqStatus:
+ case DefaultStatus:
return String(UString(part->jsDefaultStatusBarText()));
- case tqStatus:
+ case Status:
return String(UString(part->jsStatusBarText()));
case Document:
if (part->document().isNull()) {
@@ -864,9 +864,9 @@ Value Window::get(ExecState *exec, const Identifier &p) const
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
if (!part->widget())
return Number(0);
- KWin::WindowInfo inf = KWin::windowInfo(part->widget()->tqtopLevelWidget()->winId());
+ KWin::WindowInfo inf = KWin::windowInfo(part->widget()->topLevelWidget()->winId());
return Number(entry->value == OuterHeight ?
- inf.tqgeometry().height() : inf.tqgeometry().width());
+ inf.geometry().height() : inf.geometry().width());
#else
return Number(entry->value == OuterHeight ?
part->view()->height() : part->view()->width());
@@ -1002,7 +1002,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
return isSafeScript(exec) ? val2 : Undefined();
}
- KParts::ReadOnlyPart *rop = part->tqfindFramePart( p.qstring() );
+ KParts::ReadOnlyPart *rop = part->findFramePart( p.qstring() );
if (rop)
return retrieve(rop);
@@ -1088,17 +1088,17 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v
KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
if (part) {
switch( entry->value ) {
- case tqStatus: {
- if (isSafeScript(exec) && part->settings()->windowtqStatusPolicy(part->url().host())
- == KHTMLSettings::KJSWindowtqStatusAllow) {
+ case Status: {
+ if (isSafeScript(exec) && part->settings()->windowStatusPolicy(part->url().host())
+ == KHTMLSettings::KJSWindowStatusAllow) {
String s = value.toString(exec);
part->setJSStatusBarText(s.value().qstring());
}
return;
}
- case DefaulttqStatus: {
- if (isSafeScript(exec) && part->settings()->windowtqStatusPolicy(part->url().host())
- == KHTMLSettings::KJSWindowtqStatusAllow) {
+ case DefaultStatus: {
+ if (isSafeScript(exec) && part->settings()->windowStatusPolicy(part->url().host())
+ == KHTMLSettings::KJSWindowStatusAllow) {
String s = value.toString(exec);
part->setJSDefaultStatusBarText(s.value().qstring());
}
@@ -1245,7 +1245,7 @@ void Window::closeNow()
kdDebug(6070) << "closeNow on non KHTML part" << endl;
} else {
//kdDebug(6070) << k_funcinfo << " -> closing window" << endl;
- // We want to make sure that window.open won't tqfind this part by name.
+ // We want to make sure that window.open won't find this part by name.
part->setName( 0 );
part->deleteLater();
part = 0;
@@ -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::fromLatin1("javascript:"), 0, false) != 0 )
part->scheduleRedirection(-1,
dstUrl,
lockHistory);
@@ -1618,11 +1618,11 @@ 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();
- TQRect screen = KGlobalSettings::desktopGeometry(widget->tqtopLevelWidget());
+ TQRect screen = KGlobalSettings::desktopGeometry(widget->topLevelWidget());
if (key == "left" || key == "screenx") {
winargs.x = (int)val.toFloat() + screen.x();
@@ -1633,13 +1633,13 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString
if (winargs.y < screen.y() || winargs.y > screen.bottom())
winargs.y = screen.y(); // only safe choice until size is determined
} else if (key == "height") {
- winargs.height = (int)val.toFloat() + 2*tqApp->style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
+ winargs.height = (int)val.toFloat() + 2*qApp->style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
if (winargs.height > screen.height()) // should actually check workspace
winargs.height = screen.height();
if (winargs.height < 100)
winargs.height = 100;
} else if (key == "width") {
- winargs.width = (int)val.toFloat() + 2*tqApp->style().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
+ winargs.width = (int)val.toFloat() + 2*qApp->style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
if (winargs.width > screen.width()) // should actually check workspace
winargs.width = screen.width();
if (winargs.width < 100)
@@ -1693,7 +1693,7 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString
Window::retrieveWindow(p)->goURL(exec, url.url(), false /*don't lock history*/);
return Window::retrieve(p);
}
- if ( uargs.frameName.lower() == "tqreplace" )
+ if ( uargs.frameName.lower() == "replace" )
{
Window::retrieveWindow(p)->goURL(exec, url.url(), true /*lock history*/);
return Window::retrieve(p);
@@ -1897,8 +1897,8 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
KHTMLSettings::KJSWindowFocusPolicy policy =
part->settings()->windowFocusPolicy(part->url().host());
if(policy == KHTMLSettings::KJSWindowFocusAllow && widget) {
- widget->tqtopLevelWidget()->raise();
- KWin::deIconifyWindow( widget->tqtopLevelWidget()->winId() );
+ widget->topLevelWidget()->raise();
+ KWin::deIconifyWindow( widget->topLevelWidget()->winId() );
widget->setActiveWindow();
emit part->browserExtension()->requestFocus(part);
}
@@ -1950,7 +1950,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
{
KParts::BrowserExtension *ext = part->browserExtension();
if (ext) {
- TQWidget * tl = widget->tqtopLevelWidget();
+ TQWidget * tl = widget->topLevelWidget();
TQRect sg = KGlobalSettings::desktopGeometry(tl);
TQPoint dest = tl->pos() + TQPoint( args[0].toInt32(exec), args[1].toInt32(exec) );
@@ -1970,7 +1970,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
{
KParts::BrowserExtension *ext = part->browserExtension();
if (ext) {
- TQWidget * tl = widget->tqtopLevelWidget();
+ TQWidget * tl = widget->topLevelWidget();
TQRect sg = KGlobalSettings::desktopGeometry(tl);
TQPoint dest( args[0].toInt32(exec)+sg.x(), args[1].toInt32(exec)+sg.y() );
@@ -1989,7 +1989,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
if(policy == KHTMLSettings::KJSWindowResizeAllow
&& args.size() == 2 && widget)
{
- TQWidget * tl = widget->tqtopLevelWidget();
+ TQWidget * tl = widget->topLevelWidget();
TQRect geom = tl->frameGeometry();
window->resizeTo( tl,
geom.width() + args[0].toInt32(exec),
@@ -2003,7 +2003,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
if(policy == KHTMLSettings::KJSWindowResizeAllow
&& args.size() == 2 && widget)
{
- TQWidget * tl = widget->tqtopLevelWidget();
+ TQWidget * tl = widget->topLevelWidget();
window->resizeTo( tl, args[0].toInt32(exec), args[1].toInt32(exec) );
}
return Undefined();
@@ -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);
@@ -2353,10 +2353,10 @@ DateTimeMS DateTimeMS::now()
{
DateTimeMS t;
TQTime before = TQTime::currentTime();
- t.mDate = TQDate::tqcurrentDate();
+ t.mDate = TQDate::currentDate();
t.mTime = TQTime::currentTime();
if (t.mTime < before)
- t.mDate = TQDate::tqcurrentDate(); // prevent race condition in hacky way :)
+ t.mDate = TQDate::currentDate(); // prevent race condition in hacky way :)
return t;
}
@@ -2407,7 +2407,7 @@ Value FrameArray::get(ExecState *exec, const Identifier &p) const
}
// check for the name or number
- KParts::ReadOnlyPart *frame = part->tqfindFramePart(p.qstring());
+ KParts::ReadOnlyPart *frame = part->findFramePart(p.qstring());
if (!frame) {
bool ok;
unsigned int i = p.toArrayIndex(&ok);
@@ -2423,7 +2423,7 @@ Value FrameArray::get(ExecState *exec, const Identifier &p) const
}
// Fun IE quirk: name lookup in there is actually done by document.all
- // hence, it can tqfind non-frame things (and even let them hide frame ones!)
+ // hence, it can find non-frame things (and even let them hide frame ones!)
// We don't quite do that, but do this as a fallback.
DOM::DocumentImpl* doc = static_cast<DOM::DocumentImpl*>(part->document().handle());
if (doc) {
@@ -2478,7 +2478,7 @@ const ClassInfo Location::info = { "Location", 0, &LocationTable, 0 };
[[==]] Location::EqualEqual DontDelete|ReadOnly
assign Location::Assign DontDelete|Function 1
toString Location::ToString DontDelete|Function 0
- tqreplace Location::Replace DontDelete|Function 1
+ replace Location::Replace DontDelete|Function 1
reload Location::Reload DontDelete|Function 0
@end
*/
@@ -2545,7 +2545,7 @@ Value Location::get(ExecState *exec, const Identifier &p) const
return String("");
return String( url.path().isEmpty() ? TQString("/") : url.path() );
case Port:
- return String( url.port() ? TQString::number((int)url.port()) : TQString::tqfromLatin1("") );
+ return String( url.port() ? TQString::number((int)url.port()) : TQString::fromLatin1("") );
case Protocol:
return String( url.protocol()+":" );
case Search:
@@ -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/kjs_window.h b/khtml/ecma/kjs_window.h
index 0078615cd..2f5eb45f5 100644
--- a/khtml/ecma/kjs_window.h
+++ b/khtml/ecma/kjs_window.h
@@ -128,7 +128,7 @@ namespace KJS {
TQPtrDict<JSEventListener> jsEventListeners;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
- enum { Closed, Crypto, DefaulttqStatus, tqStatus, Document, Node, EventCtor, Range,
+ enum { Closed, Crypto, DefaultStatus, Status, Document, Node, EventCtor, Range,
NodeFilter, DOMException, CSSRule, Frames, _History, _External, Event, InnerHeight,
InnerWidth, Length, _Location, Navigate, Name, _Navigator, _Konqueror, ClientInformation,
OffscreenBuffering, Opener, OuterHeight, OuterWidth, PageXOffset, PageYOffset,
diff --git a/khtml/ecma/xmlhttprequest.cpp b/khtml/ecma/xmlhttprequest.cpp
index fe232457f..b20515de7 100644
--- a/khtml/ecma/xmlhttprequest.cpp
+++ b/khtml/ecma/xmlhttprequest.cpp
@@ -47,7 +47,7 @@ using KIO::NetAccess;
#define BANNED_HTTP_HEADERS "authorization,proxy-authorization,"\
"content-length,host,connect,copy,move,"\
- "delete,head,trace,put,proptqfind,proppatch,"\
+ "delete,head,trace,put,propfind,proppatch,"\
"mkcol,lock,unlock,options,via,"\
"accept-charset,accept-encoding,expect,date,"\
"keep-alive,te,trailer,"\
@@ -125,8 +125,8 @@ const ClassInfo XMLHttpRequest::info = { "XMLHttpRequest", 0, &XMLHttpRequestTab
readyState XMLHttpRequest::ReadyState DontDelete|ReadOnly
responseText XMLHttpRequest::ResponseText DontDelete|ReadOnly
responseXML XMLHttpRequest::ResponseXML DontDelete|ReadOnly
- status XMLHttpRequest::tqStatus DontDelete|ReadOnly
- statusText XMLHttpRequest::tqStatusText DontDelete|ReadOnly
+ status XMLHttpRequest::Status DontDelete|ReadOnly
+ statusText XMLHttpRequest::StatusText DontDelete|ReadOnly
onreadystatechange XMLHttpRequest::Onreadystatechange DontDelete
onload XMLHttpRequest::Onload DontDelete
@end
@@ -182,10 +182,10 @@ Value XMLHttpRequest::getValueProperty(ExecState *exec, int token) const
}
return getDOMNode(exec,responseXML);
- case tqStatus:
- return gettqStatus();
- case tqStatusText:
- return gettqStatusText();
+ case Status:
+ return getStatus();
+ case StatusText:
+ return getStatusText();
case Onreadystatechange:
if (onReadyStateChangeListener && onReadyStateChangeListener->listenerObjImp()) {
return onReadyStateChangeListener->listenerObj();
@@ -394,8 +394,8 @@ void XMLHttpRequest::send(const TQString& _body)
// Set the default referrer if one is not already supplied
// through setRequestHeader. NOTE: the user can still disable
// this feature at the protocol level (kio_http).
- // ### does tqfind() ever succeed? the headers are stored in lower case!
- if (requestHeaders.tqfind("Referer") == requestHeaders.end()) {
+ // ### does find() ever succeed? the headers are stored in lower case!
+ if (requestHeaders.find("Referer") == requestHeaders.end()) {
KURL documentURL(doc->URL());
documentURL.setPass(TQString::null);
documentURL.setUser(TQString::null);
@@ -487,9 +487,9 @@ void XMLHttpRequest::setRequestHeader(const TQString& _name, const TQString &val
// Reject all banned headers. See BANNED_HTTP_HEADERS above.
// kdDebug() << "Banned HTTP Headers: " << BANNED_HTTP_HEADERS << endl;
TQStringList bannedHeaders = TQStringList::split(',',
- TQString::tqfromLatin1(BANNED_HTTP_HEADERS));
+ TQString::fromLatin1(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,27 +535,27 @@ 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());
}
-static Value httptqStatus(const TQString& response, bool texttqStatus = false)
+static Value httpStatus(const TQString& response, bool textStatus = false)
{
if (response.isEmpty()) {
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();
}
- if (texttqStatus) {
+ if (textStatus) {
TQString statusText = firstLine.mid(codeEnd + 1, endOfLine - (codeEnd + 1)).stripWhiteSpace();
return String(statusText);
}
@@ -571,14 +571,14 @@ static Value httptqStatus(const TQString& response, bool texttqStatus = false)
return Number(code);
}
-Value XMLHttpRequest::gettqStatus() const
+Value XMLHttpRequest::getStatus() const
{
- return httptqStatus(responseHeaders);
+ return httpStatus(responseHeaders);
}
-Value XMLHttpRequest::gettqStatusText() const
+Value XMLHttpRequest::getStatusText() const
{
- return httptqStatus(responseHeaders, true);
+ return httpStatus(responseHeaders, true);
}
void XMLHttpRequest::processSyncLoadResults(const TQByteArray &data, const KURL &finalURL, const TQString &headers)
@@ -643,11 +643,11 @@ 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.tqreplace(codeStart, (codeEnd-codeStart), "200 OK");
+ responseHeaders.replace(codeStart, (codeEnd-codeStart), "200 OK");
}
changeState(Loaded);
@@ -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 = type.mid( index+1 ).remove(TQRegExp("charset[ ]*=[ ]*", false)).stripWhiteSpace();
}
diff --git a/khtml/ecma/xmlhttprequest.h b/khtml/ecma/xmlhttprequest.h
index d69f976c3..2c646708e 100644
--- a/khtml/ecma/xmlhttprequest.h
+++ b/khtml/ecma/xmlhttprequest.h
@@ -60,7 +60,7 @@ namespace KJS {
virtual bool toBoolean(ExecState *) const { return true; }
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
- enum { Onload, Onreadystatechange, ReadyState, ResponseText, ResponseXML, tqStatus, tqStatusText, Abort,
+ enum { Onload, Onreadystatechange, ReadyState, ResponseText, ResponseXML, Status, StatusText, Abort,
GetAllResponseHeaders, GetResponseHeader, Open, Send, SetRequestHeader,
OverrideMIMEType };
@@ -68,8 +68,8 @@ namespace KJS {
friend class XMLHttpRequestProtoFunc;
friend class XMLHttpRequestQObject;
- Value gettqStatusText() const;
- Value gettqStatus() const;
+ Value getStatusText() const;
+ Value getStatus() const;
bool urlMatchesDocumentDomain(const KURL&) const;
XMLHttpRequestQObject *qObject;