summaryrefslogtreecommitdiffstats
path: root/khtml/ecma
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-07-31 19:46:43 +0000
commitffe8a83e053396df448e9413828527613ca3bd46 (patch)
treea73d4169e02df4a50f9a12cb165fcd0ab5bac7c6 /khtml/ecma
parent682bf3bfdcbcbb1fca85e8a36ed03e062e0555d5 (diff)
downloadtdelibs-ffe8a83e053396df448e9413828527613ca3bd46.tar.gz
tdelibs-ffe8a83e053396df448e9413828527613ca3bd46.zip
Trinity Qt initial conversion
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1157647 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'khtml/ecma')
-rw-r--r--khtml/ecma/domparser.cpp4
-rw-r--r--khtml/ecma/domparser.h4
-rw-r--r--khtml/ecma/kjs_binding.cpp62
-rw-r--r--khtml/ecma/kjs_binding.h12
-rw-r--r--khtml/ecma/kjs_css.cpp14
-rw-r--r--khtml/ecma/kjs_debugwin.cpp268
-rw-r--r--khtml/ecma/kjs_debugwin.h92
-rw-r--r--khtml/ecma/kjs_dom.cpp8
-rw-r--r--khtml/ecma/kjs_dom.h6
-rw-r--r--khtml/ecma/kjs_events.cpp8
-rw-r--r--khtml/ecma/kjs_events.h6
-rw-r--r--khtml/ecma/kjs_html.cpp36
-rw-r--r--khtml/ecma/kjs_mozilla.cpp4
-rw-r--r--khtml/ecma/kjs_navigator.cpp90
-rw-r--r--khtml/ecma/kjs_proxy.cpp28
-rw-r--r--khtml/ecma/kjs_proxy.h8
-rw-r--r--khtml/ecma/kjs_window.cpp208
-rw-r--r--khtml/ecma/kjs_window.h56
-rw-r--r--khtml/ecma/xmlhttprequest.cpp98
-rw-r--r--khtml/ecma/xmlhttprequest.h34
-rw-r--r--khtml/ecma/xmlserializer.cpp2
21 files changed, 524 insertions, 524 deletions
diff --git a/khtml/ecma/domparser.cpp b/khtml/ecma/domparser.cpp
index 63a9dce36..672754a45 100644
--- a/khtml/ecma/domparser.cpp
+++ b/khtml/ecma/domparser.cpp
@@ -88,8 +88,8 @@ Value DOMParserProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List &
return Undefined();
}
- QString str = args[0].toString(exec).qstring();
- QString contentType = args[1].toString(exec).qstring().stripWhiteSpace();
+ TQString str = args[0].toString(exec).qstring();
+ TQString contentType = args[1].toString(exec).qstring().stripWhiteSpace();
if (contentType == "text/xml" || contentType == "application/xml" || contentType == "application/xhtml+xml") {
DocumentImpl *docImpl = parser->doc->implementation()->createDocument();
diff --git a/khtml/ecma/domparser.h b/khtml/ecma/domparser.h
index 233872602..746514783 100644
--- a/khtml/ecma/domparser.h
+++ b/khtml/ecma/domparser.h
@@ -21,7 +21,7 @@
#ifndef DOMPARSER_H
#define DOMPARSER_H
-#include <qguardedptr.h>
+#include <tqguardedptr.h>
#include <kjs/object.h>
#include <kjs/interpreter.h>
#include <misc/shared.h>
@@ -48,7 +48,7 @@ private:
enum { ParseFromString };
private:
- QGuardedPtr<DOM::DocumentImpl> doc;
+ TQGuardedPtr<DOM::DocumentImpl> doc;
friend class DOMParserProtoFunc;
};
diff --git a/khtml/ecma/kjs_binding.cpp b/khtml/ecma/kjs_binding.cpp
index 295d8c5e9..f9dd291d7 100644
--- a/khtml/ecma/kjs_binding.cpp
+++ b/khtml/ecma/kjs_binding.cpp
@@ -53,7 +53,7 @@ Value DOMObject::get(ExecState *exec, const Identifier &p) const
// ### translate code into readable string ?
// ### oh, and s/QString/i18n or I18N_NOOP (the code in kjs uses I18N_NOOP... but where is it translated ?)
// and where does it appear to the user ?
- Object err = Error::create(exec, GeneralError, QString("DOM exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("DOM exception %1").arg(e.code).local8Bit());
exec->setException( err );
result = Undefined();
}
@@ -72,7 +72,7 @@ void DOMObject::put(ExecState *exec, const Identifier &propertyName,
tryPut(exec, propertyName, value, attr);
}
catch (DOM::DOMException e) {
- Object err = Error::create(exec, GeneralError, QString("DOM exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("DOM exception %1").arg(e.code).local8Bit());
exec->setException(err);
}
catch (...) {
@@ -120,7 +120,7 @@ Value DOMFunction::get(ExecState *exec, const Identifier &propertyName) const
return tryGet(exec, propertyName);
}
catch (DOM::DOMException e) {
- Object err = Error::create(exec, GeneralError, QString("DOM exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("DOM exception %1").arg(e.code).local8Bit());
exec->setException(err);
return Undefined();
}
@@ -139,25 +139,25 @@ Value DOMFunction::call(ExecState *exec, Object &thisObj, const List &args)
// ### Look into setting prototypes of these & the use of instanceof so the exception
// type can be determined. See what other browsers do.
catch (DOM::DOMException e) {
- Object err = Error::create(exec, GeneralError, QString("DOM Exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("DOM Exception %1").arg(e.code).local8Bit());
err.put(exec, "code", Number(e.code));
exec->setException(err);
return Undefined();
}
catch (DOM::RangeException e) {
- Object err = Error::create(exec, GeneralError, QString("DOM Range Exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("DOM Range Exception %1").arg(e.code).local8Bit());
err.put(exec, "code", Number(e.code));
exec->setException(err);
return Undefined();
}
catch (DOM::CSSException e) {
- Object err = Error::create(exec, GeneralError, QString("CSS Exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("CSS Exception %1").arg(e.code).local8Bit());
err.put(exec, "code", Number(e.code));
exec->setException(err);
return Undefined();
}
catch (DOM::EventException e) {
- Object err = Error::create(exec, GeneralError, QString("DOM Event Exception %1").arg(e.code).local8Bit());
+ Object err = Error::create(exec, GeneralError, TQString("DOM Event Exception %1").arg(e.code).local8Bit());
err.put(exec, "code", Number(e.code));
exec->setException(err);
return Undefined();
@@ -170,7 +170,7 @@ Value DOMFunction::call(ExecState *exec, Object &thisObj, const List &args)
}
}
-typedef QPtrList<ScriptInterpreter> InterpreterList;
+typedef TQPtrList<ScriptInterpreter> InterpreterList;
static InterpreterList *interpreterList;
ScriptInterpreter::ScriptInterpreter( const Object &global, khtml::ChildFrame* frame )
@@ -202,7 +202,7 @@ void ScriptInterpreter::forgetDOMObject( void* objectHandle )
{
if( !interpreterList ) return;
- QPtrListIterator<ScriptInterpreter> it( *interpreterList );
+ TQPtrListIterator<ScriptInterpreter> it( *interpreterList );
while ( it.current() ) {
(*it)->deleteDOMObject( objectHandle );
++it;
@@ -215,7 +215,7 @@ void ScriptInterpreter::mark()
#ifdef KJS_VERBOSE
kdDebug(6070) << "ScriptInterpreter::mark " << this << " marking " << m_customizedDomObjects.count() << " DOM objects" << endl;
#endif
- QPtrDictIterator<void> it( m_customizedDomObjects );
+ TQPtrDictIterator<void> it( m_customizedDomObjects );
for( ; it.current(); ++it )
static_cast<DOMObject*>(it.currentKey())->mark();
}
@@ -257,7 +257,7 @@ bool ScriptInterpreter::isWindowOpenAllowed() const
}
-UString::UString(const QString &d)
+UString::UString(const TQString &d)
{
unsigned int len = d.length();
UChar *dat = new UChar[len];
@@ -283,27 +283,27 @@ UString::UString(const DOM::DOMString &d)
DOM::DOMString UString::string() const
{
- return DOM::DOMString((QChar*) data(), size());
+ return DOM::DOMString((TQChar*) data(), size());
}
-QString UString::qstring() const
+TQString UString::qstring() const
{
- return QString((QChar*) data(), size());
+ return TQString((TQChar*) data(), size());
}
-QConstString UString::qconststring() const
+TQConstString UString::qconststring() const
{
- return QConstString((QChar*) data(), size());
+ return TQConstString((TQChar*) data(), size());
}
DOM::DOMString Identifier::string() const
{
- return DOM::DOMString((QChar*) data(), size());
+ return DOM::DOMString((TQChar*) data(), size());
}
-QString Identifier::qstring() const
+TQString Identifier::qstring() const
{
- return QString((QChar*) data(), size());
+ return TQString((TQChar*) data(), size());
}
DOM::Node KJS::toNode(const Value& val)
@@ -324,17 +324,17 @@ Value KJS::getString(DOM::DOMString s)
return String(s);
}
-QVariant KJS::ValueToVariant(ExecState* exec, const Value &val) {
- QVariant res;
+TQVariant KJS::ValueToVariant(ExecState* exec, const Value &val) {
+ TQVariant res;
switch (val.type()) {
case BooleanType:
- res = QVariant(val.toBoolean(exec), 0);
+ res = TQVariant(val.toBoolean(exec), 0);
break;
case NumberType:
- res = QVariant(val.toNumber(exec));
+ res = TQVariant(val.toNumber(exec));
break;
case StringType:
- res = QVariant(val.toString(exec).qstring());
+ res = TQVariant(val.toString(exec).qstring());
break;
default:
// everything else will be 'invalid'
@@ -345,7 +345,7 @@ QVariant KJS::ValueToVariant(ExecState* exec, const Value &val) {
class EmbedLiveConnect : public ObjectImp
{
- friend Value KJS::getLiveConnectValue(KParts::LiveConnectExtension *lc, const QString & name, const int type, const QString & value, int id);
+ friend Value KJS::getLiveConnectValue(KParts::LiveConnectExtension *lc, const TQString & name, const int type, const TQString & value, int id);
EmbedLiveConnect(KParts::LiveConnectExtension *lc, UString n, KParts::LiveConnectExtension::Type t, int id);
public:
~EmbedLiveConnect();
@@ -360,13 +360,13 @@ public:
private:
EmbedLiveConnect(const EmbedLiveConnect &);
- QGuardedPtr<KParts::LiveConnectExtension> m_liveconnect;
+ TQGuardedPtr<KParts::LiveConnectExtension> m_liveconnect;
UString name;
KParts::LiveConnectExtension::Type objtype;
unsigned long objid;
};
-Value KJS::getLiveConnectValue(KParts::LiveConnectExtension *lc, const QString & name, const int type, const QString & value, int id)
+Value KJS::getLiveConnectValue(KParts::LiveConnectExtension *lc, const TQString & name, const int type, const TQString & value, int id)
{
KParts::LiveConnectExtension::Type t=(KParts::LiveConnectExtension::Type)type;
switch(t) {
@@ -412,7 +412,7 @@ Value EmbedLiveConnect::get(ExecState *, const Identifier & prop) const
{
if (m_liveconnect) {
KParts::LiveConnectExtension::Type rettype;
- QString retval;
+ TQString retval;
unsigned long retobjid;
if (m_liveconnect->get(objid, prop.qstring(), rettype, retobjid, retval))
return getLiveConnectValue(m_liveconnect, prop.qstring(), rettype, retval, retobjid);
@@ -436,11 +436,11 @@ KDE_NO_EXPORT
Value EmbedLiveConnect::call(ExecState *exec, Object&, const List &args)
{
if (m_liveconnect) {
- QStringList qargs;
+ TQStringList qargs;
for (ListIterator i = args.begin(); i != args.end(); ++i)
qargs.append((*i).toString(exec).qstring());
KParts::LiveConnectExtension::Type rtype;
- QString rval;
+ TQString rval;
unsigned long robjid;
if (m_liveconnect->call(objid, name.qstring(), qargs, rtype, robjid, rval))
return getLiveConnectValue(m_liveconnect, name.qstring(), rtype, rval, robjid);
@@ -460,7 +460,7 @@ Value EmbedLiveConnect::toPrimitive(ExecState *exec, Type) const {
KDE_NO_EXPORT
UString EmbedLiveConnect::toString(ExecState *) const {
- QString str;
+ TQString str;
const char *type = objtype == KParts::LiveConnectExtension::TypeFunction ? "Function" : "Object";
str.sprintf("[object %s ref=%d]", type, (int) objid);
return UString(str);
diff --git a/khtml/ecma/kjs_binding.h b/khtml/ecma/kjs_binding.h
index 4b49e866b..c55da21ce 100644
--- a/khtml/ecma/kjs_binding.h
+++ b/khtml/ecma/kjs_binding.h
@@ -26,8 +26,8 @@
#include <kjs/function_object.h> /// for FunctionPrototypeImp
#include <dom/dom_node.h>
-#include <qvariant.h>
-#include <qptrdict.h>
+#include <tqvariant.h>
+#include <tqptrdict.h>
#include <kurl.h>
#include <kjs/lookup.h>
@@ -144,8 +144,8 @@ namespace KJS {
private:
khtml::ChildFrame* m_frame;
- QPtrDict<DOMObject> m_domObjects;
- QPtrDict<void> m_customizedDomObjects; //Objects which had custom properties set,
+ TQPtrDict<DOMObject> m_domObjects;
+ TQPtrDict<void> m_customizedDomObjects; //Objects which had custom properties set,
//and should not be GC'd. key is DOMObject*
DOM::Event *m_evt;
bool m_inlineCode;
@@ -182,7 +182,7 @@ namespace KJS {
/**
* Convery a KJS value into a QVariant
*/
- QVariant ValueToVariant(ExecState* exec, const Value& val);
+ TQVariant ValueToVariant(ExecState* exec, const Value& val);
/**
* We need a modified version of lookupGet because
@@ -330,7 +330,7 @@ namespace KJS {
int id; \
};
- Value getLiveConnectValue(KParts::LiveConnectExtension *lc, const QString & name, const int type, const QString & value, int id);
+ Value getLiveConnectValue(KParts::LiveConnectExtension *lc, const TQString & name, const int type, const TQString & value, int id);
// This is used to create pseudo-constructor objects, like Mozillaish
diff --git a/khtml/ecma/kjs_css.cpp b/khtml/ecma/kjs_css.cpp
index 167809046..b42f9dd02 100644
--- a/khtml/ecma/kjs_css.cpp
+++ b/khtml/ecma/kjs_css.cpp
@@ -33,9 +33,9 @@
namespace KJS {
-static QString cssPropertyName( const Identifier &p, bool& hadPixelPrefix )
+static TQString cssPropertyName( const Identifier &p, bool& hadPixelPrefix )
{
- QString prop = p.qstring();
+ TQString prop = p.qstring();
int i = prop.length();
while ( --i ) {
char c = prop[i].latin1();
@@ -98,7 +98,7 @@ DOMCSSStyleDeclaration::~DOMCSSStyleDeclaration()
bool DOMCSSStyleDeclaration::hasProperty(ExecState *exec, const Identifier &p) const
{
bool hadPixelPrefix;
- QString cssprop = cssPropertyName(p, hadPixelPrefix);
+ TQString cssprop = cssPropertyName(p, hadPixelPrefix);
if (DOM::getPropertyID(cssprop.latin1(), cssprop.length()))
return true;
@@ -138,7 +138,7 @@ Value DOMCSSStyleDeclaration::tryGet(ExecState *exec, const Identifier &property
// positioned element. if it is not a positioned element, return 0
// from MSIE documentation ### IMPLEMENT THAT (Dirk)
bool asNumber;
- QString p = cssPropertyName(propertyName, asNumber);
+ TQString p = cssPropertyName(propertyName, asNumber);
#ifdef KJS_VERBOSE
kdDebug(6070) << "DOMCSSStyleDeclaration: converting to css property name: " << p << ( asNumber ? "px" : "" ) << endl;
@@ -172,8 +172,8 @@ void DOMCSSStyleDeclaration::tryPut(ExecState *exec, const Identifier &propertyN
}
else {
bool pxSuffix;
- QString prop = cssPropertyName(propertyName, pxSuffix);
- QString propvalue = value.toString(exec).qstring();
+ TQString prop = cssPropertyName(propertyName, pxSuffix);
+ TQString propvalue = value.toString(exec).qstring();
if (pxSuffix)
propvalue += "px";
@@ -360,7 +360,7 @@ Value DOMStyleSheetList::tryGet(ExecState *exec, const Identifier &p) const
DOM::NameNodeListImpl namedList( m_doc.documentElement().handle(), p.string() );
int len = namedList.length();
if ( len ) {
- QValueList<DOM::Node> styleSheets;
+ TQValueList<DOM::Node> styleSheets;
for ( int i = 0 ; i < len ; ++i ) {
DOM::HTMLStyleElement elem = DOM::Node(namedList.item(i));
if (!elem.isNull())
diff --git a/khtml/ecma/kjs_debugwin.cpp b/khtml/ecma/kjs_debugwin.cpp
index 13a12ce5f..eeb126ebb 100644
--- a/khtml/ecma/kjs_debugwin.cpp
+++ b/khtml/ecma/kjs_debugwin.cpp
@@ -25,21 +25,21 @@
#include <assert.h>
#include <stdlib.h>
-#include <qlayout.h>
-#include <qpushbutton.h>
-#include <qtextedit.h>
-#include <qlistbox.h>
-#include <qmultilineedit.h>
-#include <qapplication.h>
-#include <qsplitter.h>
-#include <qcombobox.h>
-#include <qbitmap.h>
-#include <qwidgetlist.h>
-#include <qlabel.h>
-#include <qdatastream.h>
-#include <qcstring.h>
-#include <qpainter.h>
-#include <qscrollbar.h>
+#include <tqlayout.h>
+#include <tqpushbutton.h>
+#include <tqtextedit.h>
+#include <tqlistbox.h>
+#include <tqmultilineedit.h>
+#include <tqapplication.h>
+#include <tqsplitter.h>
+#include <tqcombobox.h>
+#include <tqbitmap.h>
+#include <tqwidgetlist.h>
+#include <tqlabel.h>
+#include <tqdatastream.h>
+#include <tqcstring.h>
+#include <tqpainter.h>
+#include <tqscrollbar.h>
#include <klocale.h>
#include <kdebug.h>
@@ -75,11 +75,11 @@
using namespace KJS;
using namespace khtml;
-SourceDisplay::SourceDisplay(KJSDebugWin *debugWin, QWidget *parent, const char *name)
- : QScrollView(parent,name), m_currentLine(-1), m_sourceFile(0), m_debugWin(debugWin),
+SourceDisplay::SourceDisplay(KJSDebugWin *debugWin, TQWidget *parent, const char *name)
+ : TQScrollView(parent,name), m_currentLine(-1), m_sourceFile(0), m_debugWin(debugWin),
m_font(KGlobalSettings::fixedFont())
{
- verticalScrollBar()->setLineStep(QFontMetrics(m_font).height());
+ verticalScrollBar()->setLineStep(TQFontMetrics(m_font).height());
viewport()->setBackgroundMode(Qt::NoBackground);
m_breakpointIcon = KGlobal::iconLoader()->loadIcon("stop",KIcon::Small);
}
@@ -106,20 +106,20 @@ void SourceDisplay::setSource(SourceFile *sourceFile)
return;
}
- QString code = sourceFile->getCode();
- const QChar *chars = code.unicode();
+ TQString code = sourceFile->getCode();
+ const TQChar *chars = code.unicode();
uint len = code.length();
- QChar newLine('\n');
- QChar cr('\r');
- QChar tab('\t');
- QString tabstr(" ");
- QString line;
+ TQChar newLine('\n');
+ TQChar cr('\r');
+ TQChar tab('\t');
+ TQString tabstr(" ");
+ TQString line;
m_lines.clear();
int width = 0;
- QFontMetrics metrics(m_font);
+ TQFontMetrics metrics(m_font);
for (uint pos = 0; pos < len; pos++) {
- QChar c = chars[pos];
+ TQChar c = chars[pos];
if (c == cr) {
if (pos < len-1 && chars[pos+1] == newLine)
continue;
@@ -158,7 +158,7 @@ void SourceDisplay::setCurrentLine(int lineno, bool doCenter)
m_currentLine = lineno;
if (doCenter && m_currentLine >= 0) {
- QFontMetrics metrics(m_font);
+ TQFontMetrics metrics(m_font);
int height = metrics.height();
center(0,height*m_currentLine+height/2);
}
@@ -166,27 +166,27 @@ void SourceDisplay::setCurrentLine(int lineno, bool doCenter)
updateContents();
}
-void SourceDisplay::contentsMousePressEvent(QMouseEvent *e)
+void SourceDisplay::contentsMousePressEvent(TQMouseEvent *e)
{
- QScrollView::mouseDoubleClickEvent(e);
- QFontMetrics metrics(m_font);
+ TQScrollView::mouseDoubleClickEvent(e);
+ TQFontMetrics metrics(m_font);
int lineno = e->y()/metrics.height();
emit lineDoubleClicked(lineno+1); // line numbers start from 1
}
-void SourceDisplay::showEvent(QShowEvent *)
+void SourceDisplay::showEvent(TQShowEvent *)
{
setSource(m_sourceFile);
}
-void SourceDisplay::drawContents(QPainter *p, int clipx, int clipy, int clipw, int cliph)
+void SourceDisplay::drawContents(TQPainter *p, int clipx, int clipy, int clipw, int cliph)
{
if (!m_sourceFile) {
p->fillRect(clipx,clipy,clipw,cliph,palette().active().base());
return;
}
- QFontMetrics metrics(m_font);
+ TQFontMetrics metrics(m_font);
int height = metrics.height();
int bottom = clipy + cliph;
@@ -204,7 +204,7 @@ void SourceDisplay::drawContents(QPainter *p, int clipx, int clipy, int clipw, i
int linenoWidth = metrics.width("888888");
for (int lineno = firstLine; lineno <= lastLine; lineno++) {
- QString linenoStr = QString().sprintf("%d",lineno+1);
+ TQString linenoStr = TQString().sprintf("%d",lineno+1);
p->fillRect(0,height*lineno,linenoWidth,height,palette().active().mid());
@@ -212,8 +212,8 @@ void SourceDisplay::drawContents(QPainter *p, int clipx, int clipy, int clipw, i
p->setPen(palette().active().text());
p->drawText(0,height*lineno,linenoWidth,height,Qt::AlignRight,linenoStr);
- QColor bgColor;
- QColor textColor;
+ TQColor bgColor;
+ TQColor textColor;
if (lineno == m_currentLine) {
bgColor = palette().active().highlight();
@@ -246,16 +246,16 @@ void SourceDisplay::drawContents(QPainter *p, int clipx, int clipy, int clipw, i
KJSDebugWin * KJSDebugWin::kjs_html_debugger = 0;
-QString SourceFile::getCode()
+TQString SourceFile::getCode()
{
if (interpreter) {
KHTMLPart *part = ::qt_cast<KHTMLPart*>(static_cast<ScriptInterpreter*>(interpreter)->part());
if (part && url == part->url().url() && KHTMLPageCache::self()->isValid(part->cacheId())) {
Decoder *decoder = part->createDecoder();
- QByteArray data;
- QDataStream stream(data,IO_WriteOnly);
+ TQByteArray data;
+ TQDataStream stream(data,IO_WriteOnly);
KHTMLPageCache::self()->saveData(part->cacheId(),&stream);
- QString str;
+ TQString str;
if (data.size() == 0)
str = "";
else
@@ -287,28 +287,28 @@ SourceFragment::~SourceFragment()
//-------------------------------------------------------------------------
-KJSErrorDialog::KJSErrorDialog(QWidget *parent, const QString& errorMessage, bool showDebug)
+KJSErrorDialog::KJSErrorDialog(TQWidget *parent, const TQString& errorMessage, bool showDebug)
: KDialogBase(parent,0,true,i18n("JavaScript Error"),
showDebug ? KDialogBase::Ok|KDialogBase::User1 : KDialogBase::Ok,
KDialogBase::Ok,false,KGuiItem("&Debug","gear"))
{
- QWidget *page = new QWidget(this);
+ TQWidget *page = new TQWidget(this);
setMainWidget(page);
- QLabel *iconLabel = new QLabel("",page);
+ TQLabel *iconLabel = new TQLabel("",page);
iconLabel->setPixmap(KGlobal::iconLoader()->loadIcon("messagebox_critical",
KIcon::NoGroup,KIcon::SizeMedium,
KIcon::DefaultState,0,true));
- QWidget *contents = new QWidget(page);
- QLabel *label = new QLabel(errorMessage,contents);
- m_dontShowAgainCb = new QCheckBox(i18n("&Do not show this message again"),contents);
+ TQWidget *contents = new TQWidget(page);
+ TQLabel *label = new TQLabel(errorMessage,contents);
+ m_dontShowAgainCb = new TQCheckBox(i18n("&Do not show this message again"),contents);
- QVBoxLayout *vl = new QVBoxLayout(contents,0,spacingHint());
+ TQVBoxLayout *vl = new TQVBoxLayout(contents,0,spacingHint());
vl->addWidget(label);
vl->addWidget(m_dontShowAgainCb);
- QHBoxLayout *topLayout = new QHBoxLayout(page,0,spacingHint());
+ TQHBoxLayout *topLayout = new TQHBoxLayout(page,0,spacingHint());
topLayout->addWidget(iconLabel);
topLayout->addWidget(contents);
topLayout->addStretch(10);
@@ -327,11 +327,11 @@ void KJSErrorDialog::slotUser1()
}
//-------------------------------------------------------------------------
-EvalMultiLineEdit::EvalMultiLineEdit(QWidget *parent)
- : QMultiLineEdit(parent) {
+EvalMultiLineEdit::EvalMultiLineEdit(TQWidget *parent)
+ : TQMultiLineEdit(parent) {
}
-void EvalMultiLineEdit::keyPressEvent(QKeyEvent * e)
+void EvalMultiLineEdit::keyPressEvent(TQKeyEvent * e)
{
if (e->key() == Qt::Key_Return) {
if (hasSelectedText()) {
@@ -343,10 +343,10 @@ void EvalMultiLineEdit::keyPressEvent(QKeyEvent * e)
}
end();
}
- QMultiLineEdit::keyPressEvent(e);
+ TQMultiLineEdit::keyPressEvent(e);
}
//-------------------------------------------------------------------------
-KJSDebugWin::KJSDebugWin(QWidget *parent, const char *name)
+KJSDebugWin::KJSDebugWin(TQWidget *parent, const char *name)
: KMainWindow(parent, name, WType_TopLevel), KInstance("kjs_debugger")
{
m_breakpoints = 0;
@@ -362,73 +362,73 @@ KJSDebugWin::KJSDebugWin(QWidget *parent, const char *name)
m_steppingDepth = 0;
m_stopIcon = KGlobal::iconLoader()->loadIcon("stop",KIcon::Small);
- m_emptyIcon = QPixmap(m_stopIcon.width(),m_stopIcon.height());
- QBitmap emptyMask(m_stopIcon.width(),m_stopIcon.height(),true);
+ m_emptyIcon = TQPixmap(m_stopIcon.width(),m_stopIcon.height());
+ TQBitmap emptyMask(m_stopIcon.width(),m_stopIcon.height(),true);
m_emptyIcon.setMask(emptyMask);
setCaption(i18n("JavaScript Debugger"));
- QWidget *mainWidget = new QWidget(this);
+ TQWidget *mainWidget = new TQWidget(this);
setCentralWidget(mainWidget);
- QVBoxLayout *vl = new QVBoxLayout(mainWidget,5);
+ TQVBoxLayout *vl = new TQVBoxLayout(mainWidget,5);
// frame list & code
- QSplitter *hsplitter = new QSplitter(Qt::Vertical,mainWidget);
- QSplitter *vsplitter = new QSplitter(hsplitter);
- QFont font(KGlobalSettings::fixedFont());
+ TQSplitter *hsplitter = new TQSplitter(Qt::Vertical,mainWidget);
+ TQSplitter *vsplitter = new TQSplitter(hsplitter);
+ TQFont font(KGlobalSettings::fixedFont());
- QWidget *contextContainer = new QWidget(vsplitter);
+ TQWidget *contextContainer = new TQWidget(vsplitter);
- QLabel *contextLabel = new QLabel(i18n("Call stack"),contextContainer);
- QWidget *contextListContainer = new QWidget(contextContainer);
- m_contextList = new QListBox(contextListContainer);
+ TQLabel *contextLabel = new TQLabel(i18n("Call stack"),contextContainer);
+ TQWidget *contextListContainer = new TQWidget(contextContainer);
+ m_contextList = new TQListBox(contextListContainer);
m_contextList->setMinimumSize(100,200);
- connect(m_contextList,SIGNAL(highlighted(int)),this,SLOT(slotShowFrame(int)));
+ connect(m_contextList,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(slotShowFrame(int)));
- QHBoxLayout *clistLayout = new QHBoxLayout(contextListContainer);
+ TQHBoxLayout *clistLayout = new TQHBoxLayout(contextListContainer);
clistLayout->addWidget(m_contextList);
clistLayout->addSpacing(KDialog::spacingHint());
- QVBoxLayout *contextLayout = new QVBoxLayout(contextContainer);
+ TQVBoxLayout *contextLayout = new TQVBoxLayout(contextContainer);
contextLayout->addWidget(contextLabel);
contextLayout->addSpacing(KDialog::spacingHint());
contextLayout->addWidget(contextListContainer);
// source selection & display
- QWidget *sourceSelDisplay = new QWidget(vsplitter);
- QVBoxLayout *ssdvl = new QVBoxLayout(sourceSelDisplay);
+ TQWidget *sourceSelDisplay = new TQWidget(vsplitter);
+ TQVBoxLayout *ssdvl = new TQVBoxLayout(sourceSelDisplay);
- m_sourceSel = new QComboBox(toolBar());
- connect(m_sourceSel,SIGNAL(activated(int)),this,SLOT(slotSourceSelected(int)));
+ m_sourceSel = new TQComboBox(toolBar());
+ connect(m_sourceSel,TQT_SIGNAL(activated(int)),this,TQT_SLOT(slotSourceSelected(int)));
m_sourceDisplay = new SourceDisplay(this,sourceSelDisplay);
ssdvl->addWidget(m_sourceDisplay);
- connect(m_sourceDisplay,SIGNAL(lineDoubleClicked(int)),SLOT(slotToggleBreakpoint(int)));
+ connect(m_sourceDisplay,TQT_SIGNAL(lineDoubleClicked(int)),TQT_SLOT(slotToggleBreakpoint(int)));
- QValueList<int> vsplitSizes;
+ TQValueList<int> vsplitSizes;
vsplitSizes.insert(vsplitSizes.end(),120);
vsplitSizes.insert(vsplitSizes.end(),480);
vsplitter->setSizes(vsplitSizes);
// evaluate
- QWidget *evalContainer = new QWidget(hsplitter);
+ TQWidget *evalContainer = new TQWidget(hsplitter);
- QLabel *evalLabel = new QLabel(i18n("JavaScript console"),evalContainer);
+ TQLabel *evalLabel = new TQLabel(i18n("JavaScript console"),evalContainer);
m_evalEdit = new EvalMultiLineEdit(evalContainer);
- m_evalEdit->setWordWrap(QMultiLineEdit::NoWrap);
+ m_evalEdit->setWordWrap(TQMultiLineEdit::NoWrap);
m_evalEdit->setFont(font);
- connect(m_evalEdit,SIGNAL(returnPressed()),SLOT(slotEval()));
+ connect(m_evalEdit,TQT_SIGNAL(returnPressed()),TQT_SLOT(slotEval()));
m_evalDepth = 0;
- QVBoxLayout *evalLayout = new QVBoxLayout(evalContainer);
+ TQVBoxLayout *evalLayout = new TQVBoxLayout(evalContainer);
evalLayout->addSpacing(KDialog::spacingHint());
evalLayout->addWidget(evalLabel);
evalLayout->addSpacing(KDialog::spacingHint());
evalLayout->addWidget(m_evalEdit);
- QValueList<int> hsplitSizes;
+ TQValueList<int> hsplitSizes;
hsplitSizes.insert(hsplitSizes.end(),400);
hsplitSizes.insert(hsplitSizes.end(),200);
hsplitter->setSizes(hsplitSizes);
@@ -445,18 +445,18 @@ KJSDebugWin::KJSDebugWin(QWidget *parent, const char *name)
// Venkman use F12, KDevelop F10
KShortcut scNext = KShortcut(KKeySequence(KKey(Qt::Key_F12)));
scNext.append(KKeySequence(KKey(Qt::Key_F10)));
- m_nextAction = new KAction(i18n("Next breakpoint","&Next"),"dbgnext",scNext,this,SLOT(slotNext()),
+ m_nextAction = new KAction(i18n("Next breakpoint","&Next"),"dbgnext",scNext,this,TQT_SLOT(slotNext()),
m_actionCollection,"next");
- m_stepAction = new KAction(i18n("&Step"),"dbgstep",KShortcut(Qt::Key_F11),this,SLOT(slotStep()),
+ m_stepAction = new KAction(i18n("&Step"),"dbgstep",KShortcut(Qt::Key_F11),this,TQT_SLOT(slotStep()),
m_actionCollection,"step");
// Venkman use F5, Kdevelop F9
KShortcut scCont = KShortcut(KKeySequence(KKey(Qt::Key_F5)));
scCont.append(KKeySequence(KKey(Qt::Key_F9)));
- m_continueAction = new KAction(i18n("&Continue"),"dbgrun",scCont,this,SLOT(slotContinue()),
+ m_continueAction = new KAction(i18n("&Continue"),"dbgrun",scCont,this,TQT_SLOT(slotContinue()),
m_actionCollection,"cont");
- m_stopAction = new KAction(i18n("St&op"),"stop",KShortcut(Qt::Key_F4),this,SLOT(slotStop()),
+ m_stopAction = new KAction(i18n("St&op"),"stop",KShortcut(Qt::Key_F4),this,TQT_SLOT(slotStop()),
m_actionCollection,"stop");
- m_breakAction = new KAction(i18n("&Break at Next Statement"),"dbgrunto",KShortcut(Qt::Key_F8),this,SLOT(slotBreakNext()),
+ m_breakAction = new KAction(i18n("&Break at Next Statement"),"dbgrunto",KShortcut(Qt::Key_F8),this,TQT_SLOT(slotBreakNext()),
m_actionCollection,"breaknext");
@@ -553,7 +553,7 @@ void KJSDebugWin::slotToggleBreakpoint(int lineno)
// Find the source fragment containing the selected line (if any)
int sourceId = -1;
int highestBaseLine = -1;
- QMap<int,SourceFragment*>::Iterator it;
+ TQMap<int,SourceFragment*>::Iterator it;
for (it = m_sourceFragments.begin(); it != m_sourceFragments.end(); ++it) {
SourceFragment *sourceFragment = it.data();
@@ -627,7 +627,7 @@ void KJSDebugWin::slotEval()
// Evaluate the js code from m_evalEdit
UString code(m_evalEdit->code());
- QString msg;
+ TQString msg;
KJSCPUGuard guard;
guard.start();
@@ -657,49 +657,49 @@ void KJSDebugWin::slotEval()
updateContextList();
}
-void KJSDebugWin::closeEvent(QCloseEvent *e)
+void KJSDebugWin::closeEvent(TQCloseEvent *e)
{
while (!m_execStates.isEmpty()) // ### not sure if this will work
leaveSession();
- return QWidget::closeEvent(e);
+ return TQWidget::closeEvent(e);
}
-bool KJSDebugWin::eventFilter(QObject *o, QEvent *e)
+bool KJSDebugWin::eventFilter(TQObject *o, TQEvent *e)
{
switch (e->type()) {
- case QEvent::MouseButtonPress:
- case QEvent::MouseButtonRelease:
- case QEvent::MouseButtonDblClick:
- case QEvent::MouseMove:
- case QEvent::KeyPress:
- case QEvent::KeyRelease:
- case QEvent::Destroy:
- case QEvent::Close:
- case QEvent::Quit:
+ case TQEvent::MouseButtonPress:
+ case TQEvent::MouseButtonRelease:
+ case TQEvent::MouseButtonDblClick:
+ case TQEvent::MouseMove:
+ case TQEvent::KeyPress:
+ case TQEvent::KeyRelease:
+ case TQEvent::Destroy:
+ case TQEvent::Close:
+ case TQEvent::Quit:
while (o->parent())
o = o->parent();
if (o == this)
- return QWidget::eventFilter(o,e);
+ return TQWidget::eventFilter(o,e);
else
return true;
break;
default:
- return QWidget::eventFilter(o,e);
+ return TQWidget::eventFilter(o,e);
}
}
void KJSDebugWin::disableOtherWindows()
{
- QWidgetList *widgets = QApplication::allWidgets();
- QWidgetListIt it(*widgets);
+ TQWidgetList *widgets = TQApplication::allWidgets();
+ TQWidgetListIt it(*widgets);
for (; it.current(); ++it)
it.current()->installEventFilter(this);
}
void KJSDebugWin::enableOtherWindows()
{
- QWidgetList *widgets = QApplication::allWidgets();
- QWidgetListIt it(*widgets);
+ TQWidgetList *widgets = TQApplication::allWidgets();
+ TQWidgetListIt it(*widgets);
for (; it.current(); ++it)
it.current()->removeEventFilter(this);
}
@@ -717,12 +717,12 @@ bool KJSDebugWin::sourceParsed(KJS::ExecState *exec, int sourceId,
index = m_sourceSel->count();
if (!m_nextSourceUrl.isEmpty()) {
- QString code = source.qstring();
+ TQString code = source.qstring();
KParts::ReadOnlyPart *part = static_cast<ScriptInterpreter*>(exec->interpreter())->part();
if (m_nextSourceUrl == part->url().url()) {
// Only store the code here if it's not from the part's html page... in that
// case we can get it from KHTMLPageCache
- code = QString::null;
+ code = TQString::null;
}
sourceFile = new SourceFile(m_nextSourceUrl,code,exec->interpreter());
@@ -735,7 +735,7 @@ bool KJSDebugWin::sourceParsed(KJS::ExecState *exec, int sourceId,
// but we still know the interpreter
sourceFile = new SourceFile("(unknown)",source.qstring(),exec->interpreter());
m_sourceSelFiles.append(sourceFile);
- m_sourceSel->insertItem(QString::number(index) += "-???");
+ m_sourceSel->insertItem(TQString::number(index) += "-???");
}
}
else {
@@ -809,9 +809,9 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
if (khtmlpart && !khtmlpart->settings()->isJavaScriptErrorReportingEnabled())
return true;
- QWidget *dlgParent = (m_evalDepth == 0) ? (QWidget*)part->widget() : (QWidget*)this;
+ TQWidget *dlgParent = (m_evalDepth == 0) ? (TQWidget*)part->widget() : (TQWidget*)this;
- QString exceptionMsg = value.toString(exec).qstring();
+ TQString exceptionMsg = value.toString(exec).qstring();
// Syntax errors are a special case. For these we want to display the url & lineno,
// which isn't included in the exception messeage. So we work it out from the values
@@ -834,7 +834,7 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
// An exception occurred and we're not currently executing any code... this can
// happen in some cases e.g. a parse error, or native code accessing funcitons like
// Object::put()
- QString msg = i18n("An error occurred while attempting to run a script on this page.\n\n%1")
+ TQString msg = i18n("An error occurred while attempting to run a script on this page.\n\n%1")
.arg(exceptionMsg);
KJSErrorDialog dlg(dlgParent,msg,false);
dlg.exec();
@@ -843,9 +843,9 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
else {
Context ctx = m_execs[m_execsCount-1]->context();
SourceFragment *sourceFragment = m_sourceFragments[ctx.sourceId()];
- QString msg = i18n("An error occurred while attempting to run a script on this page.\n\n%1 line %2:\n%3")
+ TQString msg = i18n("An error occurred while attempting to run a script on this page.\n\n%1 line %2:\n%3")
.arg(KStringHandler::rsqueeze( sourceFragment->sourceFile->url,80),
- QString::number( sourceFragment->baseLine+ctx.curStmtFirstLine()-1),
+ TQString::number( sourceFragment->baseLine+ctx.curStmtFirstLine()-1),
exceptionMsg);
KJSErrorDialog dlg(dlgParent,msg,true);
@@ -861,10 +861,10 @@ bool KJSDebugWin::exception(ExecState *exec, const Value &value, bool inTryCatch
if (dontShowAgain) {
KConfig *config = kapp->config();
- KConfigGroupSaver saver(config,QString::fromLatin1("Java/JavaScript Settings"));
- config->writeEntry("ReportJavaScriptErrors",QVariant(false,0));
+ KConfigGroupSaver saver(config,TQString::fromLatin1("Java/JavaScript Settings"));
+ config->writeEntry("ReportJavaScriptErrors",TQVariant(false,0));
config->sync();
- QByteArray data;
+ TQByteArray data;
kapp->dcopClient()->send( "konqueror*", "KonquerorIface", "reparseConfiguration()", data );
}
@@ -937,13 +937,13 @@ void KJSDebugWin::setSourceLine(int sourceId, int lineno)
m_sourceDisplay->setCurrentLine(source->baseLine+lineno-2);
}
-void KJSDebugWin::setNextSourceInfo(QString url, int baseLine)
+void KJSDebugWin::setNextSourceInfo(TQString url, int baseLine)
{
m_nextSourceUrl = url;
m_nextSourceBaseLine = baseLine;
}
-void KJSDebugWin::sourceChanged(Interpreter *interpreter, QString url)
+void KJSDebugWin::sourceChanged(Interpreter *interpreter, TQString url)
{
SourceFile *sourceFile = getSourceFile(interpreter,url);
if (sourceFile && m_curSourceFile == sourceFile)
@@ -952,31 +952,31 @@ void KJSDebugWin::sourceChanged(Interpreter *interpreter, QString url)
void KJSDebugWin::clearInterpreter(Interpreter *interpreter)
{
- QMap<int,SourceFragment*>::Iterator it;
+ TQMap<int,SourceFragment*>::Iterator it;
for (it = m_sourceFragments.begin(); it != m_sourceFragments.end(); ++it)
if (it.data() && it.data()->sourceFile->interpreter == interpreter)
it.data()->sourceFile->interpreter = 0;
}
-SourceFile *KJSDebugWin::getSourceFile(Interpreter *interpreter, QString url)
+SourceFile *KJSDebugWin::getSourceFile(Interpreter *interpreter, TQString url)
{
- QString key = QString("%1|%2").arg((long)interpreter).arg(url);
+ TQString key = TQString("%1|%2").arg((long)interpreter).arg(url);
return m_sourceFiles[key];
}
-void KJSDebugWin::setSourceFile(Interpreter *interpreter, QString url, SourceFile *sourceFile)
+void KJSDebugWin::setSourceFile(Interpreter *interpreter, TQString url, SourceFile *sourceFile)
{
- QString key = QString("%1|%2").arg((long)interpreter).arg(url);
+ TQString key = TQString("%1|%2").arg((long)interpreter).arg(url);
sourceFile->ref();
if (SourceFile* oldFile = m_sourceFiles[key])
oldFile->deref();
m_sourceFiles[key] = sourceFile;
}
-void KJSDebugWin::removeSourceFile(Interpreter *interpreter, QString url)
+void KJSDebugWin::removeSourceFile(Interpreter *interpreter, TQString url)
{
- QString key = QString("%1|%2").arg((long)interpreter).arg(url);
+ TQString key = TQString("%1|%2").arg((long)interpreter).arg(url);
if (SourceFile* oldFile = m_sourceFiles[key])
oldFile->deref();
m_sourceFiles.remove(key);
@@ -1048,7 +1048,7 @@ void KJSDebugWin::leaveSession()
void KJSDebugWin::updateContextList()
{
- disconnect(m_contextList,SIGNAL(highlighted(int)),this,SLOT(slotShowFrame(int)));
+ disconnect(m_contextList,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(slotShowFrame(int)));
m_contextList->clear();
for (int i = 0; i < m_execsCount; i++)
@@ -1060,28 +1060,28 @@ void KJSDebugWin::updateContextList()
setSourceLine(ctx.sourceId(),ctx.curStmtFirstLine());
}
- connect(m_contextList,SIGNAL(highlighted(int)),this,SLOT(slotShowFrame(int)));
+ connect(m_contextList,TQT_SIGNAL(highlighted(int)),this,TQT_SLOT(slotShowFrame(int)));
}
-QString KJSDebugWin::contextStr(const Context &ctx)
+TQString KJSDebugWin::contextStr(const Context &ctx)
{
- QString str = "";
+ TQString str = "";
SourceFragment *sourceFragment = m_sourceFragments[ctx.sourceId()];
- QString url = sourceFragment->sourceFile->url;
+ TQString url = sourceFragment->sourceFile->url;
int fileLineno = sourceFragment->baseLine+ctx.curStmtFirstLine()-1;
switch (ctx.codeType()) {
case GlobalCode:
- str = QString("Global code at %1:%2").arg(url).arg(fileLineno);
+ str = TQString("Global code at %1:%2").arg(url).arg(fileLineno);
break;
case EvalCode:
- str = QString("Eval code at %1:%2").arg(url).arg(fileLineno);
+ str = TQString("Eval code at %1:%2").arg(url).arg(fileLineno);
break;
case FunctionCode:
if (!ctx.functionName().isNull())
- str = QString("%1() at %2:%3").arg(ctx.functionName().qstring()).arg(url).arg(fileLineno);
+ str = TQString("%1() at %2:%3").arg(ctx.functionName().qstring()).arg(url).arg(fileLineno);
else
- str = QString("Anonymous function at %1:%2").arg(url).arg(fileLineno);
+ str = TQString("Anonymous function at %1:%2").arg(url).arg(fileLineno);
break;
}
diff --git a/khtml/ecma/kjs_debugwin.h b/khtml/ecma/kjs_debugwin.h
index 5a2ce2f1f..d48f8b040 100644
--- a/khtml/ecma/kjs_debugwin.h
+++ b/khtml/ecma/kjs_debugwin.h
@@ -21,21 +21,21 @@
#ifndef _KJS_DEBUGGER_H_
#define _KJS_DEBUGGER_H_
-#include <qglobal.h>
+#include <tqglobal.h>
#define KJS_DEBUGGER
#ifdef KJS_DEBUGGER
-#include <qwidget.h>
-#include <qmultilineedit.h>
-#include <qpixmap.h>
-#include <qptrlist.h>
-#include <qptrstack.h>
-#include <qcheckbox.h>
+#include <tqwidget.h>
+#include <tqmultilineedit.h>
+#include <tqpixmap.h>
+#include <tqptrlist.h>
+#include <tqptrstack.h>
+#include <tqcheckbox.h>
#include <kdialogbase.h>
#include <kmainwindow.h>
-#include <qscrollview.h>
+#include <tqscrollview.h>
#include <kjs/debugger.h>
@@ -55,11 +55,11 @@ namespace KJS {
class SourceFile : public DOM::DomShared
{
public:
- SourceFile(QString u, QString c, Interpreter *interp)
+ SourceFile(TQString u, TQString c, Interpreter *interp)
: url(u), code(c), interpreter(interp) {}
- QString getCode();
- QString url;
- QString code;
+ TQString getCode();
+ TQString url;
+ TQString code;
Interpreter *interpreter;
};
@@ -96,7 +96,7 @@ namespace KJS {
class KJSErrorDialog : public KDialogBase {
Q_OBJECT
public:
- KJSErrorDialog(QWidget *parent, const QString& errorMessage, bool showDebug);
+ KJSErrorDialog(TQWidget *parent, const TQString& errorMessage, bool showDebug);
virtual ~KJSErrorDialog();
bool debugSelected() const { return m_debugSelected; }
@@ -106,25 +106,25 @@ namespace KJS {
virtual void slotUser1();
private:
- QCheckBox *m_dontShowAgainCb;
+ TQCheckBox *m_dontShowAgainCb;
bool m_debugSelected;
};
- class EvalMultiLineEdit : public QMultiLineEdit {
+ class EvalMultiLineEdit : public TQMultiLineEdit {
Q_OBJECT
public:
- EvalMultiLineEdit(QWidget *parent);
- const QString & code() const { return m_code; }
+ EvalMultiLineEdit(TQWidget *parent);
+ const TQString & code() const { return m_code; }
protected:
- void keyPressEvent(QKeyEvent * e);
+ void keyPressEvent(TQKeyEvent * e);
private:
- QString m_code;
+ TQString m_code;
};
- class SourceDisplay : public QScrollView {
+ class SourceDisplay : public TQScrollView {
Q_OBJECT
public:
- SourceDisplay(KJSDebugWin *debugWin, QWidget *parent, const char *name = 0);
+ SourceDisplay(KJSDebugWin *debugWin, TQWidget *parent, const char *name = 0);
~SourceDisplay();
void setSource(SourceFile *sourceFile);
@@ -134,18 +134,18 @@ namespace KJS {
void lineDoubleClicked(int lineno);
protected:
- virtual void contentsMousePressEvent(QMouseEvent *e);
- virtual void showEvent(QShowEvent *);
- virtual void drawContents(QPainter *p, int clipx, int clipy, int clipw, int cliph);
+ virtual void contentsMousePressEvent(TQMouseEvent *e);
+ virtual void showEvent(TQShowEvent *);
+ virtual void drawContents(TQPainter *p, int clipx, int clipy, int clipw, int cliph);
- QString m_source;
+ TQString m_source;
int m_currentLine;
SourceFile *m_sourceFile;
- QStringList m_lines;
+ TQStringList m_lines;
KJSDebugWin *m_debugWin;
- QFont m_font;
- QPixmap m_breakpointIcon;
+ TQFont m_font;
+ TQPixmap m_breakpointIcon;
};
/**
@@ -162,7 +162,7 @@ namespace KJS {
Q_OBJECT
friend class SourceDisplay;
public:
- KJSDebugWin(QWidget *parent=0, const char *name=0);
+ KJSDebugWin(TQWidget *parent=0, const char *name=0);
virtual ~KJSDebugWin();
static KJSDebugWin *createInstance();
@@ -178,8 +178,8 @@ namespace KJS {
};
void setSourceLine(int sourceId, int lineno);
- void setNextSourceInfo(QString url, int baseLine);
- void sourceChanged(Interpreter *interpreter, QString url);
+ void setNextSourceInfo(TQString url, int baseLine);
+ void sourceChanged(Interpreter *interpreter, TQString url);
bool inSession() const { return !m_execStates.isEmpty(); }
void setMode(Mode m) { m_mode = m; }
void clearInterpreter(Interpreter *interpreter);
@@ -207,16 +207,16 @@ namespace KJS {
protected:
- void closeEvent(QCloseEvent *e);
- bool eventFilter(QObject *obj, QEvent *evt);
+ void closeEvent(TQCloseEvent *e);
+ bool eventFilter(TQObject *obj, TQEvent *evt);
void disableOtherWindows();
void enableOtherWindows();
private:
- SourceFile *getSourceFile(Interpreter *interpreter, QString url);
- void setSourceFile(Interpreter *interpreter, QString url, SourceFile *sourceFile);
- void removeSourceFile(Interpreter *interpreter, QString url);
+ SourceFile *getSourceFile(Interpreter *interpreter, TQString url);
+ void setSourceFile(Interpreter *interpreter, TQString url, SourceFile *sourceFile);
+ void removeSourceFile(Interpreter *interpreter, TQString url);
void checkBreak(ExecState *exec);
void enterSession(ExecState *exec);
@@ -224,7 +224,7 @@ namespace KJS {
void displaySourceFile(SourceFile *sourceFile, bool forceRefresh);
void updateContextList();
- QString contextStr(const Context &ctx);
+ TQString contextStr(const Context &ctx);
struct Breakpoint {
int sourceId;
@@ -247,23 +247,23 @@ namespace KJS {
SourceFile *m_curSourceFile;
Mode m_mode;
- QString m_nextSourceUrl;
+ TQString m_nextSourceUrl;
int m_nextSourceBaseLine;
- QPtrStack<ExecState> m_execStates;
+ TQPtrStack<ExecState> m_execStates;
ExecState **m_execs;
int m_execsCount;
int m_execsAlloc;
int m_steppingDepth;
- QMap<QString,SourceFile*> m_sourceFiles; /* maps url->SourceFile */
- QMap<int,SourceFragment*> m_sourceFragments; /* maps SourceId->SourceFragment */
- QPtrList<SourceFile> m_sourceSelFiles; /* maps combobox index->SourceFile */
+ TQMap<TQString,SourceFile*> m_sourceFiles; /* maps url->SourceFile */
+ TQMap<int,SourceFragment*> m_sourceFragments; /* maps SourceId->SourceFragment */
+ TQPtrList<SourceFile> m_sourceSelFiles; /* maps combobox index->SourceFile */
KActionCollection *m_actionCollection;
- QPixmap m_stopIcon;
- QPixmap m_emptyIcon;
+ TQPixmap m_stopIcon;
+ TQPixmap m_emptyIcon;
SourceDisplay *m_sourceDisplay;
- QListBox *m_contextList;
+ TQListBox *m_contextList;
KAction *m_stepAction;
KAction *m_nextAction;
@@ -271,7 +271,7 @@ namespace KJS {
KAction *m_stopAction;
KAction *m_breakAction;
- QComboBox *m_sourceSel;
+ TQComboBox *m_sourceSel;
EvalMultiLineEdit *m_evalEdit;
int m_evalDepth;
diff --git a/khtml/ecma/kjs_dom.cpp b/khtml/ecma/kjs_dom.cpp
index 74a90a9d2..c96e99939 100644
--- a/khtml/ecma/kjs_dom.cpp
+++ b/khtml/ecma/kjs_dom.cpp
@@ -485,7 +485,7 @@ void DOMNode::putValueProperty(ExecState *exec, int token, const Value& value, i
if (rend->style()->hidesOverflow())
rend->layer()->scrollToXOffset(value.toInt32(exec));
else if (rend->isRoot()) {
- QScrollView* sview = node.ownerDocument().view();
+ TQScrollView* sview = node.ownerDocument().view();
if (sview)
sview->setContentsPos(value.toInt32(exec), sview->contentsY());
}
@@ -496,7 +496,7 @@ void DOMNode::putValueProperty(ExecState *exec, int token, const Value& value, i
if (rend->style()->hidesOverflow())
rend->layer()->scrollToYOffset(value.toInt32(exec));
else if (rend->isRoot()) {
- QScrollView* sview = node.ownerDocument().view();
+ TQScrollView* sview = node.ownerDocument().view();
if (sview)
sview->setContentsPos(sview->contentsX(), value.toInt32(exec));
}
@@ -1091,7 +1091,7 @@ Value DOMDocumentProtoFunc::tryCall(ExecState *exec, Object &thisObj, const List
KHTMLPart *khtmlpart = ::qt_cast<KHTMLPart *>(active->part());
if (khtmlpart) {
// Security: only allow documents to be loaded from the same host
- QString dstUrl = khtmlpart->htmlDocument().completeURL(s).string();
+ TQString dstUrl = khtmlpart->htmlDocument().completeURL(s).string();
KParts::ReadOnlyPart *part = static_cast<KJS::ScriptInterpreter*>(exec->interpreter())->part();
if (part->url().host() == KURL(dstUrl).host()) {
kdDebug(6070) << "JavaScript: access granted for document.load() of " << dstUrl << endl;
@@ -1702,7 +1702,7 @@ const ClassInfo KJS::DOMNamedNodesCollection::info = { "DOMNamedNodesCollection"
// Such a collection is usually very short-lived, it only exists
// for constructs like document.forms.<name>[1],
// so it shouldn't be a problem that it's storing all the nodes (with the same name). (David)
-DOMNamedNodesCollection::DOMNamedNodesCollection(ExecState *exec, const QValueList<DOM::Node>& nodes )
+DOMNamedNodesCollection::DOMNamedNodesCollection(ExecState *exec, const TQValueList<DOM::Node>& nodes )
: DOMObject(exec->interpreter()->builtinObjectPrototype()),
m_nodes(nodes)
{
diff --git a/khtml/ecma/kjs_dom.h b/khtml/ecma/kjs_dom.h
index e6b593fdb..b17488592 100644
--- a/khtml/ecma/kjs_dom.h
+++ b/khtml/ecma/kjs_dom.h
@@ -257,14 +257,14 @@ namespace KJS {
// when multiple nodes have the same name.
class DOMNamedNodesCollection : public DOMObject {
public:
- DOMNamedNodesCollection(ExecState *exec, const QValueList<DOM::Node>& nodes );
+ DOMNamedNodesCollection(ExecState *exec, const TQValueList<DOM::Node>& nodes );
virtual Value tryGet(ExecState *exec, const Identifier &propertyName) const;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
- const QValueList<DOM::Node>& nodes() const { return m_nodes; }
+ const TQValueList<DOM::Node>& nodes() const { return m_nodes; }
enum { Length };
private:
- QValueList<DOM::Node> m_nodes;
+ TQValueList<DOM::Node> m_nodes;
};
class DOMCharacterData : public DOMNode {
diff --git a/khtml/ecma/kjs_events.cpp b/khtml/ecma/kjs_events.cpp
index 8ebda7193..1144e723b 100644
--- a/khtml/ecma/kjs_events.cpp
+++ b/khtml/ecma/kjs_events.cpp
@@ -102,8 +102,8 @@ void JSEventListener::handleEvent(DOM::Event &evt)
exec->clearException();
else if (html)
{
- QVariant ret = ValueToVariant(exec, retval);
- if (ret.type() == QVariant::Bool && ret.toBool() == false)
+ TQVariant ret = ValueToVariant(exec, retval);
+ if (ret.type() == TQVariant::Bool && ret.toBool() == false)
evt.preventDefault();
}
window->afterScriptExecution();
@@ -124,7 +124,7 @@ Object JSEventListener::listenerObj() const
return listener;
}
-JSLazyEventListener::JSLazyEventListener(const QString &_code, const QString &_name, const Object &_win, DOM::NodeImpl* _originalNode)
+JSLazyEventListener::JSLazyEventListener(const TQString &_code, const TQString &_name, const Object &_win, DOM::NodeImpl* _originalNode)
: JSEventListener(Object(), 0, _win, true),
code(_code), name(_name),
parsed(false)
@@ -211,7 +211,7 @@ void JSLazyEventListener::parseCode() const
}
// no more need to keep the unparsed code around
- code = QString();
+ code = TQString();
if (listener.isValid()) {
static_cast<Window*>(win.imp())->jsEventListeners.insert(listener.imp(),
diff --git a/khtml/ecma/kjs_events.h b/khtml/ecma/kjs_events.h
index 9fedfe594..e48276031 100644
--- a/khtml/ecma/kjs_events.h
+++ b/khtml/ecma/kjs_events.h
@@ -72,15 +72,15 @@ namespace KJS {
class JSLazyEventListener : public JSEventListener {
public:
- JSLazyEventListener(const QString &_code, const QString &_name, const Object &_win, DOM::NodeImpl* node);
+ JSLazyEventListener(const TQString &_code, const TQString &_name, const Object &_win, DOM::NodeImpl* node);
~JSLazyEventListener();
virtual void handleEvent(DOM::Event &evt);
Object listenerObj() const;
private:
void parseCode() const;
- mutable QString code;
- mutable QString name;
+ mutable TQString code;
+ mutable TQString name;
mutable bool parsed;
DOM::NodeImpl *originalNode;
};
diff --git a/khtml/ecma/kjs_html.cpp b/khtml/ecma/kjs_html.cpp
index 94f89079f..57762ffd3 100644
--- a/khtml/ecma/kjs_html.cpp
+++ b/khtml/ecma/kjs_html.cpp
@@ -1167,7 +1167,7 @@ Value KJS::HTMLElement::tryGet(ExecState *exec, const Identifier &propertyName)
case ID_OBJECT:
case ID_EMBED: {
KParts::LiveConnectExtension *lc = getLiveConnectExtension(element);
- QString rvalue;
+ TQString rvalue;
KParts::LiveConnectExtension::Type rtype;
unsigned long robjid;
if (lc && lc->get(0, propertyName.qstring(), rtype, robjid, rvalue))
@@ -1586,13 +1586,13 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
if (url.port()==0)
return String(url.host());
else
- return String(url.host() + ":" + QString::number(url.port()));
+ return String(url.host() + ":" + TQString::number(url.port()));
}
case AnchorPathName: return String(KURL(anchor.href().string()).path());
- case AnchorPort: return String(QString::number(KURL(anchor.href().string()).port()));
+ case AnchorPort: return String(TQString::number(KURL(anchor.href().string()).port()));
case AnchorProtocol: return String(KURL(anchor.href().string()).protocol()+":");
case AnchorSearch: { KURL u(anchor.href().string());
- QString q = u.query();
+ TQString q = u.query();
if (q.length() == 1)
return String();
return String(q); }
@@ -1713,7 +1713,7 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
if ( !href.isNull() ) {
url = doc.completeURL( href ).string();
if ( href.isEmpty() )
- url.setFileName( QString::null ); // href="" clears the filename (in IE)
+ url.setFileName( TQString::null ); // href="" clears the filename (in IE)
}
switch(token) {
case AreaHref:
@@ -1724,12 +1724,12 @@ Value KJS::HTMLElement::getValueProperty(ExecState *exec, int token) const
if (url.port()==0)
return String(url.host());
else
- return String(url.host() + ":" + QString::number(url.port()));
+ return String(url.host() + ":" + TQString::number(url.port()));
}
case AreaPathName: {
return String(url.path());
}
- case AreaPort: return String(QString::number(url.port()));
+ case AreaPort: return String(TQString::number(url.port()));
case AreaProtocol: return String(url.isEmpty() ? "" : url.protocol()+":");
case AreaSearch: return String(url.query());
}
@@ -2002,13 +2002,13 @@ UString KJS::HTMLElement::toString(ExecState *exec) const
return UString(static_cast<const DOM::HTMLAnchorElement&>(node).href());
else if (node.elementId() == ID_APPLET) {
KParts::LiveConnectExtension *lc = getLiveConnectExtension(node);
- QStringList qargs;
- QString retvalue;
+ TQStringList qargs;
+ TQString retvalue;
KParts::LiveConnectExtension::Type rettype;
unsigned long retobjid;
if (lc && lc->call(0, "hashCode", qargs, rettype, retobjid, retvalue)) {
- QString str("[object APPLET ref=");
- return UString(str + retvalue + QString("]"));
+ TQString str("[object APPLET ref=");
+ return UString(str + retvalue + TQString("]"));
}
} else if (node.elementId() == ID_IMG) {
DOM::HTMLImageElement image(node);
@@ -2134,12 +2134,12 @@ Value KJS::HTMLElementFunction::tryCall(ExecState *exec, Object &thisObj, const
block = true;
// if this is a form without a target, or a special target, don't block
- QString trg = form.target().lower().string();
+ TQString trg = form.target().lower().string();
if( trg.isEmpty() || trg == "_top" || trg == "_self" ||
trg == "_parent")
block = false;
- QString caption;
+ TQString caption;
// if there is a frame with the target name, don't block
if ( view && view->part() ) {
@@ -2831,7 +2831,7 @@ void KJS::HTMLElement::putValueProperty(ExecState *exec, int token, const Value&
case AnchorHref: { anchor.setHref(str); return; }
case AnchorHrefLang: { anchor.setHreflang(str); return; }
case AnchorSearch: { KURL href(anchor.href().string());
- QString q = str.isEmpty() ? QString() : str.string();
+ TQString q = str.isEmpty() ? TQString() : str.string();
href.setQuery(q);
anchor.setHref(href.url()); return; }
case AnchorName: { anchor.setName(str); return; }
@@ -3607,7 +3607,7 @@ Value KJS::HTMLCollection::getNamedItems(ExecState *exec, const Identifier &prop
DOM::DOMString pstr = propertyName.string();
- QValueList<DOM::NodeImpl*> matches = collection.handle()->namedItems(pstr);
+ TQValueList<DOM::NodeImpl*> matches = collection.handle()->namedItems(pstr);
if (!matches.isEmpty()) {
if (matches.size() == 1) {
@@ -3619,8 +3619,8 @@ Value KJS::HTMLCollection::getNamedItems(ExecState *exec, const Identifier &prop
}
else {
// multiple items, return a collection
- QValueList<DOM::Node> nodes;
- for (QValueList<DOM::NodeImpl*>::const_iterator i = matches.begin();
+ TQValueList<DOM::Node> nodes;
+ for (TQValueList<DOM::NodeImpl*>::const_iterator i = matches.begin();
i != matches.end(); ++i)
nodes.append(DOM::Node(*i));
#ifdef KJS_VERBOSE
@@ -3824,7 +3824,7 @@ Value KJS::HTMLSelectCollectionProtoFunc::tryCall(ExecState *exec, Object &thisO
} else {
//Find what to prepend before..
DOM::HTMLSelectElementImpl* impl = static_cast<HTMLSelectElementImpl*>(element.handle());
- QMemArray<HTMLGenericFormElementImpl*> items = impl->listItems();
+ TQMemArray<HTMLGenericFormElementImpl*> items = impl->listItems();
int dummy;
impl->insertBefore(option.handle(), items.at(pos), dummy);
}
diff --git a/khtml/ecma/kjs_mozilla.cpp b/khtml/ecma/kjs_mozilla.cpp
index 4b1520b9a..1a5555c42 100644
--- a/khtml/ecma/kjs_mozilla.cpp
+++ b/khtml/ecma/kjs_mozilla.cpp
@@ -73,9 +73,9 @@ Value MozillaSidebarExtensionFunc::tryCall(ExecState *exec, Object &thisObj, con
// addPanel() id == 0
KParts::BrowserExtension *ext = part->browserExtension();
if (ext) {
- QString url, name;
+ TQString url, name;
if (args.size() == 1) { // I've seen this, don't know if it's legal.
- name = QString::null;
+ name = TQString::null;
url = args[0].toString(exec).qstring();
} else if (args.size() == 2 || args.size() == 3) {
name = args[0].toString(exec).qstring();
diff --git a/khtml/ecma/kjs_navigator.cpp b/khtml/ecma/kjs_navigator.cpp
index d962cac36..a5c793357 100644
--- a/khtml/ecma/kjs_navigator.cpp
+++ b/khtml/ecma/kjs_navigator.cpp
@@ -53,21 +53,21 @@ namespace KJS {
struct PluginInfo;
struct MimeClassInfo {
- QString type;
- QString desc;
- QString suffixes;
+ TQString type;
+ TQString desc;
+ TQString suffixes;
PluginInfo *plugin;
};
struct PluginInfo {
- QString name;
- QString file;
- QString desc;
- QPtrList<MimeClassInfo> mimes;
+ TQString name;
+ TQString file;
+ TQString desc;
+ TQPtrList<MimeClassInfo> mimes;
};
- static QPtrList<PluginInfo> *plugins;
- static QPtrList<MimeClassInfo> *mimes;
+ static TQPtrList<PluginInfo> *plugins;
+ static TQPtrList<MimeClassInfo> *mimes;
private:
static int m_refCount;
@@ -83,7 +83,7 @@ namespace KJS {
Value getValueProperty(ExecState *exec, int token) const;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
- Value pluginByName( ExecState* exec, const QString& name ) const;
+ Value pluginByName( ExecState* exec, const TQString& name ) const;
bool pluginsEnabled() const { return m_pluginsEnabled; };
private:
bool m_pluginsEnabled;
@@ -99,7 +99,7 @@ namespace KJS {
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
Value getValueProperty(ExecState *exec, int token) const;
- Value mimeTypeByName( ExecState* exec, const QString& name ) const;
+ Value mimeTypeByName( ExecState* exec, const TQString& name ) const;
bool pluginsEnabled() const { return m_pluginsEnabled; };
private:
bool m_pluginsEnabled;
@@ -114,7 +114,7 @@ namespace KJS {
virtual Value get(ExecState *exec, const Identifier &propertyName) const;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
- Value mimeByName(ExecState* exec, const QString& name ) const;
+ Value mimeByName(ExecState* exec, const TQString& name ) const;
Value getValueProperty(ExecState *exec, int token) const;
PluginBase::PluginInfo *pluginInfo() const { return m_info; }
private:
@@ -138,8 +138,8 @@ namespace KJS {
}
-QPtrList<PluginBase::PluginInfo> *KJS::PluginBase::plugins = 0;
-QPtrList<PluginBase::MimeClassInfo> *KJS::PluginBase::mimes = 0;
+TQPtrList<PluginBase::PluginInfo> *KJS::PluginBase::plugins = 0;
+TQPtrList<PluginBase::MimeClassInfo> *KJS::PluginBase::mimes = 0;
int KJS::PluginBase::m_refCount = 0;
const ClassInfo Navigator::info = { "Navigator", 0, &NavigatorTable, 0 };
@@ -179,7 +179,7 @@ Value Navigator::get(ExecState *exec, const Identifier &propertyName) const
Value Navigator::getValueProperty(ExecState *exec, int token) const
{
KURL url = m_part->url();
- QString userAgent = url.host();
+ TQString userAgent = url.host();
if (userAgent.isEmpty())
userAgent = "localhost";
userAgent = KProtocolManager::userAgentForHost(userAgent);
@@ -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(QString::fromLatin1("Mozilla")) >= 0 &&
- userAgent.find(QString::fromLatin1("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(QString::fromLatin1("Microsoft")) >= 0 ||
- userAgent.find(QString::fromLatin1("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(QString::fromLatin1("Mozilla")) >= 0 &&
- userAgent.find(QString::fromLatin1("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(QString::fromLatin1("Microsoft")) >= 0 ||
- userAgent.find(QString::fromLatin1("MSIE")) >= 0)
+ if (userAgent.find(TQString::fromLatin1("Microsoft")) >= 0 ||
+ userAgent.find(TQString::fromLatin1("MSIE")) >= 0)
{
return Undefined();
}
@@ -223,8 +223,8 @@ Value Navigator::getValueProperty(ExecState *exec, int token) const
case ProductSub:
{
int ix = userAgent.find("Gecko");
- if (ix >= 0 && userAgent.length() >= (uint)ix+14 && userAgent.unicode()[ix+5] == QChar('/') &&
- userAgent.find(QRegExp("\\d{8}"), ix+6) == ix+6)
+ 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.find(QString::fromLatin1("Win"),0,false)>=0) )
- return String(QString::fromLatin1("Win32"));
- else if ( (userAgent.find(QString::fromLatin1("Macintosh"),0,false)>=0) ||
- (userAgent.find(QString::fromLatin1("Mac_PowerPC"),0,false)>=0) )
- return String(QString::fromLatin1("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(QString::fromLatin1("%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(QString::fromLatin1("Unix X11"));
+ return String(TQString::fromLatin1("Unix X11"));
}
case CpuClass:
{
@@ -286,8 +286,8 @@ PluginBase::PluginBase(ExecState *exec, bool loadPluginInfo)
: ObjectImp(exec->interpreter()->builtinObjectPrototype() )
{
if ( loadPluginInfo && !plugins ) {
- plugins = new QPtrList<PluginInfo>;
- mimes = new QPtrList<MimeClassInfo>;
+ plugins = new TQPtrList<PluginInfo>;
+ mimes = new TQPtrList<MimeClassInfo>;
plugins->setAutoDelete( true );
mimes->setAutoDelete( true );
@@ -296,11 +296,11 @@ PluginBase::PluginBase(ExecState *exec, bool loadPluginInfo)
KTrader::OfferList::iterator it;
for ( it = offers.begin(); it != offers.end(); ++it ) {
- QVariant pluginsinfo = (**it).property( "X-KDE-BrowserView-PluginsInfo" );
+ TQVariant pluginsinfo = (**it).property( "X-KDE-BrowserView-PluginsInfo" );
if ( !pluginsinfo.isValid() ) {
// <backwards compatible>
- if ((**it).library() == QString("libnsplugin"))
- pluginsinfo = QVariant("nsplugins/pluginsinfo");
+ if ((**it).library() == TQString("libnsplugin"))
+ pluginsinfo = TQVariant("nsplugins/pluginsinfo");
else
// </backwards compatible>
continue;
@@ -309,7 +309,7 @@ PluginBase::PluginBase(ExecState *exec, bool loadPluginInfo)
KConfig kc( locate ("data", pluginsinfo.toString()) );
unsigned num = (unsigned int) kc.readNumEntry("number");
for ( unsigned n = 0; n < num; n++ ) {
- kc.setGroup( QString::number(n) );
+ kc.setGroup( TQString::number(n) );
PluginInfo *plugin = new PluginInfo;
plugin->name = kc.readEntry("name");
@@ -319,17 +319,17 @@ PluginBase::PluginBase(ExecState *exec, bool loadPluginInfo)
plugins->append( plugin );
// get mime types from string
- QStringList types = QStringList::split( ';', kc.readEntry("mime") );
- QStringList::Iterator type;
+ TQStringList types = TQStringList::split( ';', kc.readEntry("mime") );
+ TQStringList::Iterator type;
for ( type=types.begin(); type!=types.end(); ++type ) {
// get mime information
- QStringList tokens = QStringList::split(':', *type, true);
+ TQStringList tokens = TQStringList::split(':', *type, true);
if ( tokens.count() < 3 ) // we need 3 items
continue;
MimeClassInfo *mime = new MimeClassInfo;
- QStringList::Iterator token = tokens.begin();
+ TQStringList::Iterator token = tokens.begin();
mime->type = (*token).lower();
//kdDebug(6070) << "mime->type=" << mime->type << endl;
++token;
@@ -405,7 +405,7 @@ Value Plugins::get(ExecState *exec, const Identifier &propertyName) const
return lookupGet<PluginsFunc,Plugins,ObjectImp>(exec,propertyName,&PluginsTable,this);
}
-Value Plugins::pluginByName( ExecState* exec, const QString& name ) const
+Value Plugins::pluginByName( ExecState* exec, const TQString& name ) const
{
Q_ASSERT(plugins);
for ( PluginInfo *pl = plugins->first(); pl!=0; pl = plugins->next() ) {
@@ -490,7 +490,7 @@ Value MimeTypes::get(ExecState *exec, const Identifier &propertyName) const
return lookupGet<MimeTypesFunc,MimeTypes,ObjectImp>(exec,propertyName,&MimeTypesTable,this);
}
-Value MimeTypes::mimeTypeByName( ExecState* exec, const QString& name ) const
+Value MimeTypes::mimeTypeByName( ExecState* exec, const TQString& name ) const
{
//kdDebug(6070) << "MimeTypes[" << name << "]" << endl;
Q_ASSERT(mimes);
@@ -574,7 +574,7 @@ Value Plugin::get(ExecState *exec, const Identifier &propertyName) const
return lookupGet<PluginFunc,Plugin,ObjectImp>(exec, propertyName, &PluginTable, this );
}
-Value Plugin::mimeByName(ExecState* exec, const QString& name) const
+Value Plugin::mimeByName(ExecState* exec, const TQString& name) const
{
for ( PluginBase::MimeClassInfo *m = m_info->mimes.first();
m != 0; m = m_info->mimes.next() ) {
diff --git a/khtml/ecma/kjs_proxy.cpp b/khtml/ecma/kjs_proxy.cpp
index 789f99f38..ca26c5a0b 100644
--- a/khtml/ecma/kjs_proxy.cpp
+++ b/khtml/ecma/kjs_proxy.cpp
@@ -60,10 +60,10 @@ class KJSProxyImpl : public KJSProxy {
public:
KJSProxyImpl(khtml::ChildFrame *frame);
virtual ~KJSProxyImpl();
- virtual QVariant evaluate(QString filename, int baseLine, const QString &, const DOM::Node &n,
+ virtual TQVariant evaluate(TQString filename, int baseLine, const TQString &, const DOM::Node &n,
Completion *completion = 0);
virtual void clear();
- virtual DOM::EventListener *createHTMLEventHandler(QString sourceUrl, QString name, QString code, DOM::NodeImpl *node);
+ virtual DOM::EventListener *createHTMLEventHandler(TQString sourceUrl, TQString name, TQString code, DOM::NodeImpl *node);
virtual void finishedWithEvent(const DOM::Event &event);
virtual KJS::Interpreter *interpreter();
@@ -128,8 +128,8 @@ KJSProxyImpl::~KJSProxyImpl()
#endif
}
-QVariant KJSProxyImpl::evaluate(QString filename, int baseLine,
- const QString&str, const DOM::Node &n, Completion *completion) {
+TQVariant KJSProxyImpl::evaluate(TQString filename, int baseLine,
+ const TQString&str, const DOM::Node &n, Completion *completion) {
// evaluate code. Returns the JS return value or an invalid QVariant
// if there was none, an error occurred or the type couldn't be converted.
@@ -170,7 +170,7 @@ QVariant KJSProxyImpl::evaluate(QString filename, int baseLine,
*completion = comp;
#ifdef KJS_DEBUGGER
- // KJSDebugWin::debugWindow()->setCode(QString::null);
+ // KJSDebugWin::debugWindow()->setCode(TQString::null);
#endif
window->afterScriptExecution();
@@ -185,7 +185,7 @@ QVariant KJSProxyImpl::evaluate(QString filename, int baseLine,
UString msg = comp.value().toString(m_script->globalExec());
kdDebug(6070) << "WARNING: Script threw exception: " << msg.qstring() << endl;
}
- return QVariant();
+ return TQVariant();
}
}
@@ -237,7 +237,7 @@ void KJSProxyImpl::clear() {
}
}
-DOM::EventListener *KJSProxyImpl::createHTMLEventHandler(QString sourceUrl, QString name, QString code, DOM::NodeImpl *node)
+DOM::EventListener *KJSProxyImpl::createHTMLEventHandler(TQString sourceUrl, TQString name, TQString code, DOM::NodeImpl *node)
{
initScript();
@@ -341,10 +341,10 @@ void KJSProxyImpl::initScript()
void KJSProxyImpl::applyUserAgent()
{
assert( m_script );
- QString host = m_frame->m_part->url().isLocalFile() ? "localhost" : m_frame->m_part->url().host();
- QString userAgent = KProtocolManager::userAgentForHost(host);
- if (userAgent.find(QString::fromLatin1("Microsoft")) >= 0 ||
- userAgent.find(QString::fromLatin1("MSIE")) >= 0)
+ 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)
{
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(QString::fromLatin1("Mozilla")) >= 0 &&
- userAgent.find(QString::fromLatin1("compatible")) == -1 &&
- userAgent.find(QString::fromLatin1("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_proxy.h b/khtml/ecma/kjs_proxy.h
index f76543451..dde30b070 100644
--- a/khtml/ecma/kjs_proxy.h
+++ b/khtml/ecma/kjs_proxy.h
@@ -22,8 +22,8 @@
#ifndef _KJS_PROXY_H_
#define _KJS_PROXY_H_
-#include <qvariant.h>
-#include <qstring.h>
+#include <tqvariant.h>
+#include <tqstring.h>
#include <sys/time.h>
class KHTMLPart;
@@ -55,10 +55,10 @@ class KJSProxy {
public:
KJSProxy() { m_handlerLineno = 0; }
virtual ~KJSProxy() { }
- virtual QVariant evaluate(QString filename, int baseLine, const QString &, const DOM::Node &n,
+ virtual TQVariant evaluate(TQString filename, int baseLine, const TQString &, const DOM::Node &n,
KJS::Completion *completion = 0) = 0;
virtual void clear() = 0;
- virtual DOM::EventListener *createHTMLEventHandler(QString sourceUrl, QString name, QString code, DOM::NodeImpl* node) = 0;
+ virtual DOM::EventListener *createHTMLEventHandler(TQString sourceUrl, TQString name, TQString code, DOM::NodeImpl* node) = 0;
virtual void finishedWithEvent(const DOM::Event &event) = 0;
virtual KJS::Interpreter *interpreter() = 0;
diff --git a/khtml/ecma/kjs_window.cpp b/khtml/ecma/kjs_window.cpp
index bc5a85e19..90123aec6 100644
--- a/khtml/ecma/kjs_window.cpp
+++ b/khtml/ecma/kjs_window.cpp
@@ -31,10 +31,10 @@
#include "html/html_documentimpl.h"
#include "rendering/render_frames.h"
-#include <qstylesheet.h>
-#include <qtimer.h>
-#include <qpaintdevicemetrics.h>
-#include <qapplication.h>
+#include <tqstylesheet.h>
+#include <tqtimer.h>
+#include <tqpaintdevicemetrics.h>
+#include <tqapplication.h>
#include <kdebug.h>
#include <kmessagebox.h>
#include <kinputdialog.h>
@@ -52,8 +52,8 @@
#endif
#include <kglobalsettings.h>
#include <assert.h>
-#include <qstyle.h>
-#include <qobjectlist.h>
+#include <tqstyle.h>
+#include <tqobjectlist.h>
#include <kstringhandler.h>
#include "kjs_proxy.h"
@@ -85,7 +85,7 @@ namespace KJS {
static const ClassInfo info;
enum { Back, Forward, Go, Length };
private:
- QGuardedPtr<KHTMLPart> part;
+ TQGuardedPtr<KHTMLPart> part;
};
class External : public ObjectImp {
@@ -98,7 +98,7 @@ namespace KJS {
static const ClassInfo info;
enum { AddFavorite };
private:
- QGuardedPtr<KHTMLPart> part;
+ TQGuardedPtr<KHTMLPart> part;
};
class FrameArray : public ObjectImp {
@@ -109,7 +109,7 @@ namespace KJS {
virtual Value call(ExecState *exec, Object &thisObj, const List &args);
virtual bool implementsCall() const { return true; }
private:
- QGuardedPtr<KHTMLPart> part;
+ TQGuardedPtr<KHTMLPart> part;
};
#ifdef Q_WS_QWS
@@ -121,7 +121,7 @@ namespace KJS {
private:
const Konqueror* konqueror;
- QCString m_name;
+ TQCString m_name;
};
#endif
} // namespace KJS
@@ -164,8 +164,8 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
KWinModule info(0, KWinModule::INFO_DESKTOP);
#endif
- QWidget *thisWidget = Window::retrieveActive(exec)->part()->widget();
- QRect sg = KGlobalSettings::desktopGeometry(thisWidget);
+ TQWidget *thisWidget = Window::retrieveActive(exec)->part()->widget();
+ TQRect sg = KGlobalSettings::desktopGeometry(thisWidget);
switch( token ) {
case Height:
@@ -174,12 +174,12 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
return Number(sg.width());
case ColorDepth:
case PixelDepth: {
- QPaintDeviceMetrics m(QApplication::desktop());
+ TQPaintDeviceMetrics m(TQApplication::desktop());
return Number(m.depth());
}
case AvailLeft: {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
- QRect clipped = info.workArea().intersect(sg);
+ TQRect clipped = info.workArea().intersect(sg);
return Number(clipped.x()-sg.x());
#else
return Number(10);
@@ -187,7 +187,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
}
case AvailTop: {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
- QRect clipped = info.workArea().intersect(sg);
+ TQRect clipped = info.workArea().intersect(sg);
return Number(clipped.y()-sg.y());
#else
return Number(10);
@@ -195,7 +195,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
}
case AvailHeight: {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
- QRect clipped = info.workArea().intersect(sg);
+ TQRect clipped = info.workArea().intersect(sg);
return Number(clipped.height());
#else
return Number(100);
@@ -203,7 +203,7 @@ Value Screen::getValueProperty(ExecState *exec, int token) const
}
case AvailWidth: {
#if defined Q_WS_X11 && ! defined K_WS_QTONLY
- QRect clipped = info.workArea().intersect(sg);
+ TQRect clipped = info.workArea().intersect(sg);
return Number(clipped.width());
#else
return Number(100);
@@ -520,14 +520,14 @@ bool Window::hasProperty(ExecState *exec, const Identifier &p) const
if (!part)
return false;
- QString q = p.qstring();
+ TQString q = p.qstring();
if (part->findFramePart(p.qstring()))
return true;
// allow window[1] or parent[1] etc. (#56983)
bool ok;
unsigned int i = p.toArrayIndex(&ok);
if (ok) {
- QPtrList<KParts::ReadOnlyPart> frames = part->frames();
+ TQPtrList<KParts::ReadOnlyPart> frames = part->frames();
unsigned int len = frames.count();
if (i < len)
return true;
@@ -639,7 +639,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
}
} else if (!part) {
// not a KHTMLPart
- QString rvalue;
+ TQString rvalue;
KParts::LiveConnectExtension::Type rtype;
unsigned long robjid;
if (m_frame->m_liveconnect &&
@@ -882,15 +882,15 @@ Value Window::get(ExecState *exec, const Identifier &p) const
case ScreenX: {
if (!part->view())
return Undefined();
- QRect sg = KGlobalSettings::desktopGeometry(part->view());
- return Number(part->view()->mapToGlobal(QPoint(0,0)).x() + sg.x());
+ TQRect sg = KGlobalSettings::desktopGeometry(part->view());
+ return Number(part->view()->mapToGlobal(TQPoint(0,0)).x() + sg.x());
}
case ScreenTop:
case ScreenY: {
if (!part->view())
return Undefined();
- QRect sg = KGlobalSettings::desktopGeometry(part->view());
- return Number(part->view()->mapToGlobal(QPoint(0,0)).y() + sg.y());
+ TQRect sg = KGlobalSettings::desktopGeometry(part->view());
+ return Number(part->view()->mapToGlobal(TQPoint(0,0)).y() + sg.y());
}
case ScrollX: {
if (!part->view())
@@ -1010,7 +1010,7 @@ Value Window::get(ExecState *exec, const Identifier &p) const
bool ok;
unsigned int i = p.toArrayIndex(&ok);
if (ok) {
- QPtrList<KParts::ReadOnlyPart> frames = part->frames();
+ TQPtrList<KParts::ReadOnlyPart> frames = part->frames();
unsigned int len = frames.count();
if (i < len) {
KParts::ReadOnlyPart* frame = frames.at(i);
@@ -1232,7 +1232,7 @@ void Window::scheduleClose()
{
kdDebug(6070) << "Window::scheduleClose window.close() " << m_frame << endl;
Q_ASSERT(winq);
- QTimer::singleShot( 0, winq, SLOT( timeoutClose() ) );
+ TQTimer::singleShot( 0, winq, TQT_SLOT( timeoutClose() ) );
}
void Window::closeNow()
@@ -1256,9 +1256,9 @@ void Window::closeNow()
void Window::afterScriptExecution()
{
DOM::DocumentImpl::updateDocumentsRendering();
- QValueList<DelayedAction> delayedActions = m_delayed;
+ TQValueList<DelayedAction> delayedActions = m_delayed;
m_delayed.clear();
- QValueList<DelayedAction>::Iterator it = delayedActions.begin();
+ TQValueList<DelayedAction>::Iterator it = delayedActions.begin();
for ( ; it != delayedActions.end() ; ++it )
{
switch ((*it).actionId) {
@@ -1393,7 +1393,7 @@ JSEventListener *Window::getJSEventListener(const Value& val, bool html)
return new JSEventListener(listenerObject, listenerObjectImp, Object(this), html);
}
-JSLazyEventListener *Window::getJSLazyEventListener(const QString& code, const QString& name, DOM::NodeImpl *node)
+JSLazyEventListener *Window::getJSLazyEventListener(const TQString& code, const TQString& name, DOM::NodeImpl *node)
{
return new JSLazyEventListener(code, name, Object(this), node);
}
@@ -1406,7 +1406,7 @@ void Window::clear( ExecState *exec )
deleteAllProperties( exec );
// Break the dependency between the listeners and their object
- QPtrDictIterator<JSEventListener> it(jsEventListeners);
+ TQPtrDictIterator<JSEventListener> it(jsEventListeners);
for (; it.current(); ++it)
it.current()->clear();
// Forget about the listeners (the DOM::NodeImpls will delete them)
@@ -1430,23 +1430,23 @@ void Window::setCurrentEvent( DOM::Event *evt )
//kdDebug(6070) << "Window " << this << " (part=" << m_part << ")::setCurrentEvent m_evt=" << evt << endl;
}
-void Window::goURL(ExecState* exec, const QString& url, bool lockHistory)
+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());
// Complete the URL using the "active part" (running interpreter)
if (active_part && part) {
- if (url[0] == QChar('#')) {
+ if (url[0] == TQChar('#')) {
part->gotoAnchor(url.mid(1));
} else {
- QString dstUrl = active_part->htmlDocument().completeURL(url).string();
+ TQString dstUrl = active_part->htmlDocument().completeURL(url).string();
kdDebug(6070) << "Window::goURL dstUrl=" << dstUrl << endl;
// check if we're allowed to inject javascript
// SYNC check with khtml_part.cpp::slotRedirect!
if ( isSafeScript(exec) ||
- dstUrl.find(QString::fromLatin1("javascript:"), 0, false) != 0 )
+ dstUrl.find(TQString::fromLatin1("javascript:"), 0, false) != 0 )
part->scheduleRedirection(-1,
dstUrl,
lockHistory);
@@ -1486,7 +1486,7 @@ void Window::goHistory( int steps )
//emit ext->goHistory(steps);
}
-void KJS::Window::resizeTo(QWidget* tl, int width, int height)
+void KJS::Window::resizeTo(TQWidget* tl, int width, int height)
{
KHTMLPart *part = ::qt_cast<KHTMLPart *>(m_frame->m_part);
if(!part)
@@ -1504,7 +1504,7 @@ void KJS::Window::resizeTo(QWidget* tl, int width, int height)
return;
}
- QRect sg = KGlobalSettings::desktopGeometry(tl);
+ TQRect sg = KGlobalSettings::desktopGeometry(tl);
if ( width > sg.width() || height > sg.height() ) {
kdDebug(6070) << "Window::resizeTo refused, window would be too big ("<<width<<","<<height<<")" << endl;
@@ -1536,7 +1536,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
return Undefined();
KHTMLView *widget = part->view();
Value v = args[0];
- QString str;
+ TQString str;
if (v.isValid() && !v.isA(UndefinedType))
str = v.toString(exec).qstring();
@@ -1556,7 +1556,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
part->settings()->windowOpenPolicy(part->url().host());
if ( policy == KHTMLSettings::KJSWindowOpenAsk ) {
emit part->browserExtension()->requestFocus(part);
- QString caption;
+ TQString caption;
if (!part->url().host().isEmpty())
caption = part->url().host() + " - ";
caption += i18n( "Confirmation: JavaScript Popup" );
@@ -1576,10 +1576,10 @@ Value Window::openWindow(ExecState *exec, const List& args)
policy = KHTMLSettings::KJSWindowOpenAllow;
}
- QString frameName = args.size() > 1 ? args[1].toString(exec).qstring() : QString("_blank");
+ TQString frameName = args.size() > 1 ? args[1].toString(exec).qstring() : TQString("_blank");
v = args[2];
- QString features;
+ TQString features;
if (!v.isNull() && v.type() != UndefinedType && v.toString(exec).size() > 0) {
features = v.toString(exec).qstring();
// Buggy scripts have ' at beginning and end, cut those
@@ -1600,7 +1600,7 @@ Value Window::openWindow(ExecState *exec, const List& args)
}
}
-Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const QString& frameName, const QString& features)
+Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const TQString& frameName, const TQString& features)
{
KHTMLPart *p = ::qt_cast<KHTMLPart *>(m_frame->m_part);
KHTMLView *widget = p->view();
@@ -1613,16 +1613,16 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const QString&
winargs.toolBarsVisible = false;
winargs.statusBarVisible = false;
winargs.scrollBarsVisible = false;
- QStringList flist = QStringList::split(',', features);
- QStringList::ConstIterator it = flist.begin();
+ TQStringList flist = TQStringList::split(',', features);
+ TQStringList::ConstIterator it = flist.begin();
while (it != flist.end()) {
- QString s = *it++;
- QString key, val;
+ TQString s = *it++;
+ TQString key, val;
int pos = s.find('=');
if (pos >= 0) {
key = s.left(pos).stripWhiteSpace().lower();
val = s.mid(pos + 1).stripWhiteSpace().lower();
- QRect screen = KGlobalSettings::desktopGeometry(widget->topLevelWidget());
+ 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 QString&
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( QStyle::PM_DefaultFrameWidth ) + 2;
+ winargs.height = (int)val.toFloat() + 2*qApp->style().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*qApp->style().pixelMetric( QStyle::PM_DefaultFrameWidth ) + 2;
+ winargs.width = (int)val.toFloat() + 2*qApp->style().pixelMetric( TQStyle::PM_DefaultFrameWidth ) + 2;
if (winargs.width > screen.width()) // should actually check workspace
winargs.width = screen.width();
if (winargs.width < 100)
@@ -1718,9 +1718,9 @@ Value Window::executeOpenWindow(ExecState *exec, const KURL& url, const QString&
khtmlpart->docImpl()->setBaseURL( p->docImpl()->baseURL() );
}
}
- uargs.serviceType = QString::null;
+ uargs.serviceType = TQString::null;
if (uargs.frameName.lower() == "_blank")
- uargs.frameName = QString::null;
+ uargs.frameName = TQString::null;
if (!url.isEmpty())
emit khtmlpart->browserExtension()->openURLRequest(url,uargs);
return Window::retrieve(khtmlpart); // global object
@@ -1739,9 +1739,9 @@ void Window::showSuppressedWindows()
KJS::Interpreter *interpreter = part->jScript()->interpreter();
ExecState *exec = interpreter->globalExec();
- QValueList<SuppressedWindowInfo> suppressedWindowInfo = m_suppressedWindowInfo;
+ TQValueList<SuppressedWindowInfo> suppressedWindowInfo = m_suppressedWindowInfo;
m_suppressedWindowInfo.clear();
- QValueList<SuppressedWindowInfo>::Iterator it = suppressedWindowInfo.begin();
+ TQValueList<SuppressedWindowInfo>::Iterator it = suppressedWindowInfo.begin();
for ( ; it != suppressedWindowInfo.end() ; ++it ) {
executeOpenWindow(exec, (*it).url, (*it).frameName, (*it).features);
}
@@ -1758,7 +1758,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
}
Window *window = static_cast<Window *>(thisObj.imp());
- QString str, str2;
+ TQString str, str2;
KHTMLPart *part = ::qt_cast<KHTMLPart *>(window->m_frame->m_part);
if (!part)
@@ -1772,7 +1772,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
str = s.qstring();
}
- QString caption;
+ TQString caption;
if (part && !part->url().host().isEmpty())
caption = part->url().host() + " - ";
caption += "JavaScript"; // TODO: i18n
@@ -1785,7 +1785,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
part->xmlDocImpl()->updateRendering();
if ( part )
emit part->browserExtension()->requestFocus(part);
- KMessageBox::error(widget, QStyleSheet::convertFromPlainText(str, QStyleSheetItem::WhiteSpaceNormal), caption);
+ KMessageBox::error(widget, TQStyleSheet::convertFromPlainText(str, TQStyleSheetItem::WhiteSpaceNormal), caption);
return Undefined();
case Window::Confirm:
if (!widget->dialogsAllowed())
@@ -1794,7 +1794,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
part->xmlDocImpl()->updateRendering();
if ( part )
emit part->browserExtension()->requestFocus(part);
- return Boolean((KMessageBox::warningYesNo(widget, QStyleSheet::convertFromPlainText(str), caption,
+ return Boolean((KMessageBox::warningYesNo(widget, TQStyleSheet::convertFromPlainText(str), caption,
KStdGuiItem::ok(), KStdGuiItem::cancel()) == KMessageBox::Yes));
case Window::Prompt:
#ifndef KONQ_EMBEDDED
@@ -1807,12 +1807,12 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
bool ok;
if (args.size() >= 2)
str2 = KInputDialog::getText(caption,
- QStyleSheet::convertFromPlainText(str),
+ TQStyleSheet::convertFromPlainText(str),
args[1].toString(exec).qstring(), &ok, widget);
else
str2 = KInputDialog::getText(caption,
- QStyleSheet::convertFromPlainText(str),
- QString::null, &ok, widget);
+ TQStyleSheet::convertFromPlainText(str),
+ TQString::null, &ok, widget);
if ( ok )
return String(str2);
else
@@ -1911,7 +1911,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
case Window::AToB: {
if (!s.is8Bit())
return Undefined();
- QByteArray in, out;
+ TQByteArray in, out;
char *binData = s.ascii();
in.setRawData( binData, s.size() );
if (id == Window::AToB)
@@ -1950,10 +1950,10 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
{
KParts::BrowserExtension *ext = part->browserExtension();
if (ext) {
- QWidget * tl = widget->topLevelWidget();
- QRect sg = KGlobalSettings::desktopGeometry(tl);
+ TQWidget * tl = widget->topLevelWidget();
+ TQRect sg = KGlobalSettings::desktopGeometry(tl);
- QPoint dest = tl->pos() + QPoint( args[0].toInt32(exec), args[1].toInt32(exec) );
+ TQPoint dest = tl->pos() + TQPoint( args[0].toInt32(exec), args[1].toInt32(exec) );
// Security check (the spec talks about UniversalBrowserWrite to disable this check...)
if ( dest.x() >= sg.x() && dest.y() >= sg.x() &&
dest.x()+tl->width() <= sg.width()+sg.x() &&
@@ -1970,10 +1970,10 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
{
KParts::BrowserExtension *ext = part->browserExtension();
if (ext) {
- QWidget * tl = widget->topLevelWidget();
- QRect sg = KGlobalSettings::desktopGeometry(tl);
+ TQWidget * tl = widget->topLevelWidget();
+ TQRect sg = KGlobalSettings::desktopGeometry(tl);
- QPoint dest( args[0].toInt32(exec)+sg.x(), args[1].toInt32(exec)+sg.y() );
+ TQPoint dest( args[0].toInt32(exec)+sg.x(), args[1].toInt32(exec)+sg.y() );
// Security check (the spec talks about UniversalBrowserWrite to disable this check...)
if ( dest.x() >= sg.x() && dest.y() >= sg.y() &&
dest.x()+tl->width() <= sg.width()+sg.x() &&
@@ -1989,8 +1989,8 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
if(policy == KHTMLSettings::KJSWindowResizeAllow
&& args.size() == 2 && widget)
{
- QWidget * tl = widget->topLevelWidget();
- QRect geom = tl->frameGeometry();
+ TQWidget * tl = widget->topLevelWidget();
+ TQRect geom = tl->frameGeometry();
window->resizeTo( tl,
geom.width() + args[0].toInt32(exec),
geom.height() + args[1].toInt32(exec) );
@@ -2003,7 +2003,7 @@ Value WindowFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
if(policy == KHTMLSettings::KJSWindowResizeAllow
&& args.size() == 2 && widget)
{
- QWidget * tl = widget->topLevelWidget();
+ TQWidget * tl = widget->topLevelWidget();
window->resizeTo( tl, args[0].toInt32(exec), args[1].toInt32(exec) );
}
return Undefined();
@@ -2096,8 +2096,8 @@ ScheduledAction::ScheduledAction(Object _func, List _args, DateTimeMS _nextTime,
timerId = _timerId;
}
-// KDE 4: Make it const QString &
-ScheduledAction::ScheduledAction(QString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId)
+// KDE 4: Make it const TQString &
+ScheduledAction::ScheduledAction(TQString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId)
{
//kdDebug(6070) << "ScheduledAction::ScheduledAction(!isFunction) " << this << endl;
//func = 0;
@@ -2170,8 +2170,8 @@ WindowQObject::WindowQObject(Window *w)
if ( !parent->m_frame )
kdDebug(6070) << "WARNING: null part in " << k_funcinfo << endl;
else
- connect( parent->m_frame, SIGNAL( destroyed() ),
- this, SLOT( parentDestroyed() ) );
+ connect( parent->m_frame, TQT_SIGNAL( destroyed() ),
+ this, TQT_SLOT( parentDestroyed() ) );
pausedTime = 0;
lastTimerId = 0;
currentlyDispatching = false;
@@ -2187,7 +2187,7 @@ void WindowQObject::parentDestroyed()
{
killTimers();
- QPtrListIterator<ScheduledAction> it(scheduledActions);
+ TQPtrListIterator<ScheduledAction> it(scheduledActions);
for (; it.current(); ++it)
delete it.current();
scheduledActions.clear();
@@ -2222,7 +2222,7 @@ int WindowQObject::installTimeout(const Value &func, List args, int t, bool sing
void WindowQObject::clearTimeout(int timerId)
{
- QPtrListIterator<ScheduledAction> it(scheduledActions);
+ TQPtrListIterator<ScheduledAction> it(scheduledActions);
for (; it.current(); ++it) {
ScheduledAction *action = it.current();
if (action->timerId == timerId) {
@@ -2241,12 +2241,12 @@ bool WindowQObject::hasTimers() const
void WindowQObject::mark()
{
- QPtrListIterator<ScheduledAction> it(scheduledActions);
+ TQPtrListIterator<ScheduledAction> it(scheduledActions);
for (; it.current(); ++it)
it.current()->mark();
}
-void WindowQObject::timerEvent(QTimerEvent *)
+void WindowQObject::timerEvent(TQTimerEvent *)
{
killTimers();
@@ -2261,14 +2261,14 @@ void WindowQObject::timerEvent(QTimerEvent *)
// Work out which actions are to be executed. We take a separate copy of
// this list since the main one may be modified during action execution
- QPtrList<ScheduledAction> toExecute;
- QPtrListIterator<ScheduledAction> it(scheduledActions);
+ TQPtrList<ScheduledAction> toExecute;
+ TQPtrListIterator<ScheduledAction> it(scheduledActions);
for (; it.current(); ++it)
if (currentAdjusted >= it.current()->nextTime)
toExecute.append(it.current());
// ### verify that the window can't be closed (and action deleted) during execution
- it = QPtrListIterator<ScheduledAction>(toExecute);
+ it = TQPtrListIterator<ScheduledAction>(toExecute);
for (; it.current(); ++it) {
ScheduledAction *action = it.current();
if (!scheduledActions.containsRef(action)) // removed by clearTimeout()
@@ -2352,11 +2352,11 @@ int DateTimeMS::msecsTo(const DateTimeMS &other) const
DateTimeMS DateTimeMS::now()
{
DateTimeMS t;
- QTime before = QTime::currentTime();
- t.mDate = QDate::currentDate();
- t.mTime = QTime::currentTime();
+ TQTime before = TQTime::currentTime();
+ t.mDate = TQDate::currentDate();
+ t.mTime = TQTime::currentTime();
if (t.mTime < before)
- t.mDate = QDate::currentDate(); // prevent race condition in hacky way :)
+ t.mDate = TQDate::currentDate(); // prevent race condition in hacky way :)
return t;
}
@@ -2368,7 +2368,7 @@ void WindowQObject::setNextTimer()
if (scheduledActions.isEmpty())
return;
- QPtrListIterator<ScheduledAction> it(scheduledActions);
+ TQPtrListIterator<ScheduledAction> it(scheduledActions);
DateTimeMS nextTime = it.current()->nextTime;
for (++it; it.current(); ++it)
if (nextTime > it.current()->nextTime)
@@ -2394,7 +2394,7 @@ Value FrameArray::get(ExecState *exec, const Identifier &p) const
if (part.isNull())
return Undefined();
- QPtrList<KParts::ReadOnlyPart> frames = part->frames();
+ TQPtrList<KParts::ReadOnlyPart> frames = part->frames();
unsigned int len = frames.count();
if (p == lengthPropertyName)
return Number(len);
@@ -2521,11 +2521,11 @@ Value Location::get(ExecState *exec, const Identifier &p) const
if (entry)
switch (entry->value) {
case Hash:
- return String( url.ref().isNull() ? QString("") : "#" + url.ref() );
+ return String( url.ref().isNull() ? TQString("") : "#" + url.ref() );
case Host: {
UString str = url.host();
if (url.port())
- str += ":" + QString::number((int)url.port());
+ str += ":" + TQString::number((int)url.port());
return String(str);
// Note: this is the IE spec. The NS spec swaps the two, it says
// "The hostname property is the concatenation of the host and port properties, separated by a colon."
@@ -2543,9 +2543,9 @@ Value Location::get(ExecState *exec, const Identifier &p) const
case Pathname:
if (url.isEmpty())
return String("");
- return String( url.path().isEmpty() ? QString("/") : url.path() );
+ return String( url.path().isEmpty() ? TQString("/") : url.path() );
case Port:
- return String( url.port() ? QString::number((int)url.port()) : QString::fromLatin1("") );
+ return String( url.port() ? TQString::number((int)url.port()) : TQString::fromLatin1("") );
case Protocol:
return String( url.protocol()+":" );
case Search:
@@ -2587,7 +2587,7 @@ void Location::put(ExecState *exec, const Identifier &p, const Value &v, int att
if (entry->value != Href && !window->isSafeScript(exec))
return;
- QString str = v.toString(exec).qstring();
+ TQString str = v.toString(exec).qstring();
switch (entry->value) {
case Href: {
KHTMLPart* p =::qt_cast<KHTMLPart*>(Window::retrieveActive(exec)->part());
@@ -2603,8 +2603,8 @@ void Location::put(ExecState *exec, const Identifier &p, const Value &v, int att
url.setRef(str);
break;
case Host: {
- QString host = str.left(str.find(":"));
- QString port = str.mid(str.find(":")+1);
+ TQString host = str.left(str.find(":"));
+ TQString port = str.mid(str.find(":")+1);
url.setHost(host);
url.setPort(port.toUInt());
break;
@@ -2730,8 +2730,8 @@ Value ExternalFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
if (args.size() != 1 && args.size() != 2)
return Undefined();
- QString url = args[0].toString(exec).qstring();
- QString title;
+ TQString url = args[0].toString(exec).qstring();
+ TQString title;
if (args.size() == 2)
title = args[1].toString(exec).qstring();
@@ -2739,7 +2739,7 @@ Value ExternalFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
// just wanted the base js handling code in cvs
return Undefined();
- QString question;
+ TQString question;
if ( title.isEmpty() )
question = i18n("Do you want a bookmark pointing to the location \"%1\" to be added to your collection?")
.arg(url);
@@ -2749,7 +2749,7 @@ Value ExternalFunc::tryCall(ExecState *exec, Object &thisObj, const List &args)
emit part->browserExtension()->requestFocus(part);
- QString caption;
+ TQString caption;
if (!part->url().host().isEmpty())
caption = part->url().host() + " - ";
caption += i18n("JavaScript Attempted Bookmark Insert");
@@ -2809,9 +2809,9 @@ Value History::getValueProperty(ExecState *, int token) const
if ( !iface )
return Number( 0 );
- QVariant length = iface->property( "historyLength" );
+ TQVariant length = iface->property( "historyLength" );
- if ( length.type() != QVariant::UInt )
+ if ( length.type() != TQVariant::UInt )
return Number( 0 );
return Number( length.toUInt() );
@@ -2886,13 +2886,13 @@ Value Konqueror::get(ExecState *exec, const Identifier &p) const
if ( ext ) {
KParts::BrowserInterface *iface = ext->browserInterface();
if ( iface ) {
- QVariant prop = iface->property( p.qstring().latin1() );
+ TQVariant prop = iface->property( p.qstring().latin1() );
if ( prop.isValid() ) {
switch( prop.type() ) {
- case QVariant::Int:
+ case TQVariant::Int:
return Number( prop.toInt() );
- case QVariant::String:
+ case TQVariant::String:
return String( prop.toString() );
default:
break;
@@ -2916,9 +2916,9 @@ Value KonquerorFunc::tryCall(ExecState *exec, Object &, const List &args)
if ( !iface )
return Undefined();
- QCString n = m_name.data();
+ TQCString n = m_name.data();
n += "()";
- iface->callMethod( n.data(), QVariant() );
+ iface->callMethod( n.data(), TQVariant() );
return Undefined();
}
diff --git a/khtml/ecma/kjs_window.h b/khtml/ecma/kjs_window.h
index 1444110f4..433bf86ae 100644
--- a/khtml/ecma/kjs_window.h
+++ b/khtml/ecma/kjs_window.h
@@ -22,11 +22,11 @@
#ifndef _KJS_WINDOW_H_
#define _KJS_WINDOW_H_
-#include <qobject.h>
-#include <qguardedptr.h>
-#include <qmap.h>
-#include <qptrlist.h>
-#include <qdatetime.h>
+#include <tqobject.h>
+#include <tqguardedptr.h>
+#include <tqmap.h>
+#include <tqptrlist.h>
+#include <tqdatetime.h>
#include "kjs_binding.h"
#include "kjs_views.h"
@@ -70,7 +70,7 @@ namespace KJS {
};
class KDE_EXPORT Window : public ObjectImp {
- friend QGuardedPtr<KHTMLPart> getInstance();
+ friend TQGuardedPtr<KHTMLPart> getInstance();
friend class Location;
friend class WindowFunc;
friend class WindowQObject;
@@ -105,10 +105,10 @@ namespace KJS {
void closeNow();
void delayedGoHistory(int steps);
void goHistory(int steps);
- void goURL(ExecState* exec, const QString& url, bool lockHistory);
+ void goURL(ExecState* exec, const TQString& url, bool lockHistory);
Value openWindow(ExecState *exec, const List &args);
- Value executeOpenWindow(ExecState *exec, const KURL& url, const QString& frameName, const QString& features);
- void resizeTo(QWidget* tl, int width, int height);
+ Value executeOpenWindow(ExecState *exec, const KURL& url, const TQString& frameName, const TQString& features);
+ void resizeTo(TQWidget* tl, int width, int height);
void afterScriptExecution();
bool isSafeScript(ExecState *exec) const {
KParts::ReadOnlyPart *activePart = static_cast<KJS::ScriptInterpreter *>( exec->interpreter() )->part();
@@ -118,14 +118,14 @@ namespace KJS {
Location *location() const;
ObjectImp* frames( ExecState* exec ) const;
JSEventListener *getJSEventListener(const Value &val, bool html = false);
- JSLazyEventListener *getJSLazyEventListener(const QString &code, const QString &name, DOM::NodeImpl* node);
+ JSLazyEventListener *getJSLazyEventListener(const TQString &code, const TQString &name, DOM::NodeImpl* node);
void clear( ExecState *exec );
virtual UString toString(ExecState *exec) const;
// Set the current "event" object
void setCurrentEvent( DOM::Event *evt );
- QPtrDict<JSEventListener> jsEventListeners;
+ TQPtrDict<JSEventListener> jsEventListeners;
virtual const ClassInfo* classInfo() const { return &info; }
static const ClassInfo info;
enum { Closed, Crypto, DefaultStatus, Status, Document, Node, EventCtor, Range,
@@ -178,7 +178,7 @@ namespace KJS {
bool checkIsSafeScript( KParts::ReadOnlyPart* activePart ) const;
- QGuardedPtr<khtml::ChildFrame> m_frame;
+ TQGuardedPtr<khtml::ChildFrame> m_frame;
Screen *screen;
History *history;
External *external;
@@ -188,29 +188,29 @@ namespace KJS {
struct DelayedAction {
DelayedAction() : actionId(NullAction) {} // for QValueList
- DelayedAction( DelayedActionId id, QVariant p = QVariant() ) : actionId(id), param(p) {}
+ DelayedAction( DelayedActionId id, TQVariant p = TQVariant() ) : actionId(id), param(p) {}
DelayedActionId actionId;
- QVariant param; // just in case
+ TQVariant param; // just in case
};
- QValueList<DelayedAction> m_delayed;
+ TQValueList<DelayedAction> m_delayed;
struct SuppressedWindowInfo {
SuppressedWindowInfo() {} // for QValueList
- SuppressedWindowInfo( KURL u, QString fr, QString fe ) : url(u), frameName(fr), features(fe) {}
+ SuppressedWindowInfo( KURL u, TQString fr, TQString fe ) : url(u), frameName(fr), features(fe) {}
KURL url;
- QString frameName;
- QString features;
+ TQString frameName;
+ TQString features;
};
- QValueList<SuppressedWindowInfo> m_suppressedWindowInfo;
+ TQValueList<SuppressedWindowInfo> m_suppressedWindowInfo;
};
/**
- * like QDateTime, but properly handles milliseconds
+ * like TQDateTime, but properly handles milliseconds
*/
class DateTimeMS
{
- QDate mDate;
- QTime mTime;
+ TQDate mDate;
+ TQTime mTime;
public:
DateTimeMS addMSecs(int s) const;
bool operator >(const DateTimeMS &other) const;
@@ -229,14 +229,14 @@ namespace KJS {
class ScheduledAction {
public:
ScheduledAction(Object _func, List _args, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId);
- ScheduledAction(QString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId);
+ ScheduledAction(TQString _code, DateTimeMS _nextTime, int _interval, bool _singleShot, int _timerId);
~ScheduledAction();
bool execute(Window *window);
void mark();
ObjectImp *func;
List args;
- QString code;
+ TQString code;
bool isFunction;
bool singleShot;
@@ -246,7 +246,7 @@ namespace KJS {
int timerId;
};
- class KDE_EXPORT WindowQObject : public QObject {
+ class KDE_EXPORT WindowQObject : public TQObject {
Q_OBJECT
public:
WindowQObject(Window *w);
@@ -261,11 +261,11 @@ namespace KJS {
protected slots:
void parentDestroyed();
protected:
- void timerEvent(QTimerEvent *e);
+ void timerEvent(TQTimerEvent *e);
void setNextTimer();
private:
Window *parent;
- QPtrList<ScheduledAction> scheduledActions;
+ TQPtrList<ScheduledAction> scheduledActions;
int pausedTime;
int lastTimerId;
bool currentlyDispatching;
@@ -286,7 +286,7 @@ namespace KJS {
private:
friend class Window;
Location(khtml::ChildFrame *f);
- QGuardedPtr<khtml::ChildFrame> m_frame;
+ TQGuardedPtr<khtml::ChildFrame> m_frame;
};
#ifdef Q_WS_QWS
diff --git a/khtml/ecma/xmlhttprequest.cpp b/khtml/ecma/xmlhttprequest.cpp
index de77f3d7e..d3ebebaec 100644
--- a/khtml/ecma/xmlhttprequest.cpp
+++ b/khtml/ecma/xmlhttprequest.cpp
@@ -35,7 +35,7 @@
#include <kio/scheduler.h>
#include <kio/job.h>
-#include <qobject.h>
+#include <tqobject.h>
#include <kdebug.h>
#ifdef APPLE_CHANGES
@@ -86,7 +86,7 @@ void XMLHttpRequestQObject::slotData( KIO::Job* job, const char *data, int size
jsObject->slotData(job, data, size);
}
#else
-void XMLHttpRequestQObject::slotData( KIO::Job* job, const QByteArray &data )
+void XMLHttpRequestQObject::slotData( KIO::Job* job, const TQByteArray &data )
{
jsObject->slotData(job, data);
}
@@ -149,14 +149,14 @@ Value XMLHttpRequest::getValueProperty(ExecState *exec, int token) const
return Null();
}
if (!createdDocument) {
- QString mimeType = "text/xml";
+ TQString mimeType = "text/xml";
if (!m_mimeTypeOverride.isEmpty()) {
mimeType = m_mimeTypeOverride;
} else {
Value header = getResponseHeader("Content-Type");
if (header.type() != UndefinedType) {
- mimeType = QStringList::split(";", header.toString(exec).qstring())[0].stripWhiteSpace();
+ mimeType = TQStringList::split(";", header.toString(exec).qstring())[0].stripWhiteSpace();
}
}
@@ -239,7 +239,7 @@ XMLHttpRequest::XMLHttpRequest(ExecState *exec, const DOM::Document &d)
qObject(new XMLHttpRequestQObject(this)),
doc(static_cast<DOM::DocumentImpl*>(d.handle())),
async(true),
- contentType(QString::null),
+ contentType(TQString::null),
job(0),
state(Uninitialized),
onReadyStateChangeListener(0),
@@ -308,15 +308,15 @@ bool XMLHttpRequest::urlMatchesDocumentDomain(const KURL& _url) const
return false;
}
-void XMLHttpRequest::open(const QString& _method, const KURL& _url, bool _async)
+void XMLHttpRequest::open(const TQString& _method, const KURL& _url, bool _async)
{
abort();
aborted = false;
// clear stuff from possible previous load
requestHeaders.clear();
- responseHeaders = QString();
- response = QString();
+ responseHeaders = TQString();
+ response = TQString();
createdDocument = false;
responseXML = DOM::Document();
@@ -338,12 +338,12 @@ void XMLHttpRequest::open(const QString& _method, const KURL& _url, bool _async)
changeState(Loading);
}
-void XMLHttpRequest::send(const QString& _body)
+void XMLHttpRequest::send(const TQString& _body)
{
aborted = false;
if (method == "post") {
- QString protocol = url.protocol().lower();
+ TQString protocol = url.protocol().lower();
// Abondon the request when the protocol is other than "http",
// instead of blindly changing it to a "get" request.
@@ -355,8 +355,8 @@ void XMLHttpRequest::send(const QString& _body)
// FIXME: determine post encoding correctly by looking in headers
// for charset.
- QByteArray buf;
- QCString str = _body.utf8();
+ TQByteArray buf;
+ TQCString str = _body.utf8();
buf.duplicate(str.data(), str.size() - 1);
job = KIO::http_post( url, buf, false );
@@ -370,12 +370,12 @@ void XMLHttpRequest::send(const QString& _body)
}
if (!requestHeaders.isEmpty()) {
- QString rh;
- QMap<QString, QString>::ConstIterator begin = requestHeaders.begin();
- QMap<QString, QString>::ConstIterator end = requestHeaders.end();
- for (QMap<QString, QString>::ConstIterator i = begin; i != end; ++i) {
- QString key = i.key();
- QString value = i.data();
+ TQString rh;
+ TQMap<TQString, TQString>::ConstIterator begin = requestHeaders.begin();
+ TQMap<TQString, TQString>::ConstIterator end = requestHeaders.end();
+ for (TQMap<TQString, TQString>::ConstIterator i = begin; i != end; ++i) {
+ TQString key = i.key();
+ TQString value = i.data();
if (key == "accept") {
// The HTTP KIO slave supports an override this way
job->addMetaData("accept", value);
@@ -397,21 +397,21 @@ void XMLHttpRequest::send(const QString& _body)
// ### does find() ever succeed? the headers are stored in lower case!
if (requestHeaders.find("Referer") == requestHeaders.end()) {
KURL documentURL(doc->URL());
- documentURL.setPass(QString::null);
- documentURL.setUser(QString::null);
+ documentURL.setPass(TQString::null);
+ documentURL.setUser(TQString::null);
job->addMetaData("referrer", documentURL.url());
// kdDebug() << "Adding referrer: " << documentURL << endl;
}
if (!async) {
- QByteArray data;
+ TQByteArray data;
KURL finalURL;
- QString headers;
+ TQString headers;
#ifdef APPLE_CHANGES
data = KWQServeSynchronousRequest(khtml::Cache::loader(), doc->docLoader(), job, finalURL, headers);
#else
- QMap<QString, QString> metaData;
+ TQMap<TQString, TQString> metaData;
if ( NetAccess::synchronousRun( job, 0, &data, &finalURL, &metaData ) ) {
headers = metaData[ "HTTP-Headers" ];
}
@@ -421,17 +421,17 @@ void XMLHttpRequest::send(const QString& _body)
return;
}
- qObject->connect( job, SIGNAL( result( KIO::Job* ) ),
- SLOT( slotFinished( KIO::Job* ) ) );
+ qObject->connect( job, TQT_SIGNAL( result( KIO::Job* ) ),
+ TQT_SLOT( slotFinished( KIO::Job* ) ) );
#ifdef APPLE_CHANGES
- qObject->connect( job, SIGNAL( data( KIO::Job*, const char*, int ) ),
- SLOT( slotData( KIO::Job*, const char*, int ) ) );
+ qObject->connect( job, TQT_SIGNAL( data( KIO::Job*, const char*, int ) ),
+ TQT_SLOT( slotData( KIO::Job*, const char*, int ) ) );
#else
- qObject->connect( job, SIGNAL( data( KIO::Job*, const QByteArray& ) ),
- SLOT( slotData( KIO::Job*, const QByteArray& ) ) );
+ qObject->connect( job, TQT_SIGNAL( data( KIO::Job*, const TQByteArray& ) ),
+ TQT_SLOT( slotData( KIO::Job*, const TQByteArray& ) ) );
#endif
- qObject->connect( job, SIGNAL(redirection(KIO::Job*, const KURL& ) ),
- SLOT( slotRedirection(KIO::Job*, const KURL&) ) );
+ qObject->connect( job, TQT_SIGNAL(redirection(KIO::Job*, const KURL& ) ),
+ TQT_SLOT( slotRedirection(KIO::Job*, const KURL&) ) );
#ifdef APPLE_CHANGES
KWQServeRequest(khtml::Cache::loader(), doc->docLoader(), job);
@@ -451,14 +451,14 @@ void XMLHttpRequest::abort()
aborted = true;
}
-void XMLHttpRequest::overrideMIMEType(const QString& override)
+void XMLHttpRequest::overrideMIMEType(const TQString& override)
{
m_mimeTypeOverride = override;
}
-void XMLHttpRequest::setRequestHeader(const QString& _name, const QString &value)
+void XMLHttpRequest::setRequestHeader(const TQString& _name, const TQString &value)
{
- QString name = _name.lower().stripWhiteSpace();
+ TQString name = _name.lower().stripWhiteSpace();
// Content-type needs to be set seperately from the other headers
if(name == "content-type") {
@@ -486,8 +486,8 @@ void XMLHttpRequest::setRequestHeader(const QString& _name, const QString &value
// Reject all banned headers. See BANNED_HTTP_HEADERS above.
// kdDebug() << "Banned HTTP Headers: " << BANNED_HTTP_HEADERS << endl;
- QStringList bannedHeaders = QStringList::split(',',
- QString::fromLatin1(BANNED_HTTP_HEADERS));
+ TQStringList bannedHeaders = TQStringList::split(',',
+ TQString::fromLatin1(BANNED_HTTP_HEADERS));
if (bannedHeaders.contains(name))
return; // Denied
@@ -510,13 +510,13 @@ Value XMLHttpRequest::getAllResponseHeaders() const
return String(responseHeaders.mid(endOfLine + 1) + "\n");
}
-Value XMLHttpRequest::getResponseHeader(const QString& name) const
+Value XMLHttpRequest::getResponseHeader(const TQString& name) const
{
if (responseHeaders.isEmpty()) {
return Undefined();
}
- QRegExp headerLinePattern(name + ":", false);
+ TQRegExp headerLinePattern(name + ":", false);
int matchLength;
int headerLinePos = headerLinePattern.search(responseHeaders, 0);
@@ -540,14 +540,14 @@ Value XMLHttpRequest::getResponseHeader(const QString& name) const
return String(responseHeaders.mid(headerLinePos + matchLength, endOfLine - (headerLinePos + matchLength)).stripWhiteSpace());
}
-static Value httpStatus(const QString& response, bool textStatus = false)
+static Value httpStatus(const TQString& response, bool textStatus = false)
{
if (response.isEmpty()) {
return Undefined();
}
int endOfLine = response.find("\n");
- QString firstLine = (endOfLine == -1) ? response : response.left(endOfLine);
+ TQString firstLine = (endOfLine == -1) ? response : response.left(endOfLine);
int codeStart = firstLine.find(" ");
int codeEnd = firstLine.find(" ", codeStart + 1);
@@ -556,11 +556,11 @@ static Value httpStatus(const QString& response, bool textStatus = false)
}
if (textStatus) {
- QString statusText = firstLine.mid(codeEnd + 1, endOfLine - (codeEnd + 1)).stripWhiteSpace();
+ TQString statusText = firstLine.mid(codeEnd + 1, endOfLine - (codeEnd + 1)).stripWhiteSpace();
return String(statusText);
}
- QString number = firstLine.mid(codeStart + 1, codeEnd - (codeStart + 1));
+ TQString number = firstLine.mid(codeStart + 1, codeEnd - (codeStart + 1));
bool ok = false;
int code = number.toInt(&ok);
@@ -581,7 +581,7 @@ Value XMLHttpRequest::getStatusText() const
return httpStatus(responseHeaders, true);
}
-void XMLHttpRequest::processSyncLoadResults(const QByteArray &data, const KURL &finalURL, const QString &headers)
+void XMLHttpRequest::processSyncLoadResults(const TQByteArray &data, const KURL &finalURL, const TQString &headers)
{
if (!urlMatchesDocumentDomain(finalURL)) {
abort();
@@ -635,7 +635,7 @@ void XMLHttpRequest::slotRedirection(KIO::Job*, const KURL& url)
#ifdef APPLE_CHANGES
void XMLHttpRequest::slotData( KIO::Job*, const char *data, int len )
#else
-void XMLHttpRequest::slotData(KIO::Job*, const QByteArray &_data)
+void XMLHttpRequest::slotData(KIO::Job*, const TQByteArray &_data)
#endif
{
if (state < Loaded ) {
@@ -664,10 +664,10 @@ void XMLHttpRequest::slotData(KIO::Job*, const QByteArray &_data)
if ( pos > -1 ) {
pos += 13;
int index = responseHeaders.find('\n', pos);
- QString type = responseHeaders.mid(pos, (index-pos));
+ TQString type = responseHeaders.mid(pos, (index-pos));
index = type.find (';');
if (index > -1)
- encoding = type.mid( index+1 ).remove(QRegExp("charset[ ]*=[ ]*", false)).stripWhiteSpace();
+ encoding = type.mid( index+1 ).remove(TQRegExp("charset[ ]*=[ ]*", false)).stripWhiteSpace();
}
decoder = new Decoder;
@@ -684,7 +684,7 @@ void XMLHttpRequest::slotData(KIO::Job*, const QByteArray &_data)
if (len == -1)
len = strlen(data);
- QString decoded = decoder->decode(data, len);
+ TQString decoded = decoder->decode(data, len);
response += decoded;
@@ -724,7 +724,7 @@ Value XMLHttpRequestProtoFunc::tryCall(ExecState *exec, Object &thisObj, const L
return Undefined();
}
- QString method = args[0].toString(exec).qstring();
+ TQString method = args[0].toString(exec).qstring();
KHTMLPart *part = ::qt_cast<KHTMLPart *>(Window::retrieveActive(exec)->part());
if (!part)
return Undefined();
@@ -757,7 +757,7 @@ Value XMLHttpRequestProtoFunc::tryCall(ExecState *exec, Object &thisObj, const L
return Undefined();
}
- QString body;
+ TQString body;
if (args.size() >= 1) {
Object obj = Object::dynamicCast(args[0]);
if (obj.isValid() && obj.inherits(&DOMDocument::info)) {
diff --git a/khtml/ecma/xmlhttprequest.h b/khtml/ecma/xmlhttprequest.h
index 49582a905..2c646708e 100644
--- a/khtml/ecma/xmlhttprequest.h
+++ b/khtml/ecma/xmlhttprequest.h
@@ -77,31 +77,31 @@ namespace KJS {
#ifdef APPLE_CHANGES
void slotData( KIO::Job* job, const char *data, int size );
#else
- void slotData( KIO::Job* job, const QByteArray &data );
+ void slotData( KIO::Job* job, const TQByteArray &data );
#endif
void slotFinished( KIO::Job* );
void slotRedirection( KIO::Job*, const KURL& );
- void processSyncLoadResults(const QByteArray &data, const KURL &finalURL, const QString &headers);
+ void processSyncLoadResults(const TQByteArray &data, const KURL &finalURL, const TQString &headers);
- void open(const QString& _method, const KURL& _url, bool _async);
- void send(const QString& _body);
+ void open(const TQString& _method, const KURL& _url, bool _async);
+ void send(const TQString& _body);
void abort();
- void setRequestHeader(const QString& name, const QString &value);
- void overrideMIMEType(const QString& override);
+ void setRequestHeader(const TQString& name, const TQString &value);
+ void overrideMIMEType(const TQString& override);
Value getAllResponseHeaders() const;
- Value getResponseHeader(const QString& name) const;
+ Value getResponseHeader(const TQString& name) const;
void changeState(XMLHttpRequestState newState);
- QGuardedPtr<DOM::DocumentImpl> doc;
+ TQGuardedPtr<DOM::DocumentImpl> doc;
KURL url;
- QString method;
+ TQString method;
bool async;
- QMap<QString,QString> requestHeaders;
- QString m_mimeTypeOverride;
- QString contentType;
+ TQMap<TQString,TQString> requestHeaders;
+ TQString m_mimeTypeOverride;
+ TQString contentType;
KIO::TransferJob * job;
@@ -110,10 +110,10 @@ namespace KJS {
JSEventListener *onLoadListener;
khtml::Decoder *decoder;
- QString encoding;
- QString responseHeaders;
+ TQString encoding;
+ TQString responseHeaders;
- QString response;
+ TQString response;
mutable bool createdDocument;
mutable bool typeIsXML;
mutable DOM::Document responseXML;
@@ -122,14 +122,14 @@ namespace KJS {
};
- class XMLHttpRequestQObject : public QObject {
+ class XMLHttpRequestQObject : public TQObject {
Q_OBJECT
public:
XMLHttpRequestQObject(XMLHttpRequest *_jsObject);
public slots:
- void slotData( KIO::Job* job, const QByteArray &data );
+ void slotData( KIO::Job* job, const TQByteArray &data );
void slotFinished( KIO::Job* job );
void slotRedirection( KIO::Job* job, const KURL& url);
diff --git a/khtml/ecma/xmlserializer.cpp b/khtml/ecma/xmlserializer.cpp
index 6abcfe77f..856f35e1f 100644
--- a/khtml/ecma/xmlserializer.cpp
+++ b/khtml/ecma/xmlserializer.cpp
@@ -89,7 +89,7 @@ Value XMLSerializerProtoFunc::tryCall(ExecState *exec, Object &thisObj, const Li
return Undefined();
}
- QString body;
+ TQString body;
try {
body = node->toString().string();