From 560378aaca1784ba19806a0414a32b20c744de39 Mon Sep 17 00:00:00 2001 From: tpearson Date: Mon, 3 Jan 2011 04:12:51 +0000 Subject: Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1 NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- khtml/ecma/kjs_navigator.cpp | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'khtml/ecma/kjs_navigator.cpp') 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/ 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: { -- cgit v1.2.1