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 4c341699a..1efc877d8 100644
--- a/khtml/ecma/README
+++ b/khtml/ecma/README
@@ -1,4 +1,4 @@
-This module contains the ECMAScript a.k.a. JavaScript language bindings for
+This module tqcontains 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 f9dd291d7..b2ad17725 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->contains( this ) );
+ assert( interpreterList && interpreterList->tqcontains( 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.unicode(), len * sizeof(UChar));
+ memcpy(dat, d.tqunicode(), 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.unicode(), len * sizeof(UChar));
+ memcpy(dat, d.tqunicode(), len * sizeof(UChar));
rep = UString::Rep::create(dat, len);
}
diff --git a/khtml/ecma/kjs_binding.h b/khtml/ecma/kjs_binding.h
index c55da21ce..0672cd8eb 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.replace( obj, this );
+ m_customizedDomObjects.tqreplace( 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 b42f9dd02..ea651336e 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.find("!important", 0, false);
+ int important = propvalue.tqfind("!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 eeb126ebb..d7f1c66e2 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.unicode();
+ const TQChar *chars = code.tqunicode();
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::fromLatin1("Java/JavaScript Settings"));
+ KConfigGroupSaver saver(config,TQString::tqfromLatin1("Java/JavaScript Settings"));
config->writeEntry("ReportJavaScriptErrors",TQVariant(false,0));
config->sync();
TQByteArray data;
@@ -1020,7 +1020,7 @@ void KJSDebugWin::enterSession(ExecState *exec)
updateContextList();
- qApp->enter_loop(); // won't return until leaveSession() is called
+ tqApp->enter_loop(); // won't return until leaveSession() is called
}
void KJSDebugWin::leaveSession()
@@ -1043,7 +1043,7 @@ void KJSDebugWin::leaveSession()
enableOtherWindows();
}
- qApp->exit_loop();
+ tqApp->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.contains(sourceId) &&
+ if (m_sourceFragments.tqcontains(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 8faf71d52..e925965eb 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 contains
+ * KJSDebugWin represents the debugger window that is visible to the user. It tqcontains
* 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 08afc6aab..b69976e0d 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
- replaceChild DOMNode::ReplaceChild DontDelete|Function 2
+ tqreplaceChild 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
- contains DOMNode::Contains DontDelete|Function 1
+ tqcontains 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 find the new target
+ //Scan up to tqfind 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 layout is up to date before we allow a query on these attributes.
+ // Make sure our tqlayout 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 layout is up to date
+ // Make sure our tqlayout 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.replaceChild(toNode(args[0]), toNode(args[1])));
+ return getDOMNode(exec,node.tqreplaceChild(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
- replaceData DOMCharacterData::ReplaceData DontDelete|Function 2
+ tqreplaceData 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.replaceData(args[0].toInteger(exec),args[1].toInteger(exec),args[2].toString(exec).string());
+ data.tqreplaceData(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 57762ffd3..321746f20 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().contains( p.qstring() ) )
+ if ( docImpl->underDocNamedCache().tqcontains( p.qstring() ) )
return true;
if ( view && view->part() )
{
- KHTMLPart *kp = view->part()->findFrame( p.qstring() );
+ KHTMLPart *kp = view->part()->tqfindFrame( 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 findFrame :}
- KHTMLPart *kp = view->part()->findFrame( propertyName.qstring() );
+ // (IE does that). Hard to do with tqfindFrame :}
+ KHTMLPart *kp = view->part()->tqfindFrame( 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
- shape KJS::HTMLElement::AnchorShape DontDelete
+ tqshape 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
- shape KJS::HTMLElement::AreaShape DontDelete
+ tqshape 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.shape());
+ case AnchorShape: return String(anchor.tqshape());
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.shape());
+ case AreaShape: return String(area.tqshape());
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);
}
- // replace an existing entry ?
+ // tqreplace 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 a5c793357..4c51561e4 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 find "Mozilla" but not "(compatible, ...)" we are a real Netscape
- if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 &&
- userAgent.find(TQString::fromLatin1("compatible")) == -1)
+ // 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)
{
//kdDebug() << "appName -> Mozilla" << endl;
return String("Netscape");
}
- if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 ||
- userAgent.find(TQString::fromLatin1("MSIE")) >= 0)
+ if (userAgent.tqfind(TQString::tqfromLatin1("Microsoft")) >= 0 ||
+ userAgent.tqfind(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.find('/') + 1));
+ return String(userAgent.mid(userAgent.tqfind('/') + 1));
case Product:
// We are pretending to be Mozilla or Safari
- if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 &&
- userAgent.find(TQString::fromLatin1("compatible")) == -1)
+ if (userAgent.tqfind(TQString::tqfromLatin1("Mozilla")) >= 0 &&
+ userAgent.tqfind(TQString::tqfromLatin1("compatible")) == -1)
{
return String("Gecko");
}
// When spoofing as IE, we use Undefined().
- if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 ||
- userAgent.find(TQString::fromLatin1("MSIE")) >= 0)
+ if (userAgent.tqfind(TQString::tqfromLatin1("Microsoft")) >= 0 ||
+ userAgent.tqfind(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.find("Gecko");
- if (ix >= 0 && userAgent.length() >= (uint)ix+14 && userAgent.unicode()[ix+5] == TQChar('/') &&
- userAgent.find(TQRegExp("\\d{8}"), ix+6) == ix+6)
+ 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)
{
// 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.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"));
+ 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"));
else
{
struct utsname name;
int ret = uname(&name);
if ( ret >= 0 )
- return String(TQString::fromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine));
+ return String(TQString::tqfromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine));
else // can't happen
- return String(TQString::fromLatin1("Unix X11"));
+ return String(TQString::tqfromLatin1("Unix X11"));
}
case CpuClass:
{
diff --git a/khtml/ecma/kjs_proxy.cpp b/khtml/ecma/kjs_proxy.cpp
index ca26c5a0b..0301ef141 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.find(TQString::fromLatin1("Microsoft")) >= 0 ||
- userAgent.find(TQString::fromLatin1("MSIE")) >= 0)
+ if (userAgent.tqfind(TQString::tqfromLatin1("Microsoft")) >= 0 ||
+ userAgent.tqfind(TQString::tqfromLatin1("MSIE")) >= 0)
{
m_script->setCompatMode(Interpreter::IECompat);
#ifdef KJS_VERBOSE
@@ -352,10 +352,10 @@ void KJSProxyImpl::applyUserAgent()
#endif
}
else
- // 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)
+ // 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)
{
m_script->setCompatMode(Interpreter::NetscapeCompat);
#ifdef KJS_VERBOSE
diff --git a/khtml/ecma/kjs_window.cpp b/khtml/ecma/kjs_window.cpp
index 90123aec6..827756ac4 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
- defaultStatus Window::DefaultStatus DontDelete
- defaultstatus Window::DefaultStatus DontDelete
- status Window::Status DontDelete
+ defaulttqStatus Window::DefaulttqStatus DontDelete
+ defaultstatus Window::DefaulttqStatus DontDelete
+ status Window::tqStatus 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->findFramePart(p.qstring()))
+ if (part->tqfindFramePart(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 DefaultStatus:
+ case DefaulttqStatus:
return String(UString(part->jsDefaultStatusBarText()));
- case Status:
+ case tqStatus:
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()->topLevelWidget()->winId());
+ KWin::WindowInfo inf = KWin::windowInfo(part->widget()->tqtopLevelWidget()->winId());
return Number(entry->value == OuterHeight ?
- inf.geometry().height() : inf.geometry().width());
+ inf.tqgeometry().height() : inf.tqgeometry().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->findFramePart( p.qstring() );
+ KParts::ReadOnlyPart *rop = part->tqfindFramePart( 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 Status: {
- if (isSafeScript(exec) && part->settings()->windowStatusPolicy(part->url().host())
- == KHTMLSettings::KJSWindowStatusAllow) {
+ case tqStatus: {
+ if (isSafeScript(exec) && part->settings()->windowtqStatusPolicy(part->url().host())
+ == KHTMLSettings::KJSWindowtqStatusAllow) {
String s = value.toString(exec);
part->setJSStatusBarText(s.value().qstring());
}
return;
}
- case DefaultStatus: {
- if (isSafeScript(exec) && part->settings()->windowStatusPolicy(part->url().host())
- == KHTMLSettings::KJSWindowStatusAllow) {
+ case DefaulttqStatus: {
+ if (isSafeScript(exec) && part->settings()->windowtqStatusPolicy(part->url().host())
+ == KHTMLSettings::KJSWindowtqStatusAllow) {
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 find this part by name.
+ // We want to make sure that window.open won't tqfind 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.find(TQString::fromLatin1("javascript:"), 0, false) != 0 )
+ dstUrl.tqfind(TQString::tqfromLatin1("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.find('=');
+ int pos = s.tqfind('=');
if (pos >= 0) {
key = s.left(pos).stripWhiteSpace().lower();
val = s.mid(pos + 1).stripWhiteSpace().lower();
- TQRect screen = KGlobalSettings::desktopGeometry(widget->topLevelWidget());
+ TQRect screen = KGlobalSettings::desktopGeometry(widget->tqtopLevelWidget());
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*qApp->style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
+ winargs.height = (int)val.toFloat() + 2*tqApp->style().tqpixelMetric( 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*qApp->style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
+ winargs.width = (int)val.toFloat() + 2*tqApp->style().tqpixelMetric( 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() == "replace" )
+ if ( uargs.frameName.lower() == "tqreplace" )
{
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->topLevelWidget()->raise();
- KWin::deIconifyWindow( widget->topLevelWidget()->winId() );
+ widget->tqtopLevelWidget()->raise();
+ KWin::deIconifyWindow( widget->tqtopLevelWidget()->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->topLevelWidget();
+ TQWidget * tl = widget->tqtopLevelWidget();
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->topLevelWidget();
+ TQWidget * tl = widget->tqtopLevelWidget();
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->topLevelWidget();
+ TQWidget * tl = widget->tqtopLevelWidget();
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->topLevelWidget();
+ TQWidget * tl = widget->tqtopLevelWidget();
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.containsRef(action)) // removed by clearTimeout()
+ if (!scheduledActions.tqcontainsRef(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.containsRef(action))
+ if (!scheduledActions.tqcontainsRef(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::currentDate();
+ t.mDate = TQDate::tqcurrentDate();
t.mTime = TQTime::currentTime();
if (t.mTime < before)
- t.mDate = TQDate::currentDate(); // prevent race condition in hacky way :)
+ t.mDate = TQDate::tqcurrentDate(); // 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->findFramePart(p.qstring());
+ KParts::ReadOnlyPart *frame = part->tqfindFramePart(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 find non-frame things (and even let them hide frame ones!)
+ // hence, it can tqfind 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
- replace Location::Replace DontDelete|Function 1
+ tqreplace 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::fromLatin1("") );
+ return String( url.port() ? TQString::number((int)url.port()) : TQString::tqfromLatin1("") );
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.find(":"));
- TQString port = str.mid(str.find(":")+1);
+ TQString host = str.left(str.tqfind(":"));
+ TQString port = str.mid(str.tqfind(":")+1);
url.setHost(host);
url.setPort(port.toUInt());
break;
diff --git a/khtml/ecma/kjs_window.h b/khtml/ecma/kjs_window.h
index 2f5eb45f5..0078615cd 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, DefaultStatus, Status, Document, Node, EventCtor, Range,
+ enum { Closed, Crypto, DefaulttqStatus, tqStatus, 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 b20515de7..fe232457f 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,propfind,proppatch,"\
+ "delete,head,trace,put,proptqfind,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::Status DontDelete|ReadOnly
- statusText XMLHttpRequest::StatusText DontDelete|ReadOnly
+ status XMLHttpRequest::tqStatus DontDelete|ReadOnly
+ statusText XMLHttpRequest::tqStatusText 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 Status:
- return getStatus();
- case StatusText:
- return getStatusText();
+ case tqStatus:
+ return gettqStatus();
+ case tqStatusText:
+ return gettqStatusText();
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 find() ever succeed? the headers are stored in lower case!
- if (requestHeaders.find("Referer") == requestHeaders.end()) {
+ // ### does tqfind() ever succeed? the headers are stored in lower case!
+ if (requestHeaders.tqfind("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::fromLatin1(BANNED_HTTP_HEADERS));
+ TQString::tqfromLatin1(BANNED_HTTP_HEADERS));
- if (bannedHeaders.contains(name))
+ if (bannedHeaders.tqcontains(name))
return; // Denied
requestHeaders[name] = value.stripWhiteSpace();
@@ -501,7 +501,7 @@ Value XMLHttpRequest::getAllResponseHeaders() const
return Undefined();
}
- int endOfLine = responseHeaders.find("\n");
+ int endOfLine = responseHeaders.tqfind("\n");
if (endOfLine == -1) {
return Undefined();
@@ -535,27 +535,27 @@ Value XMLHttpRequest::getResponseHeader(const TQString& name) const
return Undefined();
}
- int endOfLine = responseHeaders.find("\n", headerLinePos + matchLength);
+ int endOfLine = responseHeaders.tqfind("\n", headerLinePos + matchLength);
return String(responseHeaders.mid(headerLinePos + matchLength, endOfLine - (headerLinePos + matchLength)).stripWhiteSpace());
}
-static Value httpStatus(const TQString& response, bool textStatus = false)
+static Value httptqStatus(const TQString& response, bool texttqStatus = false)
{
if (response.isEmpty()) {
return Undefined();
}
- int endOfLine = response.find("\n");
+ int endOfLine = response.tqfind("\n");
TQString firstLine = (endOfLine == -1) ? response : response.left(endOfLine);
- int codeStart = firstLine.find(" ");
- int codeEnd = firstLine.find(" ", codeStart + 1);
+ int codeStart = firstLine.tqfind(" ");
+ int codeEnd = firstLine.tqfind(" ", codeStart + 1);
if (codeStart == -1 || codeEnd == -1) {
return Undefined();
}
- if (textStatus) {
+ if (texttqStatus) {
TQString statusText = firstLine.mid(codeEnd + 1, endOfLine - (codeEnd + 1)).stripWhiteSpace();
return String(statusText);
}
@@ -571,14 +571,14 @@ static Value httpStatus(const TQString& response, bool textStatus = false)
return Number(code);
}
-Value XMLHttpRequest::getStatus() const
+Value XMLHttpRequest::gettqStatus() const
{
- return httpStatus(responseHeaders);
+ return httptqStatus(responseHeaders);
}
-Value XMLHttpRequest::getStatusText() const
+Value XMLHttpRequest::gettqStatusText() const
{
- return httpStatus(responseHeaders, true);
+ return httptqStatus(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.find("304");
+ int codeStart = responseHeaders.tqfind("304");
if ( codeStart != -1) {
- int codeEnd = responseHeaders.find("\n", codeStart+3);
+ int codeEnd = responseHeaders.tqfind("\n", codeStart+3);
if (codeEnd != -1)
- responseHeaders.replace(codeStart, (codeEnd-codeStart), "200 OK");
+ responseHeaders.tqreplace(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.find("content-type:", 0, false);
+ int pos = responseHeaders.tqfind("content-type:", 0, false);
if ( pos > -1 ) {
pos += 13;
- int index = responseHeaders.find('\n', pos);
+ int index = responseHeaders.tqfind('\n', pos);
TQString type = responseHeaders.mid(pos, (index-pos));
- index = type.find (';');
+ index = type.tqfind (';');
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 2c646708e..d69f976c3 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, Status, StatusText, Abort,
+ enum { Onload, Onreadystatechange, ReadyState, ResponseText, ResponseXML, tqStatus, tqStatusText, Abort,
GetAllResponseHeaders, GetResponseHeader, Open, Send, SetRequestHeader,
OverrideMIMEType };
@@ -68,8 +68,8 @@ namespace KJS {
friend class XMLHttpRequestProtoFunc;
friend class XMLHttpRequestQObject;
- Value getStatusText() const;
- Value getStatus() const;
+ Value gettqStatusText() const;
+ Value gettqStatus() const;
bool urlMatchesDocumentDomain(const KURL&) const;
XMLHttpRequestQObject *qObject;