From 984c25aa6969e55896e9a13c8e7f7b8a58991a4e Mon Sep 17 00:00:00 2001 From: Timothy Pearson Date: Sun, 18 Dec 2011 18:32:40 -0600 Subject: Rename old tq methods that no longer need a unique name --- khtml/ecma/kjs_debugwin.cpp | 6 +++--- khtml/ecma/kjs_navigator.cpp | 30 +++++++++++++++--------------- khtml/ecma/kjs_proxy.cpp | 10 +++++----- khtml/ecma/kjs_window.cpp | 24 ++++++++++++------------ khtml/ecma/xmlhttprequest.cpp | 2 +- 5 files changed, 36 insertions(+), 36 deletions(-) (limited to 'khtml/ecma') diff --git a/khtml/ecma/kjs_debugwin.cpp b/khtml/ecma/kjs_debugwin.cpp index b3c2a41b1..87d1b8a6c 100644 --- a/khtml/ecma/kjs_debugwin.cpp +++ b/khtml/ecma/kjs_debugwin.cpp @@ -690,7 +690,7 @@ bool KJSDebugWin::eventFilter(TQObject *o, TQEvent *e) void KJSDebugWin::disableOtherWindows() { - TQWidgetList *widgets = TQApplication::tqallWidgets(); + TQWidgetList *widgets = TQApplication::allWidgets(); TQWidgetListIt it(*widgets); for (; it.current(); ++it) it.current()->installEventFilter(this); @@ -698,7 +698,7 @@ void KJSDebugWin::disableOtherWindows() void KJSDebugWin::enableOtherWindows() { - TQWidgetList *widgets = TQApplication::tqallWidgets(); + TQWidgetList *widgets = TQApplication::allWidgets(); TQWidgetListIt it(*widgets); for (; it.current(); ++it) it.current()->removeEventFilter(this); @@ -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; diff --git a/khtml/ecma/kjs_navigator.cpp b/khtml/ecma/kjs_navigator.cpp index 637b6a8e1..a14877be2 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::tqfromLatin1("Mozilla")) >= 0 && - userAgent.find(TQString::tqfromLatin1("compatible")) == -1) + if (userAgent.find(TQString::fromLatin1("Mozilla")) >= 0 && + userAgent.find(TQString::fromLatin1("compatible")) == -1) { //kdDebug() << "appName -> Mozilla" << endl; return String("Netscape"); } - if (userAgent.find(TQString::tqfromLatin1("Microsoft")) >= 0 || - userAgent.find(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"); @@ -207,14 +207,14 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const return String(userAgent.mid(userAgent.find('/') + 1)); case Product: // We are pretending to be Mozilla or Safari - if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 && - userAgent.find(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.find(TQString::tqfromLatin1("Microsoft")) >= 0 || - userAgent.find(TQString::tqfromLatin1("MSIE")) >= 0) + if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 || + userAgent.find(TQString::fromLatin1("MSIE")) >= 0) { return Undefined(); } @@ -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::tqfromLatin1("Win"),0,false)>=0) ) - return String(TQString::tqfromLatin1("Win32")); - else if ( (userAgent.find(TQString::tqfromLatin1("Macintosh"),0,false)>=0) || - (userAgent.find(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(TQString::tqfromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine))); + return String(TQString(TQString::fromLatin1("%1 %1 X11").arg(name.sysname).arg(name.machine))); else // can't happen - return String(TQString(TQString::tqfromLatin1("Unix X11"))); + return String(TQString(TQString::fromLatin1("Unix X11"))); } case CpuClass: { diff --git a/khtml/ecma/kjs_proxy.cpp b/khtml/ecma/kjs_proxy.cpp index 2469ac681..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.find(TQString::tqfromLatin1("Microsoft")) >= 0 || - userAgent.find(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 @@ -353,9 +353,9 @@ void KJSProxyImpl::applyUserAgent() } else // If we find "Mozilla" but not "(compatible, ...)" we are a real Netscape - if (userAgent.find(TQString::tqfromLatin1("Mozilla")) >= 0 && - userAgent.find(TQString::tqfromLatin1("compatible")) == -1 && - userAgent.find(TQString::tqfromLatin1("KHTML")) == -1) + 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 bed6b83c6..02af22f55 100644 --- a/khtml/ecma/kjs_window.cpp +++ b/khtml/ecma/kjs_window.cpp @@ -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()->tqtopLevelWidget()->winId()); + KWin::WindowInfo inf = KWin::windowInfo(part->widget()->topLevelWidget()->winId()); return Number(entry->value == OuterHeight ? inf.geometry().height() : inf.geometry().width()); #else @@ -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::tqfromLatin1("javascript:"), 0, false) != 0 ) + dstUrl.find(TQString::fromLatin1("javascript:"), 0, false) != 0 ) part->scheduleRedirection(-1, dstUrl, lockHistory); @@ -1622,7 +1622,7 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString 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->tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2; + winargs.height = (int)val.toFloat() + 2*tqApp->tqstyle().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->tqstyle().tqpixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2; + winargs.width = (int)val.toFloat() + 2*tqApp->tqstyle().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2; if (winargs.width > screen.width()) // should actually check workspace winargs.width = screen.width(); if (winargs.width < 100) @@ -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(); @@ -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: diff --git a/khtml/ecma/xmlhttprequest.cpp b/khtml/ecma/xmlhttprequest.cpp index 7b88477f0..08ba07519 100644 --- a/khtml/ecma/xmlhttprequest.cpp +++ b/khtml/ecma/xmlhttprequest.cpp @@ -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::tqfromLatin1(BANNED_HTTP_HEADERS)); + TQString::fromLatin1(BANNED_HTTP_HEADERS)); if (bannedHeaders.contains(name)) return; // Denied -- cgit v1.2.1