summaryrefslogtreecommitdiffstats
path: root/khtml/ecma/kjs_navigator.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
commitf7e71d47719ab6094cf4a9fafffa5ea351973522 (patch)
tree30834aa632d442019e14f88685001d94657d060b /khtml/ecma/kjs_navigator.cpp
parentb31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff)
downloadtdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz
tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/ecma/kjs_navigator.cpp')
-rw-r--r--khtml/ecma/kjs_navigator.cpp38
1 files changed, 19 insertions, 19 deletions
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:
{