summaryrefslogtreecommitdiffstats
path: root/kjsembed/jsbinding.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/jsbinding.cpp')
-rw-r--r--kjsembed/jsbinding.cpp300
1 files changed, 150 insertions, 150 deletions
diff --git a/kjsembed/jsbinding.cpp b/kjsembed/jsbinding.cpp
index df34caf7..7abddf2c 100644
--- a/kjsembed/jsbinding.cpp
+++ b/kjsembed/jsbinding.cpp
@@ -1,12 +1,12 @@
-#include <qmetaobject.h>
+#include <tqmetaobject.h>
#include <private/qucom_p.h>
-#include <qpen.h>
-#include <qpixmap.h>
-#include <qimage.h>
-#include <qvariant.h>
-#include <qdatetime.h>
-#include <qsize.h>
+#include <tqpen.h>
+#include <tqpixmap.h>
+#include <tqimage.h>
+#include <tqvariant.h>
+#include <tqdatetime.h>
+#include <tqsize.h>
#include <kjs/interpreter.h>
#include <kjs/ustring.h>
@@ -41,7 +41,7 @@ namespace KJSEmbed {
// =========
//
// Bool, Double, CString, String, StringList, Int, UInt, Date, Time, DateTime,
- // Rect, Size, Point, Pixmap, Image, Brush, Pen, Size, Rect, Point, QValueList<QVariant>
+ // Rect, Size, Point, Pixmap, Image, Brush, Pen, Size, Rect, Point, TQValueList<TQVariant>
//
// Opqaue
// ======
@@ -51,7 +51,7 @@ namespace KJSEmbed {
// ByteArray, BitArray
//
- KJS::Value convertToValue( KJS::ExecState *exec, const QVariant &val ) {
+ KJS::Value convertToValue( KJS::ExecState *exec, const TQVariant &val ) {
if ( !val.isValid() )
return KJS::Undefined();
@@ -61,23 +61,23 @@ namespace KJSEmbed {
switch( type )
{
- case QVariant::String:
- case QVariant::CString:
+ case TQVariant::String:
+ case TQVariant::CString:
return KJS::String( val.toString() );
break;
- case QVariant::Int:
+ case TQVariant::Int:
return KJS::Number( val.toInt() );
break;
- case QVariant::UInt:
+ case TQVariant::UInt:
return KJS::Number( val.toUInt() );
break;
- case QVariant::Double:
+ case TQVariant::Double:
return KJS::Number( val.toDouble() );
break;
- case QVariant::Bool:
+ case TQVariant::Bool:
return KJS::Boolean( val.toBool() );
break;
- case QVariant::Rect:
+ case TQVariant::Rect:
{
JSValueProxy * prx = new JSValueProxy( );
prx->setValue( val );
@@ -86,14 +86,14 @@ namespace KJSEmbed {
return proxyObj;
break;
}
- case QVariant::Date:
- case QVariant::DateTime:
- case QVariant::Time:
+ case TQVariant::Date:
+ case TQVariant::DateTime:
+ case TQVariant::Time:
{
- QDateTime dt = QDateTime::currentDateTime();
- if ( type == QVariant::Date )
+ TQDateTime dt = TQDateTime::currentDateTime();
+ if ( type == TQVariant::Date )
dt.setDate( val.toDate() );
- else if ( type == QVariant::Time )
+ else if ( type == TQVariant::Time )
dt.setTime( val.toTime() );
else
dt = val.toDateTime();
@@ -107,7 +107,7 @@ namespace KJSEmbed {
return KJS::Object( exec->interpreter() ->builtinDate().construct( exec, items ) );
break;
}
- case QVariant::Point:
+ case TQVariant::Point:
{
JSValueProxy * prx = new JSValueProxy( );
prx->setValue( val );
@@ -116,37 +116,37 @@ namespace KJSEmbed {
return proxyObj;
break;
}
- case QVariant::StringList:
+ case TQVariant::StringList:
{
- QStringList lst = val.toStringList();
- QStringList::Iterator idx = lst.begin();
+ TQStringList lst = val.toStringList();
+ TQStringList::Iterator idx = lst.begin();
for ( ; idx != lst.end(); ++idx )
items.append( KJS::String( ( *idx ) ) );
return KJS::Object( exec->interpreter() ->builtinArray().construct( exec, items ) );
break;
}
- case QVariant::List:
-// case QVariant::StringList:
+ case TQVariant::List:
+// case TQVariant::StringList:
// This will cause an extra conversion step for a QStrinList so use the above case.
{
- QValueList<QVariant> lst = val.toList();
- QValueList<QVariant>::Iterator idx = lst.begin();
+ TQValueList<TQVariant> lst = val.toList();
+ TQValueList<TQVariant>::Iterator idx = lst.begin();
for ( ; idx != lst.end(); ++idx )
items.append( convertToValue( exec, ( *idx ) ) );
return KJS::Object( exec->interpreter() ->builtinArray().construct( exec, items ) );
break;
}
- case QVariant::Map:
+ case TQVariant::Map:
{
- QMap<QString,QVariant> map = val.toMap();
- QMap<QString,QVariant>::Iterator idx = map.begin();
+ TQMap<TQString,TQVariant> map = val.toMap();
+ TQMap<TQString,TQVariant>::Iterator idx = map.begin();
KJS::Object array( exec->interpreter() ->builtinArray().construct( exec, 0 ) );
for ( ; idx != map.end(); ++idx )
array.put(exec, KJS::Identifier(idx.key().latin1()), convertToValue( exec, idx.data() ) );
return array;
break;
}
- case QVariant::Pixmap:
+ case TQVariant::Pixmap:
{
JSValueProxy * prx = new JSValueProxy( );
prx->setValue( val );
@@ -155,7 +155,7 @@ namespace KJSEmbed {
return proxyObj;
break;
}
- case QVariant::Brush:
+ case TQVariant::Brush:
{
JSValueProxy * prx = new JSValueProxy( );
prx->setValue( val );
@@ -163,7 +163,7 @@ namespace KJSEmbed {
Bindings::BrushImp::addBindings( exec, proxyObj );
return proxyObj;
}
- case QVariant::Image:
+ case TQVariant::Image:
{
JSValueProxy * prx = new JSValueProxy( );
prx->setValue( val );
@@ -172,7 +172,7 @@ namespace KJSEmbed {
return proxyObj;
break;
}
- case QVariant::Pen:
+ case TQVariant::Pen:
{
JSValueProxy * prx = new JSValueProxy( );
prx->setValue( val );
@@ -181,7 +181,7 @@ namespace KJSEmbed {
return proxyObj;
break;
}
- case QVariant::Size:
+ case TQVariant::Size:
{
JSValueProxy * prx = new JSValueProxy( );
prx->setValue( val );
@@ -192,7 +192,7 @@ namespace KJSEmbed {
}
default:
{
- if ( val.canCast( QVariant::String ) )
+ if ( val.canCast( TQVariant::String ) )
return KJS::String( val.toString() );
else
{
@@ -209,8 +209,8 @@ namespace KJSEmbed {
}
}
- QVariant convertToVariant( KJS::ExecState *exec, const KJS::Value &v ) {
- QVariant val;
+ TQVariant convertToVariant( KJS::ExecState *exec, const KJS::Value &v ) {
+ TQVariant val;
KJS::Type type = v.type();
kdDebug( 80001 ) << "Convert a value of type " << type << " to a variant" << endl;
switch( type )
@@ -253,12 +253,12 @@ namespace KJSEmbed {
*/
/*if ( prx ) {
- QObject * o = prx->object();
- QCString cs( o ? o->className() : "" );
+ TQObject * o = prx->object();
+ TQCString cs( o ? o->className() : "" );
if ( obj.implementsConstruct() )
- val = QString( "new %1();" ).arg( obj.className().qstring() );
+ val = TQString( "new %1();" ).arg( obj.className().qstring() );
else if ( obj.implementsCall() )
- val = QString( "%1(...);" ).arg( obj.className().qstring() );
+ val = TQString( "%1(...);" ).arg( obj.className().qstring() );
kdDebug( 80001 ) << "convertToVariant() got a JSObjectProxy" << endl;
} else */if ( vprx ) {
kdDebug( 80001 ) << "convertToVariant() got a variant JSValueProxy" << endl;
@@ -267,7 +267,7 @@ namespace KJSEmbed {
/* kdDebug( 80001 ) << "convertToVariant() got a JSProxy" << endl;
val = prxy->typeName();
*/
- } else { // Last resort map the object to a QMap<QString,QVariant>
+ } else { // Last resort map the object to a TQMap<TQString,TQVariant>
kdDebug( 80001 ) << "convertToVariant() map to struct." << endl;
val = convertArrayToMap(exec, v);
}
@@ -276,7 +276,7 @@ namespace KJSEmbed {
}
default:
{
- QString msg = i18n( "Unsupported KJS::Value, type %1" ).arg( ( int ) v.type() );
+ TQString msg = i18n( "Unsupported KJS::Value, type %1" ).arg( ( int ) v.type() );
throwError(exec, msg);
val = msg;
break;
@@ -286,8 +286,8 @@ namespace KJSEmbed {
return val;
}
- QStringList dumpCompletion( KJS::ExecState *exec, KJS::Object &obj ) {
- QStringList returnList;
+ TQStringList dumpCompletion( KJS::ExecState *exec, KJS::Object &obj ) {
+ TQStringList returnList;
if ( !obj.isValid() ) {
return returnList;
}
@@ -300,16 +300,16 @@ namespace KJSEmbed {
if ( obj.hasProperty( exec, name ) ) {
KJS::Value v = obj.get( exec, name );
KJS::Object vobj = v.toObject( exec );
- QString nm( name.ustring().qstring() );
- QString vl;
+ TQString nm( name.ustring().qstring() );
+ TQString vl;
if ( vobj.implementsConstruct() ) {
if ( vobj.prototype().toString( exec ).qstring() == "[function]" )
- returnList << QString( "%1(...)" ).arg( nm );
+ returnList << TQString( "%1(...)" ).arg( nm );
} else if ( vobj.implementsCall() ) {
- returnList << QString( "%1(...)" ).arg( nm );
+ returnList << TQString( "%1(...)" ).arg( nm );
} else {
- QVariant val = convertToVariant( exec, v );
+ TQVariant val = convertToVariant( exec, v );
vl = val.toString();
returnList << nm;
}
@@ -319,17 +319,17 @@ namespace KJSEmbed {
}
JSObjectProxy *proxy = JSProxy::toObjectProxy( obj.imp() );
- QObject *qo = proxy ? proxy->object() : 0;
- QMetaObject *mo = qo ? qo->metaObject() : 0;
+ TQObject *qo = proxy ? proxy->object() : 0;
+ TQMetaObject *mo = qo ? qo->metaObject() : 0;
// QObject
if ( proxy ) {
// QProperties
- QStrList propList( mo->propertyNames( true ) );
- for ( QStrListIterator iter1( propList ); iter1.current(); ++iter1 ) {
+ TQStrList propList( mo->propertyNames( true ) );
+ for ( TQStrListIterator iter1( propList ); iter1.current(); ++iter1 ) {
- QCString name = iter1.current();
+ TQCString name = iter1.current();
int propid = mo->findProperty( name.data(), true );
if ( propid == -1 )
continue;
@@ -338,11 +338,11 @@ namespace KJSEmbed {
// Slots
KJS::List items;
- QStrList slotList( mo->slotNames( true ) );
+ TQStrList slotList( mo->slotNames( true ) );
- for ( QStrListIterator iter2( slotList ); iter2.current(); ++iter2 ) {
- QCString name = iter2.current();
- QString nm( name );
+ for ( TQStrListIterator iter2( slotList ); iter2.current(); ++iter2 ) {
+ TQCString name = iter2.current();
+ TQString nm( name );
int slotid = mo->findSlot( name.data(), true );
if ( slotid != -1 ) {
@@ -353,12 +353,12 @@ namespace KJSEmbed {
return returnList;
}
- QString dumpObject( KJS::ExecState *exec, KJS::Object &obj ) {
+ TQString dumpObject( KJS::ExecState *exec, KJS::Object &obj ) {
if ( !obj.isValid() )
- return QString( "Invalid object\n" );
+ return TQString( "Invalid object\n" );
- QStringList properties;
- QStringList methods;
+ TQStringList properties;
+ TQStringList methods;
KJS::ReferenceList l = obj.propList( exec, true );
KJS::ReferenceListIterator propIt = l.begin();
@@ -371,7 +371,7 @@ namespace KJSEmbed {
KJS::Value v = obj.get( exec, name );
KJS::Object vobj = v.toObject( exec );
- QString nm( name.ustring().qstring() );
+ TQString nm( name.ustring().qstring() );
kdDebug( 80001 ) << "Getting: " << name.ustring().qstring() << " "
<< vobj.prototype().toString( exec ).qstring() << endl;
@@ -392,21 +392,21 @@ namespace KJSEmbed {
propIt++;
}
- QString s;
+ TQString s;
// JS properties
- s += QString( "<h2>Properties</h2>\n" );
+ s += TQString( "<h2>Properties</h2>\n" );
if ( !properties.isEmpty() ) {
s += "<table width=\"90%\">\n";
s += "<tr><th>Type</th><th>Name</th><th>Value</th></tr>\n";
properties.sort();
- for ( QStringList::Iterator iter = properties.begin(); iter != properties.end(); ++iter ) {
+ for ( TQStringList::Iterator iter = properties.begin(); iter != properties.end(); ++iter ) {
KJS::Value v = obj.get( exec, KJS::Identifier( KJS::UString( *iter ) ) );
- QVariant val = convertToVariant( exec, v );
+ TQVariant val = convertToVariant( exec, v );
- s += QString( "<tr><td align=\"center\">%1</td><td><b>%2</b></td><td align=\"center\">%3</td></tr>\n" )
+ s += TQString( "<tr><td align=\"center\">%1</td><td><b>%2</b></td><td align=\"center\">%3</td></tr>\n" )
.arg( val.typeName() ).arg( *iter ).arg( val.toString() );
}
@@ -415,12 +415,12 @@ namespace KJSEmbed {
s += "<i>None</i>\n";
// Methods
- s += QString( "<h2>Methods</h2>\n" );
+ s += TQString( "<h2>Methods</h2>\n" );
if ( !methods.isEmpty() ) {
s += "<table width=\"90%\">";
methods.sort();
- for ( QStringList::Iterator iter = methods.begin(); iter != methods.end(); ++iter ) {
+ for ( TQStringList::Iterator iter = methods.begin(); iter != methods.end(); ++iter ) {
s += "<tr><td><b>";
s += *iter;
s += "(...)</b></td></tr>";
@@ -433,22 +433,22 @@ namespace KJSEmbed {
return s;
}
- QString dumpQObject( KJS::ExecState * /*exec*/, KJS::Object &obj ) {
+ TQString dumpQObject( KJS::ExecState * /*exec*/, KJS::Object &obj ) {
if ( !obj.isValid() )
- return QString( "Invalid object\n" );
+ return TQString( "Invalid object\n" );
- QString s( "" );
+ TQString s( "" );
JSObjectProxy *proxy = JSProxy::toObjectProxy( obj.imp() );
- QObject *qo = proxy ? proxy->object() : 0;
- QMetaObject *mo = qo ? qo->metaObject() : 0;
+ TQObject *qo = proxy ? proxy->object() : 0;
+ TQMetaObject *mo = qo ? qo->metaObject() : 0;
// QObject
if ( proxy ) {
// QProperties
- s += QString( "<h2>Qt Properties</h2>\n" );
+ s += TQString( "<h2>Qt Properties</h2>\n" );
- QStrList propList( mo->propertyNames( true ) );
+ TQStrList propList( mo->propertyNames( true ) );
if ( !propList.isEmpty() ) {
@@ -456,15 +456,15 @@ namespace KJSEmbed {
s += "<tr><th>Type</th><th>Name</th><th>Value</th></tr>\n";
propList.sort();
- for ( QStrListIterator iter( propList ); iter.current(); ++iter ) {
+ for ( TQStrListIterator iter( propList ); iter.current(); ++iter ) {
- QCString name = iter.current();
+ TQCString name = iter.current();
int propid = mo->findProperty( name.data(), true );
if ( propid == -1 )
continue;
- QVariant vl = qo->property( name.data() );
- s += QString( "<tr><td align=\"center\">%1</td><td><b>%2</b></td><td align=\"center\">%3</td></tr>\n" )
+ TQVariant vl = qo->property( name.data() );
+ s += TQString( "<tr><td align=\"center\">%1</td><td><b>%2</b></td><td align=\"center\">%3</td></tr>\n" )
.arg( mo->property( propid, true ) ->type() ).arg( name ).arg( vl.toString() );
}
@@ -474,20 +474,20 @@ namespace KJSEmbed {
}
// Signals
- s += QString( "<h2>Qt Signals</h2>\n" );
+ s += TQString( "<h2>Qt Signals</h2>\n" );
s += "<table width=\"90%\">";
- QStrList signalList( mo->signalNames( true ) );
+ TQStrList signalList( mo->signalNames( true ) );
signalList.sort();
- for ( QStrListIterator iter1( signalList ); iter1.current(); ++iter1 ) {
+ for ( TQStrListIterator iter1( signalList ); iter1.current(); ++iter1 ) {
- QCString name = iter1.current();
- QString nm( name );
+ TQCString name = iter1.current();
+ TQString nm( name );
int signalid = mo->findSignal( name.data(), true );
if ( signalid != -1 )
- s += QString( "<tr><td><b>%1</b></td></tr>\n" ).arg( nm );
+ s += TQString( "<tr><td><b>%1</b></td></tr>\n" ).arg( nm );
}
s += "</table>";
@@ -495,33 +495,33 @@ namespace KJSEmbed {
s += "<i>None</i>";
// Slots
- s += QString( "<h2>Qt Slots</h2>\n" );
+ s += TQString( "<h2>Qt Slots</h2>\n" );
s += "<table width=\"90%\">";
KJS::List items;
- QStrList slotList( mo->slotNames( true ) );
+ TQStrList slotList( mo->slotNames( true ) );
slotList.sort();
- for ( QStrListIterator iter2( slotList ); iter2.current(); ++iter2 ) {
+ for ( TQStrListIterator iter2( slotList ); iter2.current(); ++iter2 ) {
- QCString name = iter2.current();
- QString nm( name );
+ TQCString name = iter2.current();
+ TQString nm( name );
int slotid = mo->findSlot( name.data(), true );
if ( slotid != -1 ) {
const QMetaData * md = mo->slot( slotid, true );
const QUMethod *method = md->method;
if ( method->count && ( method->parameters->inOut == QUParameter::Out ) ) {
- QCString typenm( method->parameters->type->desc() );
+ TQCString typenm( method->parameters->type->desc() );
if ( typenm == "ptr" ) {
- s += QString( "<tr><td>%1</td><td><b>%2</b></td></tr>\n" )
+ s += TQString( "<tr><td>%1</td><td><b>%2</b></td></tr>\n" )
.arg( ( const char * ) method->parameters->typeExtra ).arg( nm );
} else {
- s += QString( "<tr><td>%1</td><td><b>%2</b></td></tr>\n" )
+ s += TQString( "<tr><td>%1</td><td><b>%2</b></td></tr>\n" )
.arg( typenm.data() ).arg( nm );
}
} else
- s += QString( "<tr><td>void</td><td><b>%1</b></td></tr>\n" ).arg( nm );
+ s += TQString( "<tr><td>void</td><td><b>%1</b></td></tr>\n" ).arg( nm );
}
}
@@ -535,44 +535,44 @@ namespace KJSEmbed {
- QPen extractQPen( KJS::ExecState *exec, const KJS::List &args, int idx ) {
- return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toPen() : QPen();
+ TQPen extractQPen( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toPen() : TQPen();
}
- QBrush extractQBrush( KJS::ExecState *exec, const KJS::List &args, int idx ) {
- return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toBrush() : QBrush();
+ TQBrush extractQBrush( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toBrush() : TQBrush();
}
- QFont extractQFont( KJS::ExecState *exec, const KJS::List &args, int idx ) {
- return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toFont() : QFont();
+ TQFont extractQFont( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toFont() : TQFont();
}
- QPixmap extractQPixmap( KJS::ExecState *exec, const KJS::List &args, int idx ) {
- return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toPixmap() : QPixmap();
+ TQPixmap extractQPixmap( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toPixmap() : TQPixmap();
}
- QImage extractQImage( KJS::ExecState *exec, const KJS::List &args, int idx ) {
- return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toImage() : QImage();
+ TQImage extractQImage( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toImage() : TQImage();
}
- QPalette extractQPalette( KJS::ExecState *exec, const KJS::List &args, int idx ) {
- return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toPalette() : QPalette();
+ TQPalette extractQPalette( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toPalette() : TQPalette();
}
- QString extractQString( KJS::ExecState *exec, const KJS::List &args, int idx ) {
- return ( args.size() > idx ) ? args[ idx ].toString( exec ).qstring() : QString::null;
+ TQString extractQString( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ return ( args.size() > idx ) ? args[ idx ].toString( exec ).qstring() : TQString::null;
}
int extractInt( KJS::ExecState *exec, const KJS::List &args, int idx ) {
return ( args.size() > idx ) ? args[ idx ].toInteger( exec ) : 0;
}
- QColor extractQColor( KJS::ExecState *exec, const KJS::List &args, int idx ) {
- return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toColor() : QColor();
+ TQColor extractQColor( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toColor() : TQColor();
}
- QSize extractQSize( KJS::ExecState *exec, const KJS::List &args, int idx ) {
- return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toSize() : QSize();
+ TQSize extractQSize( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toSize() : TQSize();
}
bool extractBool( KJS::ExecState *exec, const KJS::List &args, int idx ) {
@@ -587,8 +587,8 @@ namespace KJSEmbed {
return ( args.size() > idx ) ? args[ idx ].toUInt32( exec ) : 0;
}
- QStringList extractQStringList( KJS::ExecState *exec, const KJS::List &args, int idx ) {
- return ( args.size() > idx ) ? convertArrayToStringList( exec, args[ idx ] ) : QStringList();
+ TQStringList extractQStringList( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ return ( args.size() > idx ) ? convertArrayToStringList( exec, args[ idx ] ) : TQStringList();
}
/**
@@ -628,8 +628,8 @@ namespace KJSEmbed {
return None;
}
- QMap<QString, QVariant> convertArrayToMap( KJS::ExecState *exec, const KJS::Value &value ) {
- QMap<QString, QVariant> returnMap;
+ TQMap<TQString, TQVariant> convertArrayToMap( KJS::ExecState *exec, const KJS::Value &value ) {
+ TQMap<TQString, TQVariant> returnMap;
KJS::Object obj = value.toObject(exec);
// if( obj.className().qstring() == "Array" ) {
KJS::ReferenceList lst = obj.propList(exec,false);
@@ -644,8 +644,8 @@ namespace KJSEmbed {
return returnMap;
}
- QValueList<QVariant> convertArrayToList( KJS::ExecState *exec, const KJS::Value &value ) {
- QValueList<QVariant> returnList;
+ TQValueList<TQVariant> convertArrayToList( KJS::ExecState *exec, const KJS::Value &value ) {
+ TQValueList<TQVariant> returnList;
KJS::Object obj = value.toObject( exec );
if ( obj.className().qstring() == "Array" ) {
int length = obj.get( exec, KJS::Identifier( "length" ) ).toInteger( exec );
@@ -661,8 +661,8 @@ namespace KJSEmbed {
return returnList;
}
- QStringList convertArrayToStringList( KJS::ExecState *exec, const KJS::Value &value ) {
- QStringList returnList;
+ TQStringList convertArrayToStringList( KJS::ExecState *exec, const KJS::Value &value ) {
+ TQStringList returnList;
KJS::Object obj = value.toObject( exec );
if ( obj.className().qstring() == "Array" ) {
int length = obj.get( exec, KJS::Identifier( "length" ) ).toInteger( exec );
@@ -679,8 +679,8 @@ namespace KJSEmbed {
return returnList;
}
/*
- QStringList convertArrayToStringList( KJS::ExecState *exec, const KJS::Value &value ) {
- QStringList returnList;
+ TQStringList convertArrayToStringList( KJS::ExecState *exec, const KJS::Value &value ) {
+ TQStringList returnList;
KJS::Object obj = value.toObject( exec );
if ( obj.className().qstring() == "Array" ) {
@@ -693,9 +693,9 @@ namespace KJSEmbed {
return returnList;
}
*/
- QDateTime convertDateToDateTime( KJS::ExecState *exec, const KJS::Value &value ) {
+ TQDateTime convertDateToDateTime( KJS::ExecState *exec, const KJS::Value &value ) {
KJS::List args;
- QDateTime returnDateTime;
+ TQDateTime returnDateTime;
KJS::Object obj = value.toObject( exec );
if ( obj.className().qstring() == "Date" ) {
@@ -706,8 +706,8 @@ namespace KJSEmbed {
int day = obj.get( exec, KJS::Identifier( "getDate" ) ).toObject( exec ).call( exec, obj, args ).toInteger( exec );
int year = obj.get( exec, KJS::Identifier( "getFullYear" ) ).toObject( exec ).call( exec, obj, args ).toInteger( exec );
- returnDateTime.setDate( QDate( year, month + 1, day ) );
- returnDateTime.setTime( QTime( hours, minutes, seconds ) );
+ returnDateTime.setDate( TQDate( year, month + 1, day ) );
+ returnDateTime.setTime( TQTime( hours, minutes, seconds ) );
} else {
kdWarning() << "convertDateToDateTime() received a " << obj.className().qstring() << " instead of a Date" << endl;
}
@@ -715,32 +715,32 @@ namespace KJSEmbed {
return returnDateTime;
}
- QDateTime extractQDateTime( KJS::ExecState * exec, const KJS::List & args, int idx ) {
- return ( args.size() > idx ) ? convertDateToDateTime( exec, args[ idx ] ) : QDateTime();
+ TQDateTime extractQDateTime( KJS::ExecState * exec, const KJS::List & args, int idx ) {
+ return ( args.size() > idx ) ? convertDateToDateTime( exec, args[ idx ] ) : TQDateTime();
}
- QDate extractQDate( KJS::ExecState * exec, const KJS::List & args, int idx ) {
- return ( args.size() > idx ) ? convertDateToDateTime( exec, args[ idx ] ).date() : QDate();
+ TQDate extractQDate( KJS::ExecState * exec, const KJS::List & args, int idx ) {
+ return ( args.size() > idx ) ? convertDateToDateTime( exec, args[ idx ] ).date() : TQDate();
}
- QTime extractQTime( KJS::ExecState * exec, const KJS::List & args, int idx ) {
- return ( args.size() > idx ) ? convertDateToDateTime( exec, args[ idx ] ).time() : QTime();
+ TQTime extractQTime( KJS::ExecState * exec, const KJS::List & args, int idx ) {
+ return ( args.size() > idx ) ? convertDateToDateTime( exec, args[ idx ] ).time() : TQTime();
}
- QRect extractQRect( KJS::ExecState * exec, const KJS::List & args, int idx ) {
- return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toRect() : QRect();
+ TQRect extractQRect( KJS::ExecState * exec, const KJS::List & args, int idx ) {
+ return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toRect() : TQRect();
}
- QPoint extractQPoint( KJS::ExecState * exec, const KJS::List & args, int idx ) {
- return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toPoint() : QPoint();
+ TQPoint extractQPoint( KJS::ExecState * exec, const KJS::List & args, int idx ) {
+ return ( args.size() > idx ) ? convertToVariant( exec, args[ idx ] ).toPoint() : TQPoint();
}
- QStrList extractQStrList( KJS::ExecState *exec, const KJS::List &args, int idx ) {
- return ( args.size() > idx ) ? convertArrayToStrList( exec, args[ idx ] ) : QStrList();
+ TQStrList extractQStrList( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ return ( args.size() > idx ) ? convertArrayToStrList( exec, args[ idx ] ) : TQStrList();
}
- QStrList convertArrayToStrList( KJS::ExecState *exec, const KJS::Value &value ) {
- QStrList returnList;
+ TQStrList convertArrayToStrList( KJS::ExecState *exec, const KJS::Value &value ) {
+ TQStrList returnList;
KJS::Object obj = value.toObject( exec );
if ( obj.className().qstring() == "Array" ) {
@@ -753,7 +753,7 @@ namespace KJSEmbed {
return returnList;
}
- QObject *extractQObject( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ TQObject *extractQObject( KJS::ExecState *exec, const KJS::List &args, int idx ) {
KJS::Object obj = args[ idx ].toObject( exec );
JSObjectProxy *proxy = JSProxy::toObjectProxy( obj.imp() );
if ( !proxy )
@@ -762,7 +762,7 @@ namespace KJSEmbed {
}
- QWidget *extractQWidget( KJS::ExecState *exec, const KJS::List &args, int idx ) {
+ TQWidget *extractQWidget( KJS::ExecState *exec, const KJS::List &args, int idx ) {
KJS::Object obj = args[ idx ].toObject( exec );
JSObjectProxy *proxy = JSProxy::toObjectProxy( obj.imp() );
if ( !proxy )
@@ -775,7 +775,7 @@ namespace KJSEmbed {
return JSProxy::toOpaqueProxy( obj.imp() );
}
- KJS::Object throwError( KJS::ExecState *exec, const QString &error, KJS::ErrorType type )
+ KJS::Object throwError( KJS::ExecState *exec, const TQString &error, KJS::ErrorType type )
{
int sourceId = exec->context().sourceId();
int startLine = exec->context().curStmtFirstLine();