summaryrefslogtreecommitdiffstats
path: root/kjsembed/jsobjectproxy_imp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjsembed/jsobjectproxy_imp.cpp')
-rw-r--r--kjsembed/jsobjectproxy_imp.cpp138
1 files changed, 69 insertions, 69 deletions
diff --git a/kjsembed/jsobjectproxy_imp.cpp b/kjsembed/jsobjectproxy_imp.cpp
index dc94aa73..5e11e2c3 100644
--- a/kjsembed/jsobjectproxy_imp.cpp
+++ b/kjsembed/jsobjectproxy_imp.cpp
@@ -129,19 +129,19 @@ JSObjectProxyImp::JSObjectProxyImp( KJS::ExecState *exec, int mid, JSObjectProxy
}
JSObjectProxyImp::JSObjectProxyImp( KJS::ExecState *exec,
- int mid, const TQCString &name, JSObjectProxy *parent )
+ int mid, const TTQCString &name, JSObjectProxy *parent )
: JSProxyImp(exec), id(mid), slotname(name), proxy(parent), obj(parent->obj)
{
}
JSObjectProxyImp::JSObjectProxyImp( KJS::ExecState *exec,
- int mid, int sid, const TQCString &name, JSObjectProxy *parent )
+ int mid, int sid, const TTQCString &name, JSObjectProxy *parent )
: JSProxyImp(exec), id(mid), sigid(sid), slotname(name), proxy(parent), obj(parent->obj)
{
}
JSObjectProxyImp::JSObjectProxyImp( KJS::ExecState *exec,
- int mid, const char *ret, int sid, const TQCString &name,
+ int mid, const char *ret, int sid, const TTQCString &name,
JSObjectProxy *parent )
: JSProxyImp(exec), id(mid), rettype(ret), sigid(sid), slotname(name), proxy(parent), obj(parent->obj)
{
@@ -154,14 +154,14 @@ JSObjectProxyImp::JSObjectProxyImp( KJS::ExecState *exec,
KJS::Value JSObjectProxyImp::children( KJS::ExecState *exec, KJS::Object &, const KJS::List & )
{
KJS::List items;
- const TQObjectList *kids = obj->children();
+ const TTQObjectList *kids = obj->children();
if ( kids ) {
- TQObjectList l( *kids );
+ TTQObjectList l( *kids );
for ( uint i = 0 ; i < l.count() ; i++ ) {
- TQObject *child = l.at( i );
- TQCString nm = ( child ? child->name() : "<null>" );
- items.append( KJS::String( TQString(nm) ) );
+ TTQObject *child = l.at( i );
+ TTQCString nm = ( child ? child->name() : "<null>" );
+ items.append( KJS::String( TTQString(nm) ) );
}
}
@@ -171,15 +171,15 @@ KJS::Value JSObjectProxyImp::children( KJS::ExecState *exec, KJS::Object &, cons
KJS::Value JSObjectProxyImp::properties( KJS::ExecState *exec, KJS::Object &, const KJS::List & )
{
KJS::List items;
- TQMetaObject *mo = obj->metaObject();
- TQStrList propList( mo->propertyNames( true ) );
+ TTQMetaObject *mo = obj->metaObject();
+ TTQStrList propList( mo->propertyNames( true ) );
- for ( TQStrListIterator iter(propList); iter.current(); ++iter ) {
+ for ( TTQStrListIterator iter(propList); iter.current(); ++iter ) {
- TQCString name = iter.current();
+ TTQCString name = iter.current();
int propid = mo->findProperty( name.data(), true );
if ( propid != -1 ) {
- items.append( KJS::String( TQString(name) ) );
+ items.append( KJS::String( TTQString(name) ) );
}
}
@@ -215,7 +215,7 @@ KJS::Value JSObjectProxyImp::call( KJS::ExecState *exec, KJS::Object &self, cons
switch( id ) {
case MethodParent:
{
- TQObject *po = obj->parent();
+ TTQObject *po = obj->parent();
if ( po && proxy->securityPolicy()->isObjectAllowed( proxy, po ) )
return proxy->part()->factory()->createProxy( exec, po, proxy );
@@ -224,7 +224,7 @@ KJS::Value JSObjectProxyImp::call( KJS::ExecState *exec, KJS::Object &self, cons
break;
case MethodChildCount:
{
- const TQObjectList *kids = obj->children();
+ const TTQObjectList *kids = obj->children();
return kids ? KJS::Number( kids->count() ) : KJS::Number(0);
}
break;
@@ -295,16 +295,16 @@ KJS::Value JSObjectProxyImp::call( KJS::ExecState *exec, KJS::Object &self, cons
KJS::Value JSObjectProxyImp::signalz( KJS::ExecState *exec, KJS::Object &, const KJS::List & )
{
KJS::List items;
- TQMetaObject *mo = obj->metaObject();
- TQStrList signalList( mo->signalNames( true ) );
+ TTQMetaObject *mo = obj->metaObject();
+ TTQStrList signalList( mo->signalNames( true ) );
- for ( TQStrListIterator iter(signalList); iter.current(); ++iter ) {
+ for ( TTQStrListIterator iter(signalList); iter.current(); ++iter ) {
- TQCString name = iter.current();
- TQString nm( name );
+ TTQCString name = iter.current();
+ TTQString nm( name );
int signalid = mo->findSignal( name.data(), true );
- if ( (signalid != -1) && (mo->signal( signalid, true )->access == QMetaData::Public) )
+ if ( (signalid != -1) && (mo->signal( signalid, true )->access == TQMetaData::Public) )
items.append( KJS::String(nm) );
}
@@ -314,16 +314,16 @@ KJS::Value JSObjectProxyImp::signalz( KJS::ExecState *exec, KJS::Object &, const
KJS::Value JSObjectProxyImp::slotz( KJS::ExecState *exec, KJS::Object &, const KJS::List & )
{
KJS::List items;
- TQMetaObject *mo = obj->metaObject();
- TQStrList slotList( mo->slotNames( true ) );
+ TTQMetaObject *mo = obj->metaObject();
+ TTQStrList slotList( mo->slotNames( true ) );
- for ( TQStrListIterator iter(slotList); iter.current(); ++iter ) {
+ for ( TTQStrListIterator iter(slotList); iter.current(); ++iter ) {
- TQCString name = iter.current();
- TQString nm( name );
+ TTQCString name = iter.current();
+ TTQString nm( name );
int slotid = mo->findSlot( name.data(), true );
- if ( (slotid != -1) && (mo->slot( slotid, true )->access == QMetaData::Public) )
+ if ( (slotid != -1) && (mo->slot( slotid, true )->access == TQMetaData::Public) )
items.append( KJS::String(nm) );
}
@@ -341,12 +341,12 @@ KJS::Boolean JSObjectProxyImp::connect( KJS::ExecState *exec,
// Source object and signal
JSObjectProxy *sendproxy = JSProxy::toObjectProxy( args[0].imp() );
- TQObject *sender = sendproxy ? sendproxy->object() : 0;
- TQString sig = args[1].toString(exec).qstring();
+ TTQObject *sender = sendproxy ? sendproxy->object() : 0;
+ TTQString sig = args[1].toString(exec).qstring();
kdDebug( 80001 ) << "connecting C++ signal" << sig << endl;
// Receiver and slot/signal
KJS::Object recvObj;
- TQString dest;
+ TTQString dest;
if ( args.size() == 3 ) {
recvObj = self.toObject(exec);
dest = args[2].toString(exec).qstring();
@@ -359,7 +359,7 @@ KJS::Boolean JSObjectProxyImp::connect( KJS::ExecState *exec,
// Try to connect to C++ slot
JSObjectProxy *recvproxy = JSProxy::toObjectProxy( recvObj.imp() );
if ( recvproxy ) {
- TQObject *recv = recvproxy ? recvproxy->object() : 0;
+ TTQObject *recv = recvproxy ? recvproxy->object() : 0;
bool ok = JSSlotUtils::connect( sender, sig.ascii(), recv, dest.ascii() );
if ( ok )
return KJS::Boolean(true);
@@ -368,8 +368,8 @@ KJS::Boolean JSObjectProxyImp::connect( KJS::ExecState *exec,
return connect( sender, sig.ascii(), recvObj, dest );
}
-KJS::Boolean JSObjectProxyImp::connect( TQObject *sender, const char *sig,
- const KJS::Object &recv, const TQString &dest )
+KJS::Boolean JSObjectProxyImp::connect( TTQObject *sender, const char *sig,
+ const KJS::Object &recv, const TTQString &dest )
{
kdDebug(80001) << "Trying signature '" << sig << "'." << endl;
// Try to connect to JS method
@@ -409,28 +409,28 @@ KJS::Boolean JSObjectProxyImp::connect( TQObject *sender, const char *sig,
ok = JSSlotUtils::connect( sender, sig, slotp, "slot_double(double)" );
break;
case JSSlotUtils::SignatureString:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_string(const TQString&)" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_string(const TTQString&)" );
break;
case JSSlotUtils::SignatureCString:
ok = JSSlotUtils::connect( sender, sig, slotp, "slot_charstar(const char*)" );
break;
case JSSlotUtils::SignatureColor:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_color(const TQColor&)" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_color(const TTQColor&)" );
break;
case JSSlotUtils::SignatureFont:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_font(const TQFont&)" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_font(const TTQFont&)" );
break;
case JSSlotUtils::SignaturePoint:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_point(const TQPoint&)" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_point(const TTQPoint&)" );
break;
case JSSlotUtils::SignatureRect:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_rect(const TQRect&)" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_rect(const TTQRect&)" );
break;
case JSSlotUtils::SignatureSize:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_size(const TQSize&)" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_size(const TTQSize&)" );
break;
case JSSlotUtils::SignaturePixmap:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_pixmap(const TQPixmap&)" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_pixmap(const TTQPixmap&)" );
break;
case JSSlotUtils::SignatureURL:
ok = JSSlotUtils::connect( sender, sig, slotp, "slot_url(const KURL&)" );
@@ -446,29 +446,29 @@ KJS::Boolean JSObjectProxyImp::connect( TQObject *sender, const char *sig,
break;
case JSSlotUtils::SignatureDate:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_date(const TQDate&)" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_date(const TTQDate&)" );
break;
case JSSlotUtils::SignatureTime:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_time(const TQTime&)" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_time(const TTQTime&)" );
break;
case JSSlotUtils::SignatureDateTime:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_datetime(const TQDateTime&)" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_datetime(const TTQDateTime&)" );
break;
case JSSlotUtils::SignatureImage:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_image(const TQImage&)" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_image(const TTQImage&)" );
break;
- case JSSlotUtils::SignatureQWidget:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_widget(TQWidget*)" );
+ case JSSlotUtils::SignatureTQWidget:
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_widget(TTQWidget*)" );
break;
case JSSlotUtils::SignatureDateDate:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_datedate(const TQDate&, const TQDate& )" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_datedate(const TTQDate&, const TTQDate& )" );
break;
case JSSlotUtils::SignatureColorString:
- ok = JSSlotUtils::connect( sender, sig, slotp, "slot_colorstring(const TQColor&, const TQString&)" );
+ ok = JSSlotUtils::connect( sender, sig, slotp, "slot_colorstring(const TTQColor&, const TTQString&)" );
break;
case JSSlotUtils::SignatureCustom:
{
- TQString mangledSig = sig;
+ TTQString mangledSig = sig;
mangledSig.remove(' ')
.remove("const")
.remove('&')
@@ -501,12 +501,12 @@ KJS::Boolean JSObjectProxyImp::disconnect( KJS::ExecState *exec, KJS::Object &se
// Source object and signal
JSObjectProxy *sendproxy = JSProxy::toObjectProxy( args[0].imp() );
- TQObject *sender = sendproxy ? sendproxy->object() : 0;
- TQString sig = args[1].toString(exec).qstring();
+ TTQObject *sender = sendproxy ? sendproxy->object() : 0;
+ TTQString sig = args[1].toString(exec).qstring();
// Receiver and slot/signal
- TQObject *recv=0;
- TQString dest;
+ TTQObject *recv=0;
+ TTQString dest;
if ( args.size() == 3 ) {
JSObjectProxy *recvproxy = JSProxy::toObjectProxy( self.imp() );
recv = recvproxy ? recvproxy->object() : 0;
@@ -530,7 +530,7 @@ KJS::Value JSObjectProxyImp::getParentNode( KJS::ExecState *exec, KJS::Object &,
if ( args.size())
return KJS::Null();
- TQObject *parent = obj->parent();
+ TTQObject *parent = obj->parent();
if ( parent && proxy->securityPolicy()->isObjectAllowed( proxy, parent ) )
return proxy->part()->factory()->createProxy( exec, parent, proxy );
@@ -542,12 +542,12 @@ KJS::Value JSObjectProxyImp::getElementById( KJS::ExecState *exec, KJS::Object &
if ( !args.size() )
return KJS::Null();
- const TQObjectList *kids = obj->children();
+ const TTQObjectList *kids = obj->children();
if ( !kids )
return KJS::Null();
- TQObjectList l( *kids );
- TQObject *child = 0;
+ TTQObjectList l( *kids );
+ TTQObject *child = 0;
if ( args[0].isA( KJS::NumberType ) ) {
uint i = args[0].toUInt32( exec );
@@ -558,7 +558,7 @@ KJS::Value JSObjectProxyImp::getElementById( KJS::ExecState *exec, KJS::Object &
child = l.at( i );
}
else {
- TQString s = args[0].toString( exec ).qstring();
+ TTQString s = args[0].toString( exec ).qstring();
child = obj->child( s.ascii() );
}
@@ -580,8 +580,8 @@ KJS::Value JSObjectProxyImp::hasAttribute( KJS::ExecState *exec, KJS::Object &,
if ( !args.size() )
return KJS::Null();
- TQMetaObject *meta = obj->metaObject();
- TQString s = args[0].toString(exec).qstring();
+ TTQMetaObject *meta = obj->metaObject();
+ TTQString s = args[0].toString(exec).qstring();
if ( meta->findProperty( s.ascii(), true ) != -1 )
return KJS::Boolean(true);
else
@@ -592,20 +592,20 @@ KJS::Value JSObjectProxyImp::getAttribute( KJS::ExecState *exec, KJS::Object &,
{
if ( !args.size() )
{
- TQString msg = i18n( "No property was defined." );
+ TTQString msg = i18n( "No property was defined." );
return throwError(exec, msg);
}
- TQMetaObject *meta = obj->metaObject();
- TQString s = args[0].toString(exec).qstring();
+ TTQMetaObject *meta = obj->metaObject();
+ TTQString s = args[0].toString(exec).qstring();
kdDebug(80001) << "Get property " << s << " from " << obj->name() << endl;
if ( meta->findProperty( s.ascii(), true ) == -1 )
{
- TQString msg = i18n( "Property '%1' could not be found." ).arg( s );
+ TTQString msg = i18n( "Property '%1' could not be found." ).arg( s );
return throwError(exec, msg,KJS::ReferenceError);
}
- TQVariant val = obj->property( s.ascii() );
+ TTQVariant val = obj->property( s.ascii() );
return convertToValue( exec, val );
}
@@ -614,16 +614,16 @@ KJS::Value JSObjectProxyImp::setAttribute( KJS::ExecState *exec, KJS::Object &,
if ( args.size() != 2 )
return KJS::Boolean(false);
- TQMetaObject *meta = obj->metaObject();
- TQString s = args[0].toString(exec).qstring();
+ TTQMetaObject *meta = obj->metaObject();
+ TTQString s = args[0].toString(exec).qstring();
if ( meta->findProperty( s.ascii(), true ) == -1 )
{
- TQString msg = i18n( "Property '%1' could not be found." ).arg( s );
+ TTQString msg = i18n( "Property '%1' could not be found." ).arg( s );
return throwError(exec, msg,KJS::GeneralError);
}
kdDebug(80001) << "Set property " << s << " from " << obj->name() << endl;
- TQVariant val = convertToVariant( exec, args[1] );
+ TTQVariant val = convertToVariant( exec, args[1] );
bool ok = obj->setProperty( s.ascii(), val );
return KJS::Boolean(ok);