summaryrefslogtreecommitdiffstats
path: root/khtml/ecma
diff options
context:
space:
mode:
Diffstat (limited to 'khtml/ecma')
-rw-r--r--khtml/ecma/kjs_binding.cpp4
-rw-r--r--khtml/ecma/kjs_css.cpp2
-rw-r--r--khtml/ecma/kjs_debugwin.cpp12
-rw-r--r--khtml/ecma/kjs_dom.cpp4
-rw-r--r--khtml/ecma/kjs_events.cpp4
-rw-r--r--khtml/ecma/kjs_html.cpp8
-rw-r--r--khtml/ecma/kjs_navigator.cpp38
-rw-r--r--khtml/ecma/kjs_proxy.cpp10
-rw-r--r--khtml/ecma/kjs_window.cpp88
-rw-r--r--khtml/ecma/xmlhttprequest.cpp24
10 files changed, 97 insertions, 97 deletions
diff --git a/khtml/ecma/kjs_binding.cpp b/khtml/ecma/kjs_binding.cpp
index f9dd291d7..b67e206f0 100644
--- a/khtml/ecma/kjs_binding.cpp
+++ b/khtml/ecma/kjs_binding.cpp
@@ -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_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..8e5cf5dae 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');
@@ -249,7 +249,7 @@ KJSDebugWin * KJSDebugWin::kjs_html_debugger = 0;
TQString SourceFile::getCode()
{
if (interpreter) {
- KHTMLPart *part = ::qt_cast<KHTMLPart*>(static_cast<ScriptInterpreter*>(interpreter)->part());
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart*>(static_cast<ScriptInterpreter*>(interpreter)->part());
if (part && url == part->url().url() && KHTMLPageCache::self()->isValid(part->cacheId())) {
Decoder *decoder = part->createDecoder();
TQByteArray data;
@@ -805,7 +805,7 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
return true;
KParts::ReadOnlyPart *part = static_cast<ScriptInterpreter*>(exec->interpreter())->part();
- KHTMLPart *khtmlpart = ::qt_cast<KHTMLPart*>(part);
+ KHTMLPart *khtmlpart = ::tqqt_cast<KHTMLPart*>(part);
if (khtmlpart && !khtmlpart->settings()->isJavaScriptErrorReportingEnabled())
return true;
@@ -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()
diff --git a/khtml/ecma/kjs_dom.cpp b/khtml/ecma/kjs_dom.cpp
index 08afc6aab..1231c5710 100644
--- a/khtml/ecma/kjs_dom.cpp
+++ b/khtml/ecma/kjs_dom.cpp
@@ -1088,7 +1088,7 @@ Value DOMDocumentProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List
Window* active = Window::retrieveActive(exec);
// Complete the URL using the "active part" (running interpreter). We do this for the security
// check and to make sure we load exactly the same url as we have verified to be safe
- KHTMLPart *khtmlpart = ::qt_cast<KHTMLPart *>(active->part());
+ KHTMLPart *khtmlpart = ::tqqt_cast<KHTMLPart *>(active->part());
if (khtmlpart) {
// Security: only allow documents to be loaded from the same host
TQString dstUrl = khtmlpart->htmlDocument().completeURL(s).string();
@@ -1274,7 +1274,7 @@ Value DOMDOMImplementationProtoFunc::tryCall(ExecState *exec, Object &thisObj, c
case DOMDOMImplementation::CreateDocument: { // DOM2
// Initially set the URL to document of the creator... this is so that it resides in the same
// host/domain for security checks. The URL will be updated if Document.load() is called.
- KHTMLPart *part = ::qt_cast<KHTMLPart*>(static_cast<KJS::ScriptInterpreter*>(exec->interpreter())->part());
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart*>(static_cast<KJS::ScriptInterpreter*>(exec->interpreter())->part());
if (part) {
Document doc = implementation.createDocument(args[0].toString(exec).string(),args[1].toString(exec).string(),toNode(args[2]));
KURL url = static_cast<DocumentImpl*>(part->document().handle())->URL();
diff --git a/khtml/ecma/kjs_events.cpp b/khtml/ecma/kjs_events.cpp
index 1144e723b..38664c1b2 100644
--- a/khtml/ecma/kjs_events.cpp
+++ b/khtml/ecma/kjs_events.cpp
@@ -63,7 +63,7 @@ void JSEventListener::handleEvent(DOM::Event &evt)
if (KJSDebugWin::debugWindow() && KJSDebugWin::debugWindow()->inSession())
return;
#endif
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(static_cast<Window*>(win.imp())->part());
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(static_cast<Window*>(win.imp())->part());
KJSProxy *proxy = 0L;
if (part)
proxy = part->jScript();
@@ -163,7 +163,7 @@ Object JSLazyEventListener::listenerObj() const
void JSLazyEventListener::parseCode() const
{
if (!parsed) {
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(static_cast<Window*>(win.imp())->part());
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(static_cast<Window*>(win.imp())->part());
KJSProxy *proxy = 0L;
if (part)
proxy = part->jScript();
diff --git a/khtml/ecma/kjs_html.cpp b/khtml/ecma/kjs_html.cpp
index 57762ffd3..3fdc35bb2 100644
--- a/khtml/ecma/kjs_html.cpp
+++ b/khtml/ecma/kjs_html.cpp
@@ -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());
}
diff --git a/khtml/ecma/kjs_navigator.cpp b/khtml/ecma/kjs_navigator.cpp
index a5c793357..b8712e01b 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.find(TQString::fromLatin1("Mozilla")) >= 0 &&
- userAgent.find(TQString::fromLatin1("compatible")) == -1)
+ 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..55e9aeff6 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
@@ -353,9 +353,9 @@ void KJSProxyImpl::applyUserAgent()
}
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 (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..5fe2ef33e 100644
--- a/khtml/ecma/kjs_window.cpp
+++ b/khtml/ecma/kjs_window.cpp
@@ -421,7 +421,7 @@ Window *Window::retrieveWindow(KParts::ReadOnlyPart *p)
Object obj = Object::dynamicCast( retrieve( p ) );
#ifndef NDEBUG
// obj should never be null, except when javascript has been disabled in that part.
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(p);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(p);
if ( part && part->jScriptEnabled() )
{
assert( obj.isValid() );
@@ -448,10 +448,10 @@ Window *Window::retrieveActive(ExecState *exec)
Value Window::retrieve(KParts::ReadOnlyPart *p)
{
assert(p);
- KHTMLPart * part = ::qt_cast<KHTMLPart *>(p);
+ KHTMLPart * part = ::tqqt_cast<KHTMLPart *>(p);
KJSProxy *proxy = 0L;
if (!part) {
- part = ::qt_cast<KHTMLPart *>(p->parent());
+ part = ::tqqt_cast<KHTMLPart *>(p->parent());
if (part)
proxy = part->framejScript(p);
} else
@@ -478,7 +478,7 @@ Location *Window::location() const
ObjectImp* Window::frames( ExecState* exec ) const
{
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
if (part)
return m_frames ? m_frames :
(const_cast<Window*>(this)->m_frames = new FrameArray(exec, part));
@@ -516,7 +516,7 @@ bool Window::hasProperty(ExecState *exec, const Identifier &p) const
if (Lookup::findEntry(&WindowTable, p))
return true;
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
if (!part)
return false;
@@ -585,7 +585,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
}
const HashEntry* entry = Lookup::findEntry(&WindowTable, p);
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
// properties that work on all windows
if (entry) {
@@ -864,7 +864,7 @@ 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());
#else
@@ -1085,7 +1085,7 @@ void Window::put(ExecState* exec, const Identifier &propertyName, const Value &v
default:
break;
}
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
if (part) {
switch( entry->value ) {
case Status: {
@@ -1222,7 +1222,7 @@ bool Window::toBoolean(ExecState *) const
DOM::AbstractView Window::toAbstractView() const
{
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
if (!part)
return DOM::AbstractView();
return part->document().defaultView();
@@ -1240,7 +1240,7 @@ void Window::closeNow()
if (m_frame.isNull() || m_frame->m_part.isNull()) {
kdDebug(6070) << k_funcinfo << "part is deleted already" << endl;
} else {
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
if (!part) {
kdDebug(6070) << "closeNow on non KHTML part" << endl;
} else {
@@ -1288,7 +1288,7 @@ bool Window::checkIsSafeScript(KParts::ReadOnlyPart *activePart) const
if ( activePart == m_frame->m_part ) // Not calling from another frame, no problem.
return true;
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
if (!part)
return true; // not a KHTMLPart
@@ -1301,7 +1301,7 @@ bool Window::checkIsSafeScript(KParts::ReadOnlyPart *activePart) const
return false;
}
- KHTMLPart *activeKHTMLPart = ::qt_cast<KHTMLPart *>(activePart);
+ KHTMLPart *activeKHTMLPart = ::tqqt_cast<KHTMLPart *>(activePart);
if (!activeKHTMLPart)
return true; // not a KHTMLPart
@@ -1327,7 +1327,7 @@ bool Window::checkIsSafeScript(KParts::ReadOnlyPart *activePart) const
void Window::setListener(ExecState *exec, int eventId, Value func)
{
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
if (!part || !isSafeScript(exec))
return;
DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl*>(part->htmlDocument().handle());
@@ -1339,7 +1339,7 @@ void Window::setListener(ExecState *exec, int eventId, Value func)
Value Window::getListener(ExecState *exec, int eventId) const
{
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
if (!part || !isSafeScript(exec))
return Undefined();
DOM::DocumentImpl *doc = static_cast<DOM::DocumentImpl*>(part->htmlDocument().handle());
@@ -1357,7 +1357,7 @@ Value Window::getListener(ExecState *exec, int eventId) const
JSEventListener *Window::getJSEventListener(const Value& val, bool html)
{
// This function is so hot that it's worth coding it directly with imps.
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
if (!part || val.type() != ObjectType)
return 0;
@@ -1433,8 +1433,8 @@ void Window::setCurrentEvent( DOM::Event *evt )
void Window::goURL(ExecState* exec, const TQString& url, bool lockHistory)
{
Window* active = Window::retrieveActive(exec);
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
- KHTMLPart *active_part = ::qt_cast<KHTMLPart *>(active->part());
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *active_part = ::tqqt_cast<KHTMLPart *>(active->part());
// Complete the URL using the "active part" (running interpreter)
if (active_part && part) {
if (url[0] == TQChar('#')) {
@@ -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);
@@ -1470,7 +1470,7 @@ void Window::delayedGoHistory( int steps )
void Window::goHistory( int steps )
{
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
if(!part)
// TODO history readonlypart
return;
@@ -1488,7 +1488,7 @@ void Window::goHistory( int steps )
void KJS::Window::resizeTo(TQWidget* tl, int width, int height)
{
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
if(!part)
// TODO resizeTo readonlypart
return;
@@ -1531,7 +1531,7 @@ void KJS::Window::resizeTo(TQWidget* tl, int width, int height)
Value Window::openWindow(ExecState *exec, const List& args)
{
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
if (!part)
return Undefined();
KHTMLView *widget = part->view();
@@ -1544,7 +1544,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
KURL url;
if (!str.isEmpty())
{
- KHTMLPart* p = ::qt_cast<KHTMLPart *>(Window::retrieveActive(exec)->m_frame->m_part);
+ KHTMLPart* p = ::tqqt_cast<KHTMLPart *>(Window::retrieveActive(exec)->m_frame->m_part);
if ( p )
url = p->htmlDocument().completeURL(str).string();
if ( !p ||
@@ -1602,7 +1602,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString& frameName, const TQString& features)
{
- KHTMLPart *p = ::qt_cast<KHTMLPart *>(m_frame->m_part);
+ KHTMLPart *p = ::tqqt_cast<KHTMLPart *>(m_frame->m_part);
KHTMLView *widget = p->view();
KParts::WindowArgs winargs;
@@ -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)
@@ -1703,7 +1703,7 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString
// request window (new or existing if framename is set)
KParts::ReadOnlyPart *newPart = 0L;
emit p->browserExtension()->createNewWindow(KURL(), uargs,winargs,newPart);
- if (newPart && ::qt_cast<KHTMLPart*>(newPart)) {
+ if (newPart && ::tqqt_cast<KHTMLPart*>(newPart)) {
KHTMLPart *khtmlpart = static_cast<KHTMLPart*>(newPart);
//qDebug("opener set to %p (this Window's part) in new Window %p (this Window=%p)",part,win,window);
khtmlpart->setOpener(p);
@@ -1735,7 +1735,7 @@ void Window::forgetSuppressedWindows()
void Window::showSuppressedWindows()
{
- KHTMLPart *part = ::qt_cast<KHTMLPart *>( m_frame->m_part );
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>( m_frame->m_part );
KJS::Interpreter *interpreter = part->jScript()->interpreter();
ExecState *exec = interpreter->globalExec();
@@ -1760,7 +1760,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
Window *window = static_cast<Window *>(thisObj.imp());
TQString str, str2;
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(window->m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(window->m_frame->m_part);
if (!part)
return Undefined();
@@ -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();
@@ -2114,7 +2114,7 @@ ScheduledAction::ScheduledAction(TQString _code, DateTimeMS _nextTime, int _inte
bool ScheduledAction::execute(Window *window)
{
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(window->m_frame->m_part);
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(window->m_frame->m_part);
if (!part || !part->jScriptEnabled())
return false;
ScriptInterpreter *interpreter = static_cast<ScriptInterpreter *>(part->jScript()->interpreter());
@@ -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;
}
@@ -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:
@@ -2590,7 +2590,7 @@ void Location::put(ExecState *exec, const Identifier &p, const Value &v, int att
TQString str = v.toString(exec).qstring();
switch (entry->value) {
case Href: {
- KHTMLPart* p =::qt_cast<KHTMLPart*>(Window::retrieveActive(exec)->part());
+ KHTMLPart* p =::tqqt_cast<KHTMLPart*>(Window::retrieveActive(exec)->part());
if ( p )
url = p->htmlDocument().completeURL( str ).string();
else
@@ -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;
@@ -2681,7 +2681,7 @@ Value LocationFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
id == Location::Replace);
break;
case Location::Reload: {
- KHTMLPart *khtmlpart = ::qt_cast<KHTMLPart *>(part);
+ KHTMLPart *khtmlpart = ::tqqt_cast<KHTMLPart *>(part);
if (khtmlpart)
khtmlpart->scheduleRedirection(-1, part->url().url(), true/*lock history*/);
else
diff --git a/khtml/ecma/xmlhttprequest.cpp b/khtml/ecma/xmlhttprequest.cpp
index b20515de7..a2095769f 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.find("Referer") == requestHeaders.end()) {
+ if (requestHeaders.tqfind("Referer") == requestHeaders.end()) {
KURL documentURL(doc->URL());
documentURL.setPass(TQString::null);
documentURL.setUser(TQString::null);
@@ -487,7 +487,7 @@ 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))
return; // Denied
@@ -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,7 +535,7 @@ 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());
}
@@ -546,10 +546,10 @@ static Value httpStatus(const TQString& response, bool textStatus = false)
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();
@@ -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.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");
}
@@ -659,11 +659,11 @@ 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 (';');
if (index > -1)
@@ -725,7 +725,7 @@ Value XMLHttpRequestProtoFunc::tryCall(ExecState *exec, Object &thisObj, const L
}
TQString method = args[0].toString(exec).qstring();
- KHTMLPart *part = ::qt_cast<KHTMLPart *>(Window::retrieveActive(exec)->part());
+ KHTMLPart *part = ::tqqt_cast<KHTMLPart *>(Window::retrieveActive(exec)->part());
if (!part)
return Undefined();
KURL url = KURL(part->document().completeURL(args[1].toString(exec).qstring()).string());