diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-07 03:45:53 +0000 |
commit | 10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch) | |
tree | 4bc444c00a79e88105f2cfce5b6209994c413ca0 /khtml/ecma/kjs_navigator.cpp | |
parent | 307136d8eef0ba133b78ceee8e901138d4c996a1 (diff) | |
download | tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip |
Revert automated changes
Sorry guys, they are just not ready for prime time
Work will continue as always
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/ecma/kjs_navigator.cpp')
-rw-r--r-- | khtml/ecma/kjs_navigator.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
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: { |